text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
I'm trying to write a python driver for RFID-230-2 card reader. As the document says, in order to communicate with the device, one has to make a packet in the format below: |STX|ADDR|LEN|CMD/STU|DATA|BCC| STX: Communication start character, 1 byte, 0x02 ADDR: Device Addr, 1 byte, 0 can be used in any addr LEN: Data length, 1 byte, data length of CMD/STU+DATA CMD/STU: Command byte (Host->Reader) or Status byte (Reader->Host), 1byte DATA: Data information, byte is not specified. Can be not existed BCC: Section checking character, 1 byte, the XOR value of all the bytes except STX, BCC CMD 0x38 DATA STX = 0x02 REQUEST_FORMAT = 'bbbbbb' def communicate(self, command, data): address = 0x0 length = 1 + len(str(data)) + len(str(command)) bcc = address ^ length ^ command i = struct.pack(REQUEST_FORMAT, STX, address, length, command, data, bcc) ser = serial.Serial('/dev/ttyUSB0', 9600) ser.write(i) time.sleep(.1) resp = ser.read() resp = ser.read() Request Card Parameter Card Series No. communicate(0x33, [0x93, 1487824920]) File "main.py", line 21, in communicate i = struct.pack('BBBB%sBB' % len(data), STX, address, length, command, *(data + [bcc])) struct.error: ubyte format requires 0 <= number <= 255 a = binascii.hexlify(data) card_series = int(a, 16) There are a couple of issues with your approach. Firstly the BCC computation should include the data bytes. Secondly, data bytes depend on which command is being used, so if there are not any present, for example with the get version command, the format needs to be modified. I suggest your first command should be to get the version number. This will help you to prove that it is working correctly: import binascii import struct STX = 0x02 def communicate(command, data=[]): address = 0x0 length = 1 + len(data) bcc = address ^ length ^ command for b in data: bcc ^= b if len(data): i = struct.pack('BBBB{}BB'.format(len(data)), STX, address, length, command, *(data + [bcc])) else: i = struct.pack('BBBBB'.format(len(data)), STX, address, length, command, bcc) # Display the command to be sent in hex print binascii.b2a_hex(i) ser = serial.Serial('/dev/ttyUSB0', 9600) ser.write(i) time.sleep(.1) resp = ser.read() print binascii.b2a_hex(resp) # display response communicate(0x21) # Get version number communicate(0x23, [0]) # Set baud rate of device to 9600 To pass more data bytes, add more numbers to the list.
https://codedump.io/share/OO0zF4RBgwNk/1/trying-to-figure-out-block-data
CC-MAIN-2017-39
refinedweb
397
57.57
Introduction The entire LLDB API is available as Python functions through a script bridging interface. This means the LLDB API's can be used directly from python either interactively or to build python apps that provide debugger features. Additionally, Python can be used as a programmatic interface within the lldb command interpreter (we refer to this for brevity as the embedded interpreter). Of course, in this context it has full access to the LLDB API - with some additional conveniences we will call out in the FAQ. Documentation The LLDB API is contained in a python module named lldb. A useful resource when writing Python extensions is the lldb Python classes reference guide. The documentation is also accessible in an interactive debugger session with the following command: (lldb) script help(lldb) Help on package lldb: NAME lldb - The lldb module contains the public APIs for Python binding. FILE /System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/__init__.py DESCRIPTION ... You can also get help using a module class name. The full API that is exposed for that class will be displayed in a man page style window. Below we want to get help on the lldb.SBFrame class: (lldb) script help(lldb.SBFrame) Help on class SBFrame in module lldb: class SBFrame(__builtin__.object) | Represents one of the stack frames associated with a thread. | SBThread contains SBFrame(s). For example (from test/lldbutil.py), | | def print_stacktrace(thread, string_buffer = False): | '''Prints a simple stack trace of this thread.''' | ... Or you can get help using any python object, here we use the lldb.process object which is a global variable in the lldb module which represents the currently selected process: (lldb) script help(lldb.process) Help on SBProcess in module lldb object: class SBProcess(__builtin__.object) | Represents the process associated with the target program. | | SBProcess supports thread iteration. For example (from test/lldbutil.py), | | # ================================================== | # Utility functions related to Threads and Processes | # ================================================== | ... Embedded Python Interpreter The embedded python interpreter can be accessed in a variety of ways from within LLDB. The easiest way is to use the lldb command script with no arguments at the lldb command prompt: (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> 2+3 5 >>> hex(12345) '0x3039' >>> This drops you into the embedded python interpreter. When running under the script command, lldb sets some convenience variables that give you quick access to the currently selected entities that characterize the program and debugger state. In each case, if there is no currently selected entity of the appropriate type, the variable's IsValid method will return false. These variables are: While extremely convenient, these variables have a couple caveats that you should be aware of. First of all, they hold the values of the selected objects on entry to the embedded interpreter. They do not update as you use the LLDB API's to change, for example, the currently selected stack frame or thread. Moreover, they are only defined and meaningful while in the interactive Python interpreter. There is no guarantee on their value in any other situation, hence you should not use them when defining Python formatters, breakpoint scripts and commands (or any other Python extension point that LLDB provides). As a rationale for such behavior, consider that lldb can run in a multithreaded environment, and another thread might call the "script" command, changing the value out from under you. To get started with these objects and LLDB scripting, please note that almost all of the lldb Python objects are able to briefly describe themselves when you pass them to the Python print function: (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> print lldb.debugger Debugger (instance: "debugger_1", id: 1) >>> print lldb.target a.out >>> print lldb.process SBProcess: pid = 59289, state = stopped, threads = 1, executable = a.out >>> print lldb.thread SBThread: tid = 0x1f03 >>> print lldb.frame frame #0: 0x0000000100000bb6 a.out main + 54 at main.c:16 Running a Python script when a breakpoint gets hit One very powerful use of the lldb Python API is to have a python script run when a breakpoint gets hit. Adding python scripts to breakpoints provides a way to create complex breakpoint conditions and also allows for smart logging and data gathering. When your process hits a breakpoint to which you have attached some python code, the code is executed as the body of a function which takes three arguments: def breakpoint_function_wrapper(frame, bp_loc, dict): # Your code goes here Optionally, a Python breakpoint command can return a value. Returning False tells LLDB that you do not want to stop at the breakpoint. Any other return value (including None or leaving out the return statement altogether) is akin to telling LLDB to actually stop at the breakpoint. This can be useful in situations where a breakpoint only needs to stop the process when certain conditions are met, and you do not want to inspect the program state manually at every stop and then continue. An example will show how simple it is to write some python code and attach it to a breakpoint. The following example will allow you to track the order in which the functions in a given shared library are first executed during one run of your program. This is a simple method to gather an order file which can be used to optimize function placement within a binary for execution locality. We do this by setting a regular expression breakpoint that will match every function in the shared library. The regular expression '.' will match any string that has at least one character in it, so we will use that. This will result in one lldb.SBBreakpoint object that contains an lldb.SBBreakpointLocation object for each function. As the breakpoint gets hit, we use a counter to track the order in which the function at this particular breakpoint location got hit. Since our code is passed the location that was hit, we can get the name of the function from the location, disable the location so we won't count this function again; then log some info and continue the process. Note we also have to initialize our counter, which we do with the simple one-line version of the script command. Here is the code: (lldb) breakpoint set --func-regex=. --shlib=libfoo.dylib Breakpoint created: 1: regex = '.', module = libfoo.dylib, locations = 223 (lldb) script counter = 0 (lldb) breakpoint command add --script-type python 1 Enter your Python command(s). Type 'DONE' to end. > # Increment our counter. Since we are in a function, this must be a global python variable > global counter > counter += 1 > # Get the name of the function > name = frame.GetFunctionName() > # Print the order and the function name > print '[%i] %s' % (counter, name) > # Disable the current breakpoint location so it doesn't get hit again > bp_loc.SetEnabled(False) > # No need to stop here > return False > DONE The breakpoint command add command above attaches a python script to breakpoint 1. To remove the breakpoint command: (lldb) breakpoint command delete 1 Using the Python API's to create custom stepping logic A slightly esoteric use of the Python API's is to construct custom stepping types. LLDB's stepping is driven by a stack of "thread plans" and a fairly simple state machine that runs the plans. You can create a Python class that works as a thread plan, and responds to the requests the state machine makes to run its operations. There is a longer discussion of scripted thread plans and the state machine, and several interesting examples of their use in:scripted_step.py And for a MUCH fuller discussion of the whole state machine, see:ThreadPlan.h If you are reading those comments it is useful to know that scripted thread plans are set to be "MasterPlans", and not "OkayToDiscard". To implement a scripted step, you define a python class that has the following methods: To use this class to implement a step, use the command: (lldb) thread step-scripted -C MyModule.MyStepPlanClass Or use the SBThread.StepUsingScriptedThreadPlan API. The SBThreadPlan passed into your __init__ function can also push several common plans (step in/out/over and run-to-address) in front of itself on the stack, which can be used to compose more complex stepping operations. When you use subsidiary plans your explains_stop and should_stop methods won't get called until the subsidiary plan is done, or the process stops for an event the subsidiary plan doesn't explain. For instance, step over plans don't explain a breakpoint hit while performing the step-over. Create a new LLDB command using a python function Python functions can be used to create new LLDB command interpreter commands, which will work like all the natively defined lldb commands. This provides a very flexible and easy way to extend LLDB to meet your debugging requirements. To write a python function that implements a new LLDB command define the function to take four arguments as follows: Optionally, you can also provide a Python docstring, and LLDB will use it when providing help for your command, as in:Optionally, you can also provide a Python docstring, and LLDB will use it when providing help for your command, as in:def command_function(debugger, command, result, internal_dict): # Your code goes here Starting with SVN revision 218834, LLDB Python commands can also take an SBExecutionContext as an argument. This is useful in cases where the command's notion of where to act is independent of the currently-selected entities in the debugger.Starting with SVN revision 218834, LLDB Python commands can also take an SBExecutionContext as an argument. This is useful in cases where the command's notion of where to act is independent of the currently-selected entities in the debugger.def command_function(debugger, command, result, internal_dict): """This command takes a lot of options and does many fancy things""" # Your code goes here This feature is enabled if the command-implementing function can be recognized as taking 5 arguments, or a variable number of arguments, and it alters the signature as such: def command_function(debugger, command, exe_ctx, result, internal_dict): # Your code goes here Starting with SVN revision 232224, Python commands can also be implemented by means of a class which should implement the following interface: class CommandObjectType:[1] This method is optional. def __init__(self, debugger, session_dict): this call should initialize the command with respect to the command interpreter for the passed-in debugger def __call__(self, debugger, command, exe_ctx, result): this is the actual bulk of the command, akin to Python command functions def get_short_help(self): this call should return the short help text for this command[1] def get_long_help(self): this call should return the long help text for this command[1] As a convenience, you can treat the result object as a Python file object, and say SBCommandReturnObject and SBStream both support this file-like behavior by providing write() and flush() calls at the Python layer. print >>result, "my command does lots of cool stuff" One other handy convenience when defining lldb command-line commands is the command command script import which will import a module specified by file path - so you don't have to change your PYTHONPATH for temporary scripts. It also has another convenience that if your new script module has a function of the form: def __lldb_init_module(debugger, internal_dict): # Command Initialization code goes here where debugger and internal_dict are as above, that function will get run when the module is loaded allowing you to add whatever commands you want into the current debugger. Note that this function will only be run when using the LLDB command command script import, it will not get run if anyone imports your module from another module. If you want to always run code when your module is loaded from LLDB or when loaded via an import statement in python code you can test the lldb.debugger object, since you imported the: A commonly required facility is being able to create a command that does some token substitution, and then runs a different debugger command (usually, it po'es the result of an expression evaluated on its argument). For instance, given the following program: if __name__ == '__main__': # Create a new debugger instance in your module if your module # can be run from the command line. When we run a script from # the command line, we won't have any debugger object in # lldb.debugger, so we can just create it if it will be needed lldb.debugger = lldb.SBDebugger.Create() elif lldb.debugger: # Module is being run inside the LLDB interpreter lldb.debugger.HandleCommand('command script add -f ls.ls ls') print 'The "ls" python command has been installed and is ready for use.' #!/usr/bin/python import lldb import commands import optparse import shlex def ls(debugger, command, result, internal_dict): print >>result, (commands.getoutput('/bin/ls %s' % command)) # And the initialization code to add your commands def __lldb_init_module(debugger, internal_dict): debugger.HandleCommand('command script add -f ls.ls ls') print 'The "ls" python command has been installed and is ready for use.' % lldb (lldb) command script import ~/ls.py The "ls" python command has been installed and is ready for use. (lldb) ls -l /tmp/ total 365848 -rw-r--r--@ 1 someuser wheel 6148 Jan 19 17:27 .DS_Store -rw------- 1 someuser wheel 7331 Jan 19 15:37 crash.log you may want a pofoo X command, that equates po [ModifyString(X) capitalizedString]. The following debugger interaction shows how to achieve that goal: #import <Foundation/Foundation.h> NSString* ModifyString(NSString* src) { return [src stringByAppendingString:@"foobar"]; } int main() { NSString* aString = @"Hello world"; NSString* anotherString = @"Let's be friends"; return 1; } (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> def pofoo_funct(debugger, command, result, internal_dict): ... cmd = "po [ModifyString(" + command + ") capitalizedString]" ... lldb.debugger.HandleCommand(cmd) ... >>> ^D (lldb) command script add pofoo -f pofoo_funct (lldb) pofoo aString $1 = 0x000000010010aa00 Hello Worldfoobar (lldb) pofoo anotherString $2 = 0x000000010010aba0 Let's Be Friendsfoobar:cmdtemplate.py A commonly required facility is being able to create a command that does some token substitution, and then runs a different debugger command (usually, it po'es the result of an expression evaluated on its argument). For instance, given the following program: Using the lldb.py module in python LLDB has all of its core code build into a shared library which gets used by the lldb command line application. On Mac OS X this shared library is a framework: LLDB.framework and on other unix variants the program is a shared library: lldb.so. LLDB also provides an lldb.py module that contains the bindings from LLDB into Python. To use the LLDB.framework to create your own stand-alone python programs, you will need to tell python where to look in order to find this module. This is done by setting the PYTHONPATH environment variable, adding a path to the directory that contains the lldb.py python module. On Mac OS X, this is contained inside the LLDB.framework, so you would do: For csh and tcsh: % setenv PYTHONPATH /Developer/Library/PrivateFrameworks/LLDB.framework/Resources/Python For sh and bash: % export PYTHONPATH=/Developer/Library/PrivateFrameworks/LLDB.framework/Resources/Python Alternately, you can append the LLDB Python directory to the sys.path list directly in your Python code before importing the lldb module. Now your python scripts are ready to import the lldb module. Below is a python script that will launch a program from the current working directory called "a.out", set a breakpoint at "main", and then run and hit the breakpoint, and print the process, thread and frame objects if the process stopped: #!/usr/bin/python import lldb import os def disassemble_instructions(insts): for i in insts: print i # Set the path to the executable to debug exe = "./a.out" # Create a new debugger instance debugger = lldb.SBDebugger.Create() # When we step or continue, don't return from the function until the process # stops. Otherwise we would have to handle the process events ourselves which, while doable is #a little tricky. We do this by setting the async mode to false. debugger.SetAsync (False) # Create a target from a file and arch print "Creating a target for '%s'" % exe target = debugger.CreateTargetWithFileAndArch (exe, lldb.LLDB_ARCH_DEFAULT) if target: # If the target is valid set a breakpoint at main main_bp = target.BreakpointCreateByName ("main", target.GetExecutable().GetFilename()); print main_bp # Launch the process. Since we specified synchronous mode, we won't return # from this function until we hit the breakpoint at main process = target.LaunchSimple (None, None, os.getcwd()) # Make sure the launch went ok if process: # Print some simple process info state = process.GetState () print process if state == lldb.eStateStopped: # Get the first thread thread = process.GetThreadAtIndex (0) if thread: # Print some simple thread info print thread # Get the first frame frame = thread.GetFrameAtIndex (0) if frame: # Print some simple frame info print frame function = frame.GetFunction() # See if we have debug info (a function) if function: # We do have a function, print some info for the function print function # Now get all instructions for this function and print them insts = function.GetInstructions(target) disassemble_instructions (insts) else: # See if we have a symbol in the symbol table for where we stopped symbol = frame.GetSymbol(); if symbol: # We do have a symbol, print some info for the symbol print symbol
http://lldb.llvm.org/python-reference.html
CC-MAIN-2017-34
refinedweb
2,894
62.27
Gestus 0.3.4 Django application to manage some datas about Emencia client websites Gestus is a Django app to collect and store datas about our Website projects at Emencia. Although there is the Django admin to manage the Gestus objects, there is also a REST part which is used to create and update Website datas with a client. Introduction Gestus will store some datas about your project : - Its name and a description; - Its kind of environnement (integration or production); - Its server hostname; - The URL where the website project is published; - A list of installed packages with their version; Require - djangorestframework >= 2.3 Install Add PO Projects to your installed apps in settings : INSTALLED_APPS = ( ... 'gestus' 'rest_framework' ... ) Then add the djangorestframework settings : REST_FRAMEWORK = { 'PAGINATE_BY': 10, #.IsAdminUser', #'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly', ), } Finally mount its urls in your main urls.py : urlpatterns = patterns('', ... (r'^gestus/', include('gestus.urls', namespace='gestus')), (r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), ... ) External API access With djangorestframework a rest API will be available on : /gestus/rest/ It is browsable for authenticated users with admin rights (is_staff on True), also the client will need to access to the API with an user accounts with the admin rights. Gestus-client is client to use the API from your project. --0.3.4.xml
https://pypi.python.org/pypi/Gestus
CC-MAIN-2018-13
refinedweb
213
51.89
20 December 2012 18:32 [Source: ICIS news] (updates with Canadian and Mexican data) HOUSTON (ICIS)--Chemical shipments on Canadian railroads fell by 2.2% year on year for the week ended 15 December, marking their 37th decline so far this year, according to data released by a rail industry association on Thursday. Canadian chemical railcar loadings for the week totalled 10,400, compared with 10,632 in the same week in 2011, the Association of American Railroads (AAR) said. The previous week, ended 8 December, saw 6.3% year-on-year increase, following three 15 December, Canadian chemical railcar loadings were down by 5.7% year on year to 522,307. The AAR said weekly chemical railcar traffic in ?xml:namespace> US chemical railcar traffic rose by 1.9% year on year in the week ended 15 December to 28,966 railcar loadings - the fourth increase in a row. In the previous week, ended 8 December, US weekly chemical railcar loadings rose by 5.0%. From 1 January to 15 December, US chemical railcar loadings were down by 0.8% compared with the corresponding period of last year to 1,478,873. Meanwhile, overall US weekly railcar loadings for the week ended 15 December in the freight commodity groups tracked by the AAR fell by 3.9% year on year to 292,640
http://www.icis.com/Articles/2012/12/20/9626387/canada-chemical-railcar-traffic-falls-2.2-year-on-year.html
CC-MAIN-2014-10
refinedweb
224
56.66
Just curious as to how this would work. This is what I have come up with so far. Can't get this to work. THere are only 4 errors:Can't get this to work. THere are only 4 errors:Code:#include <iostream> using namespace std; int main() { int dailysum,costofUpkeep,cash_made,weeklysum; char timecheck[10]; cout <<"How often would you like to check your machines?" <<endl; cin.getline(timecheck,10) enum time {"daily","weekly","monthly","yearly"} switch((!strcmp(time,timecheck)) { case 0: dailysum=costofUpkeep-cash_made; cout <<dailysum; break; case 1: weeklysum = (cash_made * 7)-costofUpkeep; cout <<weeklysum; } } parse, syntax, and At Global
https://cboard.cprogramming.com/cplusplus-programming/43646-using-strcmp-enumerations.html
CC-MAIN-2017-13
refinedweb
102
59.7
How to Integrate Spring Boot and Apache Camel How to Integrate Spring Boot and Apache Camel Spring Boot and Apache Camel have both made developers' lives a lot easier. When integrated, they can be great resource. Join the DZone community and get the full member experience.Join For Free Spring Boot has really made developers' lives easier. Spring Boot's starters and auto-configurators reduce a lot of burden on developers. Another nice integration framework is Apache Camel, which provided abstraction over different technologies. In this article, we'll learn how to integrate Spring Boot and Apache Camel. Spring Boot projects can be created in two ways. One is through Spring Boot Intitializr (which we are doing here) and the other is through the STS Plugin for Eclipse. When you enter the Spring Initializr website, you'll be greeted with the interface below. Choose the build tool. You can choose either Maven or Gradle. I'm choosing Maven. Choose the Spring Boot version. Generally, it'll be auto-selected to stabilize the latest release. Provide the Group ID and Artifact ID for your project. Choose your starters. This is the most important step! Type "web" in the text box and select Web, then type "Camel select apache camel." Intializr will automatically select the required dependencies for you. Click Generate Project, and then you'll get a ZIP file. After the ZIP downloads, extract the ZIP file and fire up Eclipse import as a Maven project. When the import process completes, Spring starters will help Maven download all the required dependencies for Camel. Now, let's get our hands dirty. Create a RestController for invoking the Camel route: package com.dzone.sboot.camel.controllers; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class CamelController { @Autowired ProducerTemplate producerTemplate; @RequestMapping(value = "/") public void startCamel() { producerTemplate.sendBody("direct:firstRoute", "Calling via Spring Boot Rest Controller"); } } Here, we're calling firstRoute and sending the body "Calling via Spring Boot Rest Controller" using ProducerTemplate . Let's create a component class for placing Camel Routes: package com.dzone.sboot.camel.routes; import org.apache.camel.builder.RouteBuilder; import org.springframework.stereotype.Component; @Component public class CamelRoutes extends RouteBuilder { @Override public void configure() throws Exception { from("direct:firstRoute") .log("Camel body: ${body}"); } } The specialty of Camel starter is that it'll auto-wire the Camel context and auto-detect all of the Camel routes in our application. You already have a main method, which was created by Intializr: package com.dzone.sboot.camel; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootCamelIntegrationApplication { public static void main(String[] args) { SpringApplication.run(SpringBootCamelIntegrationApplication.class, args); } } Now, right-click on your project and then click on Run As > Spring Boot Application. When that application starts, hit. Viola! You'll see the body that we sent from Spring Rest Controller in the console: This is the doorstep application to Spring Boot and Camel. You can do a lot of things with both the technologies. If you have any queries, please feel free to reach out to me. Feel free to check it out on GitHub, too. Opinions expressed by DZone contributors are their own. {{ parent.title || parent.header.title}} {{ parent.tldr }} {{ parent.linkDescription }}{{ parent.urlSource.name }}
https://dzone.com/articles/how-to-integrate-spring-boot-and-apache-camel
CC-MAIN-2019-47
refinedweb
565
52.76
Do you want to learn how to load a xib file to create a custom view object? Well, this UIKit tutorial is just for you written in Swift. I already have a comprehensive guide about initializing views and controllers, but that one lacks a very special case: creating a custom view using interface builder. 🤷♂️ Using the contents of a xib file is a pretty damn easy task to do. You can use the following two methods to load the contents (aka. the view hierarchy) of the file. let view = UINib(nibName: "CustomView", bundle: .main).instantiate(withOwner: nil, options: nil).first as! UIView // let view = Bundle.main.loadNibNamed("CustomView", owner: nil, options: nil)!.first as! UIView // does the same as above view.frame = self.view.bounds self.view.addSubview(view) The snippet above will simply instantiate a view object from the xib file. You can have multiple root objects in the view hierarchy, but this time let's just pick the first one and use that. I assume that in 99% of the cases this is what you'll need in order to get your custom designed views. Also you can extend the UIView object with any of the solutions above to create a generic view loader. More on that later... 😊 This method is pretty simple and cheap, however there is one little drawback. You can't get named pointers (outlets) for the views, but only for the root object. If you are putting design elements into your screen, that's fine, but if you need to display dynamic data, you might want to reach out for the underlying views as well. 😃 Custom views with outlets & actions So the proper way to load custom views from xib files goes something like this: Inside your custom view object, you instantiate the xib file exactly the same way as I told you right up here. 👆 The only difference is that you don't need to use the object array returned by the methods, but you have to connect your view objects through the interface builder, using the File's Owner as a reference point, plus a custom container view outlet, that'll contain everything you need. 🤨 // note: view object is from my previous tutorial, with autoresizing masks disabled class CustomView: View { // this is going to be our container object @IBOutlet weak var containerView: UIView! // other usual outlets @IBOutlet weak var textLabel: UILabel! override func initialize() { super.initialize() // first: load the view hierarchy to get proper outlets let name = String(describing: type(of: self)) let nib = UINib(nibName: name, bundle: .main) nib.instantiate(withOwner: self, options: nil) // next: append the container to our view self.addSubview(self.containerView) self.containerView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ self.containerView.topAnchor.constraint(equalTo: self.topAnchor), self.containerView.bottomAnchor.constraint(equalTo: self.bottomAnchor), self.containerView.leadingAnchor.constraint(equalTo: self.leadingAnchor), self.containerView.trailingAnchor.constraint(equalTo: self.trailingAnchor), ]) } } So the initialize method here is just loading the nib file with the owner of self. After the loading process finished, your outlet pointers are going to be filled with proper values from the xib file. There is one last thing that we need to do. Even the views from the xib file are "programmatically" connected to our custom view object, but visually they aren't. So we have to add our container view into the view hierarchy. 🤐 If you want to use your custom view object, you just have to create a new instance from it - inside a view controller - and finally feel free to add it as a subview! One word about bounds, frames aka. springs and struts: f*ckng UGLY! That's two words. They are considered as a bad practice, so please use auto layout, I have a nice tutorial about anchors, they are amazing and learning them takes about 15 minutes. 😅 class ViewController: UIViewController { weak var customView: CustomView! override func loadView() { super.loadView() let customView = CustomView() self.view.addSubview(customView) NSLayoutConstraint.activate([ customView.topAnchor.constraint(equalTo: self.view.topAnchor), customView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor), customView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor), customView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor), ]) self.customView = customView } override func viewDidLoad() { super.viewDidLoad() self.customView.textLabel.text = "Lorem ipsum" } } That's it, now you have a completely working custom UIView object that loads a xib file in order to use it's contents. Wasn't so bad, right? 🤪 One more extra thing. If you don't like to handle views programmatically or you simply don't want to mess around with the loadView method, just remove it entirely. Next put the @IBOutlet keyword right before your custom view class variable. Open your storyboard using IB, then drag & drop a new UIView element to your controller and connect the custom view outlet. It should work like magic. 💫 I promised outlets and actions in the heading of this section, so let's talk a little bit about IBActions. They work exactly the same as you'd expect them with controllers. You can simply hook-up a button to your custom view and delegate the action to the custom view class. If you want to forward touches or specific actions to a controller, you should use the delegate pattern or go with a simple block. 😎 Ownership and container views It is possible to leave out all the xib loading mechanism from the view instance. We can create a set of extensions in order to have a nice view loader with a custom view class from a xib file. This way you don't need a container view anymore, also the owner of the file can be left out from the game, it's more or less the same method as reusable cells for tables and collections created by Apple. 🍎 You should know that going this way you can't use your default UIView init methods programmatically anymore, because the xib file will take care of the init process. Also if you are trying to use this kind of custom views from a storyboard or xib file, you won't be able to use your outlets, because the correspondig xib of the view class won't be loaded. Otherwise if you are trying to load it manyally you'll run into an infinite loop and eventually your app will crash like hell. 😈 import UIKit extension UINib { func instantiate() -> Any? { return self.instantiate(withOwner: nil, options: nil).first } } extension UIView { static var nib: UINib { return UINib(nibName: String(describing: self), bundle: nil) } static func instantiate(autolayout: Bool = true) -> Self { // generic helper function func instantiateUsingNib<T: UIView>(autolayout: Bool) -> T { let view = self.nib.instantiate() as! T view.translatesAutoresizingMaskIntoConstraints = !autolayout return view } return instantiateUsingNib(autolayout: autolayout) } } class CustomView: UIView { @IBOutlet weak var textLabel: UILabel! } // usage (inside a view controller for example) // let view = CustomView.instantiate() Just like with table or collection view cells this time you have to set your custom view class on the view object, instead of the File's Owner. You have to connect your outlets and basically you're done with everything. 🤞 From now on you should ALWAYS use the instantiate method on your custom view object. The good news is that the function is generic, returns the proper instance type and it's highly reusable. Oh, btw. I already mentioned the bad news... 🤪 There is also one more technique by overriding awakeAfter, but I would not rely on that solution anymore. In most of the cases you can simply set the File's Owner to your custom view, and go with a container, that's a safe bet. If you have special needs you might need the second approach, but please be careful with that. 😉 External sources - 5 approach to load UIView from Xib - UIView initialized as a Custom Class - Instantiating from .xib using Swift generics - Creating a custom view from a xib
https://theswiftdev.com/2018/10/16/custom-uiview-subclass-from-a-xib-file/
CC-MAIN-2019-39
refinedweb
1,300
55.03
import "github.com/aws/aws-sdk-go/aws/arn" Package arn provides a parser for interacting with Amazon Resource Names. IsARN returns whether the given string is an arn by looking for whether the string starts with arn: type ARN struct { // The partition that the resource is in. For standard AWS regions, the partition is "aws". If you have resources in // other partitions, the partition is "aws-partitionname". For example, the partition for resources in the China // (Beijing) region is "aws-cn". Partition string // The service namespace that identifies the AWS product (for example, Amazon S3, IAM, or Amazon RDS). For a list of // namespaces, see //. Service string // The region the resource resides in. Note that the ARNs for some resources do not require a region, so this // component might be omitted. Region string // The ID of the AWS account that owns the resource, without the hyphens. For example, 123456789012. Note that the // ARNs for some resources don't require an account number, so this component might be omitted. AccountID string // The content of this part of the ARN varies by service. It often includes an indicator of the type of resource — // for example, an IAM user or Amazon RDS database - followed by a slash (/) or a colon (:), followed by the // resource name itself. Some services allows paths for resource names, as described in //. Resource string } ARN captures the individual fields of an Amazon Resource Name. See for more information. Parse parses an ARN into its constituent parts. Some example ARNs: arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment arn:aws:iam::123456789012:user/David arn:aws:rds:eu-west-1:123456789012:db:mysql-db arn:aws:s3:::my_corporate_bucket/exampleobject.png String returns the canonical representation of the ARN Package arn imports 2 packages (graph) and is imported by 73 packages. Updated 2019-12-03. Refresh now. Tools for package owners.
https://godoc.org/github.com/aws/aws-sdk-go/aws/arn
CC-MAIN-2019-51
refinedweb
314
58.28
You can build Angular apps using plain old JavaScript and TypeScript. I’ve been using plain JavaScript for the past Angular demonstrations, because I felt in love again with JavaScript after spending years with CoffeeScript (But that’s a different story). However, teams at Google and Microsoft were working together in these days to marriage Angular and TypeScript. If you don’t know TypeScript yet, go and learn it. It will change the way how you write Frontend stuff in the upcoming years. You can think of it as todays *JavaScript on steroids. It makes you more productive, it makes your code more robust, you’ve to write less plumbing because the TypeScript Compiler (TSC) generates all the good parts of JavaScript and knows about the edge-cases. THINK: When I use TypeScript I’ll end in doing less keystrokes; That means I’ll be faster 🤘 Go and checkout the repository on GitHub. You can find the entire application there. To automate the build process I’ve created a gulpfile.js. It takes care about all the transpiling, copying and other required build steps to generate the Electron apps for all three major platforms (Windows, Linux and of course MacOS). By using gulp-typescript, you can easily compile the TypeScript sources to plain JavaScript which is managed by SystemJS at runtime. gulp.task('private:build-app', function(){ var project = typescript.createProject('tsconfig.json'); var tsResult = project.src() .pipe(typescript(project)); return tsResult.js.pipe(gulp.dest('dist/frontend')); }); See the entire gulpfile.js here. More important are some pitfalls when combining Angular with Electron. There are plenty of demo applications available out there. However, a quick google didn’t bring up a single sample using angular’s new component router. As mentioned within angular’s developer guide on angular.io, the router requires a <base href="/foo"/> or <base href="/"> in order to work as expected. If you don’t add the base node within <head> Angular throws an error like shown in figure 1. Adding the <base /> element works fine when running inside of the Browser. However, it prevents the app from finding the routes when executing the same source in Electron. You can alternatively configure the base within your application’s bootstrap routine. This is required when you’re loading scripts from within Electron’s renderer process. Snippet 1 shows the boot.ts file which is responsible for bootstrapping our Angular app. import { provide } from 'angular2/core'; import { bootstrap } from 'angular2/platform/browser'; import { AppComponent } from './components/app/app.component'; import { ROUTER_PROVIDERS, APP_BASE_HREF } from 'angular2/router'; bootstrap(AppComponent, [ROUTER_PROVIDERS, provide(APP_BASE_HREF, {useValue : '/'})]); The essential and new part here is the usage of provide to tell angular where the new base is. However, there is more required. Angular is offering a Location service which is responsible for interacting with the browser’s URL. Check out app.component.ts (Snippet 2); the RouteConfig can take an optional useAsDefault property of type boolean. Setting this to true works fine when not using provide but the combination of provide and useAsDefault: true didn’t work for me here. That’s why I used the Location service (provided by Angular’s DI container) to redirect the user immediately to the Splash Component. import { Component } from 'angular2/core'; import { RouteConfig, ROUTER_DIRECTIVES, Location } from 'angular2/router'; import { SplashComponent } from "../splash/splash.component"; @Component({ selector: 'sampleapp', templateUrl: 'templates/app.html', directives: [ROUTER_DIRECTIVES] }) @RouteConfig([ { path: '/splash', name: 'Splash', component: SplashComponent } ]) export class AppComponent { constructor(private _location: Location) { _location.go('/splash'); } } Within the current publicly available version of this sample,I’ve to load the splash template by using the plain template property when using templateUrl as I did for the app.component.ts angular2 isn’t able to find the template. For now, it seems like the template is requested after the AppBaseHref is set and in combination with electron’s path handling Angular isn’t able to find the template at a given URL. Action required If you’ve any idea how to fix that feel free to send me a pull request on GitHub or chat with me about it.
https://thorsten-hans.com/building-an-electron-app-using-angular-beta0-in-typescript
CC-MAIN-2019-18
refinedweb
685
56.96
Help:Lesson This help page is intended to help new contributors to Wikiversity write lessons (as distinct from other resource types). The page is primarily aimed at inexperienced (web) educators with little or no previous experience of writing (online) educational content. There are many resources in the main namespace of Wikiversity which can also be classified as "teacher training" or which help with the creating of learning resources - however these will be more advanced. This help page is nothing more than a help page which covers the basics. It will help contributors who want a fast track to creating learning content for Wikiversity. Contents What is a lesson?[edit] Possibly the most unpretentious definition ever of the word "lesson" comes from the Moodle help system: - "A lesson delivers content in an interesting and flexible way. It consists of a number of pages." (Moodle) Lesson structure[edit] This is just a very basic starter kind of structure you can use. It is a structure so common that it is cliched and laughed at, but it should not be ignored, especially if you don't know what else to do. If you use this structure (good), then try not to use the same labels as section headers (bad) - use other words instead, and then people probably won't notice what you're doing. - Preparation / teaser / introduction: warmer; motivational; make the audience feel an urgent desire for the material they are about to get; statement of goals; very short; get ideas from TV show teasers? - Presentation / model / instructions: the main content; you lay your cards on the table. - Practice / consolidation / interaction: the learners begin to recycle the material presented or carry out the instructions, first in more closed/passive/rule-following fashions, but then with increasing open/active/creative exercises. - Production / evaluation / the bit at the end: less agreement between educators what this is about - might be a phase where learners show full independence with the learning material (project), or a formal assessment for the teacher to check on learning success, or some kind of feedback session or link into the next lesson. Watchpoints for writing lessons[edit] Big yes-yeses[edit] - Identify the audience. - And be precise about it. Wikiversity is not Wikipedia. - Encyclopedia articles are written for a non-existent single, abstract, culturally and ideologically neutral, theoretically educated adult. - Lessons should be written with a very precise and real audience in mind all the time. The audience will differ for almost every set of resources. Picture to yourself how your audience will react to each section. - Identifying an audience is much harder in an online environment - unless you are lucky enough to have your audience in the same room - but you must bear them in mind all the time. Don't over-estimate the audience. Don't invent the audience of your dreams - be realistic. - Connect with the audience (style, interest, fun, interactivity) - Trying to connect with an online audience is rather like trying to tell jokes to a camera. All the same, you have to try. You don't want to be a newscaster. Your style of writing should talk to the audience in a way that makes them feel involved and personally understood. Use techniques to maintain interest, both in the joins from one paragraph to the next, and an overarching technique that keeps the beginning and end of the lesson tightly together. Give the reader reason to keep reading. Lessons can be fun - fun isn't allowed on Wikipedia - but it's critical to a good Wikiversity lesson, if you can manage it. Interactivity can involve things like quizzes, discussions and collaborative writing - but maintain variety and keep each activity small. - Use structured sequences - Start with what is known and move to the unknown - Lessons start with establishing common ground, such as revising what was learnt before, or finding out what is already known and then responding to this. Learning requires a foundation to build on - if you can't find that foundation, you won't be able to create a learning situation. This is one reason why you really need to identify and connect with the audience any way you can. - Use variety - Use a variety of methods; different parts of your "structured sequence" should use different methods. Also use different media types (video, audio, text, images). Sound and vision are the only two senses the digital learner can rely on, but a real-world class can benefit from all five senses - multi-sensual experiences promote learning. - Repetition and redundancy - Don't feel you constantly have to move on and teach new stuff, cramming as much knowledge into the lesson as you can. That kind of thing is for encyclopedias. Instead, keep (1) your learning goal and (2) your audience in mind, and try to create as many possible different lines of connection between these two things as you can. For example, use different methods to teach the same point (if it doesn't go in one way, it might go in another). Don't be afraid to repeat yourself, but preferably say it in different ways unless you want a laugh. Recycling material after suitable time periods helps memorisation. Methods of repeating and revising material include interactive sections such as quizzes and productive activities - as well as, ummm, saying it again. - Bridge theory and practice - Examples and case studies are good. - Feedback - Somewhere along the line it is good if you get some kind of feedback from your audience. Learners can leave messages on the lesson talk page, your own talk page as facilitator, or they can send you email - as you prefer. They can also indirectly contribute feedback while creating content. Try to motivate user response, even if it's just a userbox or your personal seal of approval which you promise them in return. - If you have spare time - Read things which tell you how to be funny while warning you how not to be stupid - it will make you a more interesting writer. Big no-noes[edit] - Too much collaboration too soon is really, really bad. - Wikis are temptingly collaborative, but collaborative online education is massively difficult to pull off successfully. A collaborative resource with 0-1 participants lies somewhere between funny and sad; it does not educate. Ditto 100 people crammed into the state of confusion created by misdirected participatory requirements. Many good resources on Wikiversity - perhaps the majority of the good ones - are written and completed in an individualistic manner for a passive audience. Write something for a passive audience first, then graduate to the next level. When you start with collaborative lessons, bring your own classes for the first ones, otherwise you or your materials may die of loneliness, or you may never become aware of the mass confusion you caused. - Don't try to be what you're not. - Be yourself and not somebody else - teachers have naturally different styles, and trying to adopt someone else's style can turn a good teacher into a bad teacher. If you are new to teaching, you may not be aware of your style yet. - Don't follow methodological fads. - Especially not the one you just read or went to a course about. Unless it naturally fits your style. Or unless you can take the risk of massive failure (remembering always that failures are great learning opportunities, provided you live). - "Build it and they will come" is not a good principle of web education. - Try: hard work, quality, a bit of marketing such as proper resource categorisation, really nice piccies and layout, bring your own class anyway just to make sure, and if all else fails, tell them the answers to the next test are numerologically disguised in the text. - Collaboration is not wiki-heaven. - Collective resource creation (if it works) brings conflict. Guaranteed. But it could be educational if you manage to steer things in the right direction. Just be prepared, get your expectations right and bring a sweat bowl. - Try not to do everything at once. - Did this page have a lot on it? Never mind. If you got half of it first time round, that's great. Go and make a resource, and another, and then come back here and pick up some more ideas, or leave your comments and experiences on the talk page. Case study[edit] This section is under construction. Courses and other resources on Wikiversity which help with lesson creation[edit] For the most part, these pages will be of interest only to experienced educationalists or trainee teachers. Reading these resources will require a significant investment of time. - Instructional Design - Designing Constructivist Learning Experiences - Designing instruction for cognitive behaviors - Designing instruction for psychomotor behaviors - Designing instruction for affective behaviors - Designing instruction for interpersonal behaviors - Developing high quality educational resources - Composing free and open online educational resources - Assistant teacher course - by User:Fasten - Experiential education - Learning and learning about learning in Wikiversity - by User:Cormaggio - Design and Develop Learning Resources / Networked learning / Flexible learning - by User:Leighblackall - Learning to learn a wiki way External links[edit] These resources are down-to-earth. - C. M. Dragomanovich, What makes a good lesson (2 pages; recommended) - Teachnology, Teaching tips - Honolulu Community College, Teaching Tips Index - John Baez, How to teach stuff (1 page) - National Weather Service Training Center, Hydrometeorology & Management Division, Anatomy of a lesson (1997) - The National Capital Language Resource Center (Washington DC), Structure the Lesson (2003/4) See also[edit] - Help:How to write an educational resource - Help:Resource types - find out what other kinds of resources you can contribute to Wikiversity. - Help:Lesson plan - Wikiversity:Learning - Wikiversity:Learning resources - Wikiversity:Learning projects - Wikiversity:Readability
https://en.wikiversity.org/wiki/Help:Lesson
CC-MAIN-2019-43
refinedweb
1,608
52.29
The checks are run as part of a single check-source target, but are described in separate sections below. In addition to printing the issues to stderr, the script also writes them into docs/doxygen/check-source.log for later inspection. Jenkins runs the checks as part of the Documentation job, and the build is marked unstable if any issues are found. For correct functionality, the scripts depend on correct usage of Doxygen annotations described in Using Doxygen, in particular the visibility and API definitions in file-level comments. For some false positives from the script, the suppression mechanism described below is the easiest way to silence the script, but otherwise the goal would be to minimize the number of suppressions. The scripts require Python 2.7 (other versions may work, but have not been tested). To understand how the scripts work internally, see comments in the Python source files under docs/doxygen/. Checker details¶ The check-source target currently checks for a few different types of issues. These are listed in detail below, mainly related to documentation and include dependencies. Note in particular that the include dependency checks are much stricter for code in modules/directories that are documented with a \defgroup: all undocumented code is assumed to be internal to such modules. The rationale is that such code has gotten some more attention, and some effort should also have been put into defining what is the external interface of the module and documenting it. For all Doxygen documentation (currently does not apply for members that do not appear in the documentation): -. For all files: Consistent usage of #include "..." // This should be used for GROMACS headers and #include <...> // This should be used for system and external headers When we again have installed headers, they must not include non-installed headers. Headers should be marked for install within CMakeLists.txtfiles of their respective modules. All source files must include “gmxpre.h” as the first header. A source/header file should include “config.h,” “gromacs/simd/simd.h”, or “gromacs/ewald/pme_simd.h” if and only if it uses a macro declared in such files. If the file has a git attribute to identify it as a candidate for include sorting, the include sorter described below should not produce any changes (i.e., the file should follow Guidelines for #include directives). For documented files: - modules. As a side effect, the XML extraction makes Doxygen parse all comments in the code, even if they do not appear in the documentation. This can reveal latent issues in the comments, like invalid Doxygen syntax. The messages from the XML parsing are stored in docs/doxygen/doxygen-xml.log in the build tree, similar to other Doxygen runs. Suppressing issues¶ The script is not currently perfect (either because of unfinished implementation, or because Doxygen bugs or incompleteness of the Doxygen XML output), and the current code also contains issues that the script detects, but the authors have not fixed. To allow the script to still be used, doxygen/suppressions.txt contains a list of issues that are filtered out from the report. The syntax is simple: <file>: <text> where <file> is a path to the file that reports the message, and <text> is the text reported. Both support * as a wildcard. If <file> is empty, the suppression matches only messages that do not have an associated file. <file> is matched against the trailing portion of the file name to make it work even though the script reports absolute paths. Empty lines and lines starting with # are ignored. To add a suppression for an issue, the line that reports the issue can be copied into suppressions.txt, and the line number (if any) removed. If the issue does not have a file name (or a pseudo-file) associated, a leading : must be added. To cover many similar issues, parts of the line can then be replaced with wildcards. A separate suppression mechanism is in place for cyclic dependencies: to suppress a cycle between moduleA and moduleB, add a line with format moduleA -> moduleB into doxygen/cycle-suppressions.txt. This suppresses all cycles that contain the mentioned edge. Since a cycle contains multiple edges, the suppression should be made for the edge that is determined to be an incorrect dependency. This also affects the layout of the include dependency graphs (see below): the suppressed edge is not considered when determining the dependency order, and is shown as invalid in the graph. Include order sorting¶ The script checks include ordering according to Guidelines for #include directives. If it is not obvious how the includes should be changed to make the script happy, or bulk changes are needed in multiple files, e.g., because of a header rename or making a previously public header private, it is possible to run a Python script that does the sorting: docs/doxygen/includesorter.py -S . -B ../build <files> The script needs to know the location of the source tree (given with -S) and the build tree (given with -B), and sorts the given files. To sort the whole source tree, one can also use: admin/reformat_all.sh includesort -B=../build For the sorter to work correctly, the build tree should contain up-to-date list of installed files and Doxygen XML documentation. The former is created automatically when cmake is run, and the latter can be built using the doxygen-xml target. Note that currently, the sorter script does not change between angle brackets and quotes in include statements. Include dependency graphs¶ The same set of Python scripts can also produce include dependency graphs with some additional annotations compared to what, e.g., Doxygen produces for a directory dependency graph. Currently, a module-level graph is automatically built when the Doxygen documentation is built and embedded in the documentation (not in the public API documentation). The graph, together with a legend, is on a separate page: Module dependency graph The Python script produces the graphs in a format suitable for dot (from the graphviz package) to lay them out. The build system also provides a dep-graphs target that generates PNG files from the intermediate dot files. In addition to the module-level graph, a file-level graph is produced for each module, showing the include dependencies within that module. The file-level graphs can only be viewed as the PNG files, with some explanation of the notation below. Currently, these are mostly for eye candy, but they can also be used for analyzing problematic dependencies to clean up the architecture. Both the intermediate .dot files and the final PNG files are put under docs/doxygen/depgraphs/ in the build tree..
https://manual.gromacs.org/current/dev-manual/gmxtree.html
CC-MAIN-2021-39
refinedweb
1,109
55.24
ChangeLog Contents - 1 Eigen 3.3.7 - 2 Eigen 3.3.6 - 3 Eigen 3.3.5 - 4 Eigen 3.3.4 - 5 Eigen 3.3.3 - 6 Eigen 3.3.2 - 7 Eigen 3.3.1 - 8 Eigen 3.3 - 9 Eigen 3.3-rc2 - 10 Eigen 3.2.10 - 11 Eigen 3.3-rc1 - 12 Eigen 3.3-beta2 - 13 Eigen 3.2.9 - 14 Eigen 3.2.8 - 15 Eigen 3.3-beta1 - 16 Eigen 3.2.7 - 17 Eigen 3.2.6 - 18 Eigen 3.3-alpha1 - 19 Eigen 3.2.5 - 20 Eigen 3.2.4 - 21 Eigen 3.2.3 - 22 Eigen 3.2.2 - 23 Eigen 3.2.1 - 24 Eigen 3.1.4 - 25 Eigen 3.0.7 - 26 Eigen 3.2.0 - 27 Eigen 3.2-rc2 - 28 Eigen 3.2-rc1 - 29 Eigen 3.1.3 - 30 Eigen 3.2-beta1 - 31 Eigen 3.1.2 - 32 Eigen 3.1.1 - 33 Eigen 3.0.6 - 34 Eigen 3.1.0 - 35 Eigen 3.1.0-rc2 - 36 Eigen 3.1.0-rc1 - 37 Eigen 3.1.0-beta1 - 38 Eigen 3.0.5 - 39 Eigen 3.1.0-alpha2 - 40 Eigen 3.1.0-alpha1 - 41 Eigen 3.0.4 - 42 Eigen 2.0.17 - 43 Eigen 3.0.3 - 44 Eigen 3.0.2 - 45 Eigen 3.0.1 - 46 Eigen 2.0.16 - 47 Eigen 3.0.0 - 48 Eigen 3.0-rc1 - 49 Eigen 3.0-beta4 - 50 Eigen 3.0-beta3 - 51 Eigen 3.0-beta2 - 52 Eigen 2.0.15 - 53 Eigen 3.0-beta1 - 54 Eigen 2.0.14 - 55 Eigen 2.0.13 - 56 Eigen 2.0.12 - 57 Eigen 2.0.11 - 58 Eigen 2.0.10 - 59 Eigen 2.0.9 - 60 Eigen 2.0.8 - 61 Eigen 2.0.7 - 62 Eigen 2.0.6 - 63 Eigen 2.0.5 - 64 Eigen 2.0.4 - 65 Eigen 2.0.3 - 66 Eigen 2.0.2 - 67 Eigen 2.0.1 - 68 Eigen 2.0.0 Eigen 3.3.7 Released on December 11, 2018. Changes since 3.3.6: Eigen 3.3.6 Released on December 10, 2018. Changes since 3.3.5: - Bug 1617: Fix triangular solve crashing for empty matrix. - Bug 785: Make dense Cholesky decomposition work for empty matrices. - Bug 1634: Remove double copy in move-ctor of non movable Matrix/Array. - Changeset 588e1eb34eff: Workaround weird MSVC bug. - Bug 1637 Workaround performance regression in matrix products with gcc>=6 and clang>=6.0. - Changeset bf0f100339c1: Fix some implicit 0 to Scalar conversions. - Bug 1605: Workaround ABI issue with vector types (aka __m128) versus scalar types (aka float). - Changeset d1421c479baa: Fix for gcc<4.6 regarding usage of #pragma GCC diagnostic push/pop. - Changeset c20b83b9d736: Fix conjugate-gradient for right-hand-sides with a very small magnitude. - Changeset 281a877a3bf7: Fix product of empty arrays (returned 0 instead of 1). - Bug 1590: Fix collision with some system headers defining the macro FP32. - Bug 1584: Fix possible undefined behavior in random generation. - Changeset d632d18db8ca: Fix fallback to BLAS for rankUpdate. - Fixes for NVCC 9. - Fix matrix-market IO. - Various fixes in the doc. - Various minor warning fixes/workarounds. Eigen 3.3.5 Released on July 23, 2018. Changes since 3.3.4: - General bug fixes: - Fix GeneralizedEigenSolver when requesting for eigenvalues only (0d15855abb30) - Bug 1560 fix product with a 1x1 diagonal matrix (90d7654f4a59) - Bug 1543: fix linear indexing in generic block evaluation - Fix compilation of product with inverse transpositions (e.g., mat * Transpositions().inverse()) (14a13748d761) - Bug 1509: fix computeInverseWithCheck for complexes (8be258ef0b6d) - Bug 1521: avoid signalling NaN in hypot and make it std::complex<> friendly (a9c06b854991). - Bug 1517: fix triangular product with unit diagonal and nested scaling factor: (s*A).triangularView<UpperUnit>()*B (a546d43bdd4f) - Fix compilation of stableNorm for some odd expressions as input (499e982b9281) - Bug 1485: fix linking issue of non template functions (ae28c2aaeeda) - Fix overflow issues in BDCSVD (92060f82e1de) - Bug 1468 : add missing std:: to memcpy (4565282592ae) - Bug 1453: fix Map with non-default inner-stride but no outer-stride (af00212cf3a4) - Fix mixing types in sparse matrix products (7e5fcd0008bd) - Bug 1544: Generate correct Q matrix in complex case (c0c410b508a1) - Bug 1461: fix compilation of Map<const Quaternion>::x() (69652a06967d) - Backends: - Fix MKL backend for symmetric eigenvalues on row-major matrices (4726d6a24f69) - Bug 1527: fix support for MKL's VML (972424860545) - Fix incorrect ldvt in LAPACKE call from JacobiSVD (88c4604601b9) - Fix support for MKL's BLAS when using MKL_DIRECT_CALL (205731b87e19, b88c70c6ced7, 46e2367262e1) - Use MKL's lapacke.h header when using MKL (19bc9df6b726) - Diagnostics: - Bug 1516: add assertion for out-of-range diagonal index in MatrixBase::diagonal(i) (783d38b3c78c) - Add static assertion for fixed sizes Ref<> (e1203d5ceb8e) - Add static assertion on selfadjoint-view's UpLo parameter. (b84db94c677e, 0ffe8a819801) - Bug 1479: fix failure detection in LDLT (67719139abc3) - Compiler support: - Bug 1555: compilation fix with XLC - Workaround MSVC 2013 ambiguous calls (1c7b59b0b5f4) - Adds missing EIGEN_STRONG_INLINE to help MSVC properly inlining small vector calculations (1ba3f10b91f2) - Several minor warning fixes: 3c87fc0f1042, ad6bcf0e8efc, "used uninitialized" (20efc44c5500), Wint-in-bool-context (131da2cbc695, b4f969795d1b) - Bug 1428: make NEON vectorization compilable by MSVC. (* 3d1b3dbe5927, 4e1b7350182a) - Fix compilation and SSE support with PGI compiler (faabf000855d 90d33b09040f) - Bug 1555: compilation fix with XLC (23eb37691f14) - Bug 1520: workaround some -Wfloat-equal warnings by calling std::equal_to (7d9a9456ed7c) - Make the TensorStorage class compile with clang 3.9 (eff7001e1f0a) - Misc: some old compiler fixes (493691b29be1) - Fix MSVC warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow) (524918622506) - Architecture support: - Several AVX512 fixes for log, sqrt, rsqrt, non AVX512ER CPUs, apply_rotation_in_the_plane b64275e912ba cab3d626a59e 7ce234652ab9, d89b9a754371. - AltiVec fixes: 9450038e380d - NEON fixes: const-cast (e8a69835ccda), compilation of Jacobi rotations (c06cfd545b15,bug 1436). - Changeset d0658cc9d4a2: Define pcast<> for SSE types even when AVX is enabled. (otherwise float are silently reinterpreted as int instead of being converted) - Bug 1494: makes pmin/pmax behave on Altivec/VSX as on x86 regarding NaNs (d0af83f82b19) - Documentation: - Update manual pages regarding BDCSVD (bug 1538) - Add aliasing in common pitfaffs (2a5a8408fdc5) - Update aligned_allocator (21e03aef9f2b) - Bug 1456: add perf recommendation for LLT and storage format (c8c154ebf130, 9aef1e23dbe0) - Bug 1455: Cholesky module depends on Jacobi for rank-updates (2e6e26b851a8) - Bug 1458: fix documentation of LLT and LDLT info() method (2a4cf4f473dd) - Warn about constness in LLT::solveInPlace (518f97b69bdf) - Fix lazyness of operator* with CUDA (c4dbb556bd36) - Bug 336: improve doc for PlainObjectBase::Map (13dc446545fe) - Other general improvements: - Enable linear indexing in generic block evaluation (31537598bf83, 5967bc3c2cdb, bug 1543). - Fix packet and alignment propagation logic of Block<Xpr> expressions. In particular, (A+B).col(j) now preserve vectorisation. (b323cc9c2c7f) - Several fixes regarding custom scalar type support: hypot (f8d6c791791d), boost-multiprec (acb8ef9b2478), literal casts (6bbd97f17534, 39f65d65894f), - LLT: avoid making a copy when decomposing in place (2f7e28920f4e), const the arg to solveInPlace() to allow passing .transpose(), .block(), etc. (c31c0090e998). - Add possibility to overwrite EIGEN_STRONG_INLINE (7094bbdf3f4d) - Bug 1528: use numeric_limits::min() instead of 1/highest() that might underflow (dd823c64ade7) - Bug 1532: disable stl::*_negate in C++17 (they are deprecated) (88e9452099d5) - Add C++11 max_digits10 for half (faf74dde8ed1) - Make sparse QR result sizes consistent with dense QR (4638bc4d0f96) - Unsupported/unit-tests/cmake/unvisible internals/etc. - Bug 1484: restore deleted line for 128 bits long doubles, and improve dispatching logic. (dffc0f957f19) - Bug 1462: remove all occurences of the deprecated __CUDACC_VER__ macro by introducing EIGEN_CUDACC_VER (a201b8438d36) - Changeset 2722aa8eb93f: Fix oversharding bug in parallelFor. - Changeset ea1db80eab46: commit 45e9c9996da790b55ed9c4b0dfeae49492ac5c46 (HEAD -> memory_fix) - Changeset 350957be012c: Fix int versus Index - Changeset 424038431015: fix linking issue - Changeset 3f938790b7e0: Fix short vs long - Changeset ba14974d054a: Fix cmake scripts with no fortran compiler - Changeset 2ac088501976: add cmake-option to enable/disable creation of tests - Changeset 56996c54158b: Use col method for column-major matrix - Changeset 762373ca9793: Bug 1449: fix redux_3 unit test - Changeset eda96fd2fa30: Fix uninitialized output argument. - Changeset 75a12dff8ca4: Handle min/max/inf/etc issue in cuda_fp16.h directly in test/main.h - Changeset 568614bf79b8: Add tests for sparseQR results (value and size) covering bugs 1522 and 1544 - Changeset 12c9ece47d14: SelfAdjointView<...,Mode> causes a static assert since commit c73a77e47db8 - Changeset 899fd2ef704f: weird compilation issue in mapped_matrix.cpp Eigen 3.3.4 Released on June 15, 2017. Changes since 3.3<>> Eigen 3.3.3 Released on February 21, 2017. Changes since 3.3.2: - General: - Improve multi-threading heuristic for matrix products with a small number of columns. - Bug 1395: fix compilation of JacobiSVD for vectors type. - Fix pruning in (sparse*sparse).pruned() when the result is nearly dense. - Bug 1382: move using std::size_t/ptrdiff_t to Eigen's namespace. - Fix compilation and inlining when using clang-cl with visual studio. - Bug 1392: fix #include <Eigen/Sparse> with mpl2-only. - Regressions: - Bug 1379: fix compilation in sparse*diagonal*dense with OpenMP. - Bug 1373: add missing assertion on size mismatch with compound assignment operators (e.g., mat += mat.col(j)) - Bug 1375: fix cmake installation with cmake 2.8. - Bug 1383: fix LinSpaced with integers for LinPspaced(n,0,n-1) with n==0 or the high<low case. - Bug 1381: fix sparse.diagonal() used as a rvalue. - Bug 1384: fix evaluation of "sparse/scalar" that used the wrong evaluation path. - Bug 478: fix regression in the eigen decomposition of zero matrices. - Fix a compilation issue with MSVC regarding the usage of CUDACC_VER - Bug 1393: enable Matrix/Array explicit constructor from types with conversion operators. - Bug 1394: fix compilation of SelfAdjointEigenSolver<Matrix>(sparse*sparse). - Others: - Fix ARM NEON wrapper for 16 byte systems. - Bug 1391: include IO.h before DenseBase to enable its usage in DenseBase plugins. - Bug 1389: fix std containers support with MSVC and AVX. - Bug 1380: fix matrix exponential with Map<>. - Bug 1369: fix type mismatch warning with OpenMP. - Fix usage of size_t instead of Index in sefl-adjoint matrix * vector - Bug 1378: fix doc (DiagonalIndex vs Diagonal). Eigen 3.3.2 Released on January 18, 2017. Changes since 3.3.1: - General: - Add transpose, adjoint, conjugate methods to SelfAdjointView (useful to write generic code) - Make sure that HyperPlane::transform maintains a unit normal vector in the Affine case. - Several documentation improvements, including: several doxygen workarounds, bug 1336, Bug 1370, StorageIndex, selfadjointView, sparseView(), sparse triangular solve, AsciiQuickReference.txt, ...) - Regressions: - Bug 1358: fix compilation of sparse += sparse.selfadjointView(); - Bug 1359: fix compilation of sparse /=scalar, sparse *=scalar, and col_major_sparse.row() *= scalar. - Bug 1361: fix compilation of mat=perm.inverse() - Some fixes in sparse coeff-wise binary operations: add missing .outer() member to iterators, and properly report storage order. - Fix aliasing issue in code as A.triangularView() = B*A.sefladjointView()*B.adjoint() - Performance: - Improve code generation for mat*vec on some compilers. - Optimize horizontal adds in SSE3 and AVX. - Speed up row-major TRSM (triangular solve with a matrix as right-hand-side) by reverting "vec/y" to "vec*(1/y)". The rationale is: - div is extremely costly - this is consistent with the column-major case - this is consistent with all other BLAS implementations - Remove one temporary in SparseLU::solve() - Others: Eigen 3.3.1 Released on December 06, 2016. Changes since 3.3.0: - Bug 426: add operators && and || to dense and sparse matrices (only dense arrays were supported) - Bug 1319: add support for CMake's imported targets. - Bug 1343: fix compilation regression in array = matrix_product and mat+=selfadjoint_view - Fix regression in assignment of sparse block to sparse block. - Fix a memory leak in Ref<SparseMatrix> and Ref<SparseVector>. - Bug 1351: fix compilation of random with old compilers. - Fix a performance regression in (mat*mat)*vec for which mat*mat was evaluated multiple times. - Fix a regression in SparseMatrix::ReverseInnerIterator - Fix performance issue of products for dynamic size matrices with fixed max size. - implement float/std::complex<float> for ZVector - Some fixes for expression-template scalar-types - Bug 1356: fix undefined behavior with nullptr. - Workaround some compilation errors with MSVC and MSVC/clr - Bug 1348: document EIGEN_MAX_ALIGN_BYTES and EIGEN_MAX_STATIC_ALIGN_BYTES, and reflect in the doc that EIGEN_DONT_ALIGN* are deprecated. - Bugs 1346,1347: make Eigen's installation relocatable. - Fix some harmless compilation warnings. Eigen 3.3 Released on November 10, 2016 For a comprehensive list of change since the 3.2 series, see this page. Main changes since 3.3-rc2: - Fix regression in printing sparse expressions. - Fix sparse solvers when using a SparseVector as the result and/or right-hand-side. Eigen 3.3-rc2 Released on November 04, 2016 For a comprehensive list of change since the 3.2 series, see this page. Main changes since 3.3-rc1: - Core module - Add supports for AVX512 SIMD instruction set. - Bugs 698 and 1004: Improve numerical robustness of LinSpaced methods for both real and integer scalar types (details). - Fix a regression in X = (X*X.transpose())/scalar with X rectangular (X was resized before the evaluation). - Bug 1311: Fix alignment logic in some cases of (scalar*small).lazyProduct(small) - Bug 1317: fix a performance regression from 3.2 with clang and some nested block expressions. - Bug 1308: fix compilation of some small products involving nullary-expressions. - Bug 1333: Fix a regression with mat.array().sum() - Bug 1328: Fix a compilation issue with old compilers introduced in 3.3-rc1. - Bug 1325: Fix compilation on NEON with clang - Properly handle negative inputs in vectorized sqrt. - Improve cost-model to determine the ideal number of threads in matrix-matrix products. - Geometry module - Tensor module - Add support for OpenCL. - Improved random number generation. - Other Eigen 3.2.10 Released on October 04, 2016 Changes since 3.2.9: Main fixes and improvements: - Bug 1272: Core module, improve comma-initializer in handling empty matrices. - Bug 1276: Core module, remove all references to std::binder* when C++11 is enabled (those are deprecated). - Bug 1304: Geometry module, fix Projective * scaling and Projective *= scaling. - Bug 1300: Sparse module, compilation fix for some block expression and SPQR support. - Sparse module, fix support for row (resp. column) of a column-major (resp. row-major) sparse matrix. - LU module, fix 4x4 matrix inversion for non-linear destinations. - Core module, a few fixes regarding custom complex types. - Bug 1275: backported improved random generator from 3.3 - Workaround MSVC 2013 compilation issue in Reverse - Fix UmfPackLU constructor for expressions. - Bug 1273: fix shortcoming in eigen_assert macro - Bug 1249: disable the use of __builtin_prefetch for compilers other than GCC, clang, and ICC. - Bug 1265: fix doc of QR decompositions Eigen 3.3-rc1 Released on September 22, 2016 For a comprehensive list of change since the 3.2 series, see this page. Main changes since 3.3-beta2: - New features and improvements: - Bug 645: implement eigenvector computation in GeneralizedEigenSolver - Bug 1271: add a SparseMatrix::coeffs() method returning a linear view of the non-zeros (for compressed mode only). - Bug 1286: Improve support for custom nullary functors: now the functor only has to expose one relevant operator among f(), f(i), f(i,j). - Bug 1272: improve comma-initializer in handling empty matrices. - Bug 1268: detect failure in LDLT and report them through info() - Add support for scalar factor in sparse-selfadjoint * dense products, and enable +=/-= assignment for such products. - Remove temporaries in product expressions matching "d?=a-b*c" by rewriting them as "d?=a; d?=b*c;" - Vectorization improvements for some small product cases. - Doc: - Bug 1265: fix outdated doc in QR facto - Bug 828: improve documentation of sparse block methods, and sparse unary methods. - Improve documentation regarding nullary functors, and add an example demonstrating the use of nullary expression to perform fancy matrix manipulations. - Doc: explain how to use Accelerate as a LAPACK backend. - Bug fixes and internal changes: - Numerous fixes regarding support for custom complex types. - Bug 1273: fix shortcoming in eigen_assert macro - Bug 1278: code formatting - Bug 1270: by-pass hand written pmadd with recent clang versions. - Bug 1282: fix implicit double to float conversion warning - Bug 1167: simplify installation of header files using cmake's install(DIRECTORY ...) command - Bug 1283: fix products involving an uncommon vector.block(..) expressions. - Bug 1285: fix a minor regression in LU factorization. - JacobiSVD now consider any denormal number as zero. - Numerous fixes regarding support for CUDA/NVCC (including bugs 1266: - Fix an alignment issue in gemv, symv, and trmv for statically allocated temporaries. - Fix 4x4 matrix inversion for non-linear destinations. - Numerous improvements and fixes in half precision scalar type. - Fix vectorization logic for coeff-based product for some corner cases - Bugs 1260, 1261, 1264: several fixes in AutoDiffScalar. Eigen 3.3-beta2 Released on July 26, 2016 For a comprehensive list of change since the 3.2 series, see this page. Main changes since 3.3-beta1: - Dense features: - Bug 707: Add support for inplace dense decompositions. - Bug 977: normalize(d) left the input unchanged if its norm is 0 or too close to 0. - Bug 977: add stableNormalize[d] methods: they are analogues to normalize[d] but with carefull handling of under/over-flow. - Bug 279: Implement generic scalar*expr and expr*scalar operators. This is especially useful for custom scalar types, e.g., to enable float*expr<multi_prec> without conversion. - New unsupported/Eigen/SpecialFunctions module providing the following coefficient-wise math functions: erf, erfc, lgamma, digamma, polygamma, igamma, igammac, zeta, betainc. - Add fast reciprocal condition estimators in dense LU and Cholesky factorizations. - Bug 1230: add support for SelfadjointView::triangularView() and diagonal() - Bug 823: add Quaternion::UnitRandom() method. - Add exclusive or operator for bool arrays. - Relax dependency on MKL for EIGEN_USE_BLAS and EIGEN_USE_LAPACKE: any BLAS and LAPACK libraries can now be used as backend (see doc). - Add static assertion to x(), y(), z(), w() accessors - Bug 51: avoid dynamic memory allocation in fixed-size rank-updates, matrix products evaluated within a triangular part, and selfadjoint times matrix products. - Bug 696: enable zero-sized block at compile-time by relaxing the respective assertion - Bug 779: in Map, allows non aligned buffers for buffers smaller than the requested alignment. - Add a complete orthogonal decomposition class: CompleteOrthogonalDecomposition - Improve robustness of JacoviSVD with complexes (underflow, noise amplification in complex to real conversion, compare off-diagonal entries to the current biggest diagonal entry instead of the global biggest, null inputs). - Change Eigen's ColPivHouseholderQR to use a numerically stable norm downdate formula (changeset 9da6c621d055) - Bug 1214: consider denormals as zero in D&C SVD. This also workaround infinite binary search when compiling with ICC's unsafe optimizations. - Add log1p for arrays. - Bug 1193: now lpNorm<Infinity> supports empty inputs. - Bug 1151: remove useless critical section in matrix product - Add missing non-const reverse method in VectorwiseOp (e.g., this enables A.rowwise().reverse() = ...) - Update RealQZ to reduce 2x2 diagonal block of T corresponding to non reduced diagonal block of S to positive diagonal form. - Sparse features: - Bug 632: add support for "dense +/- sparse" operations. The current implementation is based on SparseView to make the dense subexpression compatible with the sparse one. - Bug 1095: add Cholmod*::logDeterminant/determinant functions. - Add SparseVector::conservativeResize() method - Bug 946: generalize Cholmod::solve to handle any rhs expressions. - Bug 1150: make IncompleteCholesky more robust by iteratively increase the shift until the factorization succeed (with at most 10 attempts) - Bug 557: make InnerIterator of sparse storage types more versatile by adding default-ctor, copy-ctor/assignment. - Bug 694: document that SparseQR::matrixR is not sorted. - Block expressions now expose all the information defining the block. - Fix GMRES returned error. - Bug 1119: add support for SuperLU 5 - Performance improvements: - Bug 256: enable vectorization with unaligned loads/stores. This concerns all architectures and all sizes. This new behavior can be disabled by defining EIGEN_UNALIGNED_VECTORIZE=0 - Add support for s390x(zEC13) ZVECTOR instruction set. - Optimize mixing of real with complex matrices by avoiding a conversion from real to complex when the real types do not match exactly. (see bccae23d7018) - Speedup square roots in performance critical methods such as norm, normalize(d). - Bug 1154: use dynamic scheduling for spmv products. - Bug 667, 1181: improve perf with MSVC and ICC through FORCE_INLINE - Improve heuristics for switching between coeff-based and general matrix product implementation at compile-time. - Add vectorization of tanh for float (SSE/AVX) - Improve cost estimates of numerous functors. - Numerous improvements regarding half-packet vectorization: coeff-based products (e.g., Matrix4f*Vector4f is now vectorized again when using AVX), reductions, linear vs inner traversals. - Fix performance regression: with AVX, unaligned stores were emitted instead of aligned ones for fixed size assignment. - Bug 1201: optimize affine*vector products. - Bug 1191: prevent Clang/ARM from rewriting VMLA into VMUL+VADD. - Small speed-up in Quaternion::slerp. - Bug 1201: improve code generation of affine*vec with MSVC - Doc: - Add documentation and exemple for matrix-free solving. - A new documentation page summarizing coefficient-wise math functions. - Bug 1144: clarify the doc about aliasing in case of resizing and matrix product. - A new documentation page summarizing the true performance of Eigen's dense decomposition algorithms. - Misc improvements: - Allow one generic scalar argument for all binary operators/functions. - Add a EIGEN_MAX_CPP_VER option to limit the C++ version to be used, as well as fine grained options to control individual language features. - A new ScalarBinaryOpTraits class allowing to control how different scalar types are mixed. - NumTraits now exposes a digits10 function making internal::significant_decimals_impl deprecated. - Countless improvements and fixes in Tensors module. - Bug 1156: fix several function declarations whose arguments were passed by value instead of being passed by reference - Bug 1164: fix std::list and std::deque specializations such that our aligned allocator is automatically activated only when the user did not specified an allocator (or specified the default std::allocator). - Bug 795: mention allocate_shared as a candidate for aligned_allocator. - Bug 1170: skip calls to memcpy/memmove for empty inputs. - Bug 1203: by-pass large stack-allocation in stableNorm if EIGEN_STACK_ALLOCATION_LIMIT is too small - Improve constness of blas level-2/3 interface. - Implement stricter argument checking for SYRK and SY2K - Countless improvements in the documentations. - Internal: Remove posix_memalign, _mm_malloc, and _aligned_malloc special paths. - Internal: Remove custom unaligned loads for SSE - Internal: introduce [U]IntPtr types to be used for casting pointers to integers. - Internal: NumTraits now exposes infinity() - Internal: EvalBeforeNestingBit is now deprecated. - Bug 1213: workaround gcc linking issue with anonymous enums. - Bug 1242: fix comma initializer with empty matrices. - Bug 725: make move ctor/assignment noexcept - Add minimal support for Array<string> - Improve support for custom scalar types bases on expression template (e.g., boost::multiprecision::number<> type). All dense decompositions are successfully tested. - Most visible fixes: - Bug 1144: fix regression in x=y+A*x (aliasing issue) - Bug 1140: fix usage of _mm256_set_m128 and _mm256_setr_m128 in AVX support - Bug 1141: fix some missing initializations in CholmodSupport - Bug 1143: workaround gcc bug #10200 - Bug 1145, 1147, 1148, 1149: numerous fixes in PastixSupport - Bug 1153: don't rely on __GXX_EXPERIMENTAL_CXX0X__ to detect C++11 support. - Bug 1152: fix data race in static initialization of blas routines. - fix some buffer overflow in product block size computation. - Bug 96, 1006: fix by value argument in result_of - Bug 178: clean several const_cast. - Fix compilation in ceil() function. - Bug 698: fix linspaced for integer types. - Bug 1161: fix division by zero for huge scalar types in cache block size computation. - Bug 774: fix a numerical issue in Umeyama algorithm that produced unwanted reflections. - Bug 901: fix triangular-view with unit diagonal of sparse rectangular matrices. - Bug 1166: fix shortcoming in gemv when the destination is not a vector at compile-time. - Bug 1172: make SparseMatrix::valuePtr and innderIndexPtr properly return null for empty matrices - Bug 537: fix a compilation issue in Quaternion with Apples's compiler - Bug 1186: fix usage of vreinterpretq_u64_f64 (NEON) - Bug 1190: fix usage of __ARM_FEATURE_FMA on Clang/ARM - Bug 1189: fix pow/atan2 compilation for AutoDiffScalar - Fix detection of same input-output when applied permutations, or on solve operations. - Workaround a division by zero in triangular solve when outerstride==0 - Fix compilation of sparse.cast<>().transpose(). - Fix double-conversion warnings throughout the code. - Bug 1207: fix logical-op warnings - Bug 1222, 1223: fix compilation in AutoDiffScalar. - Bug 1229: fix usage of Derived::Options in MatrixFunctions. - Bug 1224: fix regression in (dense*dense).sparseView(). - Bug 1231: fix compilation regression regarding complex_array/=real_array. - Bug 1221: disable gcc 6 warning: ignoring attributes on template argument. - Workaround clang/llvm bug 27908 - Bug 1236: fix possible integer overflow in sparse matrix product. - Bug 1238: fix SparseMatrix::sum() overload for un-compressed mode - Bug 1240: remove any assumption on NEON vector types - Improves support for MKL's PARDISO solver. - Fix support for Visual 2010. - Fix support for gcc 4.1. - Fix support for ICC 2016 - Various Altivec/VSX fixes: exp, support for clang 3.9, - Bug 1258: fix compilation of Map<SparseMatrix>::coeffRef - Bug 1249: fix compilation with compilers that do not support__builtin_prefetch . - Bug 1250: fix pow() for AutoDiffScalar with custom nested scalar type. Eigen 3.2.9 Released on July 18, 2016 Changes since 3.2.8: - Main fixes and improvements: - Improve numerical robustness of JacobiSVD (backported from 3.3) - Bug 1017: prevents underflows in makeHouseholder - Fix numerical accuracy issue in the extraction of complex eigenvalue pairs in real generalized eigenvalue problems. - Fix support for vector.homogeneous().asDiagonal() - Bug 1238: fix SparseMatrix::sum() overload for un-compressed mode - Bug 1213: workaround gcc linking issue with anonymous enums. - Bug 1236: fix possible integer overflow in sparse-sparse product - Improve detection of identical matrices when applying a permutation (e.g., mat = perm * mat) - Fix usage of nesting type in blas_traits. In practice, this fixes compilation of expressions such as A*(A*A)^T - CMake: fixes support of Ninja generator - Add a StorageIndex typedef to sparse matrices and expressions to ease porting code to 3.3 (see) - Bug 1200: make aligned_allocator c++11 compatible (backported from 3.3) - Bug 1182: improve generality of abs2 (backported from 3.3) - Bug 537: fix compilation of Quaternion with Apples's compiler - Bug 1176: allow products between compatible scalar types - Bug 1172: make valuePtr and innerIndexPtr properly return null for empty sparse matrices. - Bug 1170: skip calls to memcpy/memmove for empty inputs. - Others: - Bug 1242: fix comma initializer with empty matrices. - Improves support for MKL's PARDISO solver. - Fix a compilation issue with Pastix solver. - Add some missing explicit scalar conversions - Fix a compilation issue with matrix exponential (unsupported MatrixFunctions module). - Bug 734: fix a storage order issue in unsupported Spline module - Bug 1222: fix a compilation issue in AutoDiffScalar - Bug 1221: shutdown some GCC6's warnings. - Bug 1175: fix index type conversion warnings in sparse to dense conversion. Eigen 3.2.8 Released on February 16, 2016 Changes since 3.2.7: - Main fixes and improvements: - Make FullPivLU::solve use rank() instead of nonzeroPivots(). - Add EIGEN_MAPBASE_PLUGIN - Bug 1166: fix issue in matrix-vector products when the destination is not a vector at compile-time. - Bug 1100: Improve cmake/pkg-config support. - Bug 1113: fix name conflict with C99's "I". - Add missing delete operator overloads in EIGEN_MAKE_ALIGNED_OPERATOR_NEW - Fix (A*B).maxCoeff(i) and similar. - Workaround an ICE with VC2015 Update1 x64. - Bug 1156: fix several function declarations whose arguments were passed by value instead of being passed by reference - Bug 1164: fix std::list and std::deque specializations such that our aligned allocator is automatically activatived only when the user did not specified an allocator (or specified the default std::allocator). - Others: - Fix BLAS backend (aka MKL) for empty matrix products. - Bug 1134: fix JacobiSVD pre-allocation. - Bug 1111: fix infinite recursion in sparse-column-major.row(i).nonZeros() (it now produces a compilation error) - Bug 1106: workaround a compilation issue in Sparse module for msvc-icc combo - Bug 1153: remove the usage of __GXX_EXPERIMENTAL_CXX0X__ to detect C++11 support - Bug 1143: work-around gcc bug in COLAMD - Improve support for matrix products with empty factors. - Fix and clarify documentation of Transform wrt operator*(MatrixBase) - Add a matrix-free conjugate gradient example. - Fix cost computation in CwiseUnaryView (internal) - Remove custom unaligned loads for SSE. - Some warning fixes. - Several other documentation clarifications. Eigen 3.3-beta1 Released on December 16, 2015 For a comprehensive list of change since the 3.2 series, see this page. Main changes since 3.3-alpha1: - Dense features: - Add LU::transpose().solve() and LU::adjoint().solve() API. - Add Array::rsqrt() method as a more efficient shorcut for sqrt().inverse(). - Add Array::sign() method for real and complexes. - Add lgamma, erf, and erfc functions for arrays. - Add support for row/col-wise lpNorm(). - Add missing Rotation2D::operator=(Matrix2x2). - Add support for permutation * homogenous. - Improve numerical accuracy in LLT and triangular solve by using true scalar divisions (instead of x * (1/y)). - Add EIGEN_MAPBASE_PLUGIN and EIGEN_QUATERNION_PLUGIN. - Bug 1074: forbid the creation of PlainObjectBase objects. - Sparse features: - Add IncompleteCholesky preconditioner. - Improve support for matrix-free iterative solvers - Extend setFromTripplets API to allow passing a functor object controlling how to collapse duplicated entries. - Bug 918: add access to UmfPack return code and parameters. - Add support for dense.cwiseProduct(sparse), thus enabling (dense*sparse).diagonal() expressions. - Add support to directly evaluate the product of two sparse matrices within a dense matrix. - Bug 1064: add support for Ref<SparseVector>. - Add supports for real mul/div sparse<complex> operations. - Bug 1086: replace deprecated UF_long by SuiteSparse_long. - Make Ref<SparseMatrix> more versatile. - Performance improvements: - Bug 1115: enable static alignment and thus small size vectorization on ARM. - Add temporary-free evaluation of "D.nolias() ?= C + A*B". - Add vectorization of round, ceil and floor for SSE4.1/AVX. - Optimize assignment into a Block<SparseMatrix> by using Ref and avoiding useless updates in non-compressed mode. This make row-by-row filling of a row-major sparse matrix very efficient. - Improve internal cost model leading to faster code in some cases (see changeset 1bcb41187a45). - Bug 1090: improve redux evaluation logic. - Enable unaligned vectorization of small fixed size matrix products. - Misc improvements: - Improve support for isfinite/isnan/isinf in fast-math mode. - Make the IterativeLinearSolvers module compatible with MPL2-only mode by defaulting to COLAMDOrdering and NaturalOrdering for ILUT and ILLT respectively. - Avoid any OpenMP calls if multi-threading is explicitly disabled at runtime. - Make abs2 compatible with custom complex types. - Bug 1109: use noexcept instead of throw for C++11 compilers. - Bug 1100: Improve cmake/pkg-config support. - Countless improvements and fixes in Tensors module. - Most visible fixes: - Bug 1105: fix default preallocation when moving from compressed to uncompressed mode in SparseMatrix. - Fix UmfPackLU constructor for expressions. - Fix degenerate cases in syrk and trsm BLAS API. - Fix matrix to quaternion (and angleaxis) conversion for matrix expression. - Fix compilation of sparse-triangular to dense assignment. - Fix several minor performance issues in the nesting of matrix products. - Bug 1092: fix iterative solver ctors for expressions as input. - Bug 1099: fix missing include for CUDA. - Bug 1102: fix multiple definition linking issue. - Bug 1088: fix setIdenity for non-compressed sparse-matrix. - Fix SparseMatrix::insert/coeffRef for non-empty compressed matrix. - Bug 1113: fix name conflict with C99's "I". - Bug 1075: fix AlignedBox::sample for runtime dimension. - Bug 1103: fix NEON vectorization of complex<double> multiplication. - Bug 1134: fix JacobiSVD pre-allocation. - Fix ICE with VC2015 Update1. - Improve cmake install scripts. Eigen 3.2.7 Released on November 5, 2015 Changes since 3.2.6: - Main fixes and improvements: - Add support for dense.cwiseProduct(sparse). - Fix a regression regarding (dense*sparse).diagonal(). - Make the IterativeLinearSolvers module compatible with MPL2-only mode by defaulting to COLAMDOrdering and NaturalOrdering for ILUT and ILLT respectively. - Bug 266: backport support for c++11 move semantic - operator/=(Scalar) now performs a true division (instead of mat*(1/s)) - Improve numerical accuracy in LLT and triangular solve by using true scalar divisions (instead of mat * (1/s)) - Bug 1092: fix iterative solver constructors for expressions as input - Bug 1088: fix setIdenity for non-compressed sparse-matrix - Bug 1086: add support for recent SuiteSparse versions - Others: - Add overloads for real-scalar times SparseMatrix<complex> operations. This avoids real to complex conversions, and also fixes a compilation issue with MSVC. - Use explicit Scalar types for AngleAxis initialization - Fix several shortcomings in cost computation (avoid multiple re-evaluation in some very rare cases). - Bug 1090: fix a shortcoming in redux logic for which slice-vectorization plus unrolling might happen. - Fix compilation issue with MSVC by backporting DenseStorage::operator= from devel branch. - Bug 1063: fix nesting of unsupported/AutoDiffScalar to prevent dead references when computing second-order derivatives - Bug 1100: remove explicit CMAKE_INSTALL_PREFIX prefix to conform to cmake install's DESTINATION parameter. - unsupported/ArpackSupport is now properly installed by make install. - Bug 1080: warning fixes Eigen 3.2.6 Released on October 1, 2015 Changes since 3.2.5: - fix some compilation issues with MSVC 2013, including bugs 1000 and 1057 - SparseLU: fixes to support EIGEN_DEFAULT_TO_ROW_MAJOR (bug 1053), and for empty (bug 1026) and some structurally rank deficient matrices (bug 792) - Bug 1075: fix AlignedBox::sample() for Dynamic dimension - fix regression in AMD ordering when a column has only one off-diagonal non-zero (used in sparse Cholesky) - fix Jacobi preconditioner with zero diagonal entries - fix Quaternion identity initialization for non-implicitly convertible types - Bug 1059: fix predux_max<Packet4i> for NEON - Bug 1039: fix some issues when redefining EIGEN_DEFAULT_DENSE_INDEX_TYPE - Bug 1062: fix SelfAdjointEigenSolver for RowMajor matrices - MKL: fix support for the 11.2 version, and fix a naming conflict (bug 1067) Eigen 3.3-alpha1 Released on September 4, 2015 See the announcement. Eigen 3.2.5 Released on June 16, 2015 Changes since 3.2.4: - Changes with main impact: - Improve robustness of SimplicialLDLT to semidefinite problems by correctly handling structural zeros in AMD reordering - Re-enable supernodes in SparseLU (fix a performance regression in SparseLU) - Use zero guess in ConjugateGradients::solve - Add PermutationMatrix::determinant method - Fix SparseLU::signDeterminant() method, and add a SparseLU::determinant() method - Allows Lower|Upper as a template argument of CG and MINRES: in this case the full matrix will be considered - Bug 872: remove usage of std::bind* functions (deprecated in c++11) - Numerical robustness improvements: - Bug 1014: improve numerical robustness of the 3x3 direct eigenvalue solver - Bug 1013: fix 2x2 direct eigenvalue solver for identical eigenvalues - Bug 824: improve accuracy of Quaternion::angularDistance - Bug 941: fix an accuracy issue in ColPivHouseholderQR by continuing the decomposition on a small pivot - Bug 933: improve numerical robustness in RealSchur - Fix default threshold value in SPQR - Other changes: - Fix usage of EIGEN_NO_AUTOMATIC_RESIZING - Improved support for custom scalar types in SparseLU - Improve cygwin compatibility - Bug 650: fix an issue with sparse-dense product and rowmajor matrices - Bug 704: fix MKL support (HouseholderQR) - Bug 705: fix handling of Lapack potrf return code (LLT) - Bug 714: fix matrix product with OpenMP support - Bug 949: add static assertions for incompatible scalar types in many of the dense decompositions - Bugs 957, 1000: workaround MSVC/ICC compilation issues when using sparse blocks - Bug 969: fix ambiguous calls to Ref - Bugs 972, 986: add support for coefficient-based product with 0 depth - Bug 980: fix taking a row (resp. column) of a column-major (resp. row-major) sparse matrix - Bug 983: fix an alignement issue in Quaternion - Bug 985: fix RealQZ when either matrix had zero rows or columns - Bug 987: fix alignement guess in diagonal product - Bug 993: fix a pitfall with matrix.inverse() - Bugs 996, 1016: fix scalar conversions - Bug 1003: fix handling of pointers non aligned on scalar boundary in slice-vectorization - Bug 1010: fix member initialization in IncompleteLUT - Bug 1012: enable alloca on Mac OS or if alloca is defined as macro - Doc and build system: 733, 914, 952, 961, 999 Eigen 3.2.4 Released on January 21, 2015 Changes since 3.2.3: - Fix compilation regression in Rotation2D - Bug 920: fix compilation issue with MSVC 2015. - Bug 921: fix utilization of bitwise operation on enums in first_aligned. - Fix compilation with NEON on some platforms. Eigen 3.2.3 Released on December 16, 2014 Changes since 3.2.2: - Core: - Enable Mx0 * 0xN matrix products. - Bug 859: fix returned values for vectorized versions of exp(NaN), log(NaN), sqrt(NaN) and sqrt(-1). - Bug 879: tri1 = mat * tri2 was compiling and running incorrectly if tri2 was not numerically triangular. Workaround the issue by evaluating mat*tri2 into a temporary. - Bug 854: fix numerical issue in SelfAdjointEigenSolver::computeDirect for 3x3 matrices. - Bug 884: make sure there no call to malloc for zero-sized matrices or for a Ref<> without temporaries. - Bug 890: fix aliasing detection when applying a permutation. - Bug 898: MSVC optimization by adding inline hint to const_cast_ptr. - Bug 853: remove enable_if<> in Ref<> ctor. - Dense solvers: - Sparse: - Fix out-of-bounds memory write when the product of two sparse matrices is completely dense and performed using pruning. - UmfPack support: fix redundant evaluation/copies when calling compute(), add support for generic expressions as input, and fix extraction of the L and U factors (Bug 911). - Improve SparseMatrix::block for const matrices (the generic path was used). - Fix memory pre-allocation when permuting inner vectors of a sparse matrix. - Fix SparseQR::rank for a completely empty matrix. - Fix SparseQR for row-major inputs. - Fix SparseLU::absDeterminant and add respective unit test. - BiCGSTAB: make sure that good initial guesses are not destroyed by a bad preconditioner. - Geometry: - Fix Hyperplane::Through(a,b,c) when points are aligned or identical. - Fix linking issues in OpenGLSupport. - OS, build system and doc: Eigen 3.2.2 Released on August 4, 2014 Changes since 3.2.1: - Core: - Relax Ref such that Ref<MatrixXf> accepts a RowVectorXf which can be seen as a degenerate MatrixXf(1,N) - Fix performance regression for the vectorization of sub columns/rows of matrices. - EIGEN_STACK_ALLOCATION_LIMIT: Raise its default value to 128KB, make use of it to assert on maximal fixed size object, and allows it to be 0 to mean "no limit". - Bug 839: Fix 1x1 triangular matrix-vector product. - Bug 755: CommaInitializer produced wrong assertions in absence of Return-Value-Optimization. - Dense solvers: - Add a rank() method with threshold control to JacobiSVD, and make solve uses it to return the minimal norm solution for rank-deficient problems. - Various numerical fixes in JacobiSVD, including:bug 843, and the move from Lapack to Matlab strategy for the default threshold. - Various numerical fixes in LDLT, including the case of semi-definite complex matrices. - Fix ColPivHouseholderQR::rank(). - Bug 222: Make temporary matrix column-major independently of EIGEN_DEFAULT_TO_ROW_MAJOR in BlockHouseholder. - Sparse: - Bug 838]: Fix dense * sparse and sparse * dense outer products and detect outer products from either the lhs or rhs. - Make the ordering method of SimplicialL[D]LT configurable. - Fix regression in the restart mechanism of BiCGSTAB. - Bug 836: extend SparseQR to support more columns than rows. - Bug 808: Use double instead of float for the increasing size ratio in CompressedStorage::resize, fix implicit conversions from int/longint to float/double, and fix set_from_triplets temporary matrix type. - Bug 647: Use smart_copy instead of bitwise memcpy in CompressedStorage. - GMRES: Initialize essential Householder vector with correct dimension. - Geometry: - OS, build system and doc: - Fix compilation with Windows CE. - Fix some ICEs with VC11. - Check IMKL version for compatibility with Eigen - Bug 754: Only inserted (!defined(_WIN32_WCE)) analog to alloc and free implementation. - Bug 803: Avoid char* to int* conversion. - Bug 819: Include path of details.h file. - Bug 738: Use the "current" version of cmake project directories to ease the inclusion of Eigen within other projects. - Bug 815: Fix doc of FullPivLU wrt permutation matrices. - Bug 632: doc: Note that dm2 = sm1 + dm1 is not possible - Extend AsciiQuickReference (real, imag, conjugate, rot90) Eigen 3.2.1 Released on February 26, 2014 Changes since 3.2.0: - Eigen2 support is now deprecated and will be removed in version 3.3. - Core: - Bug fix for Ref object containing a temporary matrix. - Bug 654: Allow construction of row vector from 1D array. - Bug 679: Support cwiseMin() and cwiseMax() on maps. - Support conservativeResize() on vectors. - Improve performance of vectorwise and replicate expressions. - Bug 642: Add vectorization of sqrt for doubles, and make sqrt really safe if EIGEN_FAST_MATH is disabled. - Bug 616: Try harder to align columns when printing matrices and arrays. - Bug 579: Add optional run-time parameter to fixed-size block methods. - Implement .all() and .any() for zero-sized objects - Bug 708: Add placement new and delete for arrays. - Bug 503: Better C++11 support. - Dense linear algebra: - Bug 689: Speed up some matrix-vector products by using aligned loads if possible. - Make solve in FullPivHouseholderQR return least-square solution if there is no exact solution. - Bug 678: Fix fullPivHouseholderQR for rectangular matrices. - Fix a 0/0 issue in JacobiSVD. - Bug 736: Wrong result in LDLT::isPositiveDefinite() for semi-definite matrices. - Bug 740: Fix overflow issue in stableNorm(). - Make pivoting HouseholderQR compatible with custom scalar types. - Geometry: - Fix compilation of Transform * UniformScaling - Sparse matrices: - Fix elimination tree and SparseQR for fat rectangular matrices. - Bug 635: add isCompressed to MappedSparseMatrix for compatibility. - Bug 664: Support iterators without operator< in setFromTriplets(). - Fixes in SparseLU: infinite loop, aliasing issue when solving, overflow in memory allocation, use exceptions only if enabled (bug 672). - Fixes in SparseQR: reduce explicit zero, assigning result to map, assert catching non-conforming sizes, memory leak. - Bug 681: Uninitialized value in CholmodSupport which may lead to incorrect results. - Fix some issues when using a non-standard index type (bug 665 and more) - Update constrained CG (unsupported module) to Eigen3. - OS and build system: - MacOS put OpenGL header files somewhere else from where we expected it. - Do not assume that alloca() is 16-byte aligned on Windows. - Compilation fixes when using ICC with Visual Studio. - Fix Fortran compiler detection in CMake files. - Fix some of our tests (bugs 744 and 748 and more). - Fix a few compiler warnings (bug 317 and more). - Documentation fixes (bugs 609, 638 and 739 and more). Eigen 3.1.4 Released on August 02, 2013. Eigen 3.0.7 Released on August 02, 2013 Changes since 3.0.6: Eigen 3.2.0 Released on July 24, 2013. Major new features and optimizations since 3.1: -. Eigen 3.2 represents about 600 commits since Eigen 3.1. Eigen 3.2-rc2 Released on July 19, 2013. Changes since 3.2-rc1: - Rename DenseBase::isFinite() to allFinite() to avoid a future naming collision. - Fix an ICE with ICC 11.1. Eigen 3.2-rc1 Released on July 17, 2013. Main changes since 3.2-beta1: - New features: - Bug 562: Add vector-wise normalized and normalize functions. - Bug 564: Add hasNaN and isFinite members. - Bug 579: Add support for mixed static/dynamic-size .block(). - Bug 588: Add support for determinant in SparseLU. - Add support in SparseLU to solve with L and U factors independently. - Allow multiplication-like binary operators to be applied on type combinations supported by scalar_product_traits. - Bug 596: Add conversion from SparseQR::matrixQ() to a SparseMatrix. - Bug 553: Add support for sparse matrix time sparse self-adjoint view products. - Accuracy and performance: - Improve BiCGSTAB robustness: fix a divide by zero and allow to restart with a new initial residual reference. - Bug 71: Enable vectorization of diagonal products in more cases. - Bug 620: Fix robustness and performance issues in JacobiSVD::solve. - Bug 609: Improve accuracy and consistency of the eulerAngles functions. - Bug 613: Fix accuracy of SSE sqrt for very small numbers. - Enable SSE with ICC even when it mimics a gcc version lower than 4.2. - Add SSE4 min/max for integers. - Bug 590 & 591: Minor improvements in NEON vectorization. - Bug fixes: - Fix HouseholderSequence::conjugate() and ::adjoint(). - Fix SparseLU for dense matrices and matrices in non compressed mode. - Fix SparseMatrix::conservativeResize() when one dimension is null. - Fix transposeInpPlace for arrays. - Fix handmade_aligned_realloc. - Bug 554: Fix detection of the presence of posix_memalign with mingw. - Bug 556: Workaround mingw bug with -O3 or -fipa-cp-clone options. - Bug 608: Fix sign computation in LDLT. - Bug 567: Fix iterative solvers to immediately return when the initial guess is the true solution and for trivial solution. - Bug 607: Fix support for implicit transposition from dense to sparse vectors. - Bug 611: Fix support for products of the form diagonal_matrix * sparse_matrix * diagonal_matrix. - Others: - Bug 583: Add compile-time assertion to check DenseIndex is signed. - Bug 63: Add lapack unit tests. They are automatically downloaded and configured if EIGEN_ENABLE_LAPACK_TESTS is ON. - Bug 563: Assignment to Block<SparseMatrix> is now allowed on non-compressed matrices. - Bug 626: Add assertion on input ranges for coeff* and insert members for sparse objects. - Bug 314: Move special math functions from internal to numext namespace. - Fix many warnings and compilation issues with recent compiler versions. - Many other fixes including Bug 230, Bug 482, Bug 542, Bug 561, Bug 564, Bug 565, Bug 566, Bug 578, Bug 581, Bug 595, Bug 597, Bug 598, Bug 599, Bug 605, Bug 606, Bug 615. Eigen 3.1.3 Released on April 16, 2013) Eigen 3.2-beta1 Released on March 07, 2013 Main changes since 3.1: - Dense modules - A new Ref<> class allowing to write non templated function taking various kind of Eigen dense objects without copies. - New RealQZ factorization and GeneralizedEigenSolver - Optimized outer products for non rank-1 update operations. - Sparse modules - New SparseLU module: built-in sparse LU with supernodes and numerical row pivoting (port of SuperLU making the SuperLUSupport module obsolete). - New SparseQR module: rank-revealing sparse QR factorization with numerical column pivoting. - OrderingMethods: extended with COLAMD ordering and a unified ordering API. - Support for generic blocks of sparse matrices. - Add conservative resize feature on sparse matrices. - Add uniform support for solving sparse systems with sparse right hand sides. - Support to external libraries - New MetisSupport module: wrapper to the famous graph partitioning library. - New SPQRSupport module: wrapper to suitesparse's supernodal QR solver. - Misc - Improved presentation and clarity of Doxygen generated documentation (modules are now organized into chapters, treeview panel and search engine for quick navagitation). - New compilation token EIGEN_INITIALIZE_MATRICES_BY_NAN to help debugging. - All bug fixes of the 3.1 branch, plus a couple of other fixes (including 211, 479, 496, 508, 552) Eigen 3.1.2 Released on Nov 05, 2012 Changes since 3.1.1: -. - MKL support: represents about 600 commits since Eigen 3.0.
http://eigen.tuxfamily.org/index.php?title=ChangeLog&oldid=2412
CC-MAIN-2020-16
refinedweb
7,617
51.14
Supp use collapsible regions in js files, but in this case I would lose javascript intellisense in VS 2008. I even thought about creating my own text editor plug-in for VS, but again - what about intellisense. Earlier or later, I found one nice solution to the problem on Microsoft forums. Yes - it's so simple. The solution uses simple macros which parses current document and creates collapsible regions for //#region //#endregion pairs. So simple :) Thanks to the author! And because I don't not find it to be easily detectable in the internet, I decided to blog this. Just do the following steps to support //#region directive: 1) Open Macro explorer: 2) Create new macro: 3) Name it "OutlineRegions": 4) Click "Edit" macro and paste the following VB code into it: Option Strict Off Option Explicit Off Imports System Imports EnvDTE Imports EnvDTE80 Imports System.Diagnostics Imports System.Collections Public Module JsMacros Sub OutlineRegions() Dim selection As EnvDTE.TextSelection = DTE.ActiveDocument.Selection Const REGION_START As String = "//#region" Const REGION_END As String = "//#endregion" selection.SelectAll() Dim text As String = selection.Text selection.StartOfDocument(True) Dim startIndex As Integer Dim endIndex As Integer Dim lastIndex As Integer = 0 Dim startRegions As Stack = New Stack() Do startIndex = text.IndexOf(REGION_START, lastIndex) endIndex = text.IndexOf(REGION_END, lastIndex) If startIndex = -1 AndAlso endIndex = -1 Then Exit Do End If If startIndex <> -1 AndAlso startIndex < endIndex Then startRegions.Push(startIndex) lastIndex = startIndex + 1 Else ' Outline region ... selection.MoveToLineAndOffset(CalcLineNumber(text, CInt(startRegions.Pop())), 1) selection.MoveToLineAndOffset(CalcLineNumber(text, endIndex) + 1, 1, True) selection.OutlineSection() lastIndex = endIndex + 1 End If Loop selection.StartOfDocument() End Sub Private Function CalcLineNumber(ByVal text As String, ByVal index As Integer) Dim lineNumber As Integer = 1 Dim i As Integer = 0 While i < index If text.Chars(i) = vbCr Then lineNumber += 1 i += 1 End If i += 1 End While Return lineNumber End Function End Module 5) Save the macro and close the editor. 6) Now let's assign shortcut to the macro. Go to Tools->Options->Environment->Keyboard and search for your macro in "show commands containing" textbox: 7) now in textbox under the "Press shortcut keys" you can enter the desired shortcut. I use Ctrl+M+E. I don't know why - I just entered it first time and use it now :) That's it, now if you write the following javascript code: /// <reference name="MicrosoftAjax.debug.js" /> /// <reference name="MicrosoftAjaxTimer.debug.js" /> /// <reference name="MicrosoftAjaxWebForms.debug.js" /> // KWB.BaseWizard class constructor //#region Type.registerNamespace("KWB"); KWB.BaseWizard = function(field) { // call base constructor KWB.BaseWizard.initializeBase(this); this._state = null; } //#endregion // KWB.BaseWizard Class Body //#region KWB.BaseWizard.prototype = { // Sys.Component Overrides //#region dispose : function () { this._state = null; this._stateField = null; this.lastClicked = null; Sys.Application.remove_load(this.appLoad); KWB.BaseWizard.callBaseMethod(this, 'dispose'); }, initialize : function() { KWB.BaseWizard.callBaseMethod(this, 'initialize'); }, //#endregion // Properties //#region get_state : function() { return this._state; }, set_state : function(value) { this._state = value; }, //#endregion // Methods //#region getNext : function(current) { /// <summary> /// Override. Called when 'next' is called. Determines next frame to display /// </summary> /// <param name="current">current SelectedIndex</param> return current + 1; }, getPrevious : function(current) { /// <summary> /// Override. Called when 'previous' is called. Determines previous frame to display /// </summary> /// <param name="current">current SelectedIndex</param> return current - 1; }, finish : function() { /// <summary> /// Override. Called when 'finish' is pressed /// </summary> return true; }, //#endregion // Event handlers //#region nextClick : function() { //TODO: add contents later } //#endregion }; KWB.BaseWizard.registerClass('KWB.BaseWizard', Sys.Component); //#endregion // WizardStepType enumeration //#region KWB.WSType = function(){}; KWB.WSType.prototype = { Server : 1, Client : 2, Service : 4 } KWB.WSType.registerEnum("KWB.WSType", false); //#endregion if(typeof(Sys) !== "undefined")Sys.Application.notifyScriptLoaded(); Now click Ctrl+M+E and you will see: Veeery handy ! This is possible in VS because actually you can outline and collapse any selection you like manually, this work in most editors for VS. If you are interested about that shortcuts see Text Manipulation Shortcut Keys, Visual C# Scheme . The shortcuts starting with Ctrl+M are the ones that manipulate test outlining and toggling. Check out my previous post related to js files in AJAX scenario, and see how we can remove unnecessary white spaces and comment blocks from them for use in production: Auto generate release scripts for web application using T4 template Hope this helps. 43 comments: Thanks this is great Thanks for passing this on I searched for regions and js in google and found your post I am using ExtJs in VS2008 and had about 400 lines of js that was becoming difficult to manage Andy Hmm... I'm using VS 2008 and this doesn't seem to work for me. The macro runs but nothing ever gets collapsed... Any ideas..?? Hi Jason, I use this macro in VS 2008 and it works ok, try to repeat steps described in the article again, hope this helps. Kirill Thank you very much!!! This is a precious help for the ExtJS developers using VS2008. Jason: You must check the name of the module in the above code with the name of your new Macro. both names must match! Nice, but you still have to manually type the comments //#region, //#endregion. I would really like to be able to outline large javascript files without typing the region comments. Also, beware that you must have a empty line after the last //#endregion comment or the macro will produce an error stating 'Value does not fall within the expected range'. seeker, Yes it does make sence if you need to outline the region only once, while using //#region comment directive you are stating the regions which are checked into source control with code itself, it means any developer working with the code can download it from source server, press shortcut buttons in editor and that's it - the js file is outlined into logical groups. Regards, Kirill Thanks Kirill. I will use your method going forward. I had just inherited a 4300 line Javascript file and it sure would've been nice to click a button and wham, everything is outlined. At least the next guy to get this file can do that after I comment it. Thanks again Kirill! I've been using you're comment method now for almost two weeks. It's a huge help. Much obliged, really useful and quick to set up. Was about to give up on VS2008 and JS. Thank-you! very helpful.. thanks.. If you look at the previous page you'll see my post about how to collapse the code without having to put in region lines. I've made some major changes to it since the original post (updates to have it use regular exp to find the funtion lines). If I get some time I might post the new code as it is much nicer than my original post --lkspencer Thank you very much for this! This is fantastic, thanks for pointing it out. Made my day! Fantastic work dear!! Thanks a lot.... It works in vs05 and vs08 both.. May I suggest you edit the Macro to enable the text on the #region line to be visible? Change: - ' Outline region ... selection.MoveToLineAndOffset(CalcLineNumber(text, CInt(startRegions.Pop())), 1) To: - ' Outline region ... selection.MoveToLineAndOffset(CalcLineNumber(text, CInt(startRegions.Pop())), text.Length) This will enable collapsed sections to read: - [+]//#region Region Description [...] Which has greater readability than: - [+][...] A useful macro. Thanks for presenting it. This is awesome! Thank you very much assert(Your.KungFu == STRONG ); Thx a lot for helping me to clean up my js-files ;). Great work, greetings from Austria. awesome! thanks! Nie script. I got the "Stack Empty" Error. I noticed that I used to have //#region automation part //#endregion automation part this macro didnot like anything after word region on the same line. I removed and standardised to //#region //#endregion and works like a charm! Thanks hips! Anyone having a problem with this in VS2010? Good work. I added this to collapse regions of HTML/ASPX pages too. Sub OutlineRegions() Const REGION_START As String = "//#region" Const REGION_END As String = "//#endregion" OutlineRegionsSub(REGION_START, REGION_END) End Sub Sub OutlineRegionsHTML() Const REGION_START As String = "<!--#region-->" Const REGION_END As String = "<!--#endregion-->" OutlineRegionsSub(REGION_START, REGION_END) End Sub Sub OutlineRegionsSub(ByVal REGION_START As String, ByVal REGION_END As String) ... I can't get this to work in VS2010 RC. The macro isn't erroring when I run it, but I'm getting no collapsing. this is really cool stuff, really i liked very much. I implemented for VS2008 Nice! Thanks, really great. Kizmar, it works in VS2010 too. Just don't forget to import the System.Collections namespace like: Imports System.Collections Best regards Muchas gracias! Nice Post! Esto es de mucha utilidad. Esto es de mucha ayuda para las personas que trabajan con .Net y quieran agregar regiones a traves de #region y #endregion en JavaScript Saludos! Hi, Im using ur tooltip.when i click my menu tab im getting javascript error.delete this.get_element().htIFrame; this is error.Plz answer me.its urgent Hello Kiril, Thank you for this job. It is very useful. I wonder if it possible to remove this collapse. when i want to change place of //#region . Because, it is still there. Thank you. Hi Eman, What if you try to close the file and open / run macro again? I think this should work. (cannot test as dont have environment setup for this) Regards, Kirill Flippin' sweet! Thanks! Hi guys! You may be interested to have js code outlining as addin for VS2008? Here it goes... JsOutline Any comments appreciated! Thanks a lot for this... It worked really well in VS2010. I could kiss you! - But instead I will just leave you a positive comment. This worked great for me and is a welcome feature with long winded js files. Great article... Really helped... Thank you very much... God bless you... Keep sharing such things... Great post Can i ask if you have a script that can expand all regions thanks :) Works Great.. Really Cool Thanks It is a pity that MS have removed macros from 2012 but not given us this functionality. Apparently they removed it as it was not being widely used. So instead of leaving it and not updating it, they removed it entirely. Thank you Microsoft :p Just found this for Visual Studio 2012: /*#region RegionName*/ css goes here /*#endregion*/ :) If I do want use this on vs2012 to apply regions to any type file? It's possible? I just made it work!!! Great job!!! Thanks!
http://blog.devarchive.net/2008/04/using-region-directive-with-javascript.html
CC-MAIN-2014-52
refinedweb
1,742
60.11
I language and get an abstract syntax tree. Anything that is prefixed with dollar sign is a language construct, anything not is a literal. As with most parsing tasks, I jump straight to fparsec. namespace FPropEngine module Parser = open FParsec type Ast = | Bag of string list | Literals of string | ForLoop of string * Ast * Ast list let tokenPrefix = '$' let tagStart = pstring (string tokenPrefix) let token n = tagStart >>. pstring n |>> ignore let tagDelim = eof <|> spaces1 let endTag = token "end" let forTag = token "for" let languageSpecific = [attempt endTag; forTag] |> List.map (fun i -> i .>> tagDelim) let anyReservedToken = attempt (languageSpecific |> List.reduce (<|>)) let tokenable = many1Chars (satisfy isDigit <|> satisfy isLetter) let element = attempt (tokenable .>> pstring ".") <|> tokenable let nonTokens = many1Chars (satisfy (isNoneOf [tokenPrefix])) |>> Literals let bag = tagStart >>. many1 element |>> Bag let innerElement = notFollowedBy anyReservedToken >>. (nonTokens <|> bag) let tagFwd, tagImpl = createParserForwardedToRef() let forLoop = parse { do! spaces do! forTag do! spaces do! skipAnyOf "$" let! alias = tokenable do! spaces let! _ = pstring "in" do! spaces let! elements = bag do! spaces let! body = many tagFwd do! spaces do! endTag do! spaces return ForLoop (alias, elements, body) } tagImpl := attempt forLoop <|> innerElement let get str = match run (many tagFwd) str with | Success(r, _, _) -> r | Failure(r,_,_) -> failwith "nothing" I’ve exposed only one language construct (a for loop), and anything else is just a basic string replace bag (which will already be deconstructed into its individual components, i.e. $foo.bar will be ["foo";"bar"]). Contexts The next thing we need is a way to store a context, and to resolve a requested path from the context. Since I want to be able to add key value pairs to the context but have the values be different (sometimes they should be a string, other times they should be other context bags), we need to be able to handle that. For example, lets say I make a context called “anton”. In this context I want to have key “isGreat” that resolves to “kropp”. That would end up being a leaf node in this context path. But how do I represent a path like “anton.shmanton.isGreat”. The key “shmanton” should resolve to a new context under the current context of “anton”. Also, in order to leverage for loops, we need some keys to resolve to multiple values. So now we have 3 types of results: a string, a string list, or another context. Given that, lets create a context class that can handle creating these contexts, as well as resolving a context path. module Formatter = open Parser open System.Collections.Generic type Context () = let ctxs = new Dictionary<string, ContextType>() let runtime = new Dictionary<string, string>() member x.add (key, values) = ctxs.[key] <- List values member x.add (key, value) = ctxs.[key] <- Value value member x.add (key, ctx) = ctxs.[key] <- More ctx member x.runtimeAdd (key, value) = runtime.[key] <- value member x.runtimeRemove key = runtime.Remove key |> ignore member x.add (dict:Dictionary<string, string>) = for keys in dict do ctxs.[keys.Key] <- Value keys.Value member x.resolve list = match list with | [] -> None | h::t -> if runtime.ContainsKey h then Some [runtime.[h]] else if ctxs.ContainsKey h then ctxs.[h].resolve t else None and ContextType = | Value of string | List of string list | More of Context member x.resolve list = match x with | Value str -> Some [str] | List strs -> Some strs | More ctx -> ctx.resolve list One thing that is tricky here: ctxs.[h].resolve t doesn’t call the same resolve function on the Context class. It actually calls the resolve function on the ContextType. This way each type can resolve itself. If you call resolve on a string, it’ll return itself (as a list). If you resolve on a list, it’ll return the list. But, if you call resolve on a context, it’ll proxy that request back to the Context class. You may also be wondering what “runTimeAdd” and “runtimeRemove” are. Those will make sense when we actually create the language interpreter. It may be a little overkill to call this a “language” but it kind of is! Applying the context to the AST Now we need to interpret the syntax tree and apply the context bag to any context related tokens. If anybody read my previous posts about my language I wrote, this should all sound pretty similar (cause it is!) module Runner = open Formatter open Parser let rec private eval (ctx : Context) = function | Bag list -> match ctx.resolve list with | Some item -> item | None -> [List.fold (fun acc i -> acc + "." + i) "$" list] | Literals l -> [l] | ForLoop (alias, bag, contents) -> [for value in (eval ctx bag) do ctx.runtimeAdd (alias, value) for elem in contents do yield! eval ctx elem ctx.runtimeRemove alias] let run ctx text = Parser.get text |> List.map (eval ctx) |> List.reduce List.append |> List.reduce (+) What we have here is an eval function that acts as the main interpreter dispatch loop. It’s asked to evaluate the current token its given based on its current context. If we have a string literal, we just return it (as a list, since I am creating a list of evaluated results). If there is a bag (like $anton.isgreat) then try and resolve the bag path from the context. If there is a for loop we want to evaluate the result of the for predicate and bind its value to the alias. Then for each element we want to evaluate the contents of the for loop. This is where we need to create a runtime storage of the alias, so we can do later lookups in the context. You can see that each for loop adds its alias to the context and then removes it from the context afterwards. This would mimic a regular language where inner loops can access outer declared variables, but not vice versa. Trying it out Let’s give our templating engine a whirl: let artists = new Context() let root = new Context() artists.add("nirvana", ["come as you are";"smells like teen spirit"]); root.add("artists", artists ); let templateText = "$for $song in $artists.nirvana The current song is $song! $for $secondTime in $artists.nirvana Oh lets just loop again for fun. First value: $song, second: $secondTime $end $end" And the result is > Runner.run root templateText;; val it : string = "The current song is come as you are! Oh lets just loop again for fun. First value: come as you are, second: come as you are Oh lets just loop again for fun. First value: come as you are, second: smells like teen spirit The current song is smells like teen spirit! Oh lets just loop again for fun. First value: smells like teen spirit, second: come as you are Oh lets just loop again for fun. First value: smells like teen spirit, second: smells like teen spirit " Not too bad! Full source available at my github 1 thought on “A simple templating engine”
https://onoffswitch.net/2014/03/10/simple-template-engine/
CC-MAIN-2020-16
refinedweb
1,148
76.72
Divide an integer into groups with C# October 28, 2016 3 Comments start integer. The following function will perform just that: public static IEnumerable<int> DistributeInteger(int total, int divider) { if (divider == 0) { yield return 0; } else { int rest = total % divider; double result = total / (double)divider; for (int i = 0; i < divider; i++) { if (rest-- > 0) yield return (int)Math.Ceiling(result); else yield return (int)Math.Floor(result); } } } Call it as follows: List<int> test = DistributeInteger(20, 3).ToList(); “test” will include 7,7,6 as expected. View all various C# language feature related posts here. Very interesting. Please let to share it on Google+. Do you mean you would like to share this example on Google+? Go ahead. //Andras Thanks for your post. I had exactly the same problem some time ago. My solution is similar but only uses integer arithmetic by subsequentially dividing the remaining count by the decreasing number of remaining parts.
https://dotnetcodr.com/2016/10/28/divide-an-integer-into-groups-with-c-2/
CC-MAIN-2022-40
refinedweb
156
58.38
From: Beman Dawes (bdawes_at_[hidden]) Date: 2003-10-21 08:05:54 At 12:28 PM 10/20/2003, Pavol Droba wrote: >... >iterator_range is merely an utility to make some tasks of in the library >easier. I don't know why do you pay so much attention to it. ... Because in the current underspecified documentation iterator_range appears to take any sequence denoted by an iterator range and turn it into a container which can then be used in the algorithms which take ContainerT arguments. This makes the algorithm interfaces look flexible enough that iterator range interfaces (like the current STL) are unnecessary. Take trim_left as an example. The template parameter is ContainerT, which isn't further defined. From the name, it would be easy to assume the requirements were very general, such as the "Container Requirements" table 65 in 23.1. It would be easy to jump to the conclusion that these requirements could be met by iterator_range. But by reading the code, we find that trim_left works by calling ContainerT::erase. That means the actual requirement is tighter; the container has to be mutable and must support erase. There are lots of useful cases, including C arrays and the pseudo-container produced by iterator_range, which don't meet that requirement. Seen in that light, the trim_left style is more limited than the traditional STL style which specifies ranges as a pair of iterators. The library seems to acknowledge this by actually implementing trim_left and other algorithms as wrappers around traditional STL style interfaces in namespace detail. >Don't you think, that there is a time to look beyon the STL? Look the list >for so-much wanted container_traits and now being-developed >container_algo(s). >I personaly think, that the STL interface is obsolete and should be >replaced with something more simplier to use. Therefor the string_algo >library abandons the STL like interface completely in the favor of new, >container-oriented one. The problem is that the proposed container-oriented interface won't handle many common sequences, such a C arrays. It won't handle operations on a sequence which is a portion of a longer sequence. The STL interface will handle these cases. So no, I don't think "the STL interface is obsolete." >But I don't understand your point about the implementaion of algorithms >being in the detail namespace. What's wrong with it, and what additional >documentation do you request? > >Even in the STL specification, the definitions of the algorithms >are quite vaque in the terms of the implementation. The issue isn't implementation, it is the lack of requirements on types specified as template parameters, and the lack of preconditions, exceptions thrown, postconditions, and other firm specifications for functions. Without that fundamental documentation, it doesn't seem possible to evaluate the proposal. --Beman Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
https://lists.boost.org/Archives/boost/2003/10/54868.php
CC-MAIN-2019-43
refinedweb
490
56.55
tgcrud 1.0.2 Genrate CRUD interface in TurboGears tgcrud is an TurboGears command extension, which could generate a sqlobject/sqlalchemy backend editor/crud (create, read, update, delete) interface based on your Model with kid template. It could be plugged into any projects even if you don’t use kid template. The generated codes are fully customizable. tgcrud heavily use form widgets and show you many TG 1.0 features in it’s controllers/templates. Please refer to for detail The command follow the TurboGears quickstart template style, you could easily add identity, form validation, paginate in your crud interface. If you are a TG beginer, tgcrud help you create a general admin skeleton based on your model. If you are an experienced TG developer, you could get it in minutes since it just done the basic procedure that every time you write a management interface of your model.(document shows how to customize 1-to-1, 1-to-many, many-to-many relationship with widgets. Or you could do it in your way) - Takes advantage of TurboGears form widgets and validation. you’d hardly need to modify the HTML. Install The ‘tgcrud’ command extension is available in Python CheeseShop and TurboGears svn. You can use setuptools to install tgcrud with following command: $ easy_install tgcrud or download the source code and install tgcrud manually. Screencast Yes, there’s a ‘Make a Book Site with TurboGears’ screencast with tgcrud. If you are an experienced TG developer, you could skip to the third. If you are new to TG, you may want to watch all of them to get familiar with TurboGears. - Quickstart TurboGears project, 6.5MB - Design model with toolbox utilities, 7.7MB - tgcrud, the TG’s scaffold, 5.2 MB With tgcrud you could easily generate a Rails scaffold style CRUD interface. The difference is all code in tgcrud is implicit, which leads to more easy customization. Usage - Define your model in model.py - Once you’ve defined your model, you could use “tg-admin crud” command to generate the crud pack. The syntax is:$ tg-admin crud [model class name] [package name] e.x if the model name is BookMark, and the package name we want is BookMarkController, the command is:$ tg-admin crud BookMark BookMarkController Then the ‘admin’ package is generated. You just need take several minutes to customize the formfield to have a proper crud interface. ..note:: you could estimate the result by passing “–dry-run” to the command, such as:$ tg-admin crud BookMark BookMarkController --dry-run With this argument the command will not effect your physical directories. - Import the package to your controllers.py with a line: from BookMarkController import BookMarkController and add a branch on your Root():foo = BookMarkController() - Customize the form filed in admin/controllers.py - Open the to use the customizable interface. Please check for detail instructions. ChangeLog - 1.0.2 - Expand compatibility to all TurboGears 1 version - 1.0.1 - Minor template updates - 1.0 - Fully SQLAlchemy support with - SQLObject/SQLAlchemy auto detection - Able to specify the primary id Minor template updates - Downloads (All Versions): - 61 downloads in the last day - 273 downloads in the last week - 1386 downloads in the last month - Author: Fred Lin - Download URL: - Keywords: turbogears.command - Categories - Package Index Owner: gasolin - DOAP record: tgcrud-1.0.2.xml
https://pypi.python.org/pypi/tgcrud/1.0.2
CC-MAIN-2016-07
refinedweb
552
56.76
29 August 2011 08:58 [Source: ICIS news] By Ariel Chen and Crystal Zhao ?xml:namespace> In eastern Spot transactions have been limited in recent weeks, with prices stagnating, as end-users are just lifting contract volumes, market sources said. Scheduled maintenance at a few SM plants in Shanghai Secco’s 650,000 tonne/year SM is currently undergoing scheduled maintenance that will last up to the middle of September, said a company source. In October, Shuangliang Petrochemical will shut down its 400,000 tonne/year SM unit for a turnaround, said a company source. Meanwhile, production of aniline - another downstream sector for benzene - is quite low, with plants running at around 40-50% of capacity, market sources said. There is less availability of spot benzene supply in Benzene supply in But prices in the domestic Chinese market may get a boost towards the end of the year, given a host of downstream plants due for start-up next year that will increase demand for benzene, industry sources said. Chongqing Fuxiang Petrochemical expects to start production at its 200,000 tonne/year adipic acid unit in the first quarter of next year, while Shanxi Yanchang Petroleum will commence operations at its Shanxi-based 140,000 tonne/year SM unit at the same period. From the caprolactam sector, demand for benzene is also expected to be boosted by a new 200,000 tonne/year caprolactam plant of Zhejiang Hengyi Petrochemical that is due to start up in the first quarter of 2012. Guangdong Kingboard will also likely raise its benzene consumption as the capacity of its Yizheng-based 120,000 tonne/year phenol facility will be increased by 80,000 tonnes/year in 2012. ($1 = CNY6.39)
http://www.icis.com/Articles/2011/08/29/9488513/china-benzene-to-remain-weak-in-near-term-on-soft-demand.html
CC-MAIN-2014-52
refinedweb
286
50.3
green 0.9.9 Test Structure Tutorial ---------------------------- This tutorial *does* cover: - External structure of your project (directory and file layout) - Skeleton of a real test module - How to import stuff from from your project into your test module - Gotchas about naming...everything. - Where to run green from and what the output could look like. This tutorial *does not* cover: -. proj ├── __init__.py ├── foo.py ├── subpkg │ ├── __init__.py │ ├── bar.py │ └── test # test subdirectory in every sub-package │ ├── __init__.py │ └── test_bar.py └── test ├── __init__.py └── test_foo.py The other option is to start mirroring your subpackage layout from within a single test directory. proj ├── __init__.py ├── foo.py ├── subpkg │ ├── __init__.py │ ├── bar.py └── test ├── __init__.py ├── subpkg # mirror sub-package layout inside test dir │ ├── __init__.py │ └── test_bar.py └── test_foo.py ### Skeleton of Test Module ### Assume `foo.py` contains the following contents: ```python def answer(): return 42 class School(): def food(self): return 'awful' def age(self): return 300 ``` Here's a possible version of `test_foo.py` you could have. ```python # Import stuff you need for the unit tests themselves to work import unittest # Import stuff that you want to test. Don't import extra stuff if you don't # have to. from proj.foo import answer, School # If you need the whole module, you can do this: # from proj import foo # # Here's another reasonable way to import the whole module: # import proj.foo as foo # # In either case, you would obviously need to access objects like this: # foo.answer() # foo.School() # Then write your tests class TestAnswer(unittest.TestCase): def test_type(self): "answer() returns an integer" self.assertEqual(type(answer()), int) def test_expected(self): "answer() returns 42" self.assertEqual(answer(), 42) class TestSchool(unittest.TestCase): def test_food(self): school = School() self.assertEqual(school.food(), 'awful') def test_age(self): school = School() self.assertEqual(school.age(), 300) ``` Notes:): - 497 downloads in the last day - 2811 downloads in the last week - 20176 downloads in the last month -.7.xml
https://pypi.python.org/pypi/green/0.9.9.7
CC-MAIN-2015-32
refinedweb
325
68.47
#include <hallo.h> * Amaya [Sat, Jul 29 2006, 12:18:29AM]: > Eduard Bloch wrote: > > Have you set a proper ultimatum and have you made understandable that > > you are going to NMU? I usually do it this way so the terms are clear > > for both sides. And/or using delayed upload to not forget about the > > time period. > > I personally fear that using NMUs as threats (I am not saying that you > do) contributes to some extent to this "Do not NMU my packages" trend. Sure, it is a small path between acting too offensive and getting the things straight (and actually DONE). But if the maintainer does not react to the bug report in any way (not even setting the confirmed tag after eg. one week) s/he should be prepared to be seen as MIA. I think questions about the personal feelings on NMUs should be part of the NM process... > > And I also had cases where someone NMUed my package after three days > > or so without warnings, and IIRC without posting a final diff. That > > sucks! > > Completely! On the other hand, as a game, I have even sponsored NMUs of > my own packages. But of course, YMMV. I know that feeling, and IMO it can be enjoyable: getting things done without investing own effort into them ;-) Eduard. -- Naja, Garbage Collector eben. Holt den Müll sogar vom Himmel. (Heise Trollforum über Java in der Flugzeugsteuerung)
https://lists.debian.org/debian-devel/2006/07/msg01251.html
CC-MAIN-2016-30
refinedweb
236
72.76
sent made available as part of the Interpedia (When the Interpedia gets underway) This document is not explicitly copyrighted so share the information freely, but please do not distribute modified version of the document. On approx. Nov 17, 1993, Doug Wilson posted to the interpedia list what he suggested could be a draft version of a faq. His original draft faq and his many suggestions have contributed greatly to this document. Please feel free to make suggestions about the current version. We could use suggestions about additional topics that you think ought to be covered. Also, if you think of something that ought to be added to a topic already in the faq please send me a note about it. As the moderator of the faq I will field suggestions, make additions/corrections/modifications and post the faq. Please send the a/c/m to me at: med...@ubvms.cc.buffalo.edu (Alan M. Reynard) ====================================================================== RECENT CHANGES TO THE FAQ ====================================================================== 01/15/93 Subject 1.3 Added note on .gz files. Subject 2.7 Added Bob McWhirter's project. Added Greg McMullan's project. Subject 4.4 Added to items. Subject 5.1 Added the JHSI project. Corrected the reference to the home page of the Principia Cybernetica project. Subject 5.2 Added more names. Subject 5.3 Added reference to list of abbreviations and acronyms. ====================================================================== CONTENTS ====================================================================== Section 1: General Interpedia Questions 1.1 Who originated the idea of the Interpedia, where did the name come from, and what is a little of its history? 1.2 What is the Interpedia? 1.3 Where can I communicate with people working on the project and where can I get information about the Interpedia? 1.4 Where can additional information be found about subjects that relate to the Interpedia? Section 2: Accessing the Interpedia 2.1 How will people access the Interpedia? 2.2 What are browsers? 2.3 What is WWW? 2.4 What gopher? 2.5 What is WAIS? 2.6 Why bother with new software? 2.7 What is the current stat of development of Interpedia-specific software? Section 3: Article submission and editing 3.1 How can I submit an article to the Interpedia? 3.2 In what form will articles be acceptable? 3.3 Why bother with new text, why not just use existing material from various online sources? 3.4 Who will pick the articles? 3.5 What will be the process of editing articles and what will be the responsibilities of the editors? 3.5.1 Who can be an editor on the Interpedia Project? 3.5.2 What will their responsibilities be to the Project? 3.5.3 How will editors communicate with one another? 3.5.4 How often and how much will editors work on the Interpedia? 3.5.5 Will all this work be voluntary? 3.5.6 What if more than one editor works in the same area? 3.5.7 What would an editor's work consist of? 3.5.8 When can editors start work on the Interpedia? Section 4: Classification, Seals, Copyright, etc 4.1 One of the principle topics is classification. What is the current status of proposed classification schemes? 4.2 What are Seals of Approval? 4.3 What is a default, and why do we need defaults? 4.4 What are the copyright issues? 4.5 How will people be protected from having to view unwanted materials? Section 5: Other projects, Volunteers, Glossary 5.1 What other projects are there that parallel or complement the Interpedia Project? 5.2 Who are the individuals who have volunteered to do specific tasks? 5.3 What are some terms used in this project and their definitions (a glossary)? Section 6: The EB11 Project 6.1 Is there an EB11 mailing list? 6.2 What is the history of the EB11 project? 6.3 Why use the EB11? 6.4 How can we get the EB11 on line and what format should be used? ====================================================================== Section 1: General Interpedia Questions ====================================================================== Subject: 1.1 Who originated the idea of the Interpedia, where did the name come from, and what is a little of its history? According to Michael Hart the idea for a net encyclopedia has been around nearly as long as the net, at least back to 1969-71. This recent burst of activity is the result of a post to several newsgroups by Rick Gates with his idea to write a new encyclopedia, place it in the public-domain, and make it available over the Internet. Among the first responses to Rick's message was one by Gord Nickerson who suggested that this Internet Encyclopedia be fully hypertexted using a markup language such as html, and one by Mike Salmon in which he made the provocative comment: > I think it's a brilliant idea, the sort that ends up as *being* the net. This comment was picked up on by Robert Neville, who proposed links to ongoing discussions including newsgroups and Internet Relay Chat (IRC), and in a joint post with Doug Wilson emphasized the importance of default articles to make the encyclopedia useful as a quick reference. The question of how to pick default articles was hotly debated until Erik Seielstad resolved the problem by suggesting the seal-of-approval mechanism. Perhaps the most important factors in making the Interpedia, as R L Samuell called it, into an active project were the establishment of the interpedia mailing list by Doug Luce, and the creation of a gopher-accessible archive for this mailing list by R L Samuell. Gary Kline suggested the use of an early encyclopaedia as a starting place for the Interpedia and Robert Carter suggest the Encyclopaedia Britannica, 11th edition. Shortly thereafter the volume of mail forced the mailing list to adopt the digest format, and Doug Luce provided archives of the digest at. More recently, specialized sublists for technical, editorial, and volunteer coordination have been set up by Jeff Foust. (Doug Wilson and Alan Reynard) ====================================================================== Subject: 1.2 What is the Interpedia? Early in the discussion Doug Wilson wrote "So far, the Interpedia is an idea. There is a mailing list to discuss it, and lots has been written about it, we don't have any articles or software to distribute yet. The term Interpedia is ambiguous -- to some it means the text, to some the software, and to others what we will have when we have both." To add to these thoughts it can be said that the Interpedia will be a reference source for people who have connectivity to the internet. It will encompass, at the least, articles submitted by individuals, and articles gleaned from non-copyrighted material. It will have mechanisms for submission, browsing, and authentication of articles. It is, currently, a completely volunteer project with no source of funding except for the contributions of the volunteers and their respective institutions. It also has no governing structure except for a group of people who have volunteered to do specific tasks or who have made major contributions to the discussion (see list, below). Everyone is encouraged to make a contribution, small or large. The Interpedia is also envisioned to eventually be much more than a simple reference source as current paper (or even CD-ROM) encyclopedias are now. Amongst other things, the browsers will be able to provide support for graphics, motion video, and sound as well as plain text, depending on the type of equipment available to the person who is accessing the Interpedia. At the very least, the text will be in hypertext form so that the user will be able to navigate easily from one document to another. Navigation will also be available for other objects such as graphics. ====================================================================== Subject: 1.3 Where can I communicate with people working on the project and where can I get information about the Interpedia? NEWSGROUP Hopefully, there will soon be a newsgroup for the Interpedia Project with the name, comp.infosystems.interpedia. Voting will be in January. Everyone interested in the Interpedia Project is encouraged to vote YES. Voting information will be sent to the various mailing lists. MAILING LISTS Subscribe to any one, any combination, or all of the mailing lists that cover the Interpedia Project. There are currently 5 lists. They are as follows: 1. The general list subscribe: send a msg to interpedi...@telerama.lm.com subject : one word, "subscribe" (don't include the quotes) msg body: anything or nothing - it is not used unsubscribe: send a msg to interpedi...@telerama.lm.com subject : one word, "unsubscribe" (don't include the quotes) msg body: anything or nothing - it is not used post messages: send msg to inter...@telerama.lm.com subject : it helps to have a subject msg body: your message The messages posted to the list will come to you in digest form. NOTE: to unsubscribe send msg to interpedi...@telerama.lm.com and *NOT* to inter...@telerama.lm.com Do not send messages to interpedia-request except to subscribe or unsubscribe. 2. Use of the Encyclopaedia Britannica, 11th edition subscribe: send a msg to kl...@tao.austin.tx.us subject : optional msg body: ask to subscribe; supply your name and internet address unsubscribe: send a msg to kl...@tao.austin.tx.us subject : optional msg body: ask to unsubscribe; supply your name and internet address post messages: send msg to eb...@tao.austin.tx.us subject : it helps to have a subject msg body: your message 3. Technical Issues (ip-tech) subscribe: send a msg to ser...@jg.cso.uiuc.edu subject : optional msg body: "subscribe ip-tech" (don't include the quotes) unsubscribe: send a msg to ser...@jg.cso.uiuc.edu subject : optional msg body: "unsubscribe ip-tech" (don't include the quotes) post messages: send msg to ip-...@jg.cso.uiuc.edu subject : it helps to have a subject msg body: your message 4. Editing Issues (ip-edit) subscribe: send a msg to ser...@jg.cso.uiuc.edu subject : optional msg body: "subscribe ip-edit" (don't include the quotes) unsubscribe: send a msg to ser...@jg.cso.uiuc.edu subject : optional msg body: "unsubscribe ip-edit" (don't include the quotes) post messages: send msg to ip-...@jg.cso.uiuc.edu subject : it helps to have a subject msg body: your message 5. Volunteer Issues (ip-vol) subscribe: send a msg to ser...@jg.cso.uiuc.edu subject : optional msg body: "subscribe ip-vol" (don't include the quotes) unsubscribe: send a msg to ser...@jg.cso.uiuc.edu subject : optional msg body: "unsubscribe ip-vol" (don't include the quotes) post messages: send msg to ip-...@jg.cso.uiuc.edu subject : it helps to have a subject msg body: your message ARCHIVES OF INTER...@TELERAMA.LM.COM Archives of the digests are available by anonymous ftp from:<whatever> Note that some of the archives are in compressed format and appear as files with the extension .gz. To decompress these files get get gzip.exe. To do this find gzip124.zip at and unzip it. At the dos prompt type 'gzip -h' for help. The syntax for use is > gzip -d <filename.ext> where the ext can be .g or .gz. POSTINGS TO INTER...@TELERAMA.LM.COM Individual postings to the list including the early ones that don't appear in the digests are available by gopher from: CIS Department, University of Alabama at Birmingham. The Gopher Bookmark is: NAME = The Interpedia Project HOST = twinbrook.cis.uab.edu PORT = 70 PATH = interped.70 TYPE = 1 The postings can also be viewed with a www browser: URL is gopher://twinbrook.cis.uab.edu:70/1/interped.70 ====================================================================== Subject: 1.4 Where can additional information be found about subjects that relate to the Interpedia? There are several newsgroups that relate to the project in various ways. They are: comp.infosystems.gopher comp.infosystems.wais comp.infosystems.www comp.text.sgml alt.hypertext Those interested in the web (www, w3) should acquire a browser and explore it. Unfortunately, most of the documentation about the web is on the web. Catch-22. ====================================================================== Section 2: Accessing the Interpedia ====================================================================== Subject: 2.1 How will people access the Interpedia? Because it has not been settled what form/format the Interpedia will assume, there is no definitive information about this. There is discussion about accessing it in a variety of ways including ftp, gopher, wais, and www. There is also discussion of producing new, more advanced software that will be directed to accessing the Interpedia, but will presumably be useful in accessing other infosystems, as well. The type of software currently available for accessing the various internet infosystems is termed a browser (or client). These are explained elsewhere. It should be emphasized that there is the that browsers for the Interpedia will have capabilities that go beyond current browsers. However, to get a feel for what a browser will do you can access one or more of the currently available browsers. ====================================================================== Subject: 2.2 What are browsers?. In other terms, browsers are software that act as 'clients' and enable you to interact with 'servers', where the servers are machines (hosts) that hold the information. For each client there has to be a matching server (e.g., gopher clients access gopher servers). This distinction is now being blurred because some clients (e.g., www clients) can access other servers (gopher and wais) in addition to accessing www servers. The Interpedia is not yet at a point where browsing is applicable. However, if you want to try a browser, you can do it in two ways. One is to log onto (telnet) to a host that runs a public-access browser. The other is to acquire a browser that you can use from your local machine. These are available for PCs, Macs, Amigas, NeXTs, etc., and can be acquired by FTP from a number of sites. There are lists of sites elsewhere in the FAQ. ====================================================================== Subject: 2.3 What is WWW and where can I get a client? WWW FAQ available: rtfm.mit.edu:/pub/usenet/comp.infosystems.www/WWW_(World_Wide_Web)_FAQ WWW (World Wide Web) consists of hypertext documents and the links between the documents. WWW documents can include images and sound. There is a large number of these documents available and the number is growing rapidly. The documents are hosted on WWW servers and can be accessed by using WWW browsers (clients). The type of information you can retrieve depends on the type of client you use. If you have only a line oriented client, you can retrieve only ascii text. If you have a more functional client you can get sound and graphics. A list of WWW clients is available in the WWW FAQ (referenced above). You can also find lists of clients (and servers) by accessing the web. Again, they are listed in the FAQ. A few of these are: info.cern.ch login: none needed ujanaix.cc.ukans.edu login: www login: www ====================================================================== Subject: 2.4 What is gopher and where can I get a client? gopher FAQ available: rtfm.mit.edu:/pub/usenet/comp.infosystems.gopher/G_(c.i.g)_F_A_Q_(F) Gopher is software that acts as server and client. The server holds information, located by traversing a menu structure. Often a menu item is an internet address that points to another gopher server. A client always logs onto a server and from there can move (burrow) from server to server searching for information. The person who sets up the client specifies which gopher server the client logs onto to start the session. Gopher clients can retrieve documents by ftp as well as retrieving them just for viewing. Some clients can also do keyword searches. You can acquire a gopher client or you can access gopher by logging onto a host at many educational and government institutions. Gopher clients (and servers) are available by ftp from boombox.micro.umn.edu:/pub/gopher there are subdirectories that contain gopher clients for a number of operating systems. Additional gopher clients can be obtained from various sites. Many of these are listed in the gopher FAQ. You can find others by posting messages to comp.infosystems.gopher. ====================================================================== Subject: 2.5 What is WAIS and where can I get a client? WAIS FAQ available from: rtfm.mit.edu:/pub/usenet/comp.infosystems.wais/c.i.w_F_a_Q_[F]_(w_a) WAIS (Wide Area Information Servers) is a networked information retrieval system. Clients are able to retrieve documents using keywords. The search returns a list of documents, ranked according to the frequency of occurrence of the keyword(s) used in the search. The client can retrieve text or multimedia documents stored on the server. There is a list of WAIS clients in the comp.infosystems.wais FAQ. You can access a WAIS client by telnetting to sunsite.unc.edu. There is a menu that guides your logging on. ====================================================================== Subject: 2.6 Why bother with new software?.. (Doug Wilson) ====================================================================== Subject 2.7 What is the current state of development of Interpedia-specific software? Doug Wilson <dwi...@crc.sd68.nanaimo.bc.ca> writes: I am working on prototype software for the Interpedia, and plan a series of prototypes, beginning with one which will run only on a single machine and access files local to that machine. A preliminary set of design notes for that software was published earlier on the mailing list, and can be obtained from me by e-mail. Updates to requirements and design documentation will be released as text files accessible with the first prototype, which will be used to support its own development. Coding is underway, and a simple version should be released in early January, 1994. Source code will be included as files accessible by the prototype, and linked to their corresponding items of documentation. ////////////////////////////////////////////////////////////////// Jared Rhine <Jared...@hmc.edu> writes: I am working primarily in the area of creating HTTP gateways to the Interpedia. Please send comments to me at the above address. There are many parts to this projects including: 1. An indexing server which can return a list of documents based upon the results of various parameters submitted via an HTML Form, including keywords, title, etc. The amount of information to be returned will also be selectable on this form. Support for seals-of-approvals is planned, but unimplemented as of yet. 2. An Interpedia gateway is being prototyped which will return the document requested, but with added markup to include information contained in the index regarding the document, such as author, related documents, relevance feedback forms, etc. 3. In order to unify the namespace of the Interpedia, documents in the above index will be returned as URNs, which uniquely identify a document, but give no indication of where to locate the resource. Thus a URN->URL mapper is being prototyped which will allow documents returned from searches to be located as URLs, which may be accessed via any Web client. In combination, these gateways will allow for full access to many of the key features of the Interpedia. An end-user will be able to connect to a Web server and be presented with a welcome page for the Interpedia. A HTML Form can be submitted to begin a search. The parameters of this form will be fed into the indexing gateway which will return a HTML document containing information about the documents hit by the search, restricted to only those documents matching the requested seal-of-approvals. The amount of information returned for each document will be selectable based on the parameters submitted in the search form. Additionally, further information about a specific article will be available without retrieving the document in full by selecting a separate link. At this point, relevance feedback can be added to the search, and the search resubmitted. At some point in the future, the links to retrieve a document will actually be links to the URN->URL mapper, but that will be one of the last prototypes to be examined. In the preliminary stages, the link will be a selector string for the server which instructs it to return the document. The document will not be returned directly; instead, it will be first marked up with relational operators so that the user can perform those actions from within the document, including relevance feedback. Documents which include net-accessible authors (who give their permission) will include links which will allow viewers to submit comments to the author via a HTML Form. The prototyping language will be Perl, linked as packages to the Plexus HTTP server. Access to the prototypes will be available via the Web, although the experimental nature of these prototypes may result in sporadic reliability. Comments about the prototypes will be able to be submitted via HTML forms. Prototypes will likely be available in early January, although the amount of functionality to be included by that point is as yet undetermined. ////////////////////////////////////////////////////////////////// Bob Socrates McWhirter <mcw...@mail.auburn.edu> writes: I plan to develop machine-specific clients to access the information in the Interpedia. Initially, there will be a Mac client. Once the powers that be decide how the info will be available over the net (how to find it, which port, etc), I'll be working on two programs. 1) A client for the Mac running TCP/IP software with direct connection to the net. (Such as Umin's TurboGopher mac client). This would support the familiar look-and-feel of the Mac world. 2) A pseudo-client to run at the Unix prompt, which, when initiated would activate an 'interpedia mode' in a special term program, which would then appear to operate as #1 above. This would be a two-program package. First, the Unix middle-man which would take the presumably raw data from the interpedia, and feed it to the modem port, only slightly altered. The second would be a special Mac term-program which would be a standard vt100 (or whatever) emulator until kicked into interpedia mode (such as how auto-zmodem downloads get kicked in). Once in Interpedia-mode, it would translate the data from the unix middle-man to provide the same mac look-and-feel as in #1 above. Basically, this allows a 'nice' interface for those macs without a direct IP connection, SLIP, or PPP. We are assuming that these users will have a valid account on a Unix machine. ////////////////////////////////////////////////////////////////// Greg McMullan <mcmu...@mit.edu> writes: My ideas for the software aren't particularly new or exciting, especially since I haven't had the time to do much more than read up on what I think I need to know and start roughing out some code. I'm mostly writing it up to make myself learn more about HTML and remember my perl. Yes, I'm using WWW software as my client - it's there and works well, and I don't have to write it, so I get something useful up and running faster. If I run into something that I *can't* do in HTML (I doubt it, but it's possible), I have the option of modifying the client or writing my own, but I won't have to do that till I know if my approach works well. I'll probably implement something like the 3-column approach to sorting keywords described earlier in the mailing list, once I'm sure that the server that I'm writing works. ////////////////////////////////////////////////////////////////// NOTE: We think that there are several others working on software. Even if it is only in the design phase, please let us know about it. It might save some duplication of effort. Send responses to med...@ubvms.cc.buffalo.edu (Alan Reynard) ====================================================================== Section 3: Article submission and editing ====================================================================== Subject 3.1 How can I submit an article to the Interpedia? There is an ftp site that is available, but details have not been worked out. Temporarily, questions about submissions should be sent to Doug Wilson <dwi...@crc.sd68.nanaimo.bc.ca>. ====================================================================== Subject 3.2 In what form will articles be acceptable? The format(s) of Interpedia article has not yet been decided. However, it is probably safe to assume that one form will be plain ascii text. Craig Richmond has made the suggestion (digest v1n20) that there be multiple formats, each identified by a number as follows: 0 : unformatted english 7 bit ascii text 1 : formatted english 7 bit ascii text (setext) 2 : formatted english 7 bit ascii text (RTF) 3 : unformatted english unicode text 4 : formatted english unicode text (who knows) 5 : formatted text with basic hypertext links 6 : formatted text with simple hypertext links 7 : bells and whistles multimedia extensions and hypertext One of the current hot items is HTML. To see more about HTML point your WWW browser to either: or ====================================================================== Subject: 3.3 Why bother with new text, why not just use existing material from various online sources? There is so much material available online that it may indeed be theoretically possible to put together an encyclopedia from what is already out there. But finding and linking in enough text would be such a formidable problem that it is probably easier to arrange for new articles to be written. Besides, people WANT to write new articles! Experts in a field are rarely happy with any existing piece of text, and there will be a few who would rather contribute new material than settle for something out-of-date or inaccurate. But, existing material that people know about could be used as a starting point. (Doug Wilson) ====================================================================== Subject: 3.4 Who will pick the articles? All submitted articles could be made available, as long as some host site somewhere is willing to make space for them. There is no need to accept or reject articles. But there is a need to provide defaults and seals-of-approval to guide readers and make quick reference to authoritative articles possible. (Doug Wilson) ====================================================================== Subject: 3.5 What will be the process of editing articles and what will be the responsibilities of the editors? Robert Neville <rnev...@crc.sd68.nanaimo.bc.ca> has volunteered to coordinate the editorial efforts. He has contributed all of editorial section (subject 3.5.x) of this FAQ. ====================================================================== Subject: 3.5.1 Who can be an editor on the Interpedia Project? Anyone. Just as articles and other data can be submitted by anyone in Cyberspace, anyone can choose to act as an editor. Of course, many writers will choose to be their own Interpedia editor, if they feel comfortable with that role. To be effective, editors will have to be thoroughly conversant with the Interpedia, its nature and its requirements. Writers who are not will approach editors and ask for their assistance. ====================================================================== Subject: 3.5.2 What will their responsibilities be to the Project? The responsibilities of editors will be to act in good faith in the advancement of the Interpedia, to communicate regularly with other editors and with techies as needed and, above all, to try to add the highest quality material possible to the Interpedia. ====================================================================== Subject: 3.5.3 How will editors communicate with one another? Editors will be expected to be members of a least one mailing list or associated newsgroup and to communicate regularly about what projects they are working on and what progress they are making. At present the appropriate list is ip-...@jg.cso.uicu.edu as described elsewhere in this FAQ. We will certainly need the current proposed newsgroup to be divided, probably as soon as it exists, into two, namely: comp.infosystems.interpedia.tech comp.infosystems.interpedia.edit Further divisions will be necessary as things progress. We will doubtless have to arrange for moderators to make periodic reports to the main newsgroups and lists, so that everyone can have a least an overview of this huge endeavour. Eventually, of course, newsgroups will themselves be part of the Interpedia and the Interpedia project itself will be the first beneficiary of improved information structures. ====================================================================== Subject: 3.5.4 How often and how much will editors work on the Interpedia? As much or as little as they wish. Some people may wish to join the project solely to improve the Interpedia in an area of special interest to them. Others will want to be general editors, working in a wide variety of areas, for a long time. ====================================================================== Subject: 3.5.5 Will all this work be voluntary? At first, yes. And for many it will always be so. But it would seem likely that individuals who choose to spend large amounts of productive time on this project will eventually find themselves being paid for it. Many people now are paid for Internet work that was volunteer not so long ago. ====================================================================== Subject: 3.5.6 What if more than one editor works in the same area? No problem. It is the very nature of the Interpedia to contain competing resources. If someone feels that the article on the recorder, facilitated by me, is inadequate, they have many avenues. They can suggest changes to me or the author, they can produce their own, they can solicit seals of disapproval, if they think that the article is in some sense actually damaging. ====================================================================== Subject: 3.5.7 What would an editor's work consist of? The process outlined above gives a good starting idea. Editors will either start with definite ideas on articles, or will use a To Do list, as discussed earlier on this list, to find areas that need work. What they may do will include: -in the early stages especially, promoting explaining the Interpedia to potential authors and approval grantors. At first organizations like the American Recorder Society will have to be persuaded of the value of assigning members to the task of evaluating articles. But once the Interpedia is well established this will be unneeded. -searching through existing Internet resources for possible hotkey links to existing material (excellent work for Rick Gate's Internet Hunt aficionados!) -establishing and operating MUDs or other resources to complement existing resources -soliciting material to fill needs indicated in the To Do list -working on the To Do list itself, to identify needs -soliciting seals of approval to support articles -soliciting seals of disapproval for articles of low quality -helping writers present material in a format appropriate to the Interpedia -identify needs. for example, I might see a need for a simplified version of some article suitable for school children. I might approach the authors and request such a version and arrange for suitable seals of approval -etc. etc. The reader is invited to add more ... ====================================================================== Subject: 3.5.8 When can editors start work on the Interpedia? Now. See elsewhere in this FAQ for information on the acceptable form of articles and what to do with them. Even though software is not ready, it is important that we start to collect material as soon as possible. It is worth noting that nothing will encourage software people to work more than a growing base of Interpedia material. Let's give them something to chew on! ====================================================================== Section 4: Classification, Seals, Copyright, etc ====================================================================== Subject: 4.1 One of the principle topics is classification. What is the current status of proposed classification schemes? Christopher Mullin has volunteered to coordinate the classification efforts. He writes: The group I'm coordinating feels that the use of existing library classification systems and subject heading lists will give better access to articles than will the use of uncontrolled keywords. Specifically, we expect to assign several Library of Congress Subject Headings and several classification numbers (either Universal Decimal Classification or Dewey Decimal Classification -- not sure yet) to each article. We will attempt to get copies of the chosen systems made available on the internet, with the expectation that others will develop search engines to make these systems accessible to Interpedia searchers. Most of us have had some library cataloging experience, but welcome help from anyone. Contact me (mul...@selway.umt.edu) for further information. ====================================================================== Subject: 4.2 What are Seals of Approval? A seal-of-approval is data provided by a person or persons which indicates that some article is good. (Seals of disapproval have also been proposed.) Seals-of-approval) ====================================================================== Subject: 4.3 What is a default, and why do we need defaults? A default is a standard choice that you can select in some easy way, such as by hitting the return/enter key or the spacebar key. There may be hundreds of articles available on some controversial topic, but we don't want to force people to wade through all those possibilities, so we must provide a default article that the user has quick and easy access to. But that doesn't mean that there is one default for everybody. Defaults can be dynamically established according to the user's preset preferences. The term default is somewhat ambiguous and has also been used for a hypothetical standard article that one might get if one hadn't set any preferences at all -- but there are strong arguments against having any such standard, and from a technical point of view it is probably not necessary. A default is actually a prediction of what a person is likely to want, or an estimation of what they would want if they had all the information they need to make a choice, and it is always possible to predict or estimate. (Doug Wilson) ====================================================================== Subject: 4.4 What are the copyright issues? There appears to be no problem with inclusion of non-copyrighted material (such as the Encyclopedia Britannica, 11th ed) in the Interpedia. However, Compton Encyclopedia chose Comdex to announce that it had been granted a patent on multimedia programs that store and retrieve text, graphics, sound, and animation. The patent (pn US5241671) describes a "multimedia search system using a plurality of entry means which indicated interrelatedness of information". A copy has been placed at. As could be expected this generated much heat, but not much light in a number of newsgroups. It was subsequently reported that other patents have been taken out including one by Optical Data Corp entitled "Interactive Method for the Effective Conveyance of Information in the Form of Visual Images". A posting to comp.text.sgml reported that the U. S. Patent Office will reexamine its patent to Compton. The final disposition will likely be taken care of in the courts. Mahesh S. Koppula <mkop...@magnus.acs.ohio-state.edu> reports in digest V2 #3 that files listing titles to 2700 software patents issued in 1992-93 have been posted to misc.legal.computing and other usenet groups. It may be of interest that a large, comprehensive faq, Frequently Asked Questions about Copyright (6 parts) is posted to misc.legal.computing and is available by ftp from rtfm.mit.edu in the /pub/usenet/news.answers/Copyright-FAQ directory. ====================================================================== Subject: 4.5 How will people be protected from having to view unwanted materials? People can use seals-of-approval and defaults to limit the amount of material they see. This might be used to protect children from material that is not appropriate for them to see. ====================================================================== Section 5: Other projects, Volunteers, Glossary ====================================================================== Subject: 5.1 What other projects are there that parallel or complement the Interpedia Project? A number of projects either parallel the Interpedia or are related to it in some way. Some of these are: The Stack of the Artist of Kouroo see Digest v1 nums 2, 4, and 12 A study by Austin Meredith of Thoreau based on Walden but extending far and wide courtesy of its hypertext format. UNITE (User Network Interface to Everything) -- see Digest v1n3 mailing list: mail...@mailbase.ac.uk to join body of message should read join unite <first-name> <last-name> OTIS (Operative Term is Stimulate) -- see Digest v1n3 This is an electronic-networked art gallery. There are FTP sites sunsite.unc.edu:/pub/multimedia/pictures/OTIS/<whatever> agl.gatech.edu:/pub/OTIS 141.24..4.135 (don't know domain name) Principia Cybernetica Project (PCP) -- see Digest v1n20 home page of server at Clearinghouse for Subject-Oriented Internet Resource Guides see Digest v1n21 ftp una.hh.lib.umich.edu:/inetdirsstacks gopher bookmark NAME = Clearinghouse for Subject-Oriented Internet Resource Guides HOST = una.hh.lib.umich.edu PORT = 70 PATH = 1/inetdirs TYPE = 1 www URL gopher://una.hh.lib.umich.edu/11/inetdirs JHSI is a project to provide a hierarchical index to sources available on the Internet. As Interpedia articles appear, we intend to index them. Our classification scheme is based upon a combination of the hierarchical classification scheme from the Encyclopedia Brittanica's Propedia and various domain specific classfication schemes, such as the ACM Computing Reviews Classification Scheme. JHSI is a project of ACM Special Interest Group on Networking at the University of Illinois at Urbana-Champaign. This information was provided by Joel Jones <jjo...@uiuc.edu>. The URL for the index is: There is also emerging a number of electronic magazines, some with hypertext links to other documents. Some of these are: Global Network Navigator (GNN) Sponsored by O'Reilly & Associates It is free (eventually to be supported by advertising). To subscribe send e-mail to in...@gnn.com Access is by www (will need a www client) INFOSYS Operates via a mailing list - sign up for the list and get issues. subscribe: send a msg to list...@american.edu subject : optional msg body: "subscribe INFOSYS yourfirstname yourlastname" (don't include the quotes) unsubscribe: send a msg to list...@american.edu subject : optional msg body: "unsubscribe INFOSYS" (don't include the quotes) submit articles: send article to inf...@american.edu subject : it helps to have a subject msg body: your article ====================================================================== Subject: 5.2 Who are the individuals who have volunteered to do specific tasks? Axel Boldt <bo...@math.ucsb.edu> -- newsgroup creation Jeff Foust <jfo...@mit.edu> -- maintain other lists (ip-edit, ip-tech, ip-vol) Michael S. Hart <ha...@vmd.cso.uiuc.edu> -- provide resources Gary D. Kline <kl...@tao.austin.tx.ux> -- maintain eb11 mailing list Doug Luce <do...@telerama.lm.com> -- maintain the interpedia mailing list Bob Socrates McWhirter <mcw...@mail.auburn.edu> -- develop software Greg McMullan <mcmu...@mit.edu> writes: -- develop software Christopher G. Mullin <mul...@selway.umt.edu> -- coordinate classification Robert Neville <rnev...@crc.sd68.nanaimo.bc.ca> -- coordinate editors Alan M. Reynard <med...@ubvms.cc.buffalo.edu> -- maintain FAQ R L Samuell <sam...@cis.uab.edu> -- maintain archives Erik Seielstad <er...@acspr1.acs.brockport.edu> -- looking at www Doug Wilson <dwi...@crc.sd68.nanaimo.bc.ca> -- develop software Lee Wood <wo...@sfu.ca> -- develop software ====================================================================== Subject: 5.3 What are some terms used in this project and their definitions (a glossary)? BABEL, a very large list of abbreviations and acronyms is available from Irving Kind. Send a disk and samped, addressed mailer to: K & D, One Church Lane, Baltimore, MD 21208. <BABEL is available by FTP from somehwere. Help, anyone - AMR> Some of the terms and acronyms are: < ANY MORE ? > CELLO A WWW browser DDC Dewey Decimal Classification DTD Document Type Definition EB11 Encyclopaedia Britannica, 11th edition. First published in 1910-1911. Fifty million words. It is not protected by GOPHER software that acts as server and client. The client uses menus to search gopher servers for information. HTML HyperText Markup Language. A specification for converting ascii text to hypertext documents. The notations made in the document are themselves ascii so the document maintains its ascii characteristic. HTTP HyperText Transfer Protocol. The specification for transferring files in the WWW. LCC Library of Congress Classification LCSH Library of Congress Subject Headings LISTSERV A mailing list mechanism, originally started for the bitnet network, but made available to the internet via gateways to the bitnet machines. There are several thousand lists managed by the listserv software world-wide. MOSAIC A WWW browser SGML Standard Generalized Markup Language UDC Universal Decimal Classification URL Uniform Resource Locator URN Uniform Resource Name VERONICA Very Easy Rodent-Oriented Net-Wide Index to Computerized Archives It is a gopher with the ability to do keyword search for documents. WAIS Wide Area Information Servers WWW World Wide Web ====================================================================== Section 6: The EB11 Project ====================================================================== Subject: 6.1 Is there an EB11 mailing list? At the top of the FAQ are listed the various mailing lists that are directly concerned with the Interpedia project. People with interest in the use of EB11 in conjunction with the Interpedia should sign up for this list. The list is moderated by Gary D. Kline and he has provided the content for this section (6.x) of the FAQ. ====================================================================== Subject: 6.2 What is the history of the EB11 project? The EB11 discussion began in late October when an early posting to the Interpedia mailing list from Gary Kline suggested that we not begin from scratch, but use an early (public domain) encyclopedia. Robert Carter (car...@andromeda.rutgers.edu) responded at once and suggested the Encyclopaedia Britannica, 11th Ed, because of its exceptional scholarship. Later, it was learned that Michael Hart and Project Gutenberg are planning to put the EB11 on-line. Doug Wilson contacted Michael Hart and the projects began to be discussed extensively on the interpedia mailing list. The EB11 mailing list exists currently for those interested in the Interpedia, but who may wish to concentrate primarily in this aspect of the project. This, the EB11 list may be considered a subset or sub-group of the larger working group. ====================================================================== Subject: 6.3 Why use the EB11? The EB11 is an obvious treasure and resource as a historical document. There are certainly hundreds of articles that were and still are true, valid, and can be used with little or no changes in the Interpedia. This has stirred some controversy. Some want to use EB11 as-is; by itself. Others like the core approach. ====================================================================== Subject: 6.4 How can we get the EB11 on line and what format should be used? However we use the work, questions remain about which format to use to get it online: ASCII, PostScript, some sort of graphics file (e.g.: a gif file). The EB11 is more than ASCII text. Another issue involves the means to get the work online. Do we type it in by hand? Use some OCR technology? Scan it in as a graphics file and work on the character recognition later? What about non-Latin characters? mathematical equations? illustrations? photographs? typefaces? These issues are currently being discussed. ====================================================================== END OF FAQ ====================================================================== prepared by Alan M. Reynard and posted to inaugurate the USENET news group COMP.INFOSYSTEMS.INTERPEDIA by R L Samuell who coined the name "Interpedia" >INTERPEDIA FREQUENTLY ASKED QUESTIONS AND ANSWERS >January 17, 1994 >====================================================================== >This faq will be: > sent Do people try things before they post them? I am accustomed to, when someone purportedly posts a gopher bookmark or link entry, clipping it with my mouse. This "link" or "bookmark" will not work with the UNIX server from UMN, accessing with the curses client from UMN. It is worse than useless to publish information that is "nearly" correct. This should be fixed. There are three errors: 1) Don't use leading spaces. 2) Don't put spaces around the '='. 3) Don't capitalize NAME, etc. > made available as part of the Interpedia > (When the Interpedia gets underway) [...] -- R.Stewart(Stew) Ellis, Assoc.Prof., (Off)313-762-9765 ___________________ Humanities & Social Science, GMI Eng.& Mgmt. Inst. / _____ ______ Flint, MI 48504 el...@nova.gmi.edu / / / / / / Gopher,News and modem maintainer, all around hack /________/ / / / / Thank you, Professor Ellis. I appreciate the information. I will inform the author of the FAQ. I do not, however, appreciate your attitude. Where did you get the idea that I am responsible for your convenience? There are many different kinds of systems in the world. As it happens, both my server and client run in an OS/2 environment, not UNIX. I claim no responsibility for the inadequacy of UNIX bookmark parsers-- my REXX parser is somewhat more tolerant. But, in my opinion, a sensitivity to leading spaces, framing spaces, and capitalization reflects a general design deficiency in such parsing software. As far as UMN, they are the originators of the GOPHER protocol, not the arbiters of all customs appertaining thereto. Finally, as this is an "error" for which it is clear I am responsible I do not understand why you did not simply e-mail me your remarks instead of advertising these "errors" publicly. In the absence of an apology, I will accept that it was an inadvertent breach of proper netiquette on your part, which therefore is the reason for this, my public reply. Sincerely, R L Samuell who coined the term "Interpedia" -- Two years ago, I was as old as the year in which I was born. How old am I?
https://groups.google.com/g/comp.infosystems.interpedia/c/oK3CID-HGRw
CC-MAIN-2021-31
refinedweb
7,457
56.96
Christ. Thanks, Ed diff --git a/libcheckers/emc_clariion.c b/libcheckers/emc_clariion.c index 462117b..a883e3d 100644 --- a/libcheckers/emc_clariion.c +++ b/libcheckers/emc_clariion.c @@ -89,14 +89,11 @@ int emc_clariion(struct checker * c) return PATH_SHAKY; } -#if 0 - /* This is not actually an error as the failover to this group - * _would_ bind the path */ - if ( /* LUN should at least be bound somewhere */ - sense_buffer[4] != 0x00) { - return PATH_UP; + if ( /* LUN should at least be bound somewhere and not be LUNZ */ + sense_buffer[4] == 0x00) { + MSG(c, "emc_clariion_checker: Logical Unit is unbound or LUNZ"); + return PATH_DOWN; } -#endif /* * store the LUN WWN there and compare that it indeed did not
http://www.redhat.com/archives/dm-devel/2006-August/msg00013.html
CC-MAIN-2014-52
refinedweb
106
70.73
I live and work in a windowsless shack in the middle of a desert in the Middle East. Opening the door in the middle of a sandstorm is not advisable. So I built a little LCD display that tells me the current weather conditions outside since I have no windows to look out of. All those U.S. DoD budget cuts didn't leave us with enough taxpayer money to pay for windows. In other words, prison cells have better natural lighting. And since I'm a lazy, lazy man I'd prefer to just be able to look at something to get the data I need and not have to go banging around on a web browser or installing a full-blown $$$ weather station. Arduinos are perfect devices for lazy, banned people such as myself. Every two minutes it pulls down an RSS feed, parses it for current Heat Index, Wind DIrection, Wind Speed, Surface Visibility, and Current Conditions. It then abbreviates and displays that data on an Adafruit 16x2 RGBLCD shield, however just about any LCD can be used with some minor code changes. Eventually this will be connecting via an Xbee-style WiFly module, but for now it works fine on the Arduino Ethernet or Ethernet Shield. I chose RSSWEATHER.COM because it has ICAO airport weather data. That means just about any airport on the planet, including small local airfields to get really local weather data...it's tracking stations that not even Weather Underground or Google's hidden weather API track. In the "GET HTTP/1.0" string around line 88 in the code below, just substitute your own 4-digit airport code in place of KQWM. Forgive the messy, unoptimized code - I'm not a programmer and have never written code before, but I've read a lot of it. I also have zero formal training or education in electronics or anything past high school, really. I've just been working with computers and strange technical stuff since I was 7 years old. That this works at all is actually pretty amazing in itself, well to me at least. Eventually hoping to utilize some of the shield's buttons to change up the display to show more data. Here's the code: - Code: Select all #include <SPI.h> #include <Ethernet.h> #include <TextFinder.h> #include <Wire.h> #include <SoftwareSerial.h> #include <Adafruit_MCP23017.h> #include <Adafruit_RGBLCDShield.h> //Setting up colors for the backlight..some unused for now #define RED 0x1 #define YELLOW 0x3 #define GREEN 0x2 #define TEAL 0x6 #define BLUE 0x4 #define VIOLET 0x5 #define WHITE 0x7 //setup Serial LCD data pin Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield(); byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0xE3, 0x0F }; //byte ip[] = { 192,168,1,177 }; // remarked here just in case a DHCP server plays funny with Arduino's DHCP code - I'm looking at you, every Microsoft DHCP Server! char serverName[] = "69.5.27.250"; //char serverName[] = ""; // Initialize the Ethernet client library EthernetClient client; //Setup TextFinder TextFinder finder( client ); //setup character strings, or "straings" if you're from south like me char cond[40]; char winddir[25]; char pubdate[40]; void setup() { // start serial comms for debugging Serial.begin(9600); lcd.begin(16,2); //This is originally setup for a 16x2 RGB reverse backlight display from adafruit.com, with minor mods it will work for any simple LCD line display lcd.setBacklight(WHITE); //the backlight at night is big and WHITE....deep in the heart of Kuwait! lcd.clear(); // start the Ethernet connection: if (Ethernet.begin(mac) == 0) { Serial.println("Failed to configure Ethernet using DHCP"); lcd.print("no IP from DHCP!"); lcd.print("Check network!"); // no point in carrying on, so do nothing forevermore: while(true); } // give the Ethernet shield a second to initialize: delay(1000); } void loop() { if (client.connect(serverName, 80)) { client.println("GET HTTP/1.0"); // rssweather.com RSS feed for Camp Udairi, Kuwait client.println(); lcd.print("Updating data..."); delay(1000); //1 second ot display the LCD message above } else { // if you didn't get a connection to the server: Serial.println("connection failed"); lcd.print("connect failed"); lcd.print(serverName); } if (client.connected()) { int gusts = 0; //this zeroes out gusts until check is done below - if gusts = 0 then no gust data is printed to LCD lcd.clear(); //clears LCD //Here is where we use the TextFinder library to pull data from the RSSWEATHER page we pulled down at the start of the loop finder.find("pubDate"); //Date last METAR/WX report was published on the server finder.getString(">","<",pubdate,(40)); finder.find("alt="); //Now find the Current Conditions finder.getString("\"","\"",cond,(40)); finder.find("\"windspeed\""); //Now find the Windspeed int windspd = ((finder.getValue() / 1.6)); //windspeed is given in KMs so I'm converting it to MPH finder.find("\"winddir\""); //Wind Direction finder.getString("\">"," ",winddir,(40)); if ((finder.findUntil("\"gusts\"", "\n\r")) == (true)){ //scan the incoming client data for the "gusts" field and return true if found gusts = (finder.getValue());} finder.find("\"heatindex\""); //find Heat Index int temperature = ((finder.getValue() * 9 / 5) + 32); //Heat Index is given in Celsius so I'm converting it to Fahrenheit finder.find("\"visibility\""); //find surface visibility - useful for desert conditions when sand and dust are blowing...do I really want to get on that chopper? int visibility = ((finder.getValue() / 1.6)); //Visibility at surface is given in KMs so I'm converting it to miles //print this to serial in CSV format - useful for those using an Xbee to transmit to a an Arduino-controlled remote display device Serial.print(temperature);//Heat Index, converted to F Serial.print(","); Serial.print(cond); //Current Conditions Serial.print(","); Serial.print(winddir); Serial.print(","); Serial.print(windspd); Serial.print(","); Serial.print(gusts); Serial.print(","); Serial.print(visibility); Serial.println("M"); Serial.println(pubdate); //date of last published report on the web server //Now time to print it all to the serial, starting with the first line on a 16x2 LCD display lcd.setCursor(0,0); lcd.print(temperature);//Heat Index converted to F lcd.print("F "); lcd.print(winddir); //Wind direction lcd.print(windspd); //Wind speed //this next bit checks if there is gust data and if so appends it to the windspeed data with /GUSTS so that "N12" becomes "N12/24" if (gusts != 0){ lcd.print("/"); lcd.print(gusts); } lcd.print(" "); lcd.print("V"); lcd.print(visibility); //Visibility at surface so one knows if to "Run! Get to the chopper!" or not lcd.print("M"); //this indicates "Miles" //Now for the second line on the LCD display lcd.setCursor(0,1); //Since we're actually capturing a JPEG's ALT description string, we want to re-write the longer strings so that they fit in 16 characters or look better...needs optimization if (strcmp(cond, "blowing widespread dust") == 0) lcd.print("Blowing Dust"); else if (strcmp(cond, "heavy duststorm") == 0) lcd.print("Heavy Dust Storm"); else if (strcmp(cond, "duststorm") == 0) lcd.print("Dust Storm"); //Making it look pretty, oh so pretty... else lcd.print(cond); //now let's change the backlight color to reflect weather conditions...man, I really need to optimize this if (strcmp(cond, "blowing widespread dust") == 0) lcd.setBacklight(YELLOW); else if (strcmp(cond, "widespread dust") == 0) lcd.setBacklight(YELLOW); else if (strcmp(cond, "heavy duststorm") == 0) lcd.setBacklight(YELLOW); else if (strcmp(cond, "duststorm") == 0) lcd.setBacklight(YELLOW); //Because after spending many years in the desert, it really is yellow during a sand/dust storm else if (temperature >= 90) lcd.setBacklight(RED); //If the Heat Index is 90 or above, switch to RED backlight else if (temperature >=80) lcd.setBacklight(GREEN); //If the Heat Index is in the 80s, switch backlight to green else if (temperature >=70) lcd.setBacklight(BLUE); //if the Heat Index is 70 or below, switch backlight to BLUE - in the desert this is COLD! //Here at the end is where we stop the client, flush the data, wait two minutes, flush the serial data, and then it starts all over again client.stop(); client.flush(); delay(120000); //wait about 2 minutes before next update Serial.flush(); } }
http://forums.adafruit.com/viewtopic.php?f=31&t=27003
CC-MAIN-2013-48
refinedweb
1,345
58.38
iofunc_attr_t I/O attribute structure Synopsis: #include ; #if !defined(_IOFUNC_OFFSET_BITS) || _IOFUNC_OFFSET_BITS == 64 #if _FILE_OFFSET_BITS - 0 == 64 off_t nbytes; ino_t inode; #else off64_t nbytes; ino64_t inode; #endif #elif _IOFUNC_OFFSET_BITS - 0 == 32 #if !defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS == 32 #if defined(__LITTLEENDIAN__) off_t nbytes; off_t nbytes_hi; ino_t inode; ino_t inode_hi; #elif defined(__BIGENDIAN__) off_t nbytes_hi; off_t nbytes; ino_t inode_hi; ino_t inode; #else #error endian not configured for system #endif #else #if defined(__LITTLEENDIAN__) int32_t nbytes; int32_t nbytes_hi; int32_t inode; int32_t inode_hi; #elif defined(__BIGENDIAN__) int32_t nbytes_hi; int32_t nbytes; int32_t inode_hi; int32_t inode; #else #error endian not configured for system #endif #endif #else #error _IOFUNC_OFFSET_BITS value is unsupported #endif uid_t uid; gid_t gid; time_t mtime; time_t atime; time_t ctime; mode_t mode; nlink_t nlink; dev_t rdev; } iofunc_attr_t; Since: BlackBerry 10.0.0 Description: The iofunc_attr_t structure describes the attributes of the device that's associated with a resource manager. The members include the following: - mount - A pointer a structure information about the mountpoint. By default, this structure is of type iofunc_mount_t, but you can specify your own structure by changing the IOFUNC_MOUNT_T manifest. - flags - Flags that your resource manager can set to indicate the state of the device. This member is a combination of the following flags: - IOFUNC_ATTR_ATIME - The access time is no longer valid. Typically set on a read from the resource. - IOFUNC_ATTR_CTIME - The change of status time is no longer valid. Typically set on a file info change. - IOFUNC_ATTR_DIRTY_NLINK - The number of links has changed. - IOFUNC_ATTR_DIRTY_MODE - The mode has changed. - IOFUNC_ATTR_DIRTY_OWNER - The uid or the gid has changed. - IOFUNC_ATTR_DIRTY_RDEV - The rdev member has changed, e.g. mknod(). - IOFUNC_ATTR_DIRTY_SIZE - The size has changed. - IOFUNC_ATTR_DIRTY_TIME - One or more of mtime, atime, or ctime has changed. - IOFUNC_ATTR_MTIME - The modification time is no longer valid. Typically set on a write to the resource. In addition to the above, your resource manager can use in any way the bits in the range defined by IOFUNC_ATTR_PRIVATE (see <sys/iofunc.h>). - lock_tid - The ID of the thread that has locked the attributes. To support multiple threads in your resource manager, you'll need to lock the attribute structure so that only one thread at a time is allowed to change it. The resource manager layer automatically locks the attribute (using iofunc_attr_lock()) for you when certain handler functions are called (i.e. IO_*). - lock_count - The number of times the thread has locked the attribute structure. You can lock the attributes by calling iofunc_attr_lock() or iofunc_attr_trylock(); unlock them by calling iofunc_attr_unlock() A thread must unlock the attributes as many times as it locked them. - count - The number of OCBs using this attribute in any manner. When this count is zero, no one is using this attribute. - rcount - The number of OCBs using this attribute for reading. - wcount - The number of OCBs using this attribute for writing. - rlocks - The number of read locks currently registered on the attribute. - wlocks - The number of write locks currently registered on the attribute. - mmap_list and lock_list - To manage their particular functionality on the resource, the mmap_list member is used by iofunc_mmap() and iofunc_mmap_default(); the lock_list member is used by iofunc_lock_default(). Generally, you shouldn't need to modify or examine these members. - list - Reserved for future use. - list_size - Size of reserved area; reserved for future use. - nbytes - The number of bytes in the resource; your resource manager can change this value. For a file, this would contain the file's size. For special devices (e.g. /dev/null) that don't support lseek() or have a radically different interpretation for lseek(), this field isn't used (because you wouldn't use any of the helper functions, but would supply your own instead.) In these cases, we recommend that you set this field to zero, unless there's a meaningful interpretation that you care to put to it. - inode - This is a mountpoint-specific inode that must be unique per mountpoint. You can specify your own value, or 0 to have the Process manager fill it in for you. For filesystem type of applications, this may correspond to some on-disk structure. In any case, the interpretation of this field is up to you. - uid and gid - The user ID and group ID of the owner of this resource. These fields are updated automatically by the chown() helper functions (e.g. iofunc_chown_default()) and are referenced in conjunction with the mode member for access-granting purposes by the open() help functions (e.g. iofunc_open_default()). - mtime, atime, and ctime - POSIX time members: - mtime — modification time (write() updates this). - atime — access time (read() updates this). - ctime — change of status time (write(), chmod() and chown() update this). One or more of the three time members may be invalidated as a result of calling an iofunc-layer function. To see if a time member is invalid, check the flags member. This is to avoid having each and every I/O message handler go to the kernel and request the current time of day, just to fill in the attribute structure's time member(s). To fill the members with the correct time, call iofunc_time_update(). - mode - The resource's mode (e.g. type, permissions). Valid modes may be selected from the S_* series of constants in <sys/stat.h>; see " Access permissions " in the documentation for stat(). - nlink - The number of links to this particular name; your resource manager can modify this member. For names that represent a directory, this value must be at least 2 (one for the directory itself, one for the ./ entry in it). - rdev - The device number for a character special device and the rdev number for a named special device. Classification: Last modified: 2014-11-17 Got questions about leaving a comment? Get answers from our Disqus FAQ.comments powered by Disqus
http://developer.blackberry.com/native/reference/core/com.qnx.doc.neutrino.lib_ref/topic/i/iofunc_attr_t.html
CC-MAIN-2015-40
refinedweb
951
65.42
The QWizardPage class is the base class for wizard pages. More... #include <QWizardPage> Inherits QWidget. This class was introduced in Qt 4.3. The Q. Access functions: See also title, QWizard::IgnoreSubTitles, and Elements of a Wizard Page. This property holds the title of the page. The title is shown by the QWizard, above the actual page. All pages should have a title. The title may be plain text or HTML, depending on the value of the QWizard::titleFormat property. Access functions: See also subTitle and Elements of a Wizard Page. Constructs a wizard page with the given parent. When the page is inserted into a wizard using QWizard::addPage() or QWizard::setPage(), the parent is automatically set to be the wizard. See also wizard().(). This virtual function is called by QWizard::cleanupPage() when the user clicks(). Returns the value of the field called name. This function can be used to access fields on any page of the wizard. It is equivalent to calling wizard()->field(name).())); } See also QWizard::field(), setField(), and registerField(). This virtual function is called by QWizard::initializePage() to prepare the page just before it is shown. (However, if the QWizard::IndependentPages option is set, this function is only called the first time the page is shown.) By reimplementing this function, you can ensure that the page's fields are properly initialized based on fields from previous pages.())); } The default implementation does nothing. See also QWizard::initializePage(), cleanupPage(), and QWizard::IndependentPages. Returns true if this page is a commit page; otherwise returns false. See also setCommitPage(). This virtual function is called by QWizard to determine whether the Next or Finish button should be enabled or disabled. The default implementation returns true if all mandatory fields are filled; otherwise, it returns false. If you reimplement this function, make sure to emit completeChanged() whenever the value of isComplete() changes, to ensure that QWizard updates the enabled or disabled state of its buttons. See also completeChanged() and isFinalPage().. This virtual function is called by QWizard::nextId() to find out which page to show when the user clicks the Next button. By default, this function returns the page with the following ID in the QWizard, or -1 if there is no such page.(). Sets the value of the field called name to value. This function can be used to set fields on any page of the wizard. It is equivalent to calling wizard()->setField(name, value). See also QWizard::setField(), field(), and registerField().. Sets the pixmap for role which to pixmap. The pixmaps are used by QWizard when displaying a page. Which pixmaps are actually used depend on the wizard style. Pixmaps can also be set for the entire wizard using QWizard::setPixmap(), in which case they apply for all pages that don't specify a pixmap. See also pixmap(), QWizard::setPixmap(), and Elements of a Wizard Page.(). Returns the wizard associated with this page, or 0 if this page hasn't been inserted into a QWizard yet. See also QWizard::addPage() and QWizard::setPage().
http://doc.trolltech.com/4.3/qwizardpage.html
crawl-002
refinedweb
505
59.6
Hey all, I think this product might become the IDE the barren wasteland of SQL IDE's is missing :) I'm experiencing some weird things with the sync feature however. In my database I removed- and added some objects. Sometimes (haven't found the exact circumstances yet) quick search (shift, shift) knows about the new tables, but the object list is still in a stale state. Sync (ctrl+alt+y) doesn't always fix it when I'm at namespace (dbo) level. I have to go to the root level to actually sync. Has anyone found similar issues? Did anyone find the exact situation where the sync seems to drop the ball? Hey all, Hello. > Sometimes (haven't found the exact circumstances yet) quick search (shift, shift) knows about the new tables, but the object list is still in a stale state. Without steps to reproduce I can only guess: Search Everywhere (shift shift is called so) may show elements defined in a source code, e.g. in database console or an SQL file. They are available immediately, without database synchronization. > Sync (ctrl+alt+y) doesn't always fix it when I'm at namespace (dbo) level. I have to go to the root level to actually sync. Not sure what happens in this case. Can you elaborate? What elements do you create, can you provide a DDL? What permissions do they get in the database? How synchronization looks visually: does it complete, are there any error messages, etc? Thank you, Alexander. Hey Alexander, Thanks for comming back to me with this. The past few days I have tried to recreate the issue, but can't seem to pinpoint the exact parameters. The table I was creating was pretty straight forward (id (identity(1,1), primary key), some string fields, one binary(max) column, no dependencies. The synchronization looked like it was finished (the loading anim in the top right corner of the object explorer dissapeared), but I didn't check the error log. I did notice however that on starting 0xdbe I get the message Error Loading Project: Cannot load [x] modules. The number of modules seems to slowly increase over time. When I look at the paths of the modules it can't find, the files are there. The path points to a network path. Could this have to do anything with the issue? If so, can I configure this base path? If I encounter a time where I have to do a lot of drop/create scripts again, I will be more mindfull of the circumstances so I can recreate the correct steps again. Hello. Not sure, does it relate to synchronization problem, but modules on network paths are really not supported (similar issue, for example:, and see the developer's comment there). It is better to work around this issue anyway. Regards, Alexander. Don't know if this is resolving my issues, but everything is MUCH snappier now. Loading and synchronization have gone from 'coffee break' to near instant :) My guess is previously it just tried accessing the folder untill it timed out ...
https://intellij-support.jetbrains.com/hc/en-us/community/posts/205995379-Confused-about-sync
CC-MAIN-2019-47
refinedweb
517
74.08
Community Tutorial: Using NPoco with CockroachDB and C# / .NET Core Hi, I’m Darrien, and I’m building a distributed, near-real time, “OSINT data reconnaissance” system. For this system, I’ll be using CockroachDB for its distributed nature, and connecting it to a .NET Core API via NPoco and Npgsql. In this post, I’ll give a walkthrough of how I’m building the system, and how these connections work, so you can use them too. An Exercise in Curiosity and Data Sets When I first learned about network penetration testing I was enamored with the reconnaissance tools available for gathering data. However, I quickly learned these tools returned disparate data sets and formats. So this presented two problems: - The lack of organization caused writing reports to be just as tedious as performing the test. - Differing data formats make it difficult to relate and analyze the data sets from the tools. I thought introducing some level of automation could make this “gather and organize” process easier (some clever modeling could alleviate that). To take this idea a step further, if such a system was designed to be distributed across IoT hardware it could introduce new possibilities for physical network pentests. For example: synchronize WiFi signals with perimeter photos. Previous attempts at designing such a system left me with scalability issues. However, a studious suggestion from a professional mentor turned me to Apache Kafka and CockroachDB to handle the data storage and distribution concern of the project. Together, these two technologies could give me distributed message queue connected to a persistent data store! Being most of my software engineering experience has been in C#, I was left with a question of how to move data from .NET Core to this new distributed database I had never seen before. I’m electing to use the NPoco micro-ORM to make the connection a little easier. So, below I’ll be covering how I connected .NET Core, NPoco, and CRDB. Currently, this is the (loose) tech stack of the larger OSINT project: - Front-end: React + redux - Back-end: C#/.NET Core, SignalR, Rx.NET, NPoco - “Data flow”: CockroachDB, Apache Kafka - OSINT tooling/consumption: Python + Flask, metagoofil, recon-ng, FOCA, and nmap NPoco, Or: Why use an ORM? I’ll admit my immediate reasoning for using an ORM because I commonly rely on one when interfacing with a SQL-compliant database. So, it’s familiar. Also, in my opinion, it helps the data access code become predictable. A few other immediate benefits: - Improved code readability around queries - Easier data mapping to declared types - hopefully…leading to quicker app prototyping Choosing an ORM (or micro-ORM for that matter) is almost never an objective decision. For a while EntityFramework was the go-to data framework for C#. Then later versions had some reported performance issues, hence there was a push to third-party libraries. Granted, a lot of improvements have been made with the release of Entity Framework Core, but in that time I’d already grown accustomed to NPoco. If you’d rather use something other than NPoco–go ahead! Just note that this post is specific to NPoco and CockroachDB. Alright, let’s jump into the tutorial. Tutorial: Using NPoco with CRDB and .NET Core Prerequisites: If you don’t already have a running version of CRDB, follow this tutorial by Cockroach Labs to get started. We’ll use a slightly different schema than used in that tutorial, but if you’ve never used CRDB before it’s a good place to start. It’s not required, but you may also want to read through this “Build a C# App w/ CRDB” article as well. I’ll be borrowing heavily from the code in that article to make a connection to our database. Step 1: Create a New .NET Core Web API Project First, we’ll walk through the normal initial steps of creating a new .NET Core Web API project in Visual Studio. Be sure to target .NET Core 3.x. Step 2: Install Packages Since CockroachDB is compatible with PostgreSQL, we are able to use Npgsql as a data provider, and don’t have to worry about one built specifically for CRDB. Further, we are able to use NPoco as a micro-ORM for the same reason: it has Postgres support built in. Step 3: Prepare the Database and create our schema Before we do anything else, we’ll need to ensure CRDB is running and start a SQL session so we can issue commands. Open a new terminal to start CRDB: cockroach.exe start --insecure In another terminal session, start a SQL session. Our work will take place here. cockroach.exe sql --insecure Note: If you still have an ‘accounts’ table in your ‘bank’ database (from the article linked above) you’ll need to drop it to continue: DROP TABLE bank.accounts; Now we create the database ‘bank’, and set it as the database we’ll be working from. CREATE DATABASE bank; SET DATABASE TO bank; Finally, we create our ‘accounts’ table with the following: CREATE TABLE accounts( id UUID NOT NULL DEFAULT gen_random_uuid(), accountownwer STRING, balance DECIMAL(15,2), datecreated TIMESTAMPTZ, lastupdated TIMESTAMPTZ); Step 4: Create a Basic Model Now that the database is setup, let’s create the class our data will be mapped to. In your project, create a folder and name it “DataAccess”. Inside that folder, create a new class: Account public class Account { public Guid Id { get; set; } public string AccountOwner { get; set; } public decimal Balance { get; set; } public DateTime DateCreated { get; set; } public DateTime LastUpdated { get; set; } } Then we’ll decorate the class with these three attributes. These attributes are the mechanism NPoco uses to map between SQL and your C# classes–so they are crucial! - [TableName(“accounts”)] - [PrimaryKey(“id”)] - [Column(“id”)] Afterwards, your class should look something like this: The TableName and PrimaryKey attributes map the underlying class to key pieces of the specified table schema. If they aren’t specified here, then you will need to specify them later in the various NPoco methods querying the database. The same importance can be placed on the Column attribute. If it’s not defined here, there is no reasonable way for NPoco to map class fields to table columns. Further, notice that all of the attribute names included are completely lowercase. Not camelCase or Pascal-cased, strictly lowercase. This was tricky until I realized how important the casing was, and it resulted in a few mapping failures. Paying close attention to error messages was key here. A Brief Note on Data Types Matching types was the most difficult part of the puzzle. I used an (educated) guess-and-check process to determine which CRDB types matched with the C# types. Several times using the wrong schema in CRDB didn’t break the application, but did result in data being inserted in an unexpected format. Determining the CRDB type for a C# Guid and DateTime were the most troublesome for me, because of the extra flexibility CRDB provides. However, discussing the minutiae of these data types is outside of the scope of this article. So, if you’d like to know more, take a look at this CRDB data type reference. Step 4: Create Basic Database Class Now that our data mappings are created, let’s make the connection from C# to CRDB. Back in the project, create a new class called “Database”. This is the class we’ll use to establish a connection to CRDB and write some basic CRUD operations. The implementation is rather simplistic, but it will work for our needs. First, we lay out a constructor for our class, and use the NpgsqlConnectionStringBuilder class to build our connection string in pieces. Notice, these values are just the defaults with the database ‘bank’ coming from our previous setup. This code is pulled directly from “Build a C# App with Cockroach DB”. Kicking the Tires Awesome! At this point we can start using NPoco to write some simple queries. Let’s take it for a spin. Simple Actions: Select & ‘where’ clause Let’s start with retrieving a single record. First, we’ll use a couple “ using” blocks for creating the connection to the database and a database object. This also sets up automatic disposing of the resources we’re using for the database connection.This method selects a single record based on the ‘id’ parameter. First, NPoco opts for using the term “ Fetch” instead of “ Select”, but you can think of these synonymously. Then, we use the LINQ expression “ Where” to filter the resulting list based on the “ Id” field. Finally, we call “ FirstOrDefault()” to return a single Account, not List<Account>. public Account GetSingle(string id) { Account acc; using (var conn = new NpgsqlConnection(connectionString)) { using (var db = new NPoco.Database(conn)) { db.Connection.Open(); acc = db.Fetch().Where(a => a.Id == new Guid(id)).FirstOrDefault(); db.Connection.Close(); } } return acc; } Simple Actions: Insert NPoco makes inserts really simple. We supply the object to be inserted as a parameter, and call “ Insert()”. db.Insert<Account>("accounts", "id", account); The method I’ve referenced has a few other parts to it, though. Here, “ Insert()” becomes “ Insert<Account>()” to specify we’re acting on the Account type. Further, an overload for “ Insert” is used which requires specifying the table, primary key, and finally the object for insertion. This is one of those weird cases where I encountered some strange behavior of NPoco, the PostgreSql driver, and CRDB not lining up exactly. So, I resolved to supplying as much information as possible to the method. Simple Actions: Update/Upsert There are several ways to update records with NPoco, and it can be done with a lot of nuance. However, I’ll keep things simple, and cover two of the simpler ways. For an update, we supply the object after field updates have been made, so the record should still have the same unaltered ‘id’ from the database. Then we pass this to NPoco’s “ Update” method. Remember those attributes we decorated the Account class with?–TableName, PrimaryKey, and Column. NPoco uses that metadata to create the proper update statement in SQL! An “upsert” is just as easy. The “Save” method in NPoco is known to perform an “upsert” operation, as documented here:. Other than that, we supply our already updated object the same as we did for “ Update”, but we specify “ Save”. That’s it! Simple Actions: Deletes are just as easy. We supply our object as a parameter, and call “ Delete()”. Again the metadata supplied by the attributes on the Account class allow NPoco to do its heavy-lifting for this. var res = db.Delete<Account>(account); Once again, I encountered some weirdness between NPoco, the Npgsql driver, and CRDB when I tried to supply only a record’s primary key value to perform a delete. I wasn’t able to track down what was failing, but using the whole object, like above, worked well. Benefit of This Approach Each ORM has its virtues. I chose NPoco in part because it offers the flexibility to submit complex SQL queries without leaving the pattern used in simpler queries–and with full control over parameterization. Just for fun, below we have an (admittedly contrived) example of how we could implement a CTE query while still utilizing a minimal amount of NPoco. string col3 = "someColumnName"; const string MyTableName = "some_special_table"; using (var conn = new NpgsqlConnection(connectionString)) { using (var db = new NPoco.Database(conn)) { db.Connection.Open(); var res = db.Execute(new Sql($@" WITH bankers_cte AS (SELECT * FROM employees WHERE type == 'banker') select col1, col2, {col3} from {MyTableName} sst where sst.col1 == bankers_cte.colX", col3)); db.Connection.Close(); } } In case you aren’t familiar with C#’s string formatting options, the ‘$’ character provides a sugar-syntax alternative to the older “ String.format()”, and the ‘ @’ allows for multi-line string. A nice two-handed punch for when you want to write multi-line SQL queries in your code without confusing formatting issues. Closing: Quick Gains, a Word about a Prototype Project I’m still in the early stages of working with CRDB and NPoco, so there are no guarantees that I’ll continue with this pairing, but already it’s allowed me to get off the ground with CRDB just like I would any other SQL-compliant database. For now, it’s great to be able to query data knowing CRDB is doing the hard work underneath to keep things scalable. I’ll continue developing my prototype application, and should this crazy idea work I’ll share more about prototyping with CRDB and my adventures with its distributed and “real-time” capabilities. As a part of that continued effort, I’d like to experiment with adapting this architecture for IoT, specifically on Raspberry Pi. The release of the RaspberryPi 4 opened the hardware up to 64-bit processing and now 4GB of RAM. Ideally, all of this experimentation would prove a concept for a data streaming system, running on IoT hardware, across a MANET (mobile ad-hoc network). Maybe it’ll work…maybe I’ll fry a few boards. 😉
https://www.cockroachlabs.com/blog/npoco-dotnet-cockroachdb/
CC-MAIN-2020-10
refinedweb
2,189
63.7
Postgresql fixtures and fixture factories for Pytest. Project Description What is this? This is a pytest plugin, that enables you to test your code that relies on a running PostgreSQL Database. It allows you to specify fixtures for PostgreSQL process and client. How to use Warning Tested on PostgreSQL versions > 9.x. See tests for more details. Plugin contains two fixtures - postgresql - it’s a client fixture that has functional scope. After each test it ends all leftover connections, and drops test database from PostgreSQL ensuring repeatability. - postgresql_proc - session scoped fixture, that starts PostgreSQL instance at it’s first use and stops at the end of the tests. Simply include one of these fixtures into your tests fixture list. You can also create additional postgresql client and process fixtures if you’d need to: from pytest_postgresql import factories postgresql_my_proc = factories.postgresql_proc( port=None, logsdir='/tmp') postgresql_my = factories.postgresql('postgresql_my_proc') Note Each PostgreSQL process fixture can be configured in a different way than the others through the fixture factory arguments. Configuration You can define your settings in three ways, it’s fixture factory argument, command line option and pytest.ini configuration option. You can pick which you prefer, but remember that these settings are handled in the following order: - Fixture factory argument - Command line option - Configuration option in your pytest.ini file Example usage: pass it as an argument in your own fixture postgresql_proc = factories.postgresql_proc( port=8888) use --postgresql-port command line option when you run your tests py.test tests --postgresql-port=8888 specify your port as postgresql_port in your pytest.ini file. To do so, put a line like the following under the [pytest] section of your pytest.ini: [pytest] postgresql_port = 8888 Package resources CHANGELOG 1.3.2 - [bugfix] version regexp to correctly catch postgresql 10 1.3.1 - [enhancement] explicitly turn off logging_collector 1.3.0 - [feature] pypy compatibility 1.2.0 [bugfix] - disallow connection to database before it gets dropped. Note Otherwise it caused random test subprocess to connect again and this the drop was unsucessfull which resulted in many more test failes on setup. [cleanup] - removed path.py dependency 1.1.1 - [bugfix] - Fixing the default pg_ctl path creation 1.1.0 - [feature] - migrate usage of getfuncargvalue to getfixturevalue. require at least pytest 3.0.0 1.0.0 - create command line and pytest.ini configuration options for postgresql starting parameters - create command line and pytest.ini configuration options for postgresql username - make the port random by default - create command line and pytest.ini configuration options for executable - create command line and pytest.ini configuration options for host - create command line and pytest.ini configuration options for port - Extracted code from pytest-dbfixtures Download Files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/pytest-postgresql/
CC-MAIN-2018-13
refinedweb
469
51.65
Question Considering the insurance benefits needed to provide $ 40,000 over the next 15 years, plus the additional $ 330,000 of insurance coverage, what amount of insurance coverage is needed? Answer to relevant QuestionsSince he only smokes occasionally, he would like to omit this information from his life insurance application. Advise Dave on this course of action. What should your first priority of investing be? What is the disadvantage of investments that satisfy that priority? Why do investors measure risk? Describe the two common measures of risk. What type of firm typically pays dividends? What are growth stocks? What are income stocks? What is the dollar amount of Joel’s return (see problem 1)? In Problem 1. Joel purchased 100 shares of stock for $ 20 per share. During the year, he received dividend checks amounting to $ 150. Joel recently sold the stock ... Post your question
http://www.solutioninn.com/considering-the-insurance-benefits-needed-to-provide-40000-over
CC-MAIN-2017-04
refinedweb
145
62.44
Introduction In this sample is shown how to build a simple button with a nice graphic interface. My control would be an example about using the drawings classes and the essentials key-words. I decide to draw an unusual button like this picture below: First step First of all I declare my new class : public class SpringButton : Control {} After that I expose some essential proprieties like the size in pixel of the triangles and the second color of the button. All the others proprieties that I need are yet behind the System.Windows.Form.Control class. //this variable say if the //mouse is over the control private bool Sel = false; private Color BackColor2= Color.Gray; public Color BackColorEnd { get { return BackColor2; } set BackColor2=value; this.Invalidate(); } int _triangle =25; //I add a property //that's the length of //a triangle rectangle (45°) public int Triangle return _triangle; } _triangle=value; //if length change I update //the control this.Invalidate(true); //set the button as "selected" on mouse entering //and as not selected on mouse leaving protected override void OnMouseEnter(EventArgs e) Sel = true; this.Invalidate(); } protected override void OnMouseLeave(EventArgs e) { Sel = false; The core The main step is this override of the OnPaint procedure. In this method I draw indirectly on the control, first the central rectangle, and then the two triangles in the opposite corners. I use this code: protected void PaintBut(PaintEventArgs e) //I select the rights color //To paint the button... Color FColor = this.BackColorEnd; Color BColor = this.BackColor; if (Sel == true) { FColor = this.BackColor; BColor = this.BackColorEnd; //and draw(see All the code...) In the end I would to explain how to use delegate. So I declared this class that I used as EventArgs. In fact when clicked on the control I decide if the click has been on a triangle and if yes, I do a delegate with the TriangleEventArgs that say that the triangle has been clicked. protected override void OnMouseDown(MouseEventArgs e) base.OnClick(e); // if the user use this delegate... if (this.TriangleClick != null) //check if the user click on the left triangle //or in the right with some geometrics rules... //(isn't possible to click all triangle at the same time ) int x= e.X; int y= e.Y; if((x<_triangle)&&(y<=(_triangle-x))|| (x>this.ClientRectangle.Width-_triangle)&&(y>=(this.ClientRectangle.Height-_triangle-x)) ) { //try with right... TriangleClickEventArgs te= new TriangleClickEventArgs(false); //if not... if((x<_triangle)&&(y<=(_triangle-x))) te= new TriangleClickEventArgs(true); this.TriangleClick(this,te); } You can find more about Spring button and my works at: If You would see my other work please visit my home page: View All
http://www.c-sharpcorner.com/article/springbutton/
CC-MAIN-2017-22
refinedweb
444
57.77
On January 1, 2017, Norway will introduce a new VAT return and new import VAT scheme. 1 January 2017: New VAT return A new version of the VAT return will be introduced as from 1 January 2017. The deadlines for submission and payment will remain unchanged. The new VAT return contains new and changed boxes (19 boxes) compared to the previous VAT return (11 boxes). Your accounts must be compatible with the VAT return. This is necessary in order to extract figures specified according to the 19 boxes in the VAT return. The accounting systems must therefore be upgraded in order to comply with the Norwegian Bookkeeping regulations. The new VAT return is mandatory. 1 January 2017: New import VAT scheme From 1 January 2017, importers who are registered in the Norwegian VAT register must report import VAT on goods in the new VAT return. You will no longer receive VAT invoices from the Customs Authority or the shipping agents. As a result, it will no longer be necessary to have a customs credit (duty deferment account) for import VAT. Please note that a customs credit can be used for other customs duties and for excise duties. The Norwegian Customs will offer a customs declaration overview as a new service in Altinn (). You must calculate the basis for the VAT and the VAT amount itself based on information in the customs declaration, etc. For VAT-registered enterprises, the VAT basis and VAT amount will no longer form part of the customs declaration – and these amounts will therefore not be shown in the customs declaration overview. Only other taxes entered on the customs declaration will be shown, where applicable, such as customs duties, excise duties research levies, export tax on fish, duties and/or raw material tax. The Norwegian Customs’ declaration system (TVINN) is the source of information in the overview. The customs declaration overview will be made available on the first working day following the end of the previous month. When a new overview becomes available in Altinn, the enterprise will receive notification via e-mail from Altinn. The customs declaration overview will show information that may be of use to VATregistered enterprises when completing the new VAT return. 1 April 2017: Changes – Fiscal representative scheme A foreign enterprise with no place of business in Norway (branch or “NUF”) is, as a main rule, obliged to register in the VAT Register through a Norwegian fiscal representative. From 1 April 2017, the enterprise can choose not to register through a VAT representative if the country of origin is one of the following: Belgium, Czech Republic, Denmark, Finland, France, Germany, Iceland, Italy, Malta, Netherlands, Poland, Portugal, Slovenia, Spain, Sweden and UK. Branches with origin in other countries (USA, Asia etc.) will still be obliged to register though a fiscal representative.
https://www.lexology.com/library/detail.aspx?g=b9cb8da3-6bb6-498a-8eef-f0b25fa1f3e6
CC-MAIN-2017-51
refinedweb
468
51.78
Regression in error message when attempting to let bind an existentially quantified type When attempting to compile the following (invalid) program: {-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. Foo a main :: IO () main = let Foo x = Foo 1 in return () GHC 8.6.2.0 (and 8.6.1.0, 8.4.1.0) gives the following complicated error message Test.hs:7:13: error: • Couldn't match expected type ‘p’ with actual type ‘a’ because type variable ‘a’ would escape its scope This (rigid, skolem) type variable is bound by a pattern with constructor: Foo :: forall a. a -> Foo, in a pattern binding at Test.hs:7:9-13 • In the pattern: Foo x In a pattern binding: Foo x = Foo 1 In the expression: let Foo x = Foo 1 in return () | 7 | let Foo x = Foo 1 in | GHC 7.10.1.2 gave a much more helpful and direct error message Test.hs:7:9: My brain just exploded I can't handle pattern bindings for existential or GADT data constructors. Instead, use a case-expression, or do-notation, to unpack the constructor. In the pattern: Foo x In a pattern binding: Foo x = Foo 1 In the expression: let Foo x = Foo 1 in return ()
https://gitlab.haskell.org/ghc/ghc/-/issues/15991
CC-MAIN-2020-34
refinedweb
208
63.19
vTaskStartScheduler() never returns. Please see the FreeRTOS documentation for details of API functions.Here is a link to vTaskStartScheduler(). pvTaskCode Pointer to the task entry function. Tasks must be implemented to never return (i.e. continuous loop). I suspect one of your tasks crashes the system when it returns. Looks like FreeRTOS have very high latency on Due or I'm being missing something. Step motor have priority 1, scrolling text - 2. Scrolling text on TM1638 LED (running as separate task) creates audible ticks and vibration (with frequency equal to scroll text speed) on running step motor. Bypassing scroll code in this task removed problem with ticking step motor. I don't recall a post about the Ethernet library. Many Arduino libraries are not RTOS friendly but that doesn't mean you can't use them.Here is an example from the Ethernet library:Code: [Select] // Wait for a response packet while(iUdp.parsePacket() <= 0) { if((millis() - startTime) > aTimeout) return TIMED_OUT; delay(50); }This loop has a delay(50) call that will block lower priority threads. If the delay were replaced by a chThdSleep(50) call, lower priority threads could use the CPU time.I think a web server is an ideal candidate for RTOS use. I would love to have a well designed web server as an example.I hope to write a "How To" for making minimal changes to libraries that will improve their performance with an RTOS. // Wait for a response packet while(iUdp.parsePacket() <= 0) { if((millis() - startTime) > aTimeout) return TIMED_OUT; delay(50); } #include <NilRTOS.h> // make it a little bit more friendly to NilRTOS.#if defined(__NIL__) nilThdSleepMilliseconds(300);#elseif delay(300);#endif Please enter a valid email to subscribe We need to confirm your email address. To complete the subscription, please click the link in the Thank you for subscribing! Arduino via Egeo 16 Torino, 10131 Italy
http://forum.arduino.cc/index.php?topic=145716.30
CC-MAIN-2017-04
refinedweb
313
67.86
Pittsburgh Scala Meetup: learning by reading Josh's code! The Pittsburgh Scala Meetup met to learn by hacking. There was a change of plan because Josh couldn’t make it to the meeting, so instead of a presentation by him, we got a link to his GitHub repository for an implementation of an interactive Web-based tic-tac-toe game using Play. Sometimes interesting things happen when plans are changed. Reading Josh’s code Since Josh wasn’t around, we decided to study his code, and use it as the basis of discussion of Scala language features and idiomatic style, making sure that all of us understood what the code was doing. This turned out to be a surprisingly useful exercise, very participatory by everyone. Justin took charge of an SBT session as we played with modifying the code and figuring out what things did. I shared some tips on using SBT in “trigger mode”, which some had not known about. While experimenting, we ran into interesting Scala gotchas involving def and val in classes that mix in traits. We also had useful discussions on coding style, such as point-free style and use of underscores in closures, and converting between curried and uncurried functions. My personal point of view is that I prefer to be more explicit rather than more concise, to improve clarity, but much does depend on assumptions about people’s prior knowledge. Josh was writing this code for only himself, and the complete application was actually not meant to showcase the tic-tac-toe game logic anyway, but the use of Play. Conclusion I thought it was a really useful session in which we all helped one other get up to speed on various Scala language features or standard library APIs. We all learned something new, and we figured out Josh’s code, and collected questions to ask him when he comes back!comments powered by Disqus
http://conscientiousprogrammer.com/blog/2013/10/11/pittsburgh-scala-meetup-learning-by-reading-joshs-code/
CC-MAIN-2017-47
refinedweb
321
59.13
#include <net.h> #include <sync.h> #include <validationinterface.h> Go to the source code of this file. Mutex to guard access to validation specific variables, such as reading or changing the chainstate. This may also need to be locked when updating the transaction pool, e.g. on AcceptToMemoryPool. See CTxMemPool::cs comment for details. The transaction pool has a separate lock to allow reading from it and the chainstate at the same time. Definition at line 130 of file validation.cpp. Default number of orphan+recently-replaced txn to keep around for block reconstruction. Definition at line 23 of file net_processing.h. Default for -maxorphantx, maximum number of orphan transactions kept in memory. Definition at line 21 of file net_processing.h. Definition at line 25 of file net_processing.h. Definition at line 24 of file net_processing.h. Threshold for marking a node to be discouraged, e.g. disconnected and added to the discouragement filter. Definition at line 27 of file net_processing.h.
https://doxygen.bitcoincore.org/net__processing_8h.html
CC-MAIN-2021-17
refinedweb
162
54.18
Odoo Help Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps: CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc. Domain for Many2many fields Hello there, I'm trying to create a domain on a Many2many field: @api.onchange('name') def onchange_domain_on_days(self): res = {} ids = [] employee_model = self.env['hr.employee'] all_employees = employee_model.search([]) for employee in all_employees: if employee.user_id.store_id == self.working_hours_id.store_id: ids.append(employee.id) res['domain'] = { 'monday': [('id', 'in', ids)], } return res This will work very well! BUT only if the field value 'name' changes.. Is there a way to apply this from the beginning? Best regards -- Alejandro Hi, - One option is to make it a compute field of type Many2many. And you can add the above code on that function, according to what should be returned on that field. - Another option is to override the view_init() which is triggered everytime showing a form view, you can add your code in that function. This post also might be helpful, which describes another way: About This Community Odoo Training Center Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
https://www.odoo.com/forum/help-1/question/domain-for-many2many-fields-92757
CC-MAIN-2018-13
refinedweb
202
58.38
Federated Identity with Microsoft Azure Access Control Service In Chapter 4, "Federated Identity for Web Applications," you saw how Adatum used claims to enable users at Litware to access the a-Order application. The scenario described how Adatum could federate with partner organizations that have their own claims-based identity infrastructures. Adatum supported the partner organizations by establishing trust relationships between the Adatum federation provider (FP) and the partner's identity provider (IdP). Adatum would now like to allow individual users who are not part of a partner's security domain to access the a-Order application. Adatum does not want to manage the user accounts for these individuals: instead, these individuals should be able to use an existing identity from social identity providers such as Microsoft® Windows® Live®, Google, Yahoo!, or Facebook. How can Adatum enable users to reuse an existing social identity, such as Facebook ID, when they access the a-Order application? In addition to establishing trust relationships with the social identity providers, Adatum must find solutions to these problems: In this chapter, the term "social identity" refers to an identity managed by a well-known, established online identity provider. - Different identity providers may use different protocols and token formats to exchange identity data. - Different identity providers may use different claim types. - The Adatum federation provider must be able to redirect users to the correct identity provider. - The a-Order application must be able to implement authorization rules based on the claims that the social identity providers issue. - Adatum must be able to enroll new users with social identities who want to use the a-Order application. The Azure™ AppFabric Access Control Service (ACS) is a cloud-based federation provider that provides services to facilitate this scenario. ACS can transition between the protocols used by different identity providers to transfer claims, perform mappings between different claim types based on configurable rules, and help locate the correct identity provider for a user when they want to access an application. For more information, see Chapter 2, "Claims-Based Architectures." In this chapter, you'll learn how Adatum enables individual customers with a range of different social identity types to access the a-Order application alongside Adatum employees and employees of an existing enterprise partner. This chapter extends the scenario described in Chapter 4, "Federated Identity for Web Applications," and shows Adatum building on its previous investments in a claims-based identity infrastructure. The Premise Now that Adatum has enabled federated access to the a-Order application for users at some of Adatum's partners such as Litware, Adatum would like to extend access to the a-Order application to users at smaller businesses with no identity infrastructure of their own and to individual consumer users. Fortunately, it is likely that these users will already have some kind of social identity such as a Google ID or a Windows Live ID. Smaller businesses want their users to be able to track their orders, just as Rick at Litware is already able to do. Consumer users want to be able to log on with their social identity credentials and use the a-Order program to determine the status of all their orders with Adatum. They don't want to be issued additional credentials from Adatum just to use the a-Order application. Goals and Requirements The goal of this scenario is to show how federated identity can make the partnership between Adatum and consumer users and users at smaller businesses with no security infrastructure of their own work more efficiently. With federated identity, one security realm can accept identities that come from another security realm. This lets people in one domain access resources located in the other domain without presenting additional credentials. The Adatum issuer will trust the common social identity providers (Windows Live ID, Facebook, Google, Yahoo!) to authenticate users on behalf of the a-Order application. In addition to the goals, this scenario has a number of other requirements. One requirement is that Adatum must control access to the order status pages and the information that the application displays based on the identity of the partner or consumer user who is requesting access to the a-Order application. In other words, users at Litware should only be able to browse through Litware's orders and not another company's orders. In this chapter, we introduce Mary, the owner of a small company named "Mary Inc." She, of course, should only be able to browse through her orders and no one else's. Another requirement is that, because Adatum has several partner organizations and many consumer users, Adatum must be able to find out which identity provider it should use to authenticate a user's credentials. As mentioned in previous chapters, this process is called home realm discovery. For more information, see Chapter 2, "Claims-Based Architectures." One assumption for this chapter is that Adatum has its own identity infrastructure in place. Overview of the Solution With the goals and requirements in place, it's time to look at the solution. As you saw in Chapter 4, "Federated Identity for Web Applications," the solution includes the establishment of a claim-based architecture with an issuer that acts as an identity provider on the customer's side and an issuer that acts as the federation provider on Adatum's side. Recall that a federation provider acts as a gateway between a resource and all of the issuers that provide claims about the resource's users. In addition, this solution now includes an ACS instance, which handles the protocol transition and token transformation for issuers that might not be WS-Federation based. This includes many of the social identity providers mentioned earlier in this chapter. Figure 1 shows the Adatum solution for both Litware that has its own identity provider, and Mary who is using a social identity—Google, in this example. Figure 1 The following two sections provide a high-level walkthrough of the interactions between the relying party (RP), the federation provider, and the identity provider for customers with and without their own identity provider. For a detailed description of the sequence of messages that the parties exchange, see Appendix B. Example of a Customer with its Own Identity Provider To recap from Chapter 4, "Federated Identity for Web Applications," here's an example of how the system works for a user, Rick, at the partner Litware, which has its own identity provider. The steps correspond to the shaded numbers in the preceding illustration. Step 1: Authenticate Rick - Rick is using a computer on Litware's network. Litware's Active Directory® service has already authenticated him. He opens a browser and navigates to the a-Order application. Rick is not an authenticated user in a-Order at this time. Adatum has configured a-Order to trust Adatum's issuer (the federation provider). The application has no knowledge of where the request comes from. It redirects Rick's request to the Adatum federation provider. - The Adatum federation provider presents the user with a page listing different identity providers that it trusts (the "Home realm Discovery" page). At this point, the federation provider doesn't know where Rick comes from. - Rick selects Litware from the list and then Adatum's federation provider redirects him to the Litware issuer that can verify that Rick is who he says he is. - Litware's identity provider verifies Rick's credentials and returns a security token to Rick's browser. Litware's identity provider has configured the claims in this token for the Adatum federation provider and they contain information about Rick that is relevant to Adatum. For example, the claims establish his name and that he belongs to the sales organization in Litware. Step 2: Transmit Litware’s Security Token to the Adatum Federation Provider - Ricks’ browser now posts the issued token back to the Adatum federation provider. The Adatum federation provider validates the token issued by Litware and creates a new token that the a-Order application can use. Step 3: Transforming the Token - The federation provider transforms the claims issued by Litware into claims that Adatum's a-Order application understands. (The mapping rules that translate Litware claims into Adatum claims were determined when Adatum configured its issuer to accept Litware's issuer as an identity provider.) - The claim mappings in Adatum's issuer remove some claims and add others that the a-Order application needs in order to accept Rick as a user, and possibly control access to certain resources. Step 4: Transmit the Transformed Token and Perform the Requested Action - The Adatum issuer uses browser redirection to send the new token to the application. In the a-Order application, Windows Identity Foundation (WIF) validates the security token and extracts the claims. It creates a ClaimsPrincipal object and assigns it to HttpContext.User property. The a-Order application can then access the claims for authorization decisions. For example, in this scenario, the application filters orders by organization, which is one of the pieces of information provided as a claim. Example of a Customer Using a Social Identity Here's an example of how the system works for a consumer user such as Mary who is using a social identity. The steps correspond to the un-shaded numbers in the preceding illustration. Step 1: Present Credentials to the Identity Provider - Mary is using a computer at home. She opens a browser and navigates to the a-Order application at Adatum. Adatum has configured the a-Order application to trust Adatum's issuer (the federation provider). Mary is currently un-authenticated, so the application redirects Mary's request to the Adatum federation provider. - The Adatum federation provider presents Mary with a page listing different identity providers that it trusts. At this point, the federation provider doesn't know which security realm Mary belongs to, so it must ask Mary which identity provider she wants to authenticate with. - Mary selects the option to authenticate using her social identity and then Adatum's federation provider redirects her to the ACS issuer to verify that Mary is who she says she is. Adatum's federation provider uses the whr parameter in the request to indicate to ACS which social identity provider to use—in this example it is Google. - ACS automatically redirects Mary to the Google issuer. - Google verifies Mary's credentials and returns a security token to Mary's browser. The Google identity provider has added claims to this token for ACS: the claims include basic information about Mary. For example, the claims establish her name and her email address. Step 2: Transmit the Identity Provider's Security Token to ACS - The Google identity provider uses HTTP redirection to redirect the browser to ACS with the security token it has issued. - ACS receives this token and verifies that it was issued by the identity provider. Step 3: Transform the Claims - If necessary, ACS converts the token issued by the identity provider to the security assertion markup language (SAML) 2.0 format and copies the claims issued by Google into the new token. - ACS returns the new token to Mary's browser. Step 4: Transmit the Identity Provider's Security Token to the federation Provider - Mary’s browser posts the issued token back to the Adatum federation provider. - The Adatum federation provider receives this token and validates it by checking that ACS issued the token. Step 5: Map the Claims - Adatum's federation provider applies token mapping rules to the ACS security token. These rules transform the claims into claims that the a-Order application can understand. - The Adatum federation provider returns the new claims to Mary's browser. Step 6: Transmit the Mapped Claims and Perform the Requested Action - Mary's browser posts the token issued by the Adatum federation provider to the a-Order application. This token contains the claims created by the mapping process. - The application validates the security token by checking that the Adatum federation provider issued it. - The application reads the claims and creates a session for Mary. It can use Mary's identity information from the token to determine which orders Mary can see in the application. Because this is a web application, all interactions happen through the browser. (See the section "Browser-Based Scenario with ACS" in Appendix B for a detailed description of the protocol for a browser-based client.) The principles behind these interactions are exactly the same as those described in Chapter 4, "Federated Identity for Web Applications." Adatum's issuer, acting as a federation provider, mediates between the application and the external issuers. The federation provider has two responsibilities. First, it maintains a trust relationship with partner issuers, which means that the federation provider accepts and understands Litware tokens and their claims, ACS tokens and their claims, and tokens and their claims from any other configured partner. Second, the federation provider needs to translate claims from partners and ACS into claims that a-Order can understand. The a-Order application only accepts claims from Adatum's federation provider (this is its trusted issuer). In this scenario, a-Order expects claims of type Role and Organization in order to authorize operations on its web site. The problem is that ACS claims don't come from Adatum and they don't have these claim types. In the scenario, the claims from ACS only establish that a social identity provider has authenticated the user. To solve this problem, the Adatum federation provider uses mapping rules that add a Role claim to the claims from ACS. Trust Relationships with Social Identity Providers The nature of a trust relationship between Adatum and a business partner such as Litware, is subtly different from a trust relationship between Adatum and a social identity provider such as Google or Windows Live. In the case of a trust relationship between Adatum and a business partner such as Litware, the trust operates at two levels; there is a business trust relationship characterized by business contracts and agreements, and a technical trust relationship characterized by the configuration of the Adatum federation provider to trust tokens issued by the Litware identity provider. In the case of a trust relationship between Adatum and a social identity provider such as Windows Live, the trust is only a technical trust; there is no business relationship between Adatum and Windows Live. In this scenario, Adatum establishes a business trust relationship with the owner of the social identity when the owner enrolls to use the a-Order application and registers his or her social identity with Adatum. A further difference between the two scenarios is in the claims issued by the identity providers. Adatum can trust the business partner to issue rich, accurate claims data about its employees such as cost centers, roles, and telephone numbers, in addition to identity claims such as name and email. The claims issued by a social identity provider are minimal, and may sometimes be just an identifier. Because there is no business trust relationship with the social identity provider, the only thing that Adatum knows for sure is that each individual with a social identity has a unique, unchanging identifier that Adatum can use to recognize that it's the same person returning to the a-Order application. Description of Mapping Rules in a Federation Provider The claims that ACS returns from the social identity provider to the Adatum federation provider do not include the role or organization claims that the a-Order application uses to authorize access to order data. In some cases, the only claim from the social identity provider is the nameidentifier that is a guid-like string. The mapping in rules in the Adatum federation provider must add the role and organization claims to the token. In the sample, the mapping rules simply add the OrderTracker role, and "Mary Inc." as an organization. The following table summarizes the mapping rules that the Adatum federation provider applies when it receives a token from ACS when the user has authenticated with Google. The following table summarizes the mapping rules that the simulated issuer applies when it receives a token from ACS when the user has authenticated with Windows Live ID. The following table summarizes the mapping rules that the simulated issuer applies when it receives a token from ACS when the user has been authenticated by a Facebook application. In the scenario described in this chapter, because of the small numbers of users involved, Adatum expects to manage the enrolment as a manual process. For a description of how this might be automated, see Chapter 7, "Federated Identity with Multiple Partners and Microsoft Azure Access Control Service." Alternative Solutions Of course, the solution we've just described illustrates just one implementation choice; another possibility would be to separate Adatum's identity provider and federation provider and let ACS manage the federation and the claims transformation. Figure 2 shows the trust relationships that Adatum would need to configure for this solution. Figure 2 In this alternative solution, ACS would trust the Adatum and Litware identity providers and there is no longer a trust relationship between the Litware and Adatum issuers. Adatum should also evaluate the costs of this solution because there will be additional ACS transactions as it handles sign-ins from users at partners with their own identity providers. These costs need to be compared with the cost of running and managing this service on-premises. A second alternative solution does away with ACS leaving all the responsibilities for protocol transition and claims transformation to the issuer at Adatum. Figure 3 shows the trust relationships that Adatum would need to configure for this solution. Figure 3 Although this alternative solution means that Adatum does not need to pay any of the subscription charges associated with using ACS, Adatum is concerned about the additional complexity of its issuer, which would now need to handle all of the protocol transition and claims transformation tasks. Furthermore, implementing this scenario would probably take some time (weeks or months), while Adatum could probably configure the solution with ACS in a matter of hours. The question becomes one of business efficiency: would Adatum get a better return by investing in creating and maintaining infrastructure services, or by focusing on their core business services? Inside the Implementation The Visual Studio solution named 6-FederationWithAcs found at is an example of how to use federation with ACS. The structure of the application is very similar to what you saw in chapter 4, "Federated Identity for Web Applications." There are no changes to the a-Order application: it continues to trust the Adatum simulated issuer that provides it with the claims required to authorize access to the application's data. The example solution extends the Adatum simulated issuer to handle federation with ACS, and uses an ACS instance that is configured to trust the social identity providers. The next section describes these changes. Setup and Physical Deployment You can see the entry for ACS () in the issuerNameRegistry section of the Web.config file in the Adatum.SimulatedIssuer.6 project. This entry includes the thumbprint used to verify the token that the Adatum federation provider receives from ACS. This is the address of the ACS instance created for the sample. When the developers at Adatum want to deploy their application, they will modify the configuration so that it uses the Adatum federation provider. They will also modify the configuration of the Adatum federation provider by adding a trust relationship with the production ACS instance. Establishing a Trust Relationship with ACS Establishing a trust relationship with ACS is very similar to establishing a trust relationship with any other issuer. Generally, there are six steps in this process: - Configure Adatum's issuer to recognize your ACS instance as a trusted identity provider. - Configure the social identity providers that you want to support in ACS. - Configure your ACS instance to accept requests from the Adatum issuer (the Adatum issuer is a relying party as far as ACS is concerned.) - Edit the claims rules in ACS to pass the claims from the social identity provider through to the Adatum issuer. - If necessary, edit the claims transformation rules in the Adatum issuer that are specific to the social identity providers. - If necessary, edit the claims rules in the Adatum issuer that are specific to the a-Order application. You can refer to documentation provided by your production issuer for instructions on how to perform these steps. You can find detailed instructions for the ACS configuration in Appendix E of this guide. Reporting Errors from ACS You can specify a URL that points to an error page for each relying party that you define in ACS. In the sample, this page is called ErrorPage.aspx and you can find it in the Adatum.FederationProvider.6 project. If ACS detects an error during processing, it can post JavaScript Object Notation (JSON) encoded error information to this page. The code-behind for this page illustrates a simple approach for displaying this error information; in practice, you may want to log these errors and take different actions depending on the specific error that occurs. Initializing ACS The sample application includes a set of pre-configured partners for Fabrikam Shipping, both with and without their own identity providers. These partners require identity providers, relying parties, and claims-mapping rules in ACS in order to function. The ACS.Setup.6 project in the solution is a basic console application that you can run to add the necessary configuration data for the pre-configured partners to your ACS instance. It uses the ACS Management API and the wrapper classes in the ACS.ServiceManagementWrapper project. For more information on working with ACS, see Appendix E. Working with Social Identity Providers The solution described in this chapter enables Adatum to support users with identities from trusted partners such as Litware, and with identities from social identity providers such as Google or Windows Live ID. Implementing this scenario in the real world would require solutions to two additional problems. First, there is the question of managing how we define the set of identities (authenticated by one of the social identity providers) that are members of the same organization. For example, which set of users with Windows Live IDs and Google IDs are associated with the organization Mary Inc? With a partner such as Litware with its own identity provider, Adatum trusts Litware to decide which users at Litware should be able to view the order data that belongs to Litware. Second, there are differences between the claims returned from the social identity providers. In particular, Windows Live ID only returns the nameidentifier claim. This is a guid-like string that Windows Live guarantees to remain unchanged for any particular Windows Live ID within the current ACS namespace. All we can tell from this claim is that that this instance of ACS and Windows Live have authenticated the same person, provided we get the same nameidentifier value returned. There are no claims that give us the user's email address or name. The following potential solutions make these assumptions about Adatum. - Adatum does not want to make any changes to the a-Order application to accommodate the requirements of a particular partner. - Adatum wants to do all of its claims processing in the Adatum federation provider. Adatum is using ACS just for protocol transition, passing through any claims from the social identity providers directly to the Adatum federation provider. Managing Users with Social Identities Taking Litware as an example, let's recap how the relationship with a partner organization works. - Adatum configures the Adatum federation provider to trust the Litware identity provider. This is a one-time, manual configuration step in this scenario. - Adatum adds a set of claims-mapping rules to the Adatum federation provider, to convert claims from Litware into claims that the Adatum a-Order application understands. In this scenario, the relevant claims that the a-Order application expects to see are name, Role and Organization. - Litware can authorize any of its employees to access the Adatum a-Order application by ensuring that Litware's identity provider gives the user the correct claim. In other words, Litware controls who has access to Litware's data in the Adatum a-Order application. The situation for a smaller partner organization without its own identity provider is a little different. Let's take MaryInc, which wants to use Windows Live IDs and Google IDs as an example. - Unlike a partner with its own identity provider, there is no need to set up a new trust relationship because Adatum already trusts ACS. From the perspective of the Adatum federation provider, ACS is where the MaryInc employee claims will originate. - The Adatum federation provider cannot identify the partner organization of the authenticated user from the claims it receives from ACS. Therefore, Adatum must configure a set of mapping rules in the federation provider that map a user's unique claim from ACS (such as the nameidentifier claim) to appropriate values for the name, Role and Organization claims that the a-Order application expects to see. - If MaryInc wants to allow multiple employees to access MaryInc data in the a-Order application, then Adatum must manually configure additional mapping rules in its federation provider. This last point highlights the significant difference between the partner with its own identity provider and the partner without. The partner with its own identity provider can manage who has access to its data in the a-Order application; the partner without its own identity provider must rely on Adatum to make changes in the Adatum federation provider if it wants to change who has access to its data. Working with Windows Live IDs Unlike the other social identity providers supported by ACS that all return name and emailaddress claims, Windows Live ID only returns a nameidentifier claim. This means that the Adatum federation provider must use some additional logic to determine appropriate values for the name, Role and Organization claims that the a-Order application expects to see. This means that when someone with a Windows Live ID enrolls to use the Adatum a-Order application, Adatum must capture values for the nameidentifier, name, Role and Organization claims to use in the mapping rules in the federation provider (as well as any other data that Adatum requires). The only way to discover the nameidentifier value is to capture the claim that Windows Live returns after the user signs in, so part of the enrollment process at Adatum must include the user authenticating with Windows Live. With ADFS you can create custom claims transformation modules that, for example, allow you to implement a mapping rule based on data retrieved from a relational database. With this in mind, the enrollment process for new users of the Adatum a-Order application could populate a database table with the values required for a user's set of claims. Working with Facebook The sample application enables you to use Facebook as one of the supported social identity providers. Adding support for Facebook did not require any changes to the a-Order web application. However, there are differences in the way the Adatum federation provider supports Facebook as compared to the other social identity providers, and differences in the ACS configuration. Configuring Facebook as an identity provider in ACS requires some additional data; an Application ID that identifies your Facebook application, an Application secret to authenticate with your Facebook application, and a list of claims that ACS will request from Facebook. The additional configuration values enable you to configure multiple Facebook applications as identity providers for your relying party. Each set of Facebook application credentials is treated as a separate identity provider in ACS. The implication for the Adatum federation provider is that it must be able to identify the Facebook application to use for authentication in the whr parameter that it passes to ACS. The following code sample from the FederationIssuers class in the Adatum federation provider shows how the Facebook application ID is included in the whr value. Questions - Which of the following issues must you address if you want to allow users of your application to authenticate with a social identity provider such as Google or Windows Live® network of Internet services? - Social identity providers may use protocols other than WS-Federation to exchange claims tokens. - You must register your application with the social identity provider. - Different social identity providers issue different claim types. - You must provide a mechanism to enroll users using social identities with your application. - What are the advantages of allowing users to authenticate to use your application with a social identity? - The user doesn't need to remember yet another username and password. - It reduces the features that you must implement in your application. - Social identity providers all use the same protocol to transfer tokens and claims. - It puts the user in control of their password management. For example, a user can recover a forgotten password without calling your helpdesk. - What are the potential disadvantages of using ACS as your federation provider? - It adds to the complexity of your relying party application. - It adds an extra step to the authentication process, which negatively impacts the user experience. - It is a metered service, so you must pay for each token that it issues. - Your application now relies on an external service that is outside of its control. - How can your federation provider determine which identity provider to use (perform home realm discovery) when an unauthenticated user accesses the application? - Present the user with a list of identity providers to choose from. - Analyze the IP address of the originating request. - Prompt the user for an email address, and then parse it to determine the user's security domain. - Examine the ClaimsPrincipal object for the user's current session. - In the scenario described in this chapter, the Adatum federation provider trusts ACS, which in turn trusts the social identity providers such as Windows Live and Google. Why does the Adatum federation provider not trust the social identity providers directly? - It's not possible to configure the Adatum federation provider to trust the social identity providers because the social identity providers do not make the certificates required for a trust relationship available. - ACS automatically performs the protocol transition. - ACS is necessary to perform the claims mapping. - Without ACS, it's not possible to allow Adatum employees to access the application over the web. More Information Appendix E of this guide provides a detailed description of ACS and its features. You can find the MSDN® documentation for ACS 2.0 at.
http://msdn.microsoft.com/en-us/library/hh446535.aspx
CC-MAIN-2014-23
refinedweb
5,098
50.67
I upgraded my WiPy firmware as shown here: ... er-the-air to 1.8.2 Downloaded the libary from here: After that i copied mpu9150.py, vector3d.py and imu.py to the wipy. Opened a telnet to the wipy and tried the following: I can see the sensor, when i do the following: the addr is 105, i have no idea what i'm doing wrong, could someone help me out? Even after that the mpu9150 module initialization is not very clear to me either. Its probably my bad tho, since i'm new to python, but i could really appreciate some help! Code: Select all from machine import I2C import os def test(): mch = os.uname().machine if 'LaunchPad' in mch: i2c_pins = ('GP11', 'GP10') elif 'WiPy' in mch: i2c_pins = ('GP24', 'GP23') else: raise Exception('Board not supported!') i2c = I2C(0, mode=I2C.MASTER, baudrate=400000, pins=i2c_pins) addr = i2c.scan() print(addr)
https://forum.micropython.org/viewtopic.php?f=5&t=231&p=18489
CC-MAIN-2019-43
refinedweb
154
76.93
Lex Lex is an actively used grammar language created in 1975. Lex is a computer program that generates lexical analyzers ("scanners" or "lexers"). Lex is commonly used with the yacc parser generator. Lex, originally written by Mike Lesk and Eric Schmidt and described in 1975, is the standard lexical analyzer generator on many Unix systems, and an equivalent tool is specified as part of the POSIX standard. Read more on Wikipedia... - Lex ranks in the top 10% of languages - the Lex wikipedia page - Lex first appeared in 1975 - file extensions for Lex include l and lex - See also: yacc, unix, c, regex, bison, ragel - Have a question about Lex not answered here? Email me and let me know how I can help. Example code from Linguist: /* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2012 Zend Technologies Ltd. () | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | |. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Zeev Suraski <zeev@zend.com> | | Jani Taskinen <jani@php.net> | | Marcus Boerger <helly@php.net> | | Nuno Lopes <nlopess@php.net> | | Scott MacVicar <scottmac@php.net> | +----------------------------------------------------------------------+ */ /* $Id$ */ #include <errno.h> #include "zend.h" #include "zend_globals.h" #include <zend_ini_parser.h> #include "zend_ini_scanner.h" #if 0 # define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c) #else # define YYDEBUG(s, c) #endif #include "zend_ini_scanner_defs.h" #define YYCTYPE unsigned char /* allow the scanner to read one null byte after the end of the string (from ZEND_MMAP_AHEAD) * so that if will be able to terminate to match the current token (e.g. non-enclosed string) */ #define YYFILL(n) { if (YYCURSOR > YYLIMIT) return 0 Example code from Wikipedia: Saw an integer: 123 Saw an integer: 2 Saw an integer: 6 Trending Repos Last updated August 9th, 2020
https://codelani.com/languages/lex.html
CC-MAIN-2021-04
refinedweb
342
67.35
With the release of Vue 3.2 a new composition tool was made available for us, called expose. Have you ever created a component that needs to make a few methods and properties available to the template, but wish that those methods were private to the component and not being able to be called by the parent? If you are building an open source component or a library, chances are you want to keep some of the internal methods private. Before Vue 3.2, this was not easy to accomplish since everything that was declared in the options API in methods or data for example was made publicly available so that the template could access it. The same is true of the composition API. Everything that we return out of the setup method can be accessed directly by the parent. Composition API Let’s look at a practical example. Imagine we have a component that creates a counter, and each second it updates that counter. 📃 MyCounter.vue <template> <p>Counter: {{ counter }}</p> <button @Reset</button> <button @☠️</button> </template> <script> import { ref } from 'vue' export default { setup () { const counter = ref(0) const interval = setInterval(() => { counter.value++ }, 1000) const reset = () => { counter.value = 0 } const terminate = () => { clearInterval(interval) } return { counter, reset, terminate } } } </script> From a composition point of view, I would like for parent components to be able to call the reset method directly if needed — but I want to keep the terminate function and the counter ref only available to the component. If we instantiate this component in a parent, App.vue for example, and we attach a ref to it, we can easily allow the parent to call the reset method because it has been exposed along with terminate when we returned it from setup. 📃 App.vue <template> <MyCounter ref="counter" /> <button @Reset from parent</button> <button @Terminate from parent</button> </template> <script> import MyCounter from '@/components/MyCounter.vue' export default { name: 'App', components: { MyCounter }, methods: { reset () { this.$refs.counter.reset() }, terminate () { this.$refs.counter.terminate() } } } </script> If we run this right now and click either the reset or terminate buttons on the parent, both will work. Let’s be explicit about what we want to expose to the parent so that only the reset function is available. 📃 MyCounter.vue <script> import { ref } from 'vue' export default { setup (props, context) { const counter = ref(null) const interval = setInterval(() => { counter.value++ }, 1000) const reset = () => { counter.value = 0 } const terminate = () => { console.log(interval) clearInterval(interval) } context.expose({ reset }) return { counter, reset, terminate } } } </script> Notice that we added the props and context params to the setup function. We need to have the context available to us because this is where the expose function lives. We could also use destructuring like so: { expose }. Next, we use context.expose to declare an object of elements that we want to expose to the parent that instantiates this component; in this case we are only going to make the reset function available. If we run the example again, and click the “Terminate from parent” button, we will get a JavaScript error. Uncaught TypeError: this.$refs.counter.terminate is not a function The terminate function is no longer available and our private API is now inaccessible. Options API I have purposely chosen to do the first example using the composition API because of the second use case of the expose function, however I want you to know that it is also possible to use this method in the options API. In order to write the above component with the declared expose, we could rewrite it as follows. 📃 MyCounter.vue export default { created () { ... }, data: () => ({ counter: null }), methods: { reset () { ... }, terminate () { ... } }, expose: ['reset'] } Notice that we have added a new options API property expose that allows us to pass in an array, where the string 'reset' is the name of the function that we are making publicly available. Composition API Render functions A very powerful and flexible way to create components is to leverage the power of render functions. This is not new to Vue 3, however with the creation of the composition API we now have the flexibility of returning the composition h function directly from a setup method. This poses a problem, because the whole return statement in our setup function is just the h method with the nodes that the component is creating. If at this point we choose to expose something to the parent, we have the inverse problem as the one we saw before. Nothing is being exposed because nothing is being returned except the DOM elements. Let’s rewrite the MyCounter.vue component to use this method. 📃 MyCounter.vue <script> // The template has been deleted import { ref, h } from 'vue' export default { setup (props, context) { const counter = ref(0) const interval = setInterval(() => { counter.value++ }, 1000) const reset = () => { counter.value = 0 } const terminate = () => { clearInterval(interval) } // context.expose({ reset }) return () => h('div', [ h('p', `Counter: ${counter.value}`), h('button', { onClick: reset }, 'Reset'), h('button', { onClick: terminate }, 'Terminate') ]) } } </script> Notice that we have imported h from Vue at the top, since we need to use it to create our DOM elements. I have also commented out the context.expose method for now to illustrate the problem. The return statement now replicates the DOM structure we had before with the <template> and if we run the example we are able to click through the Reset and Terminate buttons on the element correctly. However, if we click on the “Reset from parent” button now, we run into an error. Uncaught TypeError: this.$refs.counter.reset is not a function The reset method is no longer being exposed since it’s not being returned by the setup function. To fix this we need to uncomment our context.expose call and make it available once again. Wrapping up The new expose method is very intuitive and easy to implement in our components. It clears up a couple of very important composition problems that would have merited even a complete component rewrite in the past, so even if its not your day-to-day, go-to API, it’s something worth keeping nearby in your developer tool belt. The repository for this article can be found here:
https://www.vuemastery.com/blog/understanding-vue-3-expose/
CC-MAIN-2022-33
refinedweb
1,032
55.03
United States Change | All Microsoft Sites Help and Support Help and Support Home Select a Product Advanced Search Article ID: 950264 - Last Review: August 11, 2008 - Revision: 2.0 List of changes and fixed issues in Visual Studio 2008 Service Pack 1 for Express Editions View products that this article applies to. On This Page Expand all | Collapse all SUMMARY This article lists known issues with the setup and the removal of Visual Studio 2008 Service Pack 1 (SP1) for Express Editions. Additionally, this article discusses the features of Visual Studio 2008 SP1 for Express Editions. Back to the top MORE INFORMATION Products to which Visual Studio 2008 SP1 for Express Editions applies Supported versions of Windows that are not running any of the following editions of Visual Studio 2008: Visual Studio 2008 Team Edition Visual Studio 2008 Standard Edition Visual Studio 2008 Professional Edition The Microsoft .NET Framework 3.5 Visual Web Developer 2008 Express Edition Visual Basic 2008 Express Edition Visual C++ 2008 Express Edition Visual C# 2008 Express Edition Back to the top How to obtain Visual Studio 2008 SP1 for Express Editions () Back to the top Changed features and fixed issues in Visual Studio 2008 SP1 for Express Editions 951845 ( ) List of changes and fixed issues in Visual Studio 2008 Service Pack 1 for Team Editions 951847 ( ) List of changes and fixed issues in the .NET Framework 3.5 Service Pack 1 This service pack adds the following new features: SQL Server 2008 Community Technology Preview (CTP) support is added to Visual Studio 2008 The following Visual Basic PowerPack controls have been added: Line Shape Data Repeater In Visual Basic, the Windows Communication Foundation (WCF) Service renaming process is improved. Document level features are included for application level add-ins in Visual Studio Tools for Office. Design-time support is added in the ClickOnce application for file name extensions and for Start menu customization. You can send mail from work items in Team Foundation Server. Version control usability improvements and Microsoft Visual SourceSafe (VSS) converter improvements have been made in Team Foundation Server. Improved Team System Web access integration with notifications is added in Team Foundation Server. In Visual Studio Team Edition for Developers, support has improved for Internet Information Services (IIS) 7 in the Visual Studio Performance Tools (Profiler). In Visual Studio Team Edition for Developers, 64-bit mixed mode (native/managed) instrumentation support is added in the Profiler. In Visual C++, the Libraries support for Technical Report 1 (TR1) is added. In Visual C++, the Microsoft Foundation Class (MFC) is improved to support the appearance and behavior of Microsoft Office. In Visual Web Developer, SQL Server 2008 support for Web projects is added. In Visual Web Developer, JavaScript formatting support is added. In Visual Web Developer, the WCF Service renaming process is improved. Debugging changes improve support for inspecting the results of in-memory Language-Integrated Query (LINQ) queries. A new Visual C# feature is added to provide a richer set of error information about code. Visual Studio Industry Partners (VSIP) partners are enabled to install one copy of files for a package that can be used by multiple isolated applications. New features in Windows Presentation Foundation (WPF) Designer include an Events tab, TabControl and Expander design time support, and code to XAML rename and go to definition functionality. Visual Studio Tools for Office System (VSTO) is improved to support add-in error logging. XSD Schema Explorer is improved. The Step Into Specific debugging feature and the Step Filtering debugging feature for managed properties and managed operators are changed. The debugger now can cancel symbol and source downloading from Microsoft Public Symbol Servers. Streamlined support for Reference Source is added to the debugger. The ADO.NET Entity Designer is added to ease data access. You can now add "Local Database Cache" to device projects. ASP.NET Dynamic Data templates and toolbox controls are added. IIS 7.0 Managed Module and Handler templates are added. Support for starting the WCF Test client debug of a WCF Service file (.svc) by pressing F5 is added. Back to the top Visual Web Developer 2008 Features and functionalities that are new, changed, or improved Visual Web Developer 2008 Express Edition. Back to the top Visual Basic Features and functionalities that are added, changed, or improved. Back to the top Visual C++ Features and functionalities that are new, changed, or improved The release version of TR1 is included in Visual Studio 2008 SP1. Back to the top presents the expression-level errors that occur in open files to you according to your code. These expression-level errors were previously reported only after a build operation. Changed features and functionalities. standard query operator. Back to the top Windows Presentation Foundation (WPF) Designer New features and functionalities The Properties window now contains the Events tab. The Events tab lets you create events, assign events, and review events. The Properties window now lets you sort properties alphabetically by property name and by category. The Rename operations and the Go To Definition feature have been updated to work better with XAML. Rename operations in the code-behind file rename the XAML definition also. will maintain the positions of all contained controls on the design. Improved features and functionalities Many stability and performance improvements have been made to Visual Studio 2008 SP1. A key area of improvements includes faster, more robust document loading and more accurate error reporting. Back to the top Windows SDK Features and functionalities that are new, changed, or improved Several tools in the Windows SDK have been updated. Back to the top Expand Debugging , and then click General . Disable the "step into" behavior in the General pane. This update contains improvements for the Debugger Automation model. This update adds the Automation model support for address breakpoints and for Expression Evaluation on non-current threads or frames. Back to the top Data Projects New features and functionalities ADO.NET Entity Designer Entity Designer By using Entity Designer, you can take the following actions: Generate an entity data model from a database, and then display the model on the designer surface. Validate models and mappings at design time. Optionally embed Entity Framework metadata artifacts such as conceptual schema definition language (CSDL) artifacts, mapping specification language (MSL) artifacts, and store schema definition language (SSDL) artifacts in the output assembly. Object Relational Designer (O/R Designer) The O/R Designer in all Visual Studio 2008 editions supports the following new types in Microsoft SQL Server 2008: Date Time DateTime2 DateTimeOffset Filestream XML Editor Back to the top editions must be at the release level or at the SP1 level to be supported by Microsoft. Back to the top Hotfixes that are included in this service pack Collapse this table Expand this table KB Article Title 944899 ( ) FIX: Visual Studio 2008 performance decreases when you step through source code that you downloaded from Reference Source Server 946040 ( ) FIX: Error message when you compile a Visual C++ 2008 project: "Error C2471: cannot update program database" 948127 ( ) Error message when you link a Visual C++ project by using the /INCREMENTAL build option in Visual Studio 2008: "LNK1000: Internal error during IncrBuildImage" 946260 ( ) FIX: Error message when you check in a UTF-8 or UTF-16 encoding file and then update the warehouse in Visual Studio 2008 Team Foundation Server: "An unexpected exception occurred while calculating code churn" 946308 ( ) FIX: You may encounter various problems when you try to generate type library information by using the Microsoft.VisualStudio.Shell.Interop.dll assembly in Visual Studio 2008 946344 ( ) FIX: You may experience performance issues in the IDE after you use Visual Studio 2008 to build a Visual Basic project 946458 ( ) FIX: You can no longer connect to a Team Foundation server from Excel after you insert a column in a worksheet 946502 ( ) FIX: You may receive a System.OutOfMemoryException exception when you run a load test in Visual Studio 2008 Team System Test Load Agent 946581 ( ) A cumulative update for Visual Studio 2008 and Visual Web Developer Express 2008 is available 946673 ( ) FIX: The Web recorder may miss a request or may miss some parameters when you use a Web recorder to record Web tests in Visual Studio 2008 Team System Test Edition 947171 ( ) FIX: Visual Studio 2008 cannot correctly convert Visual Studio 2005 test projects 947173 ( ) FIX: The DataSets panel is not available in the report designer when you open a SQL Server Reporting Services 2005 RDLC file in Visual Studio 2008 947180 ( ) FIX: Error message when a user-defined function specifies the data source in a data-driven unit test in Visual Studio 2008 Team System: "The unit test adapter failed to connect to the data source or to read the data" 947455 ( ) FIX: A file that is deleted from the source branch still exists in the target branch after you perform a merge operation in Visual Studio 2008 Team Foundation Server 947540 ( ) FIX: Error message when you try to use the Data Source Configuration Wizard together with an ODBC data source in Visual Studio 2008: "Procedures not supported" 947751 ( ) FIX: The shortcut menu does not appear for many seconds when you right-click a project name in Visual Studio Team System 2008 Team Explorer 948064 ( ) FIX: You may be unable to undo local changes after you upgrade Visual Studio 2005 Team Foundation Server to Visual Studio 2008 Team Foundation Server 948677 ( ) FIX: A triggered build does not occur after the build frequency interval elapses in Microsoft Visual Studio 2008 Team Foundation Server 949255 ( ) FIX: Error message when you use the Team Foundation Server feature in Visual Studio 2008 Team Foundation Server: "A run-time error Microsoft.TeamFoundation.Build.Client.BuildServerException" 950519 ( ) FIX: The SIDs of Visual Studio 2008 Team Foundation Server users do not change when you use the "TFSAdminUtil Sid" command together with the /Change option 950829 ( ) FIX: The children of a folder may disappear after you rename the folder and check in the changes in Visual Studio 2008 Team Foundation Server 951708 ( ) FIX: The Visual Basic compiler (Vbc.exe) may use 100 percent of the CPU resources when you build a Visual Basic 2008 application that depends on many assemblies and on many references 953021 ( ) FIX: Performance decreases when you migrate Visual Studio 2005 team build types to Visual Studio 2008 team build definitions Back to the top Fixed issues that were reported by customers Visual Studio Tools for Office System 3.0 Collapse this table Expand this table Connect ID Description 301392 The VSTO and Visual Basic for Applications Interop does not work. This behavior causes the EnableVBACallers property to force a VBA error in Visual Studio 2008. 306900 You add a text box control in a Microsoft Outlook Form region. Then, you try to copy, delete, or paste from the control by using the keyboard. When you do this, the text box control does not work. 311397 The release version of VSTO 3.0 does not release the allocated memory by itself. 328329 The data cache is corrupted when protected word customizations exist. Visual Studio Web Developer 2008 Collapse this table Expand this table Connect ID Description 291226 When you compile a project that uses .refresh files, the .refresh files takes a long time to compile. 292096 Spaces are inserted incorrectly when you format a cascading style sheet (.css) file. 293526 The Web debugging operation fails if the compilation section is defined inside the location element in the Web.config file. 293683 Cascading style sheet (CSS) IntelliSense adds double quotation marks in the class attribute after you enable the Insert attribute value quote when typing option. 299418 When you add a new master page to the project, and you select a parent master page for the new master page, the default value of the AutoEventWireup attribute is set to False. 302554 You receive a "Could not find CSS class selector "<Class_Name>"" error message when you click Go To Definition in the DIV class name. 303796 When you debug a Web service, Visual Studio automatically updates the Web references in a Web client application that runs on the same computer. 304108 You receive an "attribute is invalid - The value is invalid according to its datatype 'NmToken'" error message when you add more than one value to the traceOutputOptions attribute in the Web.config file. 307231 You cannot add a nested master page as a new item in Web Application projects. 308786 When you open two or more aspx pages, images are not displayed in Design view of Visual Studio 2008. 309571 The color coding feature is unavailable when you edit a Microsoft Visual Basic Scripting Edition (.vbs) file in Visual Studio 2008. 309977 Visual Studio 2008 stops responding when you work in large HTML files. 310296 Visual Studio 2005 publishes the bin\vssver2.scc file. 310858 Visual Studio 2008 Beta 2 crashes when you format a stand-alone .css file. 311717 When you use custom controls that are inside a Tab panel that is inside a Tab container in Details view, you receive an error message. 312146 Cascading style sheet (.css) files in folders that are under the App_Themes folder are ignored at design time. 312199 If you specify an external .config file in the configSource attribute of the compilation element in the Web.config file, the debug operation fails. 314664 When you update the source of a parameter for a query that is defined for a SqlDatasouce object, Visual Studio 2008 corrupts the other parameters for the query. 314745 You cannot use the Page.StyleSheetTheme property in a page that uses a master page. 315930 In design mode, when you edit Web pages that contain tables, the Web page source code is broken 317032 When you put Visual Studio on a secondary monitor in a dual monitor scenario, a problem occurs when you resize the editor. 317251 When you link to a .css file in a master page by using the ~/ syntax, child pages cannot access the .css file. 320945 Jscript IntelliSense does not work with the "Ext JS" JavaScript library. 321902 The HTML designer does not replace the selection when you perform a paste operation. 321928 The HTML designer does not accept keyboard shortcuts. 322465 The HTML designer reverses the input text that replaces a selection if the selection has a tag. 322633 The Syntax Highlighting feature is unavailable for classic .asp files. 324668 The ASP.NET designer incorrectly put the <span> tag around SqlDataSource parameters. 327262 If you select a control inside a table that is inside a panel, the control is selected incorrectly in Source mode. 327560 A HTML page does not displayed correctly after you double-click a button in design view. 328944 The Code View button and the Design View button are not enabled, and the F7 key and the SHIFT+F7 keyboard shortcut do not work. 328999 You insert a <reference> tag to JavaScript file to point an embedded JavaScript file in a project in Visual Studio 2008. When you compile the project, you may receive an error message that resembles the following: Unable to copy file "obj\Debug\ClassLibrary.dll" to "bin\Debug\ClassLibrary.dll". The process cannot access the file 'bin\Debug\ClassLibrary.dll' because it is being used by another process. This problem occurs when both files are open in the Visual Studio 2008 IDE. 330457 In design mode of Visual Studio 2008, the "View Code" right shortcut menu entry is not always visible 330792 The NavigateURL property of the Hyperlink control incorrectly resolves the URL. 331383 JavaScript references in embedded assemblies are not followed 331523 JavaScript IntelliSense contains a typographical error for the fontcolor method and for the fontsize method. 331534 JavaScript IntelliSense does not display some members of the RegExp object. 332864 ASP.NET rendering sometimes does not display pages that use nested master pages correctly 332941 Javascript IntelliSense is turned off if the Navigation Bar option is disabled 333575 HTML editor deletes randomly html codes from aspx pages specially the closing tags 336039 When you connect a Microsoft laptop mouse to your computer, user interface problems occur. 337534 When you use the LinkButton objects, a "HTML corruption" issue may occur. 337804 When you render embedded tables that contain the “width= 100%” tag in the design view of Visual Studio 2008 IDE, the IDE may stop responding. 338211 You can now disable the preview feature and open any content directly in Design View and set that behavior as default. 338668 Visual Studio 2008 stops responding in Design View when you use animated gif image in an Atlas UpdateProgress control 342172 Visual Studio Editor produces unexpected and incorrect HTML after you drag a Panel control to an UpdatePanel control. Visual Basic Collapse this table Expand this table Connect ID Description 326452 You receive incorrect error messages and behavior when you import XML namespaces. 333884 Visual Basic projects are compiled slowly when they contain Web references. 321043 You may encounter debugging performance issues when you use large arrays. 320416, 302187 The IntelliSense completion list for Boolean variables displays the full list instead of only "True" and "False." 301577 Incorrect value output is displayed in the immediate window. 315796 The compiler may crash when you edit a Windows Forms application. 322131 An application that contains a custom attribute causes the compiler to crash. 322714 If you modify the property page, there should be a dirty flag shown. If you modify only one text input in the property page, the modification will be lost. 301749 The "using System.Linq" directive is missing from the files that are generated by the Class Designer. 317143 The publisher uses wrong configuration settings to compile and to publish projects and solutions. 312573 Error message after you upgrade Visual Basic 6 code to Visual Basic 2008 Express Edition: "The operation could not be completed. The system cannot find the file specified." 291268 Data connection to SQL Server 2008 fails. 305371 Visual Studio 2008 installation disables connections to SQL 2008 CTP. 311689 Error in the code that is generated by the DataSet Designer. 331912 Typed DataSets relationships are broken. 321275 Error message in Dataset Designer: "Requested value 'Properties' was not found." 305067 When you use the component designer in an ASP.NET project, the Visual Basic Power Pack PrintForm component is shown in the toolbox. Visual C++ Collapse this table Expand this table Connect ID Description 312421 The Microsoft Macro Assembler (MASM) tool for Visual C++ 2008 Express Edition is added in Visual C++ 2008 Express Edition Service Pack 1. When you use the _BIND_TO_CURRENT_VCLIBS_VERSION define in a project by using ATL on computer that has Visual C++ 2008 Feature Pack installed, you receive "error LNK2001" error messages. 330199 After you build a multibyte character set (MBCS) program that uses the GetSelText method of the RichEditCtrl class, the program returns an incorrect value. 329919 You use the search_n algorithm to locate n consecutive integer values in a vector<int> object. If the value of n is greater than 3, an assertion may occur. 339442 The is_pod class and the has_trivial_constructor class incorrectly return true when the class type neither is a pod nor has trivial default constructor. 337241 In some applications whose .NCB file exceeds 64 megabytes (MB), IntelliSense may fail. 339432 The compiler incorrectly returns false for the is_polymorphic class. Visual C# Collapse this table Expand this table Connect ID Description 294736 IntelliSense proposes read-only properties in object initializers. 295945 The Remove Unused Usings command does not remove unbound using Language-Integrated Query (LINQ) statements. 299277 The System.Linq.IGrouping interface cannot be used in a Windows Presentation Foundation (WPF) binding on the Key property, because the interface is implemented explicitly. 299827 The Rename function in the Refactor feature does not always handle string contents correctly. 303073 When you compile the code that has incorrectly formed comments by using the /doc option, you may receive an "Internal Compiler Error" error message. 304338 When you create a generic event handler by using the "generate event handler on tab" feature, the Visual Studio 2008 IDE crashes. 304804 The Using directive is not applied to both parts of a partial method if the Using directive is defined in different scopes. 305895 The "==" operator and the "!= "operator do not work correctly when the operators compare a nullable value type with itself. This problem occurs when the value of the type is null. 307131 IntelliSense does not show the extension methods that apply to generic type parameters. 315853 Two lock statements in the same block may cause the compiler to crash. 316127 When you press CTRL+ENTER or SHIFT+CTRL+ENTER in an XML comment, Visual Studio 2008 crashes. 317256 The Debugger Visualizer template references the wrong version of the Microsoft.VisualStudio.DebuggerVisualizers assembly when an earlier version of Visual Studio is installed. 319387 When you call a generic interface method in expression trees, value types are boxed. 319429 Object initializers for value types do not work correctly in expression trees. 319430 Object initializer works incorrectly with value-types variables 319454 Expression trees that have user-defined conversions do not work correctly. 319465 The true operator and the false operator do not work correctly in expression trees when these operators are overloaded. 321448 Rename refactoring may cause Visual C# 2008 Express Edition to stop responding (hang). 322925 When you pass a null reference to the GetHashCode function, certain StringComparers objects throw an ArgumentNullException exception. This exception is undocumented. 323137 LINQ expression tree compiler throws a VerificationException exception on null constants for nullable types. 327883 LINQ expression compiler crashes when you a well-formed expression tree involving an "is" operator and an operand whose return type is void. 329326 Multiple issues occur when you compile the following code: "default(T) ?? t" 336356 You have a solution that has many projects. If you click "Find All References" in the solution, the Visual Studio may stop responding or needs a long time to complete the operation. 337315 When the Add method that is used by a collection initializer does not return void value, the expression compiler generates invalid code. 339226 C# compiler creates an invalid expression tree when nullble user operator is used. 339562 You construct an expression tree node for a new expression that uses the "System.Void " type, the expression tree node is constructed. When you compile the expression tree node, the expression compiler crashes. 340291 C# compiler emits incorrect expression tree for enum binary operations. 340383 If embedded statements are used without braces, compilers may throw an error and refuse to compile. 342361 When you create a fixed size array in a data structure under Visual Studio 2008 targeting Compact Framework 2.0, you may receive the following error message: Missing compiler required member ‘System.Runtime.CompilerServices.UnsafeValueTypeAttribute.ctor' 344277 IntelliSense crashes IDE when you scroll through the members of an object from a third-party library. 346407 Live semantic errors analysis incorrectly shows an error. 347248 Live semantic errors analysis shows the following false error: 'The type 'int' must be a reference type Visual Studio Debugger Collapse this table Expand this table Connect ID Description 307998 You may not remove a breakpoint from a Microsoft ASP.NET application when you debug the application. 308138 If you have two files that have the same name in different folders, breakpoints work only in one of the files. 310644 The DataView visualizer is not displayed correctly. 301865 You may encounter a problem when you use breakpoints on a computer that is running Windows Vista. 319295 When the Microsoft symbol store is configured in Visual Studio and Visual Studio is running in Windows Vista, Visual Studio always displays the symbol license agreement. 315555 You debug JavaScript by attaching the debugger to Iexplorer.exe by using Visual Studio 2008. If multiple script files that have the same name are loaded, breakpoints do not persist on the correct script file when the page is refreshed. 320815 The StartupInfo.wShowWindow flag has different values when the program is started by using the Start Without Debugging option or the Start Debugging option. 333493 You cannot redirect an application by using standard input (STDIN) and standard output (STDOUT) for debugging. Visual Studio Team Editions Collapse this table Expand this table Connect ID Description 314747 The "Generate Create Script to Project" operation fails when the solution contains both .dbp and .dbproj database projects. 323638 When you try to open a query from a table that has a reserved word such as "PROC," the reserved word was enclosed in brackets ("[ ]") in Visual Studio 2005. However, if you try to view the table data in Visual Studio 2008, you receive a reserved word error message. If you manually add the square brackets and then you try to run the query, the square brackets are removed. Additionally, you receive the error message. 315102 A program that is created in Visual Studio 2008 crashes during the Code Analysis process. Additionally, you receive a "fatal error C1001: An internal error has occurred in the compiler" error message. 330500 The Visual Studio 2008 Code Analysis feature fails with an "InternalErrorException" exception when you analyze projects in which a file is included in multiple projects as a linked item. 329363 If you implement an interface property, you may incorrectly trigger the "CA1725" message. 315974 Visual Studio 2008 crashes and you receive a "fatal error C1001" error message when you declare a static local variable after a partly initialized array in code. 311092 You receive an "error 2 CA0001" error message when more than one method has the same name and the same number of method type parameters. 310133 Function names are sometimes displayed as hexadecimal addresses in profiler reports. 317272 Profiler does not display error messages when you use unsupported command arguments, such as the left angle bracket ("<"), the right angle bracket (">"), or a pipe ("|"). 306270 Visual Studio 2008 may crash, if there is a code metrics calculation on a project in a collapsed solution folder that has an un-cached icon. 334334 Custom Path check-in policy does not work with Code Analysis policy. 336142 Code Analysis fails with nested generic class and generic constraint. Windows Presentation Foundation (WPF) Designer Collapse this table Expand this table Connect ID Description 290646 When you use an XAML editor, some collapsed regions may automatically expand. 305184 You cannot open a PageFunction page that uses the RemoveFromJournal property. 307180 A Window-level ActiveX control event generates an error at design time. 307331 The WPF designer displays an incorrect layout of controls. 309063 WPF editor generates repeated exceptions that cause Visual Studio to close and restart. 312249 The WPF designer incorrectly displays a horizontal scrollbar. 312859 You add a control template for a button in WPF application in Visual Studio 2008. You create border for the button. When you try to preview the design, Visual Studio 2008 may crash. 333036 When you edit a WPF application, Visual Studio 2008 IDE may crash. 315614 Errors in User's controls in a WPF Application Project may crash Visual Studio 2008 Team System 318018 XAML designer does not correctly show what will appear at runtime. 319692 Visual Studio crashes when you add a StackPanel control to a paragraph 334662 When you create a WPF application in Visual Basic, some menus and toolbars may stop responding, and you receive the following error message: An unhandled exception has occurred. Back to the top Supported languages and operating systems Supported languages Microsoft Windows Installer 3.1 or a later version of Windows Installer must be installed on the destination computer. For more information, visit the following Microsoft Developer Network (MSDN) Web site: () We recommend 512 MB or more of RAM. Visual Studio 2008 Express Editions with SP1 support () Informal community support is available through the MSDN forums. For more information, visit the following Microsoft Web site: () Back to the top Installation/removal issues for all platforms Back to the top Known issues with the service pack Back to the top REFERENCES For more information about Visual Studio 2008 Service Pack 1 Beta, click the following article number to view the article in the Microsoft Knowledge Base: 945140 ( ) Visual Studio 2008 Service Pack 1 release notes and a list of fixed issues Back to the top APPLIES TO Microsoft Visual Basic 2008 Express Edition Microsoft Visual C++ 2008 Express Edition Microsoft Visual C# 2008 Express Edition Back to the top Keywords: kbexpertiseadvanced kbhowto kbinfo KB950264 Page Tools Print this page Get Help Now Contact a support professional by E-mail, Online, or Phone Help and Support Feedback | Services Agreement | | Trademarks | Privacy Statement ©2009 Microsoft
http://support.microsoft.com/kb/950264/
crawl-002
refinedweb
4,753
51.89
Hi,If there's already a project to bring Inline::C capability to Tcl, please point me at it. Otherwise, perhaps this could be the start of one.For those unfamiliar with what Inline::C is, it is a Perl module that allows you to embed C code within your Perl program -- for more information, look here:, tonight, I got to thinking: gee, it'd be nice to have something like this for Tcl. After giving it the "good ol' college try" (you know, I Googled two or three times and nothing came up) I couldn't find an implementation of Inline::C for Tcl. So, I said to myself: Tcl is awesome -- it shouldn't take me more than a minute or two to get a bare minimum snippet of Tcl code working that does what I want.So, here is my first whack at Inline::C for Tcl., if such a thing already exists, pointers would be appreciated. Otherwise, perhaps if others find this useful, we can get this added to Tcllib or it can stand on its own. I don't care either way.-- Dossy Critcl and tcc4tcl do this and a lot more, but at 50 lines Dossy's code is worth preserving as an illustration of how simple it can be.Note that this is pure Tcl code, except the call to exec gcc. It assumes that your system is configured so GCC will see the correct Tcl headers. # # $Id: inline.tcl,v 1.1.1.1 2003/08/24 04:23:14 dossy Exp $ # package require Tcl 8 namespace eval ::inline { ### Do I need anything here? } proc ::inline::c {procName body} { set fd [open /tmp/inline-c.c w] puts $fd [subst { #include <tcl.h> int ${procName}ObjCmd(clientData, interp, objc, objv) ClientData clientData; Tcl_Interp *interp; int objc; Tcl_Obj *CONST objv[]; { $body } int [string totitle $procName]_Init(interp) Tcl_Interp *interp; { Tcl_CreateObjCommand(interp, "$procName", ${procName}ObjCmd, NULL, NULL); return TCL_OK; } }] close $fd ### FIXME: Platform-dependent. Needs error checking, too. exec gcc -shared -o /tmp/inline-c.so /tmp/inline-c.c load /tmp/inline-c.so $procName file delete /tmp/inline-c.c /tmp/inline-c.so } package provide inline 1.0And a test program: package require inline ::inline::c hello { Tcl_SetResult(interp, "Hello, world.", TCL_VOLATILE); return TCL_OK; } puts [hello]
http://wiki.tcl.tk/9667
CC-MAIN-2017-30
refinedweb
385
65.32
Formatted error message #include <err.h> void warn( const char* fmt, ...); void warnx( const char* fmt, ...); libc Use the -l c option to qcc to link against this library. This library is usually included automatically. The err() and warn() family of functions display a formatted error message on stderr. For a comparison of the members of this family, see err(). The warn() function produces a message that consists of: The warnx() function produces a similar message, except that it doesn't include the string associated with errno. The message consists of: Warn of an error: if ((fd = open(raw_device, O_RDONLY, 0)) == -1) warnx("%s: %s: trying the block device", raw_device, strerror(errno)); if ((fd = open(block_device, O_RDONLY, 0)) == -1) warn("%s", block_device);
http://www.qnx.com/developers/docs/7.0.0/com.qnx.doc.neutrino.lib_ref/topic/w/warn.html
CC-MAIN-2018-43
refinedweb
122
58.48
Feb 2013 update: in response to overwhelming popular opinion, SimpleMath has now been merged into the DirectX Tool Kit on Codeplex. --- I am curious what folks think is the right long term home for the SimpleMath helper code? - A post on my blog is fine - The MSDN code gallery - Merge it into DirectXTK (seems kinda weird to me, as SimpleMath isn't really a DirectX graphics helper like the other code in there) - A standalone CodePlex project (also seems kinda weird, as SimpleMath is so small) - Other?. > maybe extend SimpleMath beyond a wrapper with giving the Color struct or a Color namespace all the color constants we're familiar with from the Xna.Framework.Graphics.Color struct These are already provided by the core DirectXMath: msdn.microsoft.com/…/ee415576%28v=vs.85%29.aspx Oh wow, somehow missed that transitioning from XNAMath. Sweet. All the more reason SimpleMath bundled with DirectXTK would help complete a productivity vibe of using XNA since so many pieces are already there. Seeing it present as an option rather than an extension may help ease people from C# to C++. But it'd also be ok if it was a separate CodePlex project. Even though DirectXTK doesn't depend on SimpleMath like it does DirectTex, would be nice if it linked to SimpleMath as an option. It's such a useful wrapper though that it deserves more than being a blog post even if it'll need no further work. NuGet package!? I'd say merging it into DirectXTK, as yes its close to graphics, and lots of exposure. It will be nice if Shawn and other former XNA developers create own NET-DirectX11 port like XNA. Or help people in MonoGame. However its a dreams. But C++ is very uncomfortable thing even in VS2012. I vote for DirectXTK My vote is DirectXTK I'd say release it on CodePlex or github or whatever. Merging it in TK would be ok, but if it helps other people, releasing it seperately, users wouldn't have to deal with the unnecessary (for their purpose) code and dependancies and such of DXTK. and people who want it in their TK Project can include it Created CodePlex Issue for this. Feel free to Up-Vote it :> directxtk.codeplex.com/…/866
https://blogs.msdn.microsoft.com/shawnhar/2013/01/15/where-should-simplemath-live/
CC-MAIN-2018-13
refinedweb
381
61.87
Search: Search took 0.01 seconds. - 19 Nov 2012 7:01 AM - Replies - 3 - Views - 2,409 You're thinking an issue with PhoneGap then? Sigh. Thanks for testing that. RS - 15 Nov 2012 11:00 AM - Replies - 3 - Views - 2,409 Sencha Touch does not seem to fully load up on iOS (but works fine on my Android devices). Here's a few examples of namespaces that are undefined: Ext.Msg Ext.Viewport Ext.plugin I'm using... - 15 Nov 2012 9:21 AM This bug still exists in 2.1.0. - 15 Nov 2012 9:19 AM - Replies - 2 - Views - 1,126 Correct. If I set the page in the params and reload the list with some different data, then when the ListPaging plugins takes back over, the list ends up on the wrong (probably cached page) if it had... - 13 Nov 2012 12:44 PM - Replies - 2 - Views - 1,126 A #setPage method would be useful for stores as an alternative to #loadPage where you may not want to actually send a request. This is relevant for re-using components where new data is loaded.... - 13 Nov 2012 9:52 AM @TommyMaintz thanks nice fix until Sencha figures it out. - 9 Nov 2012 8:55 AM Thanks for the fix! I hadn't looked at that #setTpl method. I actually ended up creating new lists for each time I would normally just call #setItemTpl. Horrible, I know, but something had to... - 8 Nov 2012 12:53 PM The records on screen are being rendered improperly and the ones off the screen are being rendered correctly ( try resizing your browser window and you'll see some that are working ). - 27 Aug 2012 7:14 AM - Replies - 2 - Views - 716 Thanks for the response. My model is set up in the fashion of: Ext.define('Namespace.model.ValueModel', { extend: 'Ext.data.Model', fields: [ { - 17 Aug 2012 12:42 PM Is there a way to add drop listeners like normal binds would work? This is the best I can come up with and it doesn't work (#notifyEnter: fires less often than more): ... - 15 Aug 2012 8:06 AM So far this article has been the most helpful: - 15 Aug 2012 7:51 AM What is the best way to go about drag and drop functionality? I have spent several hours reading and experimenting, with not a whole lot of success. It seems like some of the examples out there are... - 6 Aug 2012 10:46 AM - Replies - 2 - Views - 716 How can I accomplish nested form data with TreePanels? I feel as if this question has been asked a lot, but I can't seem to find a good solution. The cheater sort of way I was attempting looks... - 23 Jul 2012 12:52 PM Not really sure. I put a workaround in for now anyway. Here's the exact build I'm using: (debug version) Build date: 2012-06-04 15:34:28 (d81f71da2d56f5f71419dc892fbc85685098c6b7) - 23 Jul 2012 12:28 PM Ugh that didn't format very well. var cnt = new Ext.Container({ fullscreen : true, items : [ { xtype : 'toolbar', docked : 'top' - 23 Jul 2012 12:27 PM Thanks for the response. Hmm I didn't try a unit test. It doesn't throw an error this way (not sure what I screwed up in my code); however, setting the title after passing undefined doesn't seem... - 23 Jul 2012 9:10 AM Ext version tested: Sencha Touch 2.1 Browser versions tested against: Chrome 20.0.1132.57 Description: - 23 Jul 2012 9:06 AM - Replies - 4 - Views - 2,318 Oops, I'm posting this in the Sencha Touch 2 forums if I can find them. Thought I was.... - 23 Jul 2012 9:05 AM - Replies - 4 - Views - 2,318 There is a related issue. calling #setTitle(undefined) causes this same problem as well. - 17 Jul 2012 10:45 AM Solved: Caused by a syntax error in XTemplate html. XTemplate lint should be done at some point. - 17 Jul 2012 10:28 AM Other ways to recreate: Setting #data: in panel config. Using #apply() or #applyTemplate() on a template. - 17 Jul 2012 10:00 AM When using #setData() or #updateData(), I get an error from the Sencha Touch library: Line 21907 of sencha-touch-all-debug.js:21097: return me.useEval ? me.evalTpl(code) : (new... Results 1 to 22 of 22
http://www.sencha.com/forum/search.php?s=6de86c376d9453b26296639a93aeeb70&searchid=9258947
CC-MAIN-2014-52
refinedweb
731
82.95
#include <hallo.h> * Branden Robinson [Thu, Feb 27 2003, 09:09:20AM]: > On Thu, Feb 27, 2003 at 11:05:21AM +0100, Eduard Bloch wrote: > > Funny to hear it from someone still refusing to change few things to > > improve useability on _small_ costs of mental consistency (remember > > x-session-manager story). > > Again, a moral condemnation grounded upon my disagreement with you on a > technical issue. That is not only about me - you did not listen to any other person showing you a way to change the current behaviour. > If you have that big a problem with my differing opinion, appeal the > issue to the Technical Committee. Heh? That is not really a technical issue, and you know it. Therefore I do not see a reason to bother Technical Committee with this question. Gruss/Regards, Eduard. -- Die dümmsten Hähne haben die dicksten Eier.
http://lists.debian.org/debian-vote/2003/02/msg00116.html
CC-MAIN-2013-48
refinedweb
142
60.55
Programs are a sequence of instructions or statements. These statements form the structure of a C++ program. C++ program structure is divided into various sections, namely, headers, class definition, member functions definitions and main function. Note that C++ provides the flexibility of writing a program with or without a class and its member functions definitions. A simple C++ program (without a class) includes comments, headers, namespace, main() and input/output statements. Comments are a vital element of a program that is used to increase the readability of a program and to describe its functioning. Comments are not executable statements and hence, do not increase the size of a file. C++ supports two comment styles: single line comment and multiline comment. Single line comments are used to define line-by-line descriptions. Double slash (//) is used to represent single line comments. To understand the concept of single line comment, consider this statement. / / An example to demonstrate single line comment It can also be written as / / An example to demonstrate / / single line comment Multiline comments are used to define multiple lines descriptions and are represented as / * * /. For example, consider this statement. /* An example to demonstrate multiline comment */ Generally, multiline comments are not used in C++ as they require more space on the line. However, they are useful within the program statements where single line comments cannot be used. For example, consider this statement. for(int i = 0; i<10; //loop runs 10 times i++) Compiler ignores everything written after the single line comment and hence, an error occurs. Therefore, in this case multiline comments are used. For example, consider this statement. for(int i = 0; i<10; /*loop runs 10 times */ i++) Headers: Generally, a program includes various programming elements like built-in functions, classes, keywords, constants, operators, etc., that are already defined in the standard C++ library. In order to use such pre-defined elements in a program, an appropriate header must be included in the program. The standard headers contain the information like prototype, definition and return type of library functions, data type of constants, etc. As a result, programmers do not need to explicitly declare (or define) the predefined programming elements. Standard headers are specified in a program through the preprocessor directive" #include. In Figure, the iostream header is used. When the compiler processes the instruction #inc1ude<iostream>, it includes the contents of iostream. • cin (pronounced "see in") : It is the standard input stream that is associated with the standard input device (keyboard) and is used to take the input from users. • cout (pronounced "see out") : It is the standard output stream that is associated with the standard output device (monitor) and is used to display the output to users. • cerr (pronounced "see err") : It is the standard error stream that is associated with the standard error device (monitor) and is used to report errors to the users. The cerr object does not have a buffer (temporary storage area) and hence, immediately reports errors to users. ' • clog (pronounced "see log"): It is the buffered error stream that is associated with the standard error device (computer screen) and is used to report errors to users. Unlike cerr, clog reports errors to users only when the buffer is full For many years, C++ applied C-style headers, that is, .h extension in the headers. However, the standard C++ library introduced new-style headers that include only header name. Hence, the most modem compilers do not require any extension, though they support the older .h extension. Some of C-style headers and their equivalent C++ style headers are listed in Table. Namespace: Since its creation, C++ has gone through many changes by the C++ Standards Committee. One of the new features added to this language is namespace. A namespace permits grouping of various entities like classes, objects, functions and various C++ tokens, etc., under a single name. Different users can create separate namespaces and thus can use similar names of the entities. This avoids compile-time error that may exist due to identical-name conflicts. The C++ Standards Committee has rearranged the entities of the standard library under a namespace called std. In Figure, the statement using namespace std informs the compiler to include all the entities present in the namespace std. The entities of a namespace can be accessed in different ways which are listed here. • By specifying the using directive using namespace std; cout<<"Hello World"; • By specifying the full member name std: :cout<<"Hello World"; • By specifying the using declaration using std:: cout; cout<<"Hello World"; As soon as the new-style header is included, its contents are included in the std namespace. Thus, all the modern C++ compilers support these statements. #include<iostream> using namespace std; However, some old compilers may not support these statements. In that case, the statements are replaced by this single statement. #include<iostream.h> Main Function: The main () is a startup function that starts the execution of a c++ program. All C++ statements that need to be executed are written within main ( ). The compiler executes all the instructions written within the opening and closing curly braces' {}' that enclose the body of main ( ). Once all the instructions in main () are executed, the control passes out of main ( ), terminating the entire program and returning a value to the operating system. By default, main () in C++ returns an int value to the operating system. Therefore, main () should end with the return 0 statement. A return value zero indicates success and a non-zero value indicates failure or error.
http://mail.ecomputernotes.com/cpp/introduction-to-oop/structure-of-a-cpp
CC-MAIN-2019-35
refinedweb
922
55.44
TIME matters, and so do you. HAHV’s Chest Pain Center at the Kingston Hospital. It’s teamwork and dedication that make it possible for us to provide faster treatment, better care, and better outcomes. At our Chest Pain Center, patients are treated by our board-certified emergency medicine physicians and an expert cardiology team. s Visit hahvcares.com to learn more. It is our goal to provide the best possible cardiac care to our community. The Chest Pain Center at the Kingston Hospital’s Emergency Department is the only accredited facility of its kind in the Hudson Valley and one of only nine in New York State recognized by the Society of Chest Pain Centers. Using advanced testing and the latest technologies, we’re proud to be able to offer emergency treatment for you and your loved ones when it matters most. 845.331.3131 YOUR PARTNERS IN HEALTH Health Announcing The Warren Kitchen & Cutlery Once-A-Year Summer Sale. One week of the lowest prices on the Hudson Valley’s best selection of fine cutlery, cookware, appliances, barware and professional kitchen tools. A-YE AR g in Everythin sale. n o the store J ru 50%reOFF and mo E UP TO M M E R S AL ULY 24 ~ ENC SU O Unique knives from around the world • The Exclusive line of Primo™ US-made ceramic grills and smokers • Grilling tools Glassware and Barware • Unique gadgets • Serving pieces and accessories • Coffee making for the aficionado Expert sharpening • Great gifts for anyone who loves to cook or entertain • Cooking classes and demos and more... Sale prices limited to store stock. Come early for the best selection. Just north of the 9G intersection. 6934 Route 9 Rhinebeck, NY 12572 845-876-6208 Open Mon–Sat 9:30–5:30, Sun 11–4:30 ULY 16 th ~ J DEEP ROOTS PROMOTE GOOD HEALTH. Northern Dutchess Hospital cares deeply for its community. And that’s what keeps us growing. *As recognized by HQND1022_DeepRoots_Ad_Chrono_FINAL.indd 1 MATERIALS PREPARED BY SEIDEN • 212.223.8700 6/10/11 3:21 PM •APPROVAL STAMP• Signature/Initials/Date kel Design TD3 2990 Dwell and Dwell Homes are registered trademarks of Dwell Media, LLC Atlantic Custom Homes Open House Weekend Home Building/Green Building Seminar For 66 years Lindal Cedar Homes has led the industry with our legendary building materials, innovative spirit, distinctive architecture and The Lindal Experience - our Sat. & lifestyle Sun. February 5th & 6th, 2011 - 10AM - 5PM personal delivery system. Saturday, JulyCedar 16,Homes 11am For 66 years Lindal has – led1pm the industry with our legendary building Come to the Open House andarchitecture see Lindal’s exciting designs in materials, innovative spirit, distinctive andnew The Lindal Experience - our Modern architecture warmed by wood Visit two Lindal Cedar Homes. This free Seminar gives you a realistic overview of the entire process of designing the Classic Lindal, “Modern A-Frame” Series and the warm, modern personal lifestyle deliveryservices system.provided Customization by Turkel Design and creating your own energy efficient custom home, from buying land through construction and finishing. First named the Dwell Homes Collection Turkel Designs forto the Dwell Collection. architecture warmed by wood Learn about Modern Lindal’s exciting Summer Savings! Homes Featured in the 2009 provided TIME Green Design 100 Customization services by Turkel Design Reservations are needed, please call 888-558-2636 or email ach@highlands.com to reserve your seat. Independently distributed by: Only NAHB Approved ndependently distributed by: named First to‘Green the Dwell Homes Product’ Collectionin our industry Featured in the 2009 TIME Green Design 100 Atlantic Custom Homes Atlantic Custom Homes Independently distributed by: Only ‘Green Approved Product’ in our industry 2785 9Spring, -NAHB Cold Spring, NY 10516 2785 Atlantic Rte 9 - Rte ColdCustom NY 10516 Homes 888.558.2636 Independently distributed by: 888.558.2636 2785 Rte 9 - Cold Spring, NY 10516 ach@highlands.com ach@highlands.com Atlantic Custom Homes 888.558.2636 lindalny.com 2785 Rte 9 - Cold Spring, NY 10516 indalny.com ach@highlands.com 888.558.2636 ach@highlands.com lindalny.com lindalny.com Visit Lindal.com Visit Lindal.com for your for your Living Dreams copy of copy LivingofDreams or the or the Lindal Experience planbooks Visit Lindal.com for your Lindal Experience planbooks copy of Living Dreams or the Visit Lindal.com for your Lindal Experience copy of Living Dreams planbooks or the Lindal Experience planbooks In A 2 8 ac lin Yoga being2011 August 26â&#x20AC;&#x201C;28 live your yoga On Our Rhinebeck, New York Campus Weekend Conference Retreat Teachers include: Seane Corn Gurmukh Kaur Khalsa Gurushabd Singh Khalsa Rodney Yee Colleen Saidman Yee Gary Kraftsow Pandit Rajmani Tigunait Sharon Gannon David Life Beryl Bender Birch Hemalayaa Biff Mithoefer Kaline Alayna Kelly Jenn Brown Mark Whitwell Sue Jones Rod Stryker Sarah Powers Matthew Daniell Peter Sterios Carrie Owerko Sandra Anderson Shyamdas Manorama Ellen Saltonstall Sponsored by visit eOmega.org/beingyoga or call 800.944.1001 for more information OMEGA Rhinebeck, NY Face to Face with Great New Theater P o w e r h o u s e M a i n s tag e Martel Musicals June 29-July 10 July 8-10 By Patricia Wettig, Directed By Maria Mileaf. Award-winning actress and playwright Patricia Wettig (thirtysomething, Brothers & Sisters) returns to Powerhouse, with Maria Mileaf (The Argument, Lobster Alice, Underneath the Lintel) directing. Book & Lyrics by Steven Sater, Music by Duncan Sheik, Directed by Moisés Kaufman The Nightingale F2M July 20-31 July 14-16 February House Music & Lyrics by Gabriel Kahane, Book by Seth Bockley, Directed By Davis Mccallum July 29-31 Piece of My Heart Book By Daniel Goldfarb, Brett Berns, and Cassandra Berns, Music and Lyrics by Bert Berns, Directed by Leigh Silverman A Maze By Rob Handel, Directed by Sam Buntrock A graphic novelist struggles to complete his 15,000 page comic book, a musician searches for the inspiration for his next hit, and a young girl strives to recreate her identity after years in captivity in this highly theatrical examination of creativity, addiction, love, and power. Rob Handel (Aphrodisiac, founding member of 13P) is joined for his Powerhouse debut by Tony Award® nominee Sam Buntrock (Roundabout’s Sunday in the Park with George). inside look workshoPs July 1-3 Margaret and Craig By David Solomon, Directed by Sheryl Kaller July 15-17 Handball By Seth Zvi Rosenfeld, Directed by Candido Tirado Vassar & New York Stage and Film present June 24 - July 31 / on the Vassar Campus / / 845-437-5599 Cast of the 2008 Powerhouse Theater production Finks, photo by Walter Garshagen. POWERHOUSE THEATER Proud media sponsors of the 2011 Powerhouse Theater season 7/11 ChronograM 5 Chronogram arts.culture.spirit. contents 7/11 news and politics community pages 20 while you were sleeping 36 rosendale: enchanted playground Good Samaritans arrested for feeding homeless, homebirth increases, and more. 21 beinhart’s body politic: THE LAST WEINER YOU'LL EVER NEED Larry Beinhart looks at the recent political scandal through verse and rhyme. The best food, fests, and fun in this historic cement-filled town. 58 newburgh: history and heart Orange County Choppers and Washington's Headquarters in the "Queen City." MEDICINE & HEALING 22 LIVING MONOLITH 97 patient-focused medicine: healing the new-fashioned way Ann Hutton discusses recent advances in medical technology. Peggy Atwood's custom dome home in Kerhonkson. By Jennifer Farley. 27 the garden Michelle Sutton visits the Hudson Valley's Open Days gardens. 30 the craft Gregory Schoenfeld talks landscaping with Samarotto Design Group. 33 the item Zan Strumfeld on eco-paint, creative shades, and stones benches. whole living guide 86 PEACEFUL WARRIORS CULINARY ADVENTURES 73 where's the beef? a meat lover's guide Holly Tarson finds the Hudson Valley's most tender restaurants. BERKSHIRES travel guide 83 mass appeal Peter Aaron explores the culture and arts of the beautiful Berks. Bethany Saltman plans a trip to Italy—without Azalea! Community Resource Guide 76 tastings A directory of what’s cooking and where to get it. 78 business directory A compendium of advertiser services. 91 whole living directory For the positive lifestyle. deborah degraffenreid Wendy Kagan explains the martial art of Aikido. 90 flowers fall: taking the attachment parenting challenge 22 Peggy Atwood in the kitchen of her monlithic dome home. 6 ChronograM 7/11 Mtk-Chronogram-Magazine 5/18/09 2:44 PM Page 1 Tools for Video & Pro-Audio Professionals. America’s Broadcast & Pro-Audio Supply House. New York • London EMPAC 2011 O N V I EW May 11–Sept 1 Mon–Sat 12–6 PM Céleste Boursier–Mougenot untitled (series #3) + index (v.4) Glasses and bowls touch as they float through pools of water. The fragile sounds of this chance music combine with music created from the building’s network activity that plays on two computer-controlled pianos. empac.rpi.edu/cg/celeste11 :: 518.276.3921 :: 110 8�� ������ ����, �� 12180 7/11 ChronograM 7 Chronogram arts.culture.spirit. contents 7/11 arts & culture FOOD & DRINK 44 Gallery & museum GUIDe 66 48 music Peter Aaron reveals singer/songwriter/playwright Dar Williams. 50 nightlife highlights Music events not to be missed this month: Peter Sando, Green River Festival, Blues at Boscobel, Mike & Ruthy Single Release Party, and the Ravi Coltrane Quartet. 51 cd reviews Cheryl K. Symister-Masterson reviews Porgy/Bess Act 2 by David Arner. Jason Broome reviews Probably Not by Hot Garbage. Crispin Kott reviews Tern Rounders by Tern Rounders. 52 books Nina Shengold talks with Bard fictionistas Karen Russell and Edie Meidav. 54 book reviews Robert Burke Warren reviews I'll Never Get Out of This World Alive by Steve Earle. Marx Dorrity reviews A Moment in the Sun by John Sayles. 56 Poetry Poems by Brant Clemente, Daniel de Sa', Nigel Gore, Katherine Hauswirth, Ally Jerro-Greco, Mary Cuffe Perez, Andrew F. Popper, Rick Tannenbaum, Samantha Tansey, Ted Taylor, Christina Lilian Turczyn, Catherine Wald, Tom Weigel, K. A. Willis. Edited by Phillip Levine. 128 parting shot Half Empty Heart by Tom Holmes. cottage industry Peter Barrett on the joys and challenges of a home-based food business. 69 restaurant openings A Tavola, Bacco Restaurant, Brasserie 292, `Cue, Vineyard Grille and Cafe. 71 FOOD & DRINK EVENTS FOR JULY Fleisher's book launch, Friends of the Farmer Festival, Connecticut Wine Festival. the forecast 106 daily Calendar Comprehensive listings of local events. (Daily updates at Chronogram.com.) PREVIEWS 103 Shadowland Theatre presents the world premiere of "Jackass Flats." 106 Danny Maseng leads workshop on love, humanity, God, and violence. 107 "Current," Garrison Art Center's survey of contemporary sculpture, at Boscobel. 108 Joseph Bertolozzi's Bridge Music plays on Poughkeepsie's Mid-Hudson Bridge. 110 Mount Tremper Arts Summer Festival kicks off its fourth year. 111 Postclassical string quartet Ethel makes its festival debut at Maverick Concerts. 116 Anthony Ward leads a meditation workshop, Being With Flowers, at Omega. 117 Vassar's 27th Powerhouse Theater Season shares plays, musicals, and readings. 120 Seventy-four bands take the stage at the Rosendale Street Festival July 23 & 24. 121 The 2011 season of the Hudson Valley Shakespeare Festival begins. planet waves 122 eclipse in cancer, chiron in pisces Eric Francis Coppolino reflects on the alignment in the cardinal signs. 124 horoscopes What do the stars have in store for us this month? Eric Francis Coppolino knows. roy gumpel 66 8 ChronograM 7/11 Bread from Much Mor Bread. FOOD & DRINK BARDSUMMERSCAPE july 7 – august 21, 2011 Bard SummerScape presents seven weeks of opera, dance, music, drama, film, cabaret, and the 22nd annual Bard Music Festival, this year exploring the works and world of composer Jean Sibelius. Staged in the extraordinary Richard B. Fisher Center for the Performing Arts and other venues on Bard’s stunning Mid Hudson River Valley campus, SummerScape brings to audiences a dazzling season of world-class performances you won’t see anywhere else. Opera Theater Bard Music Festival DIE LIEBE DER DANAE THE WILD DUCK Twenty-Second Season By Henrik Ibsen Directed by Caitriona McLaughlin SIBELIUS AND HIS WORLD American Symphony Orchestra Conducted by Leon Botstein theater two July 13 –24 Production design by Rafael Viñoly Operetta Twelve concert performances, as well as panel discussions, preconcert talks, and films, examine the music and world of Finnish composer Jean Sibelius. A “hotbed of intellectual and aesthetic adventure.” (New York Times) TERO SAARINEN COMPANY BUY YOUR TICKETS NOW 845-758-7900 fishercenter.bard.edu Music by Richard Strauss Directed by Kevin Newbury and Mimi Lien August 12–14 and 19–21 BITTER SWEET sosnoff theater July 29 – August 7 Music and libretto by Noël Coward Film Festival Directed by Michael Gieleta BEFORE AND AFTER BERGMAN: THE BEST OF NORDIC FILM Conducted by James Bagwell Dance theater two August 4 – 14 Choreography by Tero Saarinen Westward Ho! Wavelengths HUNT Thursdays and Sundays July 14 – August 18 Spiegeltent CABARET and FAMILY FARE sosnoff theater July 7 – 10 July 8 – August 21 Annandale-on-Hudson, New York PHOTO ©Peter Aaron ‘68/Esto the bard music festival presents PHOTO ©Peter Aaron ‘68/Esto Sibelius and His World august 12–14 and 19 –21 Twelve concert performances, as well as panel discussions, preconcert talks, and films, examine the music and world of Finnish composer Jean Sibelius. weekend one Friday, August 12 Imagining Finland program one Saturday, August 13 program two Sunday, August 14 Bard College Annandale-on-Hudson, New York PHOTO: Jean Sibelius at his house “Ainola” in Järvenpää, Finland, 1907. ©akg-images American Symphony Orchestra, Leon Botstein, conductor Orchestral works by Sibelius Berlin and Vienna: The Artist as a Young Man Chamber works by Sibelius, Goldmark, Fuchs, Busoni program three Kalevala: Myth and the Birth of a Nation program four White Nights—Dark Mornings: Creativity, Depression, and Addiction program five Aurora Borealis: Nature and Music in Finland and Scandinavia program six To the Finland Station: Sibelius and Russia American Symphony Orchestra, Leon Botstein, conductor Orchestral works by Sibelius and Kajanus Chamber works by Sibelius, Grieg, Peterson-Berger, Delius Chamber works by Sibelius, Grieg, Stenhammar, Kuula Chamber works by Sibelius, Tchaikovsky, Glazunov, Rachmaninov weekend two Sibelius: Conservative or Modernist? Friday, August 19 Nordic Purity, Aryan Fantasies, and Music program seven Saturday, August 20 program eight 845-758-7900 fishercenter.bard.edu Jean Sibelius: National Symbol, International Iconoclast Sunday, August 21 Chamber works by Sibelius, Bruckner, Atterberg, Kilpinen From the Nordic Folk Chamber works by Sibelius, Grieg, Grainger, Ravel, Kuula program nine Finnish Modern program ten The Heritage of Symbolism program eleven Nostalgia and the Challenge of Modernity program twelve Chamber works by Sibelius, Melartin, Madetoja, Merikanto American Symphony Orchestra, Leon Botstein, conductor Orchestral works by Sibelius and Raitio Chamber works by Sibelius, Strauss, Respighi Silence and Influence American Symphony Orchestra, Leon Botstein, conductor Orchestral works by Sibelius, Barber, Vaughan Williams 7/11 ChronograM 9 onlinE MarkEting on the cover Search Engine Optimization / Pay-per-Click Management / Social Media Cutting EdgE, StratEgiC intErnEt MarkEting SolutionS for BuSinESSES and agEnCiES 845.383.0890 dragon@dragonsearch.net Why Not Tube the Esopus? 10 Bridge Street, Phoenicia, NY (845) 688-5553 Memorial Day Weekend to September 30 10 ChronograM 7/11 Bi-Polar Explorer Allison Leach | 55 p/n 4x5 polaroid negative | 2008 Gardiner-based photographer Allison Leach is obsessed with early 20th-century explorers. “There was so much of our world that was unexplored. It was such a romantic time as opposed to our time now, where it seems like everything’s been done,” Leach says. In 1999, Leach visited the Shackleton exhibit at the American Museum of Natural History. Expedition photographer Frank Hurley’s pictures of Antarctic adventurers filled the walls. Hurley’s glass-plate negatives inspired Leach to ask: “What happened to all the explorers that never got anywhere or found anything?” This led to the collection of tragic explorers, amalgamations of inadequate pioneers, and fantastical failures in Leach’s “Misfit Explorers” series. The cover photo, Bi-Polar Explorer, is based on Captain Robert Falcon Scott. In 1911, Scott and his crew took photos of themselves after their unsuccessful mission to be the first to reach the South Pole. Leach uses a 4x5 Polaroid 55 P/N press camera from the 1950s for the series. While Polaroid users usually only keep the positive side of the film, Leach salvages the negatives to process and print the photos. “The reason I used this film is because it looked like a glass-plate negative. That’s why I was drawn to it,” she says. This type of process makes the rough, deteriorated border around the photos. Raised in Houston, Leach studied at Rice University and Bristol University in London. Specializing in commercial and fine art photography, Leach has worked on assignment for People, EntertainmentWeekly, and Vanity Fair. After shooting a number of celebrities, including Jon Stewart, Tom Wolfe, and Joan Rivers, Leach learned the annoyances of the business. “It’s funny. When you work with celebrities, you get all this chatter before you meet them. Invariably, it’s always the converse of what you hear. With Joan Rivers, all I heard was, ‘Oh my god, she’s difficult,’ and when I met her, she was lovely. And then you’ll get a celebrity and you hear, ‘Oh, they’re great,’ and then they come on and they’re a nightmare,” she says. “Misfit Explorers” will be on display at Davis Orton Gallery in Hudson through July 31.;. —Zan Strumfeld EDITORIAL Belleayre Mountain Rt. 28, Highmount, NY (800) 942-6904, ext. 1344 e-m: festival@catskill.net Editorial Director Brian K. Mahoney bmahoney@chronogram.com creative Director David Perry dperry@chronogram.com Books editor Nina Shengold books@chronogram.com health & wellness editor Wendy Kagan wholeliving@chronogram.com Poetry Editor Phillip Levine poetry@chronogram.com music Editor Peter Aaron music@chronogram.com Jul. 3 8pm k.d. lang and The Siss Boom Bang with special guests The Belle Brigade Jul. 8 8pm Broadway Dance Soiree Jul. 9 8pm Legendary Song & Dance Man Jim Caruso’s Cast Party Tommy Tune in “Steps in Time” Jul. 16 8pm Creedence Clearwater Revisited Jul. 23 8pm Belleayre Festival Opera Jul. 29 8pm Belleayre Jazz Club Jul. 30 8pm Belleayre Jazz Club Aug. 5 8pm Belleayre Jazz Club Aug. 6 8pm p Music of Miles Davis Verdi’s “La Traviata” KJ Denhert Global Noize Ravi Coltrane Quartet Jimmy Cobb’s “So What Band” featuring: Larris Willis, Vince Herring, Buster Williams, Javon Jackson & Eddie Henderson Aug. 13 8pm Country Music Superstar Aug. 20 8pm Pop & Country Hit-Maker Aug. 27 8pm Punch Brothers Sept. 3 8pm Clint Black Mary Chapin Carpenter with special guest Jessica Lea Mayfield Banjo Wizard / Original Band Bela Fleck & The Flecktones food & drink Editor Peter Barrett community pages editor C. J. Ansorge design INTErN Jana Leon EDITORIAL INTErN Zan Strumfeld proofreader Lee Anne Albritton contributors Larry Beinhart, Jay Blotcher, Jason Broome, Eric Francis Coppolino, Anne Pyburn, David Morris Cuningham, Marx Dorrity, Roy Gumpel, Jennifer Farley, Ann Hutton, Annie Internicola, Crispin Kott, Sharon Nichols, Fionn Reilly, Bethany Saltman, Gregory Schoenfeld, Sparrow, Michelle Sutton, Cheryl K. Symister-Masterson, Holly Tarson, Robert Burke Warren PUBLISHING FOUNDERS Jason Stern & Amara Projansky publisher Jason Stern jstern@chronogram.com chairman David Dell Chronogram is a project of Luminary Publishing advertising sales advertising director Maryellen Case mcase@chronogram.com ACCOUNT EXECUTIVE Eva Tenuto etenuto@chronogram.com ACCOUNT EXECUTIVE Mario Torchio mtorchio@chronogram.com account executive Lara Hope lhope@chronogram.com account executive Ralph Jenkins rjenkins@chronogram.com account executive Barbara Manson bmanson@chronogram.com sales assistant Stephanie Wyant swyant@chronogram.com ADMINISTRATIVE director of operations Amara Projansky aprojansky@chronogram.com; (845) 334-8600x105 business MANAGER Ruth Samuels rsamuels@chronogram.com; (845) 334-8600x107 technology director Michael LaMuniere mlamuniere@chronogram.com PRODUCTION Production director Jaclyn Murray jmurray@chronogram.com; (845) 334-8600x108 pRoduction designers Kerry Tinger, Adie Russell Office 314 Wall Street, Kingston, NY 12401 (845) 334-8600; fax (845) 334-8610 MISSION Chronogram is a regional magazine dedicated to stimulating and supporting the creative and cultural life of the Hudson Valley. All contents © Luminary Publishing 2011 SUBMISSIONS calendar To submit listings, e-mail events@chronogram.com. Deadline: July 15. fiction/nonfiction/POETRY/ART 12 ChronograM 7/11 Think of the Children To the Editor: Arenâ&#x20AC;&#x2122;t any Democrat or liberal readers of Chronogram going to challenge Larry Beinhartâ&#x20AC;&#x2122;s optimistic statements in this magazine about our nation's leadership and how things are going? Is intellectual honesty dead in the Hudson Valley liberal community? With unemployment at 9.1 percent, which does not include those who have stopped looking for work; with banks holding over a million homes in foreclosure; with home values dropping like stones; with the anti-war president waging and escalating wars in Pakistan,Yemen, Afghanistan, Iraq, and Libya while making life miserable for tiny Israel, you would think somebody other than James Carville would start talking the truth. Are all you liberals out there afraid of being called racist if you criticize a biracial president? In our region, Larry Beinhart is one of the leaders of the mediaâ&#x20AC;&#x2122;s Obama denial movement. Find the one good thing in a hundred if you can and talk that up. Downplay the bad things and above all keep blaming Bush year after year after year. Larry and others like him get help from the mainstream media for sure. Youâ&#x20AC;&#x2122;ll notice the TV news is no longer scrolling death tolls in the wars night after night. The death toll stuff is only for Republicans. Liberals who continue wars, escalate wars, and start wars win the Nobel Peace Prize for positive thoughts and eloquent teleprompter speeches. Itâ&#x20AC;&#x2122;s time to think about saving the country you grew up in for your children. Thatâ&#x20AC;&#x2122;s far more important than keeping your dream of a successful Obama presidency alive. Obama has failed and he has failed in the most destructive way possible. The very survival of our nation can now be questioned. Get off the denial bandwagon and call it the way it is and do something to save your country. Ed Fertik, Philmont Columbia County Tea Party Department of Corrections Letters * %.,0/! 5 1! /%)! . 1! )+*!4 5 ! 0 ! (%/%# /%+* *3%!/4 5 +*/-+( -!.0(/. ! % /%+* %. /$! !./ +,,+-/0*%/4 "+- (( , -/%!. /+ +*/-+( /$! +0/ +)! +" %.,0/! . )! % /+- *! +) %*!. '*+2(! #! !3,!-%!* ! .!*.%/%1%/4 * $0)+- %* ,!-.+* ( ./4(! /$ / %. +)"+-/ (! * !""! /%1! *! +//-!(( & *! +//-!(( & *! +//-!(( +) & *! +//-!(( +) In the June issue, the above photo of the Kramer clan in the Woodstock Community Pages was not captioned. From left to right: Aunt Loretta Akers, Robin Kramer, Jill Kramer, Daisy Kramer; (back row) Mike Kramer. The photo was taken by KrashKramer. In addition, a photo of Levon Helm was not credited. It was taken by Greg Aiello. In the Phoenicia Community Pages, we printed some erroneous information about the Phoenicia Festival of the Voice. The festival is taking place August 4-7 with 18 events over four days. Rozz Morehead opens with a Gospel concert on Thursday night. Saturday night will feature a performance of Mozartâ&#x20AC;&#x2122;s â&#x20AC;&#x153;Don Giovanniâ&#x20AC;? with an acclaimed cast, including Barry Banks and Morris Robinson; Metropolitan Opera maestro Steven White will conduct the Woodstock Chamber Orchestra for the opera. For more (correct!) information on the Phoenicia Festival of the Voice:. In an article on summer drinks, "Do Try This At Home," we inccorectly identified the vodka The Local uses in its Thai Boxer. It is Hangar One Kaffir Lime, not Ketel One Kaffir Lime. 7/11 ChronograM 13 Courtesy of Omega Institute for Holistic Studies zan strumfeld chronogram seen clockwise from top left: arlo guthrie, tao rodriguez-seeger, and pete seeger centerstage for the clearwater generations concert at the clearwater festival; browsing the stacks at the stone ridge library fair; summer is here at the kingston farmers' market; the rhinebeck chamber of commerce hosted a mixer at omega institute; wdst's GARY CHETKOF, ZACH GALIFINAKIS, AND WARREN HAYNES AT MOUNTAIN JAM 2011 AT HUNTER MOUNTAIN. 14 ChronograM 7/11 the events we sponsor, the people who make a difference, the chronogram community. POUGHKEEPSIE K I N G S TO N NEWBURGH Route 44 845-454-4330 Route 9W 845-336-6300 Route 300 845-569-0303 A Smile Is The Ultimate Accessory Stephen Eric Enriquez, DMD Prosthodontist • Cosmetic and Implant Specialist 12 Hudson Valley Professional Plaza • Newburgh NY 12550 • 845 562 3370 7/11 ChronograM 15 Esteemed Reader U ls t e r C o u n ty St y l e ARTS & CULTURE | WINE & CUISINE | RESORTS & LODGING | YEAR-ROUND FUN Experience the style of Ulster County this summer. Stay at one of our luxurious resorts, quaint lodges or comfortable campgrounds and find plenty to do with world famous Main streets; a maritime museum; 350 miles of hiking trails; 12 pristine golf courses; hundreds of restaurants, art galleries, outdoor theatres, a renowned wine trail and much more. A world � adventure Hudson Valley/Catskill Regions 16 ChronograM 7/11 A human being is a symbol of the laws of creation; in her there is evolution, involution, struggle, progress and retrogression, struggle between positive and negative, active and passive, yes and no... —Teilhard de Chardin “Come inside. It’s dinnertime!” I called to my son, who’s four, from the front porch. “No!” Came the definitive reply. He was riding laps around the house on his bicycle. “It’s time to stop playing,” I hollered after him. “Come inside and eat!” My voice got louder as he disappeared around the corner for the hundredth time. Standing on the porch alone, the sound of his no and my ineffectual response echoed in my ears. A couple laps and variations on the demand later he happily came in to eat, but I found myself savoring his clear and strong denial. Hearing the child’s unequivocal no, I recognized how often I am lamely fighting against more surreptitious no’s in myself. Mine are more wily than the fouryear-olds, hiding behind justifications, eluding confrontation, and furtively getting their way, in spite of all the reasoning, wrangling, and manipulation I can muster. We’ve all found ourselves in comical arguments with kids which distill to “Yes!” “No!” “Yes!” “No!” We hear the same arguments in ourselves and among fellow adults. We even see it playing out on the world stage, on which little boys with big guns seek to enforce their yesses on their opponents’ nos. This is how human beings functioning like children resolve every conflict— through the lens of domination and submission. If all that can be seen are two forces at work, for all intents and purposes, this unending conflict is the only option. An ancient aphorism puts it this way: “Every stick has two ends.” The tendency is to grab the end of the stick that is pleasant and desirable, and beat adversaries over the head with the other end. But the inevitable result is that the unpleasant end of stick swings around and whacks the wielder when he least expects it. Clinging to the pleasant yields automatic suffering in every case. Examples of this abound both personally and on a global scale. Staying up late drinking wine yields a headache in the morning; imperial domination of weaker people makes them want to destroy the oppressor; trying to break habits makes them return stronger. Isn’t it odd that as consciousness of the inevitable catastrophes associated with carbon emissions and climate change grows, the whole world burns ever more dirty fuel? But reconciling a conflict does not mean choosing the unpleasant like some kind of martyr.This is a perverse reaction to the natural impulse to seek pleasure, like the pre-enlightened Buddha’s renunciate buddies, who accused the Buddha of being a pushover for renouncing austerities and seeking the Middle Way. Instead, reconciling opposites is a matter of holding the yes and no in dynamic tension within the sphere of awareness. It is in this effort that the force that motivates the two forces is fused through the friction of their collision. It is a balancing of the stick precisely in the middle. Since we tend to gravitate toward the pleasant it does take a little compensatory effort to allow attention to go to the unpleasant. As the harmonizing force is called the Holy Reconciling, so too is the negative force—the no—called Holy Denying. In this sense we are invited to honor and respect that which resists us— not simply overcome it. There is a lesson in both old and new sciences that every event is comprised not of two but three forces. The third goes by various names. In atomic physics it is called the neutron; in Christianity it’s the Holy Ghost; in Vedanta it’s Sattva; in Taoism it’s the Tao; In Buddhism it’s the Dharma; in the Fourth Way it’s the Holy Reconciling. Essentially it’s a third force that allows the yes and the no to be transcended and reconciled to effect peace. Like the hand that holds down the fly while the other pulls the zipper up, the denying force needs to be our friend. There is only a conflict when we find ourselves identified with one or another side. When we take sides in any argument it is a clear sign that we have lost sight of the larger picture. We are missing the tripartite dynamic in our refusal to make friends with no. “Blessed are the Peacemakers, for they shall be called children of God,” resounds the beatitude uttered on the mountain 2,000 years ago. The peacemakers are those who are able to channel the material of the Force Reconciling. Because they are established in the position of the impartial observer in themselves, they can be a channel for that peacemaking impulse in the world. —Jason Stern 7/11 ChronograM 17 frOg HOllOw farm English riding for all ages Celebrating the Partnership of Human & Horse Olympic sized indoor arena Heated viewing area Dust free footing Lessons • Boarding and Training • Summer Program • Gift Certificates • Esopus, NY • (845) 384-6424 CON-TACK CONSIGNMENT FOR RIDING APPAREL AND TACK EQUINE ANTIQUES AND COLLECTIBLES FABULOUS EQUINE JEWELRY 845.757.4442 Panorama Dr. Tivoli, NY 18 ChronograM 7/11 con-tack@webjogger.net Brian K. Mahoney Editor’s Note Raindrops on Roses W elcomeYork congressman. His ode to the misbehaving political class (“The Last WeinerYWoodstock. Robert BurkeWarren reviews his debut novel, I’ll Never Get Out of ThisWorld Alive, on page 54.) Eye on the Prize The Bard Fiction Prize has been an ongoing concern for 10 years now. The prize is given to a published novelist under 40. Despite the fact that Nina Shengold, our books editor, believes the prize is slightly discriminatory— Nina published her first (award-winning!) novel, Clearcut, after the cut-off age was just past—she interviewed two Bard winners for this issue, Edie Meidav (Crawl Space) and Karen Russell (Swamplandia!). Nina, with her novelist’s ear for dialog, gets some gems out of the writers. Russell, a native of Miami: “I didn’t realize you have to be a paleontologist of your car, hacking it out of layers of snow.” Meidav, on the linear nature of existence: “As you proceed in life, certain avenues open and can’t be closed. Every choice you make opens one thing and closes three others.” For the profiles in the Books section, Nina is joined by Jennifer May, who shoots the author portraits each month. Our dynamic duo recently won an Independent Publisher Book Award for River of Words: Portraits of Hudson Valley Writers, their collection of author profiles, most of which originated in these pages. Well done! I’m not at all surprised. (Books, page 52) Chronogram Sponsors: As part of our ongoing commitment to nourish and support the creative, cultural, and economic life of the Hudson Valley, Chronogram helps promote organizations and events in our pages each month. Here's some of what we’re sponsoring in July. Tea Time A letter of praise is nice, but a vitriolic missive shot like a flaming arrow through my office window really makes my day. It’s wonderful to know that people care enough to tell us how wrong we are. Ed Fertik, our Tea Party correspondent from Columbia County, never fails to delight. (Letters, page 13) Apologies to Rodgers and Hammerstein On a deadline, As the phone rings, When I’m feeling slammed, I simply remember my favorite things, They’re all in Chronogram. Chronogram Open Word (July 2) Chronogram poetry editor Phillip Levine hosts an open mike at Beahive Kingston with featured readers Ron Whiteurs and Michael Platsky. Kingston Civic Engagement Forum (July 17) Join Assemblyman Kevin Cahill, Ivan Lajara of the Daily Freeman, Rebecca Martin of the Kingston Land Trust, and other Kingstonians to discuss the conscious creation of a vibrant community at Stella May Gallery Theater. Twiitter: #civickingstonny Spirituality and the Environment Talk (July 21) The Beacon Institute presents Marymount President Brigid Driscoll and Rabbi Lawrence Troster. Friends of the Farmer (July 30) The first annual Hudson Valley food lover's festival at the Copake Country Club. Powerhouse Theater (Through July 31) caption The professional theater development incubator returns to Vassar College. 7/11 ChronograM 19 A recent study has shown that between 2004 and 2008, there was a 20 percent increase in American women giving birth at home. With most of the rise occurring in non-Hispanic white women, home births statistically show an improvement in birth outcomes: Both preterm and low-birth-weight infants have dropped over 15 percent. In the 25 states studied, 87 percent of home births were planned. Home births make up less than 1 percent of United States births. Source: NPR Forty years after President Nixon launched the War on Drugs, a June 2 report by a private global commission on drug policy lead by ex-Brazilian president Fernando Henrique Cardoso declared that the drug war has failed. In response, the White House drug policy office said the United States’ overall drug use has dropped to half of what it was in the late '70s. In the past five years, there has also been a 46 percent decrease in cocaine use among young adults and a 68 percent drop in employees testing positive for cocaine. The commission recommended ideas like offerring health and treatment services to those in need, as well as investing in activities to prevent young people from taking drugs in the first place. However, the White House said there were no plans for legalization because “illegal drug use is associated with voluntary treatment admissions, fatal drugged driving accidents, mental illness, and emergency room admissions.” Source: USA Today According to the American Society of Plastic Surgeons, cosmetic procedures among men rose 2 percent to more than 1.1 million since last year. Hoping to maintain their youth or enhance masculine features, men are undergoing surgeries for face-lifts and body fat reductions. Men are also receiving temporary treatments like Botox injections. Baby boomers make up a large portion of these clients. However, 75 percent of the 18,000 men who had gynecomastia, a male breast reduction, were between the ages of 13 and 19. Although new technology allows outpatient treatment and less recovery time, studies show that male patients are either not as tolerant to pain or are less satisfied with their results than women. Men are also becoming less shy about cosmetic surgery, unlike a decade ago when they would enter through the back door of a doctor’s office, according to Manhattan dermatologist Howard Sobel. Source: Wall Street Journal The United States, Australia, and Italy are among the 10 countries with the highest income inequality in the world. Released in a 2011 report by the Organisation for Economic Co-operation and Development, one of the greatest effects of the economic crisis is the growing rate of income inequality around the globe. There has also been a significant increase of income inequality in countries like Germany and Sweden, which, prior to this past decade, had historically low levels of income inequality. Source: Huffington Post Millionaire households are on the rise, growing 12.2 percent in the past year, according to a report by the Boston Consulting Group. The United States leads the field with 5.2 million millionaire households, followed by 1.5 million millionaire households in Japan. Singapore has 15.5 percent millionaire households, making it the country with the largest percentage of millionaires. Though the millionaires represent only 0.9 percent of the world’s population, they control 39 percent of the world’s wealth. Source: Wall Street Journal A new survey by the National Governors Association and the National Association of State Budget Officers found that higher education, elementary and high schools, transportation, and other areas are facing billions of dollars in budget cuts as well as rising taxes or fees. The survey found that states expect to collect less tax revenue while also spending less money in the coming fiscal year. The cost of Medicaid is also rising due to many people losing their jobs and their health insurance. However, improving state tax collections is still not enough to make up for the end of the federal stimulus money. The report also found that in the coming year, states will only have about $2.8 billion in federal stimulus money for balancing their budgets, a drastic decline from the $51 billion this year. Source: New York Times Although police waited until after the food was served, three members of the international Food Not Bombs movement were arrested on June 1 in Lake Eola Park in Orlando for illegally feeding the homeless. The three were charged with violating the city’s ordinance that restricts group feedings in public parks. The ordinance applies to feeding more than 25 people and the members had fed 40. Each person received a $250 fine, but unlike the other two who were released from jail early, Douglas Coleman is staying in jail and will let the legal process take its course. Source: Orlando Sentinel On June 3, the United Nations AIDS agency said in a new report that increased funding for early treatment of people with HIV could significantly reduce the number of infections spread through sexual transmission. After a nine-nation study that showed that HIV medicines can make patients less infectious, patients getting earlier treatment also showed that they were 96 percent less likely to spread the virus to their partners. Billions of dollars will be needed to obtain the agency’s vision for the future— “zero new HIV infections, zero discrimination, and zero AIDS-related deaths.” The report also said that in the last decade, there was a 25 percent decline in new HIV infections and AIDS-related deaths. Source: Washington Post The late 20th century’s growth in farm output has slowed down so much that it is failing to keep up with the demand for food, due to population increase and the rise of affluence in once-poor countries. Consumption of wheat, corn, rice, and soybeans—the four main crops that supply the most human calories—has created an imbalance between supply and demand, where some grains have more than doubled in cost. These price jumps have increased hunger problems for tens of millions of poor people in countries like Yemen and Uzbekistan. Recent scientific research found that climate change is one of the main factors of the destabilized food system. Although scientists had predicted that climate change would be manageable for agriculture until around 2080, they now believe that some of the weather disasters like floods, droughts, and heat waves that destroyed harvests were caused by human-induced global warming. Source: New York Times State parks across the country at risk of closing are attempting new strategies to stay open, including trying new fees, becoming more volunteer-heavy, and pushing to drill for oil and gas beneath trails. Since 2008, state park finances have been cut significantly, with some parks closing altogether; in a news release on May 13, California announced they will permanently close 70 of the 278 state parks this fall. In states like Washington, parks are no longer receiving state money and will instead implement new entrance fees to the parks. If a bill is approved by the Ohio legislature, drilling for oil and gas will be allowed in Ohio’s parks—the parks would directly benefit from revenues. Source: New York Times —Compiled by Zan Strumfeld 20 ChronograM 7/11 dion ogust Larry Beinhart’s Body Politic THE LAST WEINER YOU’LL EVER NEED Once again it has been rubbed in our face, a political penis escaped from its place a scandal, an outrage, an erectile disgrace, this tale of a penis caught off its base. It’s happened again, as it happened before, a wandering penis off in search of some more. The pundits swarm out in their pack to deplore the politician caught while trying to score. Clinton was my favorite I must confess, Monica’s knee padsigslist, and now he’s gone, but not at all missed. John Edwards had a sordid and tragic affair, a videographer fell in love with his hair. Eliot Spitzer paid more than we knew a man could, is it possible there’s a hooker that could. Is it the fault of the liberals, the hippies, the Jews? repression, recession, the fault of the news? Could we have avoided all of these dreadful disasters, if we listened to our priests and heeded our pastors? That sounds oh, very right, but perhaps it even worse is as pedophiles so often make their perches in churches. and powerful preachers have so very often lost their ways in those closets of clothes that are kept by the gays. The strict teaching of religion, to everyone’s great sorrow didn’t work yesterday and it won’t work tomorrow. There’s a war in Afghanistan and one in Iraq. But what’s important is who is in whose sack. In underground bunkers they’re building nukes in Iran; in America, vamp, invite, and sashay, until the poor dick comes out to play. Women are always the victims, because they’re from Venus. Men are from Mars and it’s the fault of the penis. How should we get energy? Who can figure that out? Climate change, global warming, what that’s really about? That’s one of those issues that seems way too complex but at least we can be clear about who shouldn’t have sex. Who can fix the economy, correct the dire fiscal mess? Marital fidelity predicts who will have success. You wouldn’t let a plumber fix the pipes in your house if you knew he had been with someone who was not his spouse. You wouldn’t let a mechanic change the brakes on your car if you knew with some girl he’d gone a little too far. You would never let a surgeon cut into your abdomen unless you were certain he was too pure to sin. This needs to be solved, this needs a real fix, we need a new combination, we need a new mix to save the world from men getting their kicks. And the news media full of nothing but pricks. To find salvation, a method that really will work we go back to the old day of the Ottoman Turk. With a powerful empire, so rich, wide, and vast, to run it they needed. Don’t worry about this new political class they will still be able to talk out of their ass. We are already ruled by the confused and the witless It will be so much better if they also made dickless. 7/11 ChronograM 21 The House ABOVE: Peggy Atwood’s monolithic dome in Kerhonkson. OPPOSITE (Top): The master bedroom; (Bottom): The living room. Living Monolith Peggy’s Dome By Jennifer Farley Photographs by Deborah DeGraffenreid A lifetime of living on the edge propelled Peggy Atwood—a stellar chanteuse, sometime legal secretary, and forever daughter of an Army colonel diplomat—into the smooth squash-shaped domes of “Outpost Planet Earth,” her Kerhonkson dream home. The learning curve was treacherous and expensive. Peggy probably spent $100,000 more than necessary due to various contractor errors, absenteeism, and omissions. Atwood has about $450,000 in the 3,200-square-foot custom home, which sits on three scenic acres. The house is warm in the winter yet cool in the summer. Atwood brags that her total annual energy bill for 2010 was just $2,000. It’s ironic that commissioning the most cavelike of domiciles—a veritable lunar module, as it were—got complicated. Moreover, Atwood’s house, technically a “monolithic dome,” is made almost entirely of concrete, steel reinforcing bar, and polyurethane insulation foam, hardly exotic construction materials in 21st-century America. Undaunted, Atwood’s turning the lessons she learned into a dome-construction consulting business. (Monolithic, by the way, literally means “big rock.”) “There’s no better structure in all the world” than a monolithic dome, claims Atwood, a native Californian. “It’s an idea who’s time has finally come.” Close calls with a couple of natural disasters—a Nashville tornado and a Catskills forest fire—ignited Atwood’s desire to build what FEMA rates as the safest type of aboveground building. Theoretically, Atwood’s home could stand for centuries, resisting catastrophes, rot, and even termites. “I was raised on survival. My father was in the diplomatic service overseas 22 home ChronograM 7/11 and he would ship us off ” to wilderness-skill summer camps, says Atwood, who both loves and fears nature. She’s also spent a lot of time studying issues such as global warming. Living in such a secure structure nurtures the artist’s sense of peace. Atwood made some money renovating conventional homes. She also grew up immersed in other cultures. She’s seen a lot of the world. Her family moved to Czechoslovakia when she was a toddler. Atwood attended high school in Beirut. But before deciding on a monolithic dome, Atwood carefully considered many other types of environmentally friendly new construction. Cordwood, straw bale, rammed earth, earthships, geodesic domes, sandbag structures and yurts “all had their weaknesses,” she says. Monolithic domes are earth-friendly and easily maintained. The concrete’s thermal mass keeps the interior temperature stable. Properly constructed, they’re actually reasonably priced for custom residential. What’s tricky is the installation of exterior windows and doors a curvilinear façade. Barring expertise, they’ll leak. Atwood learned about that the hard way. Influenced by John Denver Disillusioned by the Kent State massacre, Atwood dropped out of college in Vermont and moved to Colorado. Someone asked the blonde beauty to organize a reception for a newly famous John Denver, also the child of a stern and itinerant military officer. Denver later built a “far-out” solar-powered home in Aspen and established a sustainable-living foundation. 7/11 chronogram home 23 845.679.2115 hhoust.com open JULY SA bring inVINGS this ad 7 days to save $ 5 Hardware ◊ Plumbing ◊ Electricala gallon MSR Hand & Power Tools ◊ Automotive P $48.99 Paint ◊ Lawn&Garden ◊ Housewares Outdoor Living ◊ Sporting Goods Seasonal Products ◊ Toys Holiday Lighting & Décor 845.679.2115 hhoust.com open 7 days 845.679.2115 hhoust.com open 7 days Hardware ◊ Plumbing ◊ Electrical Hardware ◊ Plumbing ◊ Electrical Hand & Power Tools ◊ Automotive Hand & Power Tools ◊ Automotive Paint ◊ Lawn&Garden ◊ Housewares Paint ◊ Lawn&Garden ◊ Housewares ◊ Sporting Outdoor Outdoor Living ◊ Living Sporting Goods Goods Seasonal Products Seasonal Products ◊ Toys ◊ Toys Holiday Lighting Holiday Lighting & Décor & Décor 845.679.2115 hhoust.com open 7 days Hardware ◊ Plumbing ◊ Electrical Hand & Power Tools ◊ Automotive Paint ◊ Lawn&Garden ◊ Housewares Outdoor Living ◊ Sporting Goods Seasonal Products ◊ Toys Holiday Lighting & Décor “John Denver was a really big influence on me,” says Atwood. “People thought we were kind of wacko in the seventies, but now they’ve come around.” Atwood has always eaten organic and lived fairly simply. As a songwriter, her music carries a message of environmental and social justice. Critically acclaimed as a singer and guitarist, Atwood recently made two albums and sometimes performs at the Bearsville Theater. She describes her style as “Northern Country.” But Atwood’s music-royalty income—some of which comes from television—isn’t quite enough to live on. To make ends meet, she works parttime in a law office. She’s also an expert at cleaning up all sorts of small business administration and bookkeeping issues. That’s why she plans to advise people in this area about building monolithic domes. Rising fuel costs should spur demand. Atwood’s working on a deal to provide general contracting services to would-be dome builders with a real estate developer in Saugerties, whom she declines to name. It’s in the development stage. Dome Construction Basics The premier company behind homes like Atwood’s is Texas-based Monolithic. Its educational arm, the Monolithic Dome Institute, was founded by David South, the dome’s co-inventor. Since 1970, Monolithic’s built domes all over the world and in all climates, but most are in the hot and arid Southwest. Large domes make great community buildings like churches, arenas, and gymnasiums—potential gathering places for refuge in a natural disaster. Monolithic dome construction begins with digging and pouring a ring-like foundation. That outline gets attached to an airtight, heavy-duty airform— something like a custom-made balloon. Monolithic makes the airforms and provides other support, but as a rule the homeowner must hire the contractors. Next the airform is inflated, creating a gigantic bubble. That’s coated from inside with insulating foam. Steel bars are inserted vertically into the foundation ring. A thick layer of concrete solidifies everything.The exterior is finished with stucco. If nothing goes wrong, the various layers that make a monolithic dome go up pretty quickly. Work began on Atwood’s around Labor Day, 2003.When winter hit, it was too cold to spray and cure the 160 tons of concrete the dome required. During this angst-filled winter, Atwood lived in a trailer nearby. At the construction site, Atwood had to keep the electricity on even during snowstorms, to maintain the airform’s inflation. She bought a generator. If snow had built up on the 23-foot-high roof, the intermediary structure might have collapsed. “Start early!” she advises. A Little Crazy is Helpful Building a monolithic dome in the Northeast proved a much greater challenge and financial drain than Atwood anticipated. While the singer was able to self-finance the construction, mistakes sent the project wildly over budget. It’s still not quite finished. Atwood had to take a break. Keeping things green, inside she’s used wood from trees cleared from her own property, milled by a friendly neighbor. But much trim work—largely ornamental but required for that flawless decor look—remains undone. Banks don’t want to finance monolithic domes because it’s hard to establish appraisal comparables, says Atwood. In mortgage lending, a comparable is a house of similar size and age, in a 20-mile radius of the property to be financed, that has sold in the last 24 months. Atwood hopes greater awareness of monolithic domes’ many positive attributes will make lenders more willing in the future. If a bit rough around the edges, Atwood’s house is still very beautiful. Situated in a field, surrounded by pristine state-owned woodlands, the fantasy contemporary architecture presents a visually intriguing juxtaposition. She loves viewing the stream from her living room couch. “I originally named it “Mountain Mist,” but once it was finished, it needed something otherworldly,” says Atwood. “Some have called it “The Grand Peanut.’” Most people who inquire about Atwood’s unique home are quite polite. She directs the seriously curious to her website,, for more information. During building, Atwood says she continually questioned her sanity. But now she never wants to live in a “stick-built” house ever again. She’s since heard much worse stories of dome construction than her own. “As my dear departed father was so fond of saying, ‘You don’t have to be crazy—but it helps!’” 24 home ChronograM 7/11 INVEST That’s what we did in our own backyard. More value, a treasure trove of memories. A beautiful, well designed and constructed pool is an investment in the good life. For over 50 years, NeJame has produced some of the Hudson Valley’s finest pools. From design to water balance, NeJame does it all - right from the start. 800-724-2675 • nejamepools.com 7/11 chronogram home 25 DC Studios a Stained Glass LLC Fully Restored 1891 Residential Window - Section Detail Beautiful spaces. Open-air places. Enjoy your life outdoors. Our award-winning team designs unique and organic outdoor rooms and livable landscapes, inspired by you. Custom Work & Restoration gardengateny.com The Hudson Valleyâ&#x20AC;&#x2122;s best source for personalized, high quality stained glass services. Send a photo of your repair project for a free estimate, or call to schedule a consultation at the Rhinebeck studio. 845.876.5198 21 Winston Dr, Rhinebeck, NY 845-876-3200 email: dcstudios@msn.com Our lampshades and panels are also available for purchase at A COLLECTORâ&#x20AC;&#x2122;S EYE, 511 Warren Street, Hudson, NY 12534 New England Wine Cellars Foxx pools by Charles Burger From ConCept to Completion...... We handle all aspects of your project to create the outdoor living space you desire. offering you our 38 years of experience in the Hudson Valley, with us building one pool at a time providing you the personal service deserved. patios Fine Crafted Wine Cellars Artistic Design Expert Installation Call now. Your dream cellar is more attainable than you think. 800.863.4851 26 home ChronograM 7/11 FenCing pools service maintenance liner replacements Full retail Division parts Chemicals accessories Computerized Water testing 845-691-6795 3730 rte. 9W Highland nY The Garden Behind a nondescript outbuilding lay this spiral garden, arresting in its simplicity and playfulness, at the home of Ann Krupp Bryan in Saugerties. Call of the Cultivated Open Garden Days in the Hudson Valley Text and Photos by Michelle Sutton The Graciousness of Gardeners Ann Krupp Bryan Garden The Open Days program, begun in 1995 by the Garden Conservancy, is a gem.You get to visit some of the most creative and ambitious gardens in the area, with the proceeds going to support the Conservancy, whose mission is “preserving America’s exceptional gardens for the education and enjoyment of the public.” Luckily for us Hudson Valleyites, the East Coast headquarters for the Garden Conservancy is in Cold Spring, as is the property of the organization’s founder, Francis Cabot. The site is now a stunningly creative public garden, Stone Crop Gardens. The Cold Spring roots of the Conservancy means that many of the most longstanding Open Days gardens are in the Hudson Valley or nearby towns in Massachusetts, Connecticut, and other Northeast states (although there are participating gardens around the country, including a big California contingent). Each year, 50 percent of the gardens are new to the tour, yet there are also many repeat hosts, resulting in a touring guidebook that is getting delightfully chunky. In 2011, Dutchess County posted eight gardens for Open Days, half of which can still be toured in July and August. Ulster County has seven, two of which can be seen in September; Putnam County has three, two of which are open in October; and there are seven Open Days gardens in Columbia County, two yet to appear on the tour— one in July, one in August. In Berkshire County, Massachusetts, there are seven gardens open on Saturday, July 31, in Great Barrington, Stockbridge, or Williamstown. In Litchfield County, Connecticut you can see more than a dozen Open Gardens, including five in July and one in September. In Fairfield County, Connecticut, there are 10 open gardens, including two that you can see in July. When you become a member of the Garden Conservancy for as little as $50, you receive a touring guidebook and can buy tickets for just $2.50 each (half the price of nonmember tickets). My husband and I feel it’s the best investment in our continuing education (and horticultural delight) we have ever made. Open Days garden tours go through the fall. Ann Krupp Bryan and her husband renovated a Catholic church in rural Saugerties to make their dream home, a fantastic backdrop for Ann’s perennial borders. Ann is self-taught but the degree of horticulturist should be conferred on her; the gardens are a marvelous celebration of contrasts in sun and shade foliage plants, with flowers used as strategic accents. In addition to gardening for more than 20 years on the site, she has built numerous handsome dry-stone walls. Ann Krupp Bryan’s home in a renovated church in saugerties. 7/11 chronogram home 27 Ghent Wood Products iNc From its source to the finished project, we can accomodate virtually all your lumber needs. All materials are produced in the Tri-State Area. Cabinetry by Romber Works 1262 Rte. 66, Ghent, NY 518.828.5684 Country Home The perfect driveway for your The look and feel of crushed stone, without the upkeep. Call today for a complimentary consultation. Residential & Commercial DRIvEwAYS | PARkINg LOTS | TENNIS COURTS | PRIvATE ROADS Classic Asphalt Paving • Decorative Finish Options 518.479.1400 / 518.794.0490 ATTENTION TO DETAIL • SUPERIOR QUALITY • CRAFTSMANSHIP • CUSTOMER CARE • FUNCTION 28 home ChronograM 7/11 the golden dawn redwood grove in the bevacqua-king garden Then we went outdoors and enjoyed the unconventional garden tour Dun set updifferent colors of yarn that visitors could follow from one garden space to the next in a series of minitours. According to her Open Days description, Dun says, “My first priority as a gardener is to create a good place to be, a place that feels inviting, a playful and magical park. It’s at all times a workshop, a long dialogue with Place, rather than the design-and-install approach.” the bevacqua-king garden in hudson We are still vibrating from our visit to the two-acre Hudson garden of designer Peter Bevacqua and his partner, Stephen King. Bevacqua says of his gardens, “I hope to illustrate the importance of a strong underlying structure; a focus on form and texture; and the concept of laying out a garden formally, then informally planting it.” Bevacqua encourages vines to use shrubs as support, a technique not so often seen in American gardens. Here, a clematis (Clematis) finds its way up a purple smokebush (Cotinus). a clematis vine climbs up a purple smokebush in the bevacqua-king garden My husband enters the magical golden dawn redwood (Metasequoia glyptostroboides Gold Rush) grove planted by Bevacqua. Dawn redwoods are very adaptable to a variety of stresses yet fast growing and sturdy. They are related to West Coast redwoods but don’t get nearly as big. They are deciduous conifers, meaning they lose their leaves in winter and bear little cones. This sofa garden feature is but a glimpse into the creative mind of Lena Dun, proprietor of Moresca Clothing and Costume in Ulster Park. Before we toured her theatrical gardens, Thunder Lane, we got to see her warehouse of Renaissance-period clothing made on-site: dresses, capes, bodices, and more made with beautiful textiles and workmanship. Perusing those racks was a visual feast. the Sofa Garden by Lena Dun, proprietor of moresca clothing & costume Woodland fairy in Lena Dun’s Thunder Lane Garden. Owing to the graciousness and creativity of the garden hosts, my husband and I frequently feel like kids on these tours, exploring new worlds. To be honest, we don’t love every garden. But when we come upon kindred spirits and get to hang out with them among their plants and soulful, expressive gardens—that just doesn’t get any better. RESOURCES Garden Conservancy Peter Bevacqua Garden Design Stonecrop Gardens Moresca Clothing & Costume (And Gardens!) 7/11 chronogram home 29 image provided The Craft Samarotto Design Group A fenced garden in Pound Ridge designed by Gina Samarotto. The rough-hewn cedar is organized with formal lines to marry the rustic surroundings with a groomed aesthetic. P Futon The Store Open Mon, Tues & Sat 10-6 Wed, Thurs & Fri 10-9 Sun 12-5 Route 9, poughkeepsie (next to Route 9 Lamp & Light) (845) 297-1933 1-800-31 FUTON Deer Overrunning You? Deer Defeat to the Rescue! All Natural Deer, Rabbit and Woodchuck Repellent • safe for people and pets • dries odorless in minutes • long lasting • year round protection • no need to reapply after rain To see how effective Deer Defeat is visit: 518-755-1086 mail@deerdefeat.com 30 home ChronograM 7/11 erhaps more now than at any time in the past several decades, property holds a singularly cherished premium to its owners. The often confounding story surrounding the past 10 years of homeownership in the Hudson Valley—the exodus from NewYork City following 9/11, the meltdown of the housing market and it delicately hopeful journey back to solidity—has only enhanced the fierce devotion we have to our space.Yet for all of us devotees— indeed, maybe most dauntingly for those of us who have recently traded our apartment keys for our own plot of heaven—there is one essential question: What, exactly, should we actually do with all this wonderful space? Landscape designer Gina Samarotto offers sage advice, though not nearly as simple as it sounds. “You know what you have to do?” says Samarotto with a knowing smile, “you have to live in the space.” The roots of Samarotto’s joy of her craft come from a journey built first of necessity, then of love. Twenty years ago she found herself faced with the same conundrum, having moved from her Yonkers condominium to her first home in Orange County. Though it was scarcely half an acre, the prospect of making the land her own was intimidating. “To me, it was like Strawberry Fields in Central Park,” Samarotto recalls. “What am I going to with all of this? It forced me to start educating myself.” The then-marketing designer first became immersed in her local garden club; and, discovering both an inherent kinship with the outdoors and a burgeoning passion for the work, soon after enrolled in Cornell University’s Master Gardener program. She left her 15-year marketing career behind, and began judging gardening shows, consulting, and writing and speaking about landscape design in various newspapers and radio shows. Immediately apparent, five minutes after meeting Gina Samarotto, is what may be the most engaging element of her artisanship: She loves your space as much as you do, and her enthusiasm about unlocking it’s potential is infectious. Though she honed her skills as the primary designer with renowned Wilton, Connecticut design firm Glen Gate, creating large scale, multimillion dollar projects, no property is too small to elicit Samarotto’s trademark ardor. “I’ve learned something along the way,” Samarotto asserts, “that money can’t buy you style, and it can’t buy you taste.” Now operating her own Samarotto Design Group, based in Poughkeepsie, the designer maintains that her favorite work is to guide more modest homeowners in inventing a space that is both captivating and functional, as well as a reflection of that particular owners individuality. Equally as valuable as her extensive knowledge of root and branch, as well as interior design techniques—Samarotto is a member in good standing of both the American Society of Interior Designers and Landscape Architects—is Samarotto’s commitment to knowing her clients, to listening and learning about their aesthetic. Most importantly in any home, says Samarotto, is purpose in design. “There has got to be a reason to be somewhere,” she exclaims with conviction. “You’re paying to maintain a property—it’s a tragedy to buy it and not to use it, not to love it.” —Gregory Schoenfeld Samarotto Design Group (800) 797-0598; Rhinebeck • Salt POint • huDSOn hOPeWell • tanneRSville ReD hOOk • high FallS • hyDe PaRk 845.876.WOOD Scan this QR code with your phone for more information. To get a QR code reader, check your app store or try 7/11 chronogram home 31 full design services, in-house workroom solid wood studio Custom furniture using sustainably-sourced Hudson Valley hardwoods. Natural edge tables, benches, headboards, countertops. Van Maassen. Interiors. 3304 Route 343, Suite 1 Amenia, New York 12501 â&#x20AC;˘ â&#x20AC;˘ P.O. Box 57 845.343.8400 Discover Our Locally Handcrafted Kitchens 2368 Rt. 66, Chatham, NY 12037 518.392.8400 32 home ChronograM 7/11 The Item Stunning homes deserve stunning landscapes. Recycled hard maple two-person bench with cedar pads and antique tools welded to armrest pegs by Jesse Reimer of Stone Back Benches in Saugerties. Sly Stones Using tools and scrap metal compiled from the Hudson Valley, artist Jesse Reimer makes sculptures, stone-back and wooden-back benches, tables, and steel gates. Through a combination of woodwork, metalwork, and welding, Reimer creates comfortable and intricate pieces like the stone-back bench made of sugar maple and creek stone. Reimer’s benches and tables can be placed inside the home, but because of the weight, they are more practical as patio furniture or by swimming pools. Each product ranges in price according to size and intricacy; sculptures, $150-$5,000; recycled gates, $1,500-$15,000; one-ofa-kind projects like creating a bench from trees removed by specialists Arbor Barber, $350-$15,000. 1795 Route 212, Saugerties. stunning landscape design. impeccable installation. informaton@samarotodesigns.com (800) 797-0598 Let There Be Shade(s) Vintage is on the rise in one of its newest forms—lampshades. Longtime collector Susan Schneider brings a new light to your home with Shandell’s vintage wallpaper lampshades ranging in shape and size from clip-on to large shades. These custom-made covers ($55-$250) are created from an array of 5,000 rolls of hand-picked wallpaper from the 1890s to the 1960s. Schneider offers a DIY Original Cloth Cords Swag and Pendant Light Kit for $39 to make your one-of-a-kind light fixtures. Shandell’s Lampshades also has night lights, matchboxes, holiday ornaments, and tissue box covers. Or, bring in any of your own items and Schneider will transform it into a lamp. 5916 North Elm Avenue, Millerton. Perfectly Restored 1701 Stone Home w/ Pool & Guest House Live graciously, entertain guests, swim in the lavender-lined pool. Well-loved and cared for colonial with integrity and updated systems is centrally located in Ulster County and less than 2 hrs from NYC. Enjoy the beautifully landscaped private property on 6+ acres complete with IG pool and newly-built separate guest quarters/studio with a 2-car garage. $725,000, MLS/ID 20112234 Patty Curry Licensed Real Estate Salesperson Westwood Metes & Bounds Realty, LTD 845.399.6230 patty@westwoodrealty.com Whether you want to buy or sell let me help you. Give me a call today and we’ll make it happen. Paint the Town Green This family-owned business offers environmentally safe, low-VOC, mildewfree paints as well as wall coverings, home fashions, and paint supplies. With a wide range of color options, Sun Wallpaper & Paint is an exclusive supplier of international designers like Ralph Lauren, California Paint, and Farrow & Ball. Sun Wallpaper & Paint is the only story within 100 miles that carries Stark Company paint, which provides no-odor, no-VOC paint. The Hunter Douglas Window Treatments also have highly energy-efficient Honeycomb Shades and Hunter Douglas NewStyle hybrid shutters, all excellent choices for green-loving lifestyles. The store also has rebate programs until September 12 on different window treatments. The 91-year-old store helps customers with inspiration for creativity inside and outside their homes, even providing in-home design consultations and services.Two locations: 47 Overocker Road, Poughkeepsie; and 1004 Main Street, Fishkill. —Zan Strumfeld Let us Light up your life Fed-On Lights Antiques Two Floors of: 19th & 20th Century Lighting Footed Bathtubs Architectural Elements Marble Top Sinks Furniture Over 100 Medicine Cabinets Many Towel Bars & Soap Dishes Lamp Repair and Rewiring : Friday - Monday 12pm - 5:30pm Specializing in : 845-246-8444 : 518-678-3581 Lighting Fixtures 34 Market Street, Saugerties, NY 7/11 chronogram home 33 Green Building Event Green By Nature – Sustainable Site Design Strategies for protecting and restoring the natural sites that support our built environments. Presented by Barbara Z. Restaino, RLA, LEED AP BD+C July 12th 6-8pm Orange County Association of Realtors, Goshen July 19 6-8pm Cathryn’s Tuscan Grill, Cold Spring July 20th 6-8pm Skytop Steakhouse, Kingston Cost: At the door: $20 for nonmembers, $15 for members and students In advance: $15 for nonmembers, $10 for members. For Event Information: New York Upstate Chapter Hudson Valley Branch Sponsored by: Kingston’s Best Business Address OFFICE SUITES 300 sq. ft. to 1200 sq. ft. RETAIL STORES 600 sq. ft. to 2300 sq. ft. Contact Bill (owner/manager) for availability: (845) 399-1212 or email: 3991212@gmail.com 275 Fair Street, Kingston, NY CO L L A B O RAT I V E SPAC ES F OR WOR K + C O M M UN ITY BE+COLLABORATIVE Photo by Rob Penner JOIN THE HIVE. ENGAGE. 4 levels of membership from $20 /month BEACON 291 Main St BEAHIVEBZZZ.COM BZZZ@BEAHIVEBZZZ.COM KINGSTON 314 Wall St R E NT TH E H IV E F OR EV ENTS + W OR KSHOPS + M EETIN GS 34 home ChronograM 7/11 . Come visit and see what keeps us going and growing .... You're gonna love this place ! FOR OVER 30 YEARS Supplying local gardeners with locally grown plants. VEGETABLES YEARS AND Contemporary and Rustic Home Furnishings, Gifts and Furniture 31 YEARS HERBS In the Courtyard at 43 East Market Street Rhinebeck, NY (845)876-2625 OF AN EXTRAORDINARY VARIETY OF An Emporium for the Soul featuring vintage collectibles, work of artisans, culinary treats from France, and of course, HONEY! LOCAL GROWERS B umble & H ive ℡ 845 • 876 • 2953 Northern Dutchess Botanical Gardens 389 Salisbury Turnpike, Rhinebeck, 845-876-2953 One of Dutchess County’s best garden resources! , TENDER LAND HOME 64 Main Street, Phoenicia, NY 845-688-7213 open 10 to 6, closed Wednesday ANNUALS, PERENNIALS, WILDFLOWERS, For Directions, Production Lists and a peek at what you’re missing visit : Packed to the rafters with fun, practical, & hard-to-find merchandise The most exclusive of home products. Minnetonka Moccasins Homemade Fudge Local Books & Maps Jewelry Old-Fashioned Candies Old Time Games Souviners & So Much More. Fine Authentic Persian Rugs Contemporary American Craft Distinct Lighting Come visit us for a unique shopping experience 2 5 5 - 6 6 3 4 84 Main Street, Phoenicia, NY (845) 688-5851 8 4 5 Use code CHRONO online to receive 10% discount Thinking ouTside The Boxwood 36 Main Street, Warwick, NY (845) 988-1888 7/11 chronogram home 35 ROSENDALE Enchanted Playground by Anne Pyburn photos by David Morris Cunningham There’s a deceptively sleepy feeling to Rosendale. natalie keyssar On a weekday morning, there might be only a couple of people stirring around Main Street at any given moment, more action on the porch of the Crossroads Deli in Cottekill out in and down around Stewarts than in the center of town. Then suddenly, it’s playtime—show time, dinner time, music time, or, best of all, festival time—and Main Street rises like the Delaware and Hudson Canal where it used to flood at the center of town. Folks from the hamlets and the hills beyond pour in, locals pop out to inhabit comfy porches or are pulled into the current of the street. Any given weekend, the action might be centered around the theater, the café, the community center, the Red Brick Tavern, or the Bywater Bistro or all of the above and more, but all of a sudden the town is visibly pulsating with sweet, quirky life. natalie keyssar •A Dreamy Town• When the family that had run the Rosendale Theatre for three generations needed to move on after keeping a night at the movies far more affordable and intelligent in this pocket-size town than it is at your nearest multiplex, the community didn’t whine and wring its collective hands. Not this town. They organized. They fund-raised. They reached out to friends far and near and great and small, bombarded the Pepsi Refresh website with determined voters, and bought themselves their theater. Now The Rosendale Theatre Collective, it makes a splendid venue for area crews like Starling Productions, who recently had a smash hit there with “Too Much Information.” Such fun was had with “TMI,” in fact, that a Story Slam based on the concept is coming to Market Market this month. The gray gold of Rosendale’s Natural Cement has given way to a rainbow of realized dreams, the 18 bars downtown to a wider variety of ways to have fun, but some things haven’t changed and probably won’t. Rosendale’s still welcoming vacationers—the venerable Astoria Hotel is being reborn as a B&B, christened The 1850 House. It’s still a great place to work hard and play hard, with a natural beauty that outshines artifice, far more than skin deep. And like the gray gold, the boundless creativity and sense of sheer fun that is Rosendale could well be a key ingredient in the foundations of tomorrow’s better world. w w w. rosendale t h eat re .or g w w w.t h e 1 8 5 0 h o u se . c om •ROSENDALE NATURAL CEMENT• It was gray gold, that natural cement. It rocked the building world and made possible what had been impossible before, making things better and stronger—things like the Brooklyn Bridge, the Statue of Liberty, and the United States Capitol. The little town on the canal was a busy and prosperous place and curiously blessed. In 1899, the mine collapsed—while every man on the job was outside having lunch. People worked hard and played hard and didn’t bother much about appearances. Even the resorts and hotels that lured the city folks were good, solid places to swim and fish in the daytime, eat and dance at night, breathe good air, and make friends. Then came Portland cement, and the Rosendale variety lost the mass market. The last mine closed in 1970, leaving a honeycomb of caves under the surface and a triple handful of bars on Main Street. The town took a deep breath and wondered what to do next, and by the end of the decade, a street festival was born. 36 rosendale ChronograM 7/11 market market liz cook, jude roberts, jeff mccoy •Do It Your Way• rosendale cafe karen schaefer favata’s table rock tours & bicycles christian favata The Festival Town does those moments exceptionally well, with something for everyone. If you want a solid family dinner and to browse a few nifty shops, can do. Gourmet vegetarian and jazz? Check. Avantgarde film? Maybe, if there’s no live performance on the stage that night. Sipping wine in a creekside garden into the wee hours? But of course. The whole point of Rosendale is doing it your way. Doing it their way, Dietrich and Gayle Werner moved into the estate of Andrew J. Snyder’s—the last of the cement barons—researching, restoring the property into a museum and event space in 1991. The estate is located in the Rosendale National Cement Historic District and offers tours that include the Widow Jane Mine, cement kilns, and the D&H Canal. The museum is currently presenting “Atomic Rosendale: From Mushrooms to Mushroom Clouds,” a worthy complement to the subterranean creative explosions that have rocked the Widow Jane Mine over the years. Japanese drummers, rock climbers, hydrogeologists, poets, and mad revelers of all sorts love to inhabit the Widow Jane. Almost anything can be an event space in Rosendale, and usually is. Want to throw a shindig in a restored 1896 chapel? The Belltower’s all yours. From the geothermal community center—where the parking lot fills to overflowing for everything from memorials to benefit jam sessions to contentious hearings to swim meets and a farmers’ market beckons each Sunday, June through October—on to Market Market, where you can order a bahn mi sandwich and a beer while local favorites like Big Sister rock out—to the Rosendale Café and its steady stream of national acts like Erin McKeown and Fred Eaglesmith, the rebranding of Rosendale as the Festival Town was as natural as the cement beneath its surface. 7/11 ChronograM rosendale 37 ©2011 FranCe Menk CR EEKSIDE acupuncture and natural medicine Stephanie elliS, l.ac. 10 years in rosendale—new name and new location! Stop in during the rosendale Street Festival for coupons and more. 371 Main Street roSendale, nY (behind bill brookS’ barber Shop) (845) 546-5358 I first picked up Chronogram years ago when I used to just visit the area. The content of the magazine contributed greatly to my family moving up here. I am always inspired by the articles and the coverage of arts and culture in the Hudson Valley. I read it to keep my finger on the pulse of what is happening. I also love the covers and the design of the magazine. Very moving! community pages: rosendale Carrie Wykoff Founder, Events That Matter Secretary, The Rosendale Theatre and The Rosendale Street Festival Rosendale Get your message across: Join the Chronogram community. Call 845.334.8600 Online Marketing Coaching & Classes: Google, Facebook, Twitter and more... Doug Motel, Author, Speaker & Marketing Wiz 845.363.4728 the carpet store July 9 Rosendale Radio - Live Theater with music by Soul Purpose $20 | 8 pm July 10 Dance FiLm SunDayS: Oklahoma with a special performance $10/$6 students | 2pm July 14 chiLDRen’S PROgRamming: megamind with modifications for sensory issues $3 | 10 am July 15 FunDRaiSeR! moonwalk One with director Theo Kameke $10 | 4 pm July 15 music Videos and Voices of the Valley $10 | 10 pm July 17 LiVe FamiLy muSic! Recess monkey $6 | 11 am July 23 &24 hudson Valley Short Flix Fest during the Street Festival July 31 chiLDRen’S PROgRamming: megamind $3 | 4 pm Plus nightly films! Closed most Tuesdays. Please make a donation to the RTC today! We need your help now to make our final payment for the purchase of the theater. Visit for details. 408 Main St, RoSendale, nY 12472 | 845-658-8989 and warehouse • Competitive Pricing + free Estimates • Complete Sales & Installation • Carpet • Vinyl • Wood Floors 845-658-8338 Open Monday-Friday 10-6 Saturday 10-5 Corner of Route 213 & 32, Rosendale, NY largest stocking dealer of Carpet, Vinyl, Laminate & Hardwood in the area! Auto Life Boat Serving the Hudson Valley Since 1979 Monday - Friday 8:30 - 5:30 Saturday By Appt. Home Business Classic Car Special Event Motorcycle Snowmobile ATV 38 rosendale ChronograM 7/11 John Liggan Insurance Agency P.O. Box 485 ~ 2039 Route 32 Rosendale, NY 12472 Phone: (845) 658-8348 Fax: (845) 658-8974 alternative bakery Sarah schneck bill brooks’ barber shop bill brooks rosendale acupuncture and apothecary katie finley bywater bistro sam ullman and rueben ullman •Grin and Buy It• twisted foods jeanne rakowski But don’t make the mistake of waiting for an official festival to explore. Dinner and a movie, the Rosendale way, is something to be savored any time. On the southeast end of town, Toad Holly is a bar/restaurant serving eclectic American fare. The Postage Inn offers classic Continental American and pub fare. On Main Street, the Red Brick Tavern is hospitable Old Rosendale, comfy as your favorite jeans, and the Bywater Bistro beckons you with garden seating and upscale fusion dishes like herbed tuna steak with tapenade. There’s great food to take home, too—or snack on before or after a shopping expedition. Twisted Foods offers handmade pretzels with ambrosial toppings (try the homemade cream cheese). Any cheese fan should, of course, experience the international selection at the Big Cheese—and while you’re there, browse the thrift shop. Rosendale’s shops are creative art in their own way. The colorful façade of Vision of Tibet beckons you into a sphere of handcrafted beauty from the other side of the world. Next door, Favata’s Table Rock Tours and Bicycles combines an old-fashioned level of service with the absolute latest in pedal sports gear and guidance. Roos Arts showcases fresh and thought provoking contemporary art. In Tillson, Judy Go Vintage is a bonanza for lovers of retro-boho clothes and furnishings. Rosendale’s also a great place to find certain basics: carpet and auto parts, for example, sold by people who love their customers and know their products. In Rosendale, even the Dollar Store has a community feel. rosendale wine & spirits bobby shen and mary lee 7/11 ChronograM rosendale 39 PART OF THE VIBRANT COMMUNITY OF ROSENDALE The Williams Lake Project is creating a resort residential community focused on healthy living, outdoor recreation and sustainability. Artist’s rendering of proposed Kiln Wall Cafe, Rail Trail and Outdoor Activity Center In 2011 we proudly sponsor or support: • Ongoing, on-site research of the White Nose Syndrome affecting bats community pages: rosendale • The Walkill Valley Land Trust’s efforts to repair the Rosendale trestle • The Williams Lake Mountain Bike Classic with Table Rock Bicycles • The Family Stage at the Rosendale Street Festival • and many other local organizations and events For more information please visit or contact Tim Allred, Project Manager at tallred@hrvresorts.info •Best Fests• The Rosendale Street Festival (July 23-34) has been re-reinvented like a master chef’s soup, with mass quantities of live music and cool people being the basic broth. You never know when someone will invent a new variation; the year after Katrina saw a Mardi Gras, and 2010 a Zombie Crawl. The Pickle Fest (November 20) is a Rosendale classic that draws thousands from near and far. Then there are Frozendale (December), the Chili Bowl Fiesta (February), the Earthfest and Energy Expo (May), the celebrations of ancient holy days at the Beltane Festival (May)—in fact, there are more than a dozen festivals, and counting, celebrated each year in town. In between festivals, studies of all sorts are a popular pastime. The Women’s Studio Workshop, almost 40 years young and the largest publisher of hand-printed artists’ books in the United States, offers papermaking, printmaking, book arts, photography, and ceramics in summer intensives and private instruction year round. The Canaltown Alley Arts and Learning Center teaches voice, music, theater and healing arts. The folks at the Center for Symbolic Studies delve deep into the work of Joseph Campbell and shamanic wisdom. There’s also a trapeze school on the grounds. This being Rosendale, the education tends to have a festive edge and the festivities are often educational. ADVERTISer RESOURCES Acupuncture & Natural Medicine 446 The 1850 House Hudson River Valley Resorts Judy Go Vintage Pretzel Rolls & More..... A fun place to have Breakfast/Brunch/Lunch/Snack.... Rumor has it that we have the Best Chicken Salad..... Visit us on Facebook All homemade and delicious Open Thurs-Mon 6am-6pm & Tues 8am-4pm • 845.658.9121 • 446 Main St, Rosendale Liggans Insurance The Carpet Store Rosendale Chamber of Commerce Rosendale Street Festival Rosendale Theatre Collective Vision of TibeT Rosendale Wine and Spirits (845) 658-7244 Site Optimized Starling Productions featuring affordable, fairly traded, handcrafted items from the Himalayas. astarlingproduction@gmail.com Looking for beautiful, unique, yet reasonably priced gifts? We specialize in fairly-traded, handcrafted, and yes, affordable, items from the Himalayas. Come browse our vast selection of fine & ethnic jewelry, home decor, textiles, adult & kids clothing, including newly arrived summer dresses and hemp hats, ritual items, meditation supplies, books on Buddhism & spirituality, antiques, photos of Tibet, and much, much more. Toad Holly The Big Cheese (845) 658-7175 Twisted Foods (845) 658-9121 Vision of Tibet 378 Main St., Rosendale, NY (845) 658-3838 40 rosendale ChronograM 7/11 1 STREET2 DAYS Paninis to Party Platters Mediterranian Plates Snacks for Movies! Family Stage Drum Circle Vendors Exceptional Cheeses from Around the World at Fantastic Prices. Serving Breakfast, Lunch & Light Dinner. ©2011 France Menk Chronogram’s advertisers are local businesses who stand behind their products and we wanted to be among that element. We picked the magazine for its distribution and high quality. Its readers look for good service and pleasurable dining experiences; both of which we offer. We distribute Chronogram and it flies out of here! It’s a real advocate for the Hudson Valley. Jeanne Rakowski and Gianna Montanez Co-Owners, Twisted Foods, Rosendale Rosendale Wine and Spirits Rt. 32, Rosendale 658-7244 15% Discount on Cases Wine Tastings Hours: Tue-Sat 10 am - 9 pm Sun 12 pm - 7 pm Get your message across: Join the chronogram community. Call 845.334.8600 ROSENDALE, NY TH E C OMFORT O F A N I N N & H OSPITALITY O F A P U B The 1850 House Judy Go VintaGe Fashion Furniture art LiGhtinG GiFts Vintage Clothing Retro Upscale Treasures Mid Modern Furniture Thurs -Sat 11 - 6, Sun - Mon 12 - 4 judyvintage@gmail.com W W W . T H E 18 50 H OU SE . C O M 848 rte 32, tiLLson 7/11 ChronograM rosendale 41 community pages: rosendale DONATION DRIVEN r ROSENDALE, NY THE DORSKY DORSKY THE SAMUEL DORSKY MUSEUM OF ART STATE UNIVERSITY OF NEW YORK AT NEW PALTZ SAMUEL DORSKY MUSEUM OF ART STATE UNIVERSITY OF NEW YORK AT NEW PALTZ Hudson Valley Artists 2011: Hudson ValleyIN Artists 2011: EXERCISES EXERCISES IN BEAUTY UNNECESSARY UNNECESSARY BEAUTY June 23 – November 13, 2011 June 23 – November 13, 2011 Charles Geiger, Out of Sight, 2010, courtesy the artist Charles Geiger, Out of Sight, 2010, courtesy the artist SAMUEL DORSKY MUSEUM OF ART STATE UNIVERSITY OF NEW YORK AT NEW PALTZ SAMUEL DORSKY MUSEUM OF ART galleries & museums W W W.N EOF W PA LTZ.E D UAT/ MNEW U S PALTZ EUM STATE UNIVERSITY NEW YORK Open Wed. – Sun. 11 am – 5 pm | 845/257-3844 W W W.N E W PA LTZ.E D U / M U S E U M Open Wed. – Sun. 11 am – 5 pm | 845/257-3844 42 galleries & museums ChronograM 7/11 arts & culture july 2011 meagan miller stars in the bard summerscape production of richard strauss’s opera “die liebe der danae” at the fisher center, todd norwood july 9-august 7. 7/11 ChronograM 43 galleries & museums Hilary Ferris White ALBERT SHAHINIAN FINE ART UPSTAIRS GALLERIES 22 EAST MARKET STREET, RHINEBECK 505-6040. “Christie Scheele: Fullness of Time: Celebrating a Twelve-Year Gallery Partnership.” July 2-September 11. Opening Saturday, July 2, 8pm-10pm. THE ART AND ZEN GALLERY 702 FREEDOM PLAINS ROAD, POUGHKEEPSIE 473-3334. “Oil Paintings by Rose Stock.” July 1-August 31. Opening Saturday, July 16, 4pm-7pm. ARTE ARTIGIANATO RESTAURO, INC. 27 WEST STRAND STREET, KINGSTON 338-1688. “Ethereal Spheres.” Oil and water color paintings by Julie Hedrick. Through July 30. ASK ARTS CENTER 97 BROADWAY, KINGSTON 338-0331. “Oasis II.” Paintings by Deirdre Leber. July 2-30. Opening Saturday, July 2, 5pm-8pm. BAU 161 MAIN STREET, BEACON 440-7584. “Tom Holmes: Frozen in Frost.” Works in stone, metal, wood, light, ice, and water. July 9-August 7. Opening Saturday, July 9, 6pm-9pm. BRC GALLERY BEANRUNNER CAFE, PEEKSKILL (914) 954-5948. “Green in Vietnam.” Paintings and pastels by Sheilah Rechtschaffer. Through July 24. BRIK 473 MAIN STREET, CATSKILL (518) 943-0145. “7 New York Painters.” Through July 17. BRODY’S BEST 159 WEST MAIN SREET, GOSHEN emacavery@gmail.com. “Chakra Garden.” Photography exhibition by Eileen MacAvery Kane. Through August 1. CARRIE HADDAD GALLERY 318 WARREN STREET, HUDSON (518) 828-1915. “Early Summer Exhibit.” Featuring abstract landscape paintings by Nancy Rutter, fire drawings by Paul Chojnowski, and small abstract paintings by Willie Marlowe. Through July 10. “Interior/Exterior.” Stephen Walling, Patty Neal, Scott Foster and Joseph Maresca. July 14-August 14. Opening Saturday, July 16, 6pm-8pm. CCS BARD HESSEL MUSEUM BARD COLLEGE, ANNANDALE-ON-HUDSON 758-7598 “Blinky Palermo: Retrospective 1964-1977.” Through October 31. “If you lived here, you’d be home by now.” Through December 16. CENTER FOR PHOTOGRAPHY AT WOODSTOCK 59 TINKER STREET, WOODSTOCK 679-9957. “Becoming Muses.” Through August 28. “Camp Visiting Day.” Group show. Through August 28. DANIEL AUBRY GALLERY 426 MAIN STREET, BEACON (917) 647-6823. “Billboards: 1980-2011.” Photographs by Daniel Aubry. Through July 5. DARREN WINSTON 81 MAIN STREET, SHARON, CONNECTICUT (860) 364-1890. “Gilded Art and Design by Carol Leskanic.” Through July 10. DAVIS ORTON GALLERY 114 WARREN STREET, HUDSON. “The Art of the Movie Theater: A Disappearing American Tradition.” Through July 31. DIA:BEACON 3 BEEKMAN STREET, BEACON 440-0100 “Blinky Palermo: Retrospective 1964-1977.” Through October 31. “Franz Erhard Walther: Work as Action.” Through February 13, 2012 “Imi Knoebel: 24 Colors—for Blinky, 1977.” Ongoing. “Sol LeWitt: Drawing Series...” Ongoing DUCK POND GALLERY 128 CANAL STREET, PORT EWEN 338-5580. “Alex Wood: Acrylic.” July 2-30. Opening Saturday, July 2, 5pm-8pm. FOVEA EXHIBITIONS 143 MAIN STREET, BEACON 765-2199. “Japan Now.” Photography exhibition. Through July 17. “Children of the Cheyenne Nation.” July 23-September 4. Opening Saturday, July 16, 5pm-9pm. GALERIE BMG 12 TANNERY BROOK ROAD, WOODSTOCK 679-0027. “Leah Macdonald: Soliloquy.” July 8-August 15. Opening Saturday, July 9, 5pm-7pm. THE GALLERY AT PRUDENTIAL NUTSHELL REALTY 3056 ROUTES 213E. & 209, STONE RIDGE 687-2200. “Horse Eye to Eye.” Pat Travis, pastel drawings; Connie Fiedler, oils. July 16-September 10. Opening Saturday, July 16, 1pm-3pm. THE GALLERY AT STILL RIVER EDITIONS 128 EAST LIBERTY STREET, DANBURY, CONNECTICUT (203) 791-1474. “Photographs by Keith Johnson and Mark Savoia.” Through August 26. GARRISON ART CENTER 23 GARRISON’S LANDING, GARRISON 424-3960. “Current 2011: Summer Sculpture Exhibition.” Through October 10. 44 galleries & museums ChronograM 7/11 abigail dillen, Panel IV: The Return, Ink, oil, pastel on paper, 30” x 65”, 2011 part of the exhibit “Reports from Chernobyl Eco Preserve” at Team Love RavenHouse Gallery in new paltz through august 19 VISIT STORM KING ART CENTER Over 500 acres of pristine fields, gentle hills, and woodlands provide a spectacular setting for more than 100 large-scale masterworks of sculpture. Explore the landscape and art on foot, by accessible tram, or on a rented bicycle. Enjoy fresh seasonal fare, coffee, and more at Storm King Café. Brave is a film production company. We create high-end commercials, music videos, promotional videos and web content. Let us craft a film that will express your voice, strengthen your brand and inspire your consumers. Based in NYC and the Hudson Valley founded by Editor/Director Beth Cramer. Special anniversary exhibitions now on view. Old Pleasant Hill Road, Mountainville, NY 10953 For GPS, use 1 Museum Road, New Windsor, NY 12553 845 534-3115 bravenyc.com chronogram 1/8 ad fi n e a rt M EET TH E A RTI ST JASON BOYD satu rday JU LY 9 L I V E M U S I C 5pm-8pm a group photography show july 15 - september 4 perspective reception sunday july 17 from 2-4 by Bacana Helen K. Garber an American photographer. “Times Square from Rear of Cab” Helen K. Garber Peter de Lory an American photographer known mostly for his black and white landscapes of the Pacific Northwest, as well as Utah, California and North Carolina. His work is held in over 50 public and private collections including The National Museum of American Art at The Smithsonian Institute, The BrookGALLERY fourteen main street ings Institute, Paine chatham, new york 12037 Webber, The Braini n f o @ a r t v i e w g a l l e r y n y. c o m erd Foundation and thurs - sat: 12-5pm sun: 12-4pm or by appointment 518.392.0999 Princeton University. art “Overheated Cadillac” Peter de Lory 105-a mill hill rd woodstock NY 12498 845.679.2162 for updated event and artist info, visit GALLERY HOURS wed-sun 12pm-8pm 7/11 ChronograM museums & galleries 45 galleries & museums Ursula von Rydingsvard, LUBA, 20092010, Cedar, cast bronze and graphite. 17.5' x 59" x 59", Lent by the artist, courtesy Galerie Lelong, New York. Photograph by Jerry L. Thompson adventures in storytelling melinda stickney gibson, chasing myself, oil on canvas, 2011. part of the exhibit “thinkings” at elena zang gallery. Ed garbarino, clio and calliope, 1998, part of the Center for Photography at Woodstock exhibition “becoming muses,” through August 28. !aaddyy AAuuddrreeyy*ss ,aalllleerryy 5522 MMaaiinn SSttrreeeett MMiilllleerrttoonn,, NNYY 1122554466 551188--559922--11330033 OOrriiggiinnaall FFiinnee AArrtt bbyy EEmmeerrggiinngg AArrttiissttss GCCA CATSKILL GALLERY 398 MAIN STREET, CATSKILL (518) 943-3400. “Big Wide World.” Juried group show of multi-media works inspired by nature. July 9-August 20. Opening Saturday, July 9, 5pm-7pm. HAMMERTOWN 6422 MONTGOMERY STREET, RHINEBECK 876-1450. “Impressions and Reflections.” Paintings by Suzanne C. Ouellette. Through September 5. Opening Saturday, July 2, 5:30pm-7pm. galleries & museums HUDSON BEACH GLASS CCaallll ffoorr EEnnttrriieess DDoogg DDaayy AA fftteerrnnoooonn www 162 MAIN STREET, BEACON 440-0068. “Three at the Beach.” Artists’ interpretation of the liquid experience; Gail Robinson, Kerry Law, Khara Gilvey. Through August 6. HUDSON OPERA HOUSE 327 WARREN STREET, HUDSON (518) 822-1438. “Warren Street.” Photographs by David Franck. Through August 14. HUDSON VALLEY CENTER FOR CONTEMPORARY ART 1701 MAIN STREET, PEEKSKILL (914) 788-0100. “First Look III.” 12 outstanding MFA students from across the United States. Through July 24. make Exciting & Inspiring Art Making Workshops . Mixed Media Assemblage/Collage . Broken Dish Mosaic . Steampunk Jewelry & Beading . Art Doll Making . Story Art Call for complete schedule Private classes & custom workshops available Ask about our unique children’s parties 845.679.3660 sydhap@aol.com Back Door Studio 9 Rock City Road Woodstock, NY 12498 JOHN DAVIS GALLERY 362 1/2 WARREN STREET, HUDSON (518) 828-5907. “Bruce Gagnier.” July 21-August 14. “Daisy Craddock: New Work.” July 21-August 14. “Ruth Lauer Manenti: Paper Blankets, Glasses and Bandages.” July 21-August 14. Opening Saturday, July 23, 6pm-8pm. JOYCE GOLDSTEIN GALLERY 16 MAIN STREET, CHATHAM (518) 392-2250. “New York Comic Book Art Show.” July 2-August 6. Opening Saturday, July 2, 3pm-6pm. KINGSTON MUSEUM OF CONTEMPORARY ART 105 ABEEL STREET, KINGSTON. “New Works by Jenny Fowler, Jessica Poser, and Mau Schoettle.” July 2-31. Opening Saturday, July 2, 5pm-7pm. KLEINERT/JAMES ARTS CENTER 34 TINKER STREET, WOODSTOCK 679-2079. “Art History: Fact and Fiction.” Paintings by Richard Bosman. Through July 24. LOCUST GROVE THE SAMUEL MORSE HISTORIC SITE, POUGHKEEPSIE 454-4500. “Earth, River, Sky.” Landscape paintings of the Hudson Valley by Jane Bloodgood-Abrams. July 7-August 14. Opening Thursday, July 7, 5pm-7pm. M GALLERY 350 MAIN STREET, CATSKILL (518) 943-0380. “Hudson Valley Art & Wine.” Featuring 18 artists. Through July 11. M&T BANK 6375 MILL STREET, RHINEBECK 876-6470. “Shrine.” Floor to ceiling sculptural art installation by Andreas San Milla. Through July 9. MARK GRUBER GALLERY NEW PALTZ PLAZA, NEW PALTZ 255-1241. “Thomas Locker: New Work.” Through July 5. MILL STREET LOFT’S GALLERY 45 45 PERSHING AVENUE, POUGHKEEPSIE 471-7477. “Our Towns.” Paintings, photography, printmaking and mixed media focusing on the towns of the Hudson Valley. Through July 15. MOUNT LEBANON SHAKER VILLAGE 202 SHAKER ROAD, NEW LEBANON (518) 794-9100. “Freshet: Uncovering the Shaker Waterworks at Mount Lebanon.” Through August 31. MOUNT TREMPER ARTS 647 S. PLANK ROAD, MOUNT TREMPER 688-9893. “Productive Steps.” July 9-August 21. Opening Saturday, July 9, 5pm-11pm. 46 galleries & museums ChronograM 7/11 Thomas Chambers (1808-1866) melinda stickney gibson, chasing myself, oil on canvas, 2011. part of the exhibit “thinkings” at elena zang gallery. OLANA STATE HISTORIC SITE 5720 STATE ROUTE 9G, HUDSON (518) 828-0135. “FARM: Agricultural Life of the Hudson Valley.” Photographs by Brandt Bolding. Through October 30. ONE MILE GALLERY 475 ABEEL STREET, KINGSTON 338-2035. “Foolsgold Sanctuary.” Exhibit and auction to benefit Catskill Animal Sanctuary. July 2-30. Opening Saturday, July 23, 6pm-9pm. “Clipper Ship in a Storm” 19" x 25" oil on Canvas ORIOLE 9 17 TINKER STREET, WOODSTOCK 679-8117. “Photography of Egypt/Eternal Light.” Sarite Sanders, with paintings by Adah Frank. July 6-August 9. Opening Saturday, July 9, 5pm-7pm. RED EFT GALLERY 159 SULLIVAN STREET, WURTSBORO 888-2519. “Works by Phil Sigunick.” Through July 16. ROELIFF JANSON COMMUNITY LIBRARY Roos Arts 449 Main Street, Rosendale (718) 755-4726. “The Most Extreme Perfect That Exists.” New work by Adie Russell. Through July 23. SpeCializing in workS by eriC Sloane and ameriCan arT of The 19Th and 20 Th CenTurieS 1578 Boston Corners Road, Millerton, NY 12546 • 518 789-3311 open Saturday 10-5, Sunday 12-5, or by appointment Just 5 3/4 miles North of Millerton SAMUEL DORSKY MUSEUM OF ART 1 HAWK DRIVE, NEW PALTZ 257-3844. “The Upstate New York Olympics: Tim Davis.” Through July 17. “The Illustrious Mr. X: Museum Collection as Character Study , Volume II.” Through July 17. “Thick and Thin: Ken Landauer and Julianne Swartz.” Through October 23. “Hudson Valley Artists 2011: Exercises in Unnecessary Beauty.” Through November 13. The Woodstock Framing TEAM LOVE RAVENHOUSE GALLERY 11 CHURCH STREET, NEW PALTZ. “Endangered, Radioactive, and Thriving.” Abigail Dillen: Reports From Chernobyl Eco-Preserve. Through August 19. GALLERY THADDEUS KWIAT PROJECTS 1536 ROUTE 212, STUDIO #C, SAUGERTIES (917) 456-7496. “Leona Christie.” Through July 10. “Laura Gurton.” July 16-August 21. Opening Saturday, July 16, 4pm-7pm. Custom Framing and Fine Art TWISTED SOUL 442 MAIN STREET, POUGHKEEPSIE 705-5381. “Consumption.” Chelsey Freeman. Through July 14. UNFRAMED ARTIST GALLERY 173 HUGUENOT STREET, NEW PALTZ 255-5482. “Under the Sea.” Through July 18. “Beneath the Surface.” The question “What lies below?” is explored from various angles. Through August 7. 31 Mill Hill Road, Woodstock, NY 12498 • 845.679.6003 WALLKILL RIVER SCHOOL AND ART GALLERY 232 WARD STREET, MONTGOMERY 457-ARTS. “New Works by Steve Blumenthal and Elizabeth Ocskay.” July 9-31. Opening Saturday, July 9, 5pm-7pm. WILDERSTEIN PRESERVATION MORTON ROAD, RHINEBECK 876-4818. “Modern Art & the Romantic Landscape.” Through October 31. SkinFlower Cosmic Arts WOLFGANG GALLERY 40 RAILROAD AVENUE, MONTGOMERY 769-7446. “Lost & Found.” Paintings and sculptures by Frank Shuback & Jon Patrick Murphy. Through July 7. “Sympathy for the Devil.” John D. Wolf and son, John A. Wolf. July 9-August 10. Opening Saturday, July 9, 6pm-9pm. WOODSTOCK ARTISTS ASSOCIATION AND MUSEUM 28 TINKER STREET, WOODSTOCK 679-2940. “Cats and Caricatures.” Peggy Bacon. Through October 9. WOODSTOCK BYRDCLIFFE GUILD 34 TINKER STREET, WOODSTOCK 679-2079. “Quick, Down and Dirty.” Focus on outdoor furniture & landscape/ garden accessory constructions, many of them site specific. July 16-November 6. Opening Saturday, July 16, 4pm-6pm. On the Boardwalk in Phoenicia 845~688~3166 Tattoos & art appreciation in a genial atmosphere! 7/11 ChronograM museums & galleries 47 galleries & museums 9091 ROUTE 22, HILLSDALE (518) 325-4101. “Works by Karen Caldicott.” Through July 11. Green river Gallery SinCe 1975 by peter aaron fionn reilly Music Big Sister Dar Williams A girl sits on the edge of her bed. She’s overwhelmed by the looming adult world before her, wracked with the confusion that comes with trying to figure out her place in it. Or, really, if she even wants any part of it at all. Hell, she’s still not even sure exactly who she is yet, much less what everyone else wants of her. Her head and her heart combine to form a churning cauldron of a million conflicting thoughts, about society, sexuality, politics, spirituality, careers, the planet. She feels like she’s drowning. And very much alone. But songs help. Especially beautifully crafted, movingly sung songs that come from the perspective of someone who’s been right where she is now and made it through—and become a stronger, more aware, and more self-assured person in the process. Songs like “It’s Alright,” “As Cool as I Am,” “The Great Unknown,” and “Buzzer.” Dar Williams’s songs. One of pop folk’s leading singer-songwriters, Williams is beloved for her questioning and deeply personal narratives; tunes whose wry, minutely focused observations—often quite humorous in their irony—pinpoint the poetry and paradoxes of everyday life. Her steadfast stance and frequent addressing of gender issues have made her a paragon of the so-called women’s music 48 music ChronograM 7/11 movement, a mantle she never consciously courted but one she’s worn with pride since the identity-straddling “When I Was a Boy,” from her 1993 debut, The Honesty Room (reissued in 1995 by Razor & Tie Records, home to all her subsequent albums), became an anthem for many. “I’ve always been a feminist, but I really lucked out by being embraced by such a passionate and seriously committed audience so early on,” says Williams, who lives in Cold Spring with her husband, Michael Robinson, and their two children. “I guess [“When I Was a Boy”] sort of came out of me being a tomboy as a kid in the ’70s, and picking up on the androgyny of everyone with their Dorothy Hamill/John Denver hairdos.” This kind of vivid imagery comes naturally to Williams, a storyteller at heart. In addition to the story-songs that fill her 11 official albums, she’s authored two novels targeted at young girls (2004’s Amalee and 2008’s Lights, Camera, Amalee; both, Scholastic Books), a road guide for natural foodies (The Tofu Tollbooth; Ceres Press, 1998), and, now, a children’s play, “The Island Musical.” Given the “liberal and loving” and very literate Chappaqua household in which she was raised, it’s not too hard to see where her love of words and the performing arts stems from. “My dad went to Yale and was a medical writer and editor, and my mom went to Vassar and worked with Planned Parenthood, which I’m very proud of,” says the singer, who was born Dorothy Snowden Williams in 1967 and whose nickname is a family truncation of that of the character Darcy from Pride and Prejudice. “We had a lot of classical albums, a lot of show tunes, all alphabetized. I loved the Beatles, Jim Croce, Crosby, Stills and Nash; poets who wrote melodic, story-based songs. I remember really being into my vocabulary books when I was in sixth grade, and I guess that’s when I really started to fall in love with words.” Williams began learning guitar at age nine and wrote her first songs soon after, yet by high school she’d become more interested in sports. But when an ankle injury landed her on the bench she took to theater, writing plays and stage music. By her senior year she seemed to have found her voice as a playwright, and was on her way to majoring in theater and religion at Wesleyan University. It all sounds pretty idyllic, so where does the angst come in? “I finally had my rebellion when I was 21, just trying to relate to the world,” says Williams, adding that she contemplated suicide in college but was yanked out of the predicament when a romantically beleaguered friend called her for emotional help. “I think of what Erik Erikson wrote about Martin Luther, who came from a privileged background but was discontented because, basically, he was just a really sensitive person. Besides finding music there was also some intense therapy, thank God.” After graduating from college and spending a few months in Berkeley, California, where she played some tenuous early gigs, Williams moved to Boston in 1990. There, she acted in and directed a handful of plays and operas before becoming the stage director of the Opera Company of Boston. “It was a dark time for theater in Boston then,” she says. “You had [alternative weekly] the Boston Phoenix just savaging any productions that weren’t from New York. But the music scene was great, and underneath it there were still the bones of the great folk scene Boston had back in the ’60s.” Her voice teacher, the improbably named Jeannie Diva, prodded her to begin playing Beantown coffeehouses and she recorded a couple of self-issued cassettes. Chicago’s Waterbug label released The Honesty Room to rapturous praise that found Williams’s beautiful voice compared to those of two of her heroines, Joni Mitchell and Joan Baez. And it was an eventual connection with the latter folk icon that would kick the young singer-songwriter’s career into hyperdrive, when Williams opened for an impressed Baez and the two immediately struck up a friendship and later toured together.The elder artist even ended up covering a couple of Williams’s songs, most famously “You’re Aging Well,” the confessional tale of a woman grappling with adolescent self-image, societal expectations, and the onset of age: “Why is it that as we grow older and stronger / the road signs point us adrift and make us afraid / saying ‘You never can win,’ ‘Watch your back,’ ‘Where’s your husband?’” The song ends, quite appropriately in the case of Williams and Baez, with the narrator being welcomed into enlightenment by an older female mentor. “Again, I feel so lucky to have had something like [Baez’s recording the song] happen for me so early on,” Williams says. “Joan is so gracious and kind, and she’s really great about tamping down the behind-the-scenes craziness when we play together. She’s, like, ‘Screw all this, let’s go shopping!’” Following a move to Northampton, Massachusetts, came a fuller, folk rock sound with 1995’s Mortal City. With such sardonic pieces as “The Christians and the Pagans,” which finds a lesbian couple sharing the holidays and finding much in common with some conservative relatives, and “The Pointless, Yet Poignant, Crisis of a Co-Ed,” an uproarious look at collegeactivist idealism, the disc made Williams acres of new fans. Among Mortal City’s contributing players are modern folk legends John Prine and Cliff Eberhardt, the latter then one of Williams’s Western Massachusetts neighbors. “Dar is such a very expressive, forgiving, positive personality,” says Eberhardt, who also performed with Cry Cry Cry, a folk supergroup centered on the trio of Williams, Lucy Kaplansky, and Richard Shindell. “As a singersongwriter one of the things that strikes me most is her insight into how young people think and feel, which to me is really necessary.” Williams was invited by organizer Sarah McLachlan to perform on the inaugural Lilith Fair tour in 1997, the same year the more expansive End of the Summer, home to such standouts as the late-night radio paean “Are You Out There?” appeared. Now based in New York, she continued to build her standing as a club and festival favorite and released 2000’s religion-examining The Green World and 2003’s The Beauty of the Rain, which contains guest spots from Alison Krauss, Bela Fleck, John Medeski, and Chris Botti. She and her family became Hudson Valley residents the year of the latter effort’s release. “We love it here because it’s this crossroads of nature, music, words, and people,” says Williams, an avid gardener who supports, among many other causes, local sustainability and organic farm-to-table efforts. Digging in locally, she recorded 2005’s cult smash My Better Self (featuring the river ode “The Hudson”) at Woodstock’s Allaire Studios and 2007’s Live at the Bearsville Theater DVD, while the booklet of the following year’s tellingly named Promised Land exhibits the work of area visual artists. In learning Williams’s personal history, the question naturally arises: Just what is it that attracts her to the art of storytelling? “That’s a good question,” she ponders, wrinkling the brow above a pair of recognizably striking pale blue eyes. “I guess it’s that storytelling, when it’s good, is never about one thing or idea. It’s about a conflict of ideas or truths. And the characters in a story exist to embody that conflict, to pull everything together. Putting a story out there is like throwing a rock in the water and watching it ripple.You hope it resonates with other people.” Her favorite storytellers? “Dickens, for sure, and Thomas Hardy, especially Jude the Obscure,” says Williams, whose most recent album, last year’s Many Great Companions, was co-produced by the Jayhawks’ Gary Louris and features a best-of disc and a disc of early songs revisited in strippeddown acoustic fashion. “George Elliot’s Middlemarch is probably my favorite book. So it’s mainly been 19th-century English writers like those, along with early 20th-century Southern authors and post-World War II people like Heller and Bellow.” “The Island Musical,” which is being presented in a staged reading this month at Powerhouse Theater on the Vassar College campus, might seem like a recent return to Williams’s theatrical roots. In fact, however, she started it as one-act play in 1992 and continued to work on it between tours and albums over the decades that followed. Featuring several unheard original songs, the work is an environmentally themed fable concerning “a faraway island whose inhabitants must confront the forces which threaten their magical home, and come together to protect their beloved land.” “[In developing the play] Dar has been doing the jobs of three people, writing not only the play itself, but also the music and the lyrics,” explains the musical’s director, Jeremy Dobrish, who, coincidentally, attended Wesleyan with the author. “The reading is a way to take all of the puzzle pieces from paper and see how they work together on the stage. There comes a point where you have to stop writing and see how things play in real time. Of course the music is fantastic, but the story is great, too. It really beats of narrative.” And “The Island Musical” itself is really just the latest chapter in another narrative, that of the ongoing, and always rewarding, chronicle of one of today’s greatest storytellers. One whose art, just like that of her hero and friend Joan Baez, has helped so many weather life’s trying interludes. Think back to that confused and distraught young woman. Alone in her bedroom with her murky thoughts, she convulses hysterically and glares blankly at the wall through her tears. There doesn’t seem to be a whole lot to look forward to, besides more stress and others telling her who to be, what to do. But then, as the lines of “You’re Aging Well” drift into her earbuds, a warm little glow begins.? New York Stage and Film and Powerhouse Theater will present a special musical reading of “The Island Musical” at Powerhouse at Vassar College in Poughkeepsie on July 17.. 7/11 ChronograM music 49 nightlife highlights Handpicked by music editor Peter Aaron for your listening pleasure. Peter Sando Fri, 7/1 8:30pm HIGH IRONS; guest Sasha Beecher Sat, 7/2 8:30pm BACK TO THE GARDEN 1969 Sun, 7/3 7:30pm LUGWRENCH Fri, 7/8 8:30pm BUCKWHEAT ZYDECO Sat, 7/9 8:30pm KEVIN KANE Band; also MATT RAE Trio Sun, 7/10 12:30pm HUDSON VALLEY YOUNG ARTIST TALENT SEARCH Sun, 7/10 7:30pm SHOWCASE featuring EVOLUTIONARY WAR, AUSTIN JAHNER Fri, 7/15 8:30pm McPEAKE from Ireland Sat, 7/16 8:30pm FRANK VIGNOLA with Vinny Raniolo; guest The YaYas Sun, 7/17 12:30pm HUDSON VALLEY YOUNG ARTIST TALENT SEARCH Sun, 7/17 7:30pm NATE & KATE; also TWANGTOWN PARAMOURS t Fri, 7/22 8:30pm BEREZNAK BROTHERS; also ROB CARLSON & The Benefit Street Band Sat, 7/23 8:30pm WOODY MANN; also PAUL GEREMIA Sun, 7/24 12:30pm HUDSON VALLEY YOUNG ARTIST TALENT SEARCH Sun, 7/24 7:30pm CHRISTOPHER ROBIN Band 4/21/2011 Fri, 7/29 JM:8:30pm see changes below, make sure there is no â&#x20AC;&#x153;$2.00â&#x20AC;? JOHN NĂ&#x2030;METH Blues Band Sat,price 7/30 8:30pm MARC BLACK Band lowed to give HUDSON VALLEY$2.00 YOUNG ARTIST TALENT SEARCH 4/20/2011 Sun, 7/31 We12:30pm need to change to the word â&#x20AC;&#x153;Cheapâ&#x20AC;? Sun, 7/31 7:30pm JESSY J Band 2. The last bullet point is not needed. The last two points should read Fri, 8/5 8:30pm RED DIRT ROAD; also BOB STUMP & The Blue Mt. Band July 8. The eponymous 1969 LP by Peter Sandoâ&#x20AC;&#x2122;s band Gandalf might be the most perfect psychedelic album ever made. A lazy, hazy, strings-augmented opus, it drifts like a dream through blissfully stoned originals and lysergic reimaginings of songs by Tim Hardin and others. (The record was reissued in 2002 by Coxsackieâ&#x20AC;&#x2122;s Sundazed Music; Gandalf 2, a set of rare tracks, followed in 2007.) In support of Afraid of the Dark, Sandoâ&#x20AC;&#x2122;s newest solo release, the part-time Upstater plays this acoustic date at American Glory BBQ. Perhaps the ribs wonâ&#x20AC;&#x2122;t be the only thing smoked this night. (The Admiral Douglas Band steams in July 22; Four Seasons guitarist Bob Grimm picks July 30.) 8:30pm. Free. Hudson. (518) 822-1234;. Green River Festival - July 16, 17. News of this formidable festâ&#x20AC;&#x2122;s lineup arrived too late for last monthâ&#x20AC;&#x2122;s summer round-up. Rocking three stages on the grounds of Greenfield Community College, the Green River Festival is an overload of rootsy riches: Emmylou Harris, Toots and the Maytals, Terry Adams and the new NRBQ, Wanda Jackson, Black Joe Lewis and the Honeybears, the Old 97â&#x20AC;&#x2122;s, Kermit Ruffins, the Carolina Chocolate Drops, Thomas theyMapfumo, arenâ&#x20AC;&#x2122;tEilen al- Jewell, and too many more. Plus food, crafts, hot air balloons, and kidsâ&#x20AC;&#x2122; activities. See website for times. $45, $65. Greenfield, Massachusetts. (413) 773-5463;. Blues at Boscobel as one and read as July 18. The roots action continues with Blues at Boscobel, a trad triple-header featurfollows: Grillinâ&#x20AC;&#x2122; and Up-to-date Chillin Every Friday Happy Hour: Free BBQ and Great Specials schedule: ing Guy Davis, Christine Ohlman and Rebel Montez, and John Platania on the glorious Until 9:00â&#x20AC;&#x153;ď&#x201A;Ťď&#x201A;Ťď&#x201A;Ťď&#x201A;Ťâ&#x20AC;? pm. â&#x20AC;&#x201D;Poughkeepsie Journal; â&#x20AC;&#x153;Exquisite desserts!â&#x20AC;?â&#x20AC;&#x201D;New York Times grounds of the titular estate. Davis, an award-nominated favorite, appears regularly on â&#x20AC;&#x153;First rate!â&#x20AC;?â&#x20AC;&#x201D;Rolling Stone; â&#x20AC;&#x153;Finest roots music club!â&#x20AC;?â&#x20AC;&#x201D;The Wall Street Journal â&#x20AC;&#x153;´´´´â&#x20AC;? â&#x20AC;&#x201D;Poughkeepsie Journal; â&#x20AC;&#x153;Exquisite desserts!â&#x20AC;?â&#x20AC;&#x201D;New York Times â&#x20AC;&#x153;First rate!â&#x20AC;?â&#x20AC;&#x201D;Rolling Stone; â&#x20AC;&#x153;Finest roots music club!â&#x20AC;?â&#x20AC;&#x201D;The Wall Street Journal Serving Dinner Serving DinnerWednesday Wednesday- -Sunday Sunday 3PVUF 1BXMJOH /: t 130 Route 22, Pawling, NY 12564 â&#x20AC;˘ 845-855-1300 NPRâ&#x20AC;&#x2122;s â&#x20AC;&#x153;A Prairie Home Companion,â&#x20AC;? â&#x20AC;&#x153;Mountain Stage,â&#x20AC;? and â&#x20AC;&#x153;World CafĂŠâ&#x20AC;?; the blond beehive-sporting Ohlman sang lead with the Saturday Night Live Band and has duetted with Dion and Levon Helm; and, in addition to being Van Morrisonâ&#x20AC;&#x2122;s longtime guitarist, Red Hook resident Platania has worked with Bonnie Raitt, Randy Newman, and Don McLean. (The Big Band Sound brings the fireworks July 4; â&#x20AC;&#x153;Patriots vs. Loyalistsâ&#x20AC;?-themed site tours take place all month.) 5pm. $40. Garrison. (845) 265-3638;. Mike & Ruthy Single Release Party SNUG HARBOR ď&#x192;˛ Under New Management ď&#x192;˛ Live Music Thu - Sat ď&#x192;˛ Free Pool Mon & Wed ď&#x192;˛ Best Open Mic In The Hudson Valley, Every Tuesday at 10 pm, ď&#x192;˛ Home of the PBR Tall Boy ď&#x192;˛ Schlitz All Day Every Day! ď&#x192;˛ Grillinâ&#x20AC;&#x2122; and Chillin Every Friday Happy Hour: Free BBQ, and Great Specials Until 9:00 pm! Ravi Coltrane Quartet 38 Main Street New Paltz, NY (845) 255-9800 Maverick Young People´s Concerts * Saturdays at 11 am * Children Free * Adults $5 *ree * F * * July 9 Jason Vieaux, guitar * July 16 Trio Solisti July 29. Following the false promise of the CD and the impersonal nothingness of the mp3, vinylâ&#x20AC;&#x2122;s vindication has been an extra-sweet development for those of us whoâ&#x20AC;&#x2122;ve known all along that wax is king. And to many of us itâ&#x20AC;&#x2122;s the seven-inch, 45-rpm vinyl record thatâ&#x20AC;&#x2122;s the definitive format: two quick, say-it-all-on-one-side shots straight from the soul, presented with total focus and no wasteful filler. So the prospect of a new single by leading local folk rock duo Mike & Ruthy, â&#x20AC;&#x153;On My Homeâ&#x20AC;? b/w â&#x20AC;&#x153;My New York Cityâ&#x20AC;? (the latter an unpublished Woody Guthrie original!), here celebrated with a live event at the Kleinert/James Art Center, is one more reason for vinyl heads to rejoice. (â&#x20AC;&#x153;Woodstock Beat,â&#x20AC;? a benefit for the Woodstock Byrdcliffe Guild featuring NEXUS and the Canadian Brass, hits Maverick Concert Hall July 2.) 8pm. $15. Woodstock. (845) 679-2079;. August 5. Despite the pressures of family lineage (yes, heâ&#x20AC;&#x2122;s the son of groundbreakers John and Alice Coltrane), saxophonist Ravi Coltrane has done well making his own way in jazz, choosing wisely, perhaps, to pursue a style that owes more to in-the-pocket hard-bop players like Joe Henderson than the ultratranscendent work of his parents. But by no means does that mean heâ&#x20AC;&#x2122;s been lazy: 2009â&#x20AC;&#x2122;s Blending Times, his fifth album, has been roundly hailed for its understated and deeply personal atmospherics. Which should certainly play extremely well in the Belleayre Music Festivalâ&#x20AC;&#x2122;s mountaintop setting. (K. D. Lang croons July 3; Jimmy Cobb celebrates 50 years of Kinda Blue August 6.) 8pm. $233 lawn to $327 platinum. Highmount. (800) 942-6904, ext. 1344;. * Fre* * e* July 20 Andrew Russo and Frederic Chiu * Piano Duo August 6 Elizabeth Mitchell and Family * 120 Maverick road â&#x20AC;˘ Woodstock, NeW York 845-679-8217 â&#x20AC;˘ 50 music ChronograM 7/11 MIKE & RUTHY play the kleinert/james art center in woodstock on july 29. cd reviews David Arner Porgy/Bess Act 2 (2010, CIMP Records) The secret to using standards as your performance springboard is in knowing where to land afterwards. George Gershwin’s career-refining work “Porgy and Bess” has been a musical fount for artists, including Ulster County resident David Arner, for over 70 years. Porgy/Bess Act 2 shows that there’s still more to draw from the infamous Catfish Row. Pianist and composer Arner describes Porgy/ Bess Act 2 as the continued journey from Porgy/Bess Act 1, which was recorded in 2007 in Esopus. Accompanied by bassist Michael Bisio and drummer Jay Rosen, Arner performs his “rearrangements and deconstructions” of “Porgy and Bess,” segments of which are neatly bundled throughout five compositions. He comfortably incorporates his classical facilities into “There’s a Boat, It’s Left.” His midsection solo is reminiscent of Gershwin’s “Rhapsody in Blue”: charged and ecstatic. “Honey Man” is an all-too brief encounter with the full, settling sound of the trio. The 22-plus-minute “Gone Now” is an aural journey that depicts the turmoil in act two of “Porgy and Bess”: indecision, temptation, betrayal, fear, death. How does Porgy/Bess Act 2 measure up to other interpretations of “Porgy and Bess”? Hmm… and there comes the idiomatic apples to oranges. Ella Fitzgerald and Louis Armstrong’s 1957 Porgy and Bess—within their own improvisational framework—is elegant as well as theatrical (it is an American folk opera, after all). Arner’s adventures with “Porgy and Bess” focus on emotional depth; taut and vicious but also awesome in their laudation of the Lord’s power over human circumstances.. —Cheryl K. Symister-Masterson Hot Garbage Probably Not (2010, Independent) Questionable band name aside, Hot Garbage’s new six-song EP, the Beacon group’s third release, delivers warm and fuzzy diversions. The CD has a washing machine-like scrub, rinse, and spin quality. The cycles are refreshing: varying between delicate and permanent press, occasionally going off balance like a wet pillow until, once in a while, the belt frays and snaps. This is not necessarily a bad thing. It forces attention and analysis and brings relief in the respite of resolve. Compositions like “Awaiting in the Melting Tray” embrace emotions that swim deep with post-tornado-like trauma, only to re-surface for air with an “in this together” community voice. These swings are due in no small part to the stark influence of having two very different lead voices that also play guitar. The instrumental interplay is an easy standout, swaying from tender intricacy to chaotic discord; from the wistfulness of Television to the tension of Slint. Cormac Gartland possesses hearts-on-a-sleeve-with-tinges-of-Elliot-Smith musings and timbre, while Jason Price rests in the ironic dichotomy of a painfully aware and detached yet down-to-Earth Lou Barlow. The music begs for more description by association: lo-fi in the vein of Pavement, shoegaze à la Dinosaur Jr., East Village noise rock circa early-to-mid Sonic Youth with premature Flaming Lips pop ejaculations. For better or worse, Probably Not was recorded in two days and it shows. The devil-may-care dissonance dances around the slop well enough for DIY indie rock, but the band’s potential deserves more studio time and a few notches on the instrumental bedpost.. —Jason Broome Tern Rounders Tern Rounders (2011, Independent) There’s a moment when something really special happens on the new album by Tern Rounders, and thankfully it doesn’t take too long to arrive. It happens at roughly the midway point of “Livin’,” the album’s opening number, an amiable country rocker that suddenly goes 3-D when Marc Clayton joins Kim Kilby on harmony vocals. It’s the moment in The Wizard of Oz when Dorothy sees everything in color, and it’s a sign of wonderful things to come. This is actually the Albany-based Tern Rounders’ second album, though the accompanying press release notes some big changes have been undertaken between releases. The addition of a pedal steel guitarist, Rick Morse, and a more upbeat country flair are the primary additions to the mix, and even if you don’t know how the band sounded the first time around, it’s still good news. Witness “The Rock,” a crackling number with what can’t possibly be happy lyrics (“Go back to the rock you crawled out from!”) delivered in such a celebratory manner you’ll never want to experience torment in any other way. Over 12 original tracks Kilby and Clayton trade vocals and guitars as the rhythm section rolls in rollicking lockstep and Morse adds one more layer of dirt and soul to the mix. There are variations on the theme—“Moment Not Meant to Last” is a dark, howling blues—but it all unfolds as naturally as can be. Tern Rounders is without a single moment of excess, a perfect accompaniment for the thick heat of summer.. —Crispin Kott, including editing of academic and term papers. Bertoni Gallery presents its 7th annual Sundays in July Free Music Festival Are you BORED? DOn’t BE! Come join us in the garden for FREE live music all afternoon Where: Bertoni Gallery Sculpture Garden (1392 Kings Highway Sugar Loaf, NY) When: Every Sunday in July (July 3, 10, 17, 24, 31) 1-5pm July 31, 4th Annual Bill Perry Day 12-6pm Go to for schedule. Call 845.469.0993 for more information Sponsored by Warwick School of Music 7/11 ChronograM music 51 Books SUNSHINE STATES Bard Fictionistas Edie Meidav and Karen Russell Go Coastal By Nina Shengold Photograph by Jennifer May W hat is it about the edge of a continent? Though Bard Fiction Prize winners Karen Russell and Edie Meidav currently live on the temperate banks of the Hudson, their new novels gleefully plunge into coastal extremities. Russell’s Swamplandia! (Knopf, 2011) unfolds in the hummocky swamps of Florida’s 10,000 Islands. Meidav’s Lola, California (Farrar, Straus and Giroux, 2011) follows its two title characters—best friends nicknamed after a Kinks lyric—from a pitch-perfect Berkeley to Europe, New York, and back to their home state’s cracked paradise. 52 books ChronograM 7/11.” Russell’s parents grew up in that wilder Floridian landscape. Her father, a Vietnam vet, is retired; her mother, a real estate lawyer. Russell decided as a child that she’d be a writer. “I was such an anxious kid. It was a lifesaver to have this little door to carry around with me.” Books were her lifeline, the darker the better. “Mom used to say I could have one Stephen King and one Charlotte Brontë.” Her first story collection, St. Lucy’s Home for Girls Raised byWolves (Random House, 2006) reflects those affinities. Populated by ghosts, minotaurs, and the title story’s plaintive ex-cubs, the book garnered raves for its 25-year-old author. Bard professor Bradford Morrow, who teaches Russell’s stories, invited her to campus, urging her to apply for the 2011 Bard Fiction Prize. The author was working as a Putney Student Travel tourguide, and found out she’d won in the Singapore Airport Starbucks. “The BFP is a total dream,” she effuses. “It’s the best part of teaching—the contact with students, reading students’ work—without grading.” The Hudson Valley location enhances the magic. “The same prize could be endowed at an urban university, but it wouldn’t feel the same. The gift of time is great, but the actual spaciousness is a real gift. There’s a waterfall on campus.” She spent her residency polishing stories for a forthcoming collection, tentatively titled Vampires in the Lemon Grove, and mapping out a second novel inspired by photographers sent to document the Dust Bowl. “It’s still in progress, a weird embryo—I feel like I’ll kill it if I talk too much about it,” she demurs. “I’m always surprised at how resilient my bewilderment is.” Russell’s stories usually start with “an image, or a bad ‘Saturday Night Live’ premise. The surreal and magical feels like ventilation to me. You follow the premise out just for the joy of it, and the real story starts to emerge in some sort of inky way, like a Polaroid coming into focus.” This month will mark Karen Russell’s 30th birthday. “It’ll be a relief not to get so much comment on how young I am,” she says with a shrug. “Anyway, now [The Tiger’s Wife author] Tea Obreht is the ‘so young’ one. I’m off the hook.” When Edie Meidav won the BFP in 2006, she had already published two acclaimed novels, Crawl Space (Farrar, Straus and Giroux, 2005) and The Far Field: A Novel of Ceylon (Houghton Mifflin, 2001), winner of the Kafka Award. After her semester as writer-in-residence, she stayed on to teach creative writing and literature. “Bard is very stimulating, a very rich broth to be placed into in terms of colleagues, the events unfolding on campus,” she says over dinner at Rhinebeck’s Aroi Thai. The hyperarticulate Meidav started teaching in part to overcome her fear of public speaking. “I wasn’t a verbal child,” she explains. Reading created a fluency and bridge for her hidden linguistic gifts. “I’ve been thinking about the way a book stitches together a community of readers,” she reflects. “It cheers me to think I’m performing some kind of a service—in the same way that literature saved me, I could give a voice to someone else.” Meidav just spent two months in Cuba with her husband, painter Stan Stroh, and their two young daughters (“It was definitely nontourist Cuba—there were food shortages, water shortages, blackouts—an amazing experience”), researching a novel-in-progress about a Latin American boxer. Even for someone as fearless about stepping into other skins as Meidav, this sounds like a daunting stretch. “Creatively, there are times when you need to fill the well, to expand the context a little,” she says. There was also a personal motive. Meidav’s father died in September. Born in Poland and raised in Israel, he traveled extensively as a UN geophysicist, often bringing his wife and three children to exotic locales. “He was a traveling man, a restless spirit,” Meidav says, her voice thick with pride and grief. “That was his legacy. I feel very close to him in motion.” Meidav’s mother is an engineer, sociologist, and playwright; she also bellydanced at the family’s bohemian parties. They moved to Berkeley in 1974, during “the buzzkill years” after its countercultural flowering. “My family was always giving shelter to these lost puppies,” Meidav recalls; troubled classmates often moved in for long stretches. Lola, California features a similarly magnetic household with a very dark center: when we meet charismatic and brilliant Vic Mahler, he’s on Death Row for killing his wife. His daughter has severed all ties, changing her name and disappearing into a marijuana growers’ community. Her teenage best friend, a foster child who idolized the Mahler clan, races the clock to effect a reunion before Vic’s execution. “We always think our significant relationships are romantic, or with our parents, but for women especially, our friendships are formative,” says Meidav. “As you proceed in life, certain avenues open and can’t be closed. Every choice you make opens one thing and closes three others. It’s very similar to writing a novel.” Meidav is a prodigal wordsmith. “I’ve probably written or started 50 novels; I’ve published three. Some writers are Dionysian, others Apollonian. Some of us love to get lost in the forest, some love to plan. But if the writer is surprised, the reader is too.” Lola, California is nothing if not surprising. Vic’s psychopathology infects the next generations in unforeseen ways; some of the book’s revelations are gut punches. That many unfold in the echt Californian milieu of a New Age retreat adds to the resonance. In her essay “Daughter of California,” Meidav writes, “If every state has a psychological age appropriate to it, California is forever an adolescent, dreaming in bright colors and assuming suicidal proportions at its misfortunes.” Concepts of East and West also inform The Far Fields, and Crawl Space’s Emile Pouquet, a French Nazi war criminal, shares some DNA with the unrepentant, selfjustifying, yet thoroughly human Vic Mahler. “Even if somebody is a monster, there’s still an imperative to try to understand,” Meidav attests. “I think secretly all my novels are preaching a kind of gospel of human empathy.” Edie Meidav will read 7/9 at 7:30pm at Oblong Books & Music, Rhinebeck; 7/16 at 3pm, Kleinert/James, Woodstock, sponsored by Golden Notebook, with performances by Amii Legendre and Kevin Salem. THE BARD FICTION PRIZE’S FIRST DECADE Awarded each October to “a promising, emerging writer who is an American citizen aged 39 or younger at the time of application,” the BFP offers a significant cash prize and a semester-long appointment as writer-in-residence at Bard College. Author and Conjunctions editor Bradford Morrow says he and fellow judges Mary Caponegro and Robert Kelly seek published authors “whose work we feel is original, ambitious, and shows profound promise for the future.” Previous winners include: 2011 Karen Russell (Swamplandia!) 2010 Samantha Hunt (The Invention of Everything Else) 2009 Fiona Maazel (Last Last Chance) 2008 Salvador Plascencia (The People of Paper) 2007 Peter Orner (Love and Shame and Love) 2006 Edie Meidav (Lola, California) 2005 Paul LaFarge (Luminous Airplanes) 2004 Monique Truong (Bitter in the Mouth) 2003 Emily Barton (Brookland) 2002 Nathan Englander (The Ministry of Special Cases) “Over the past 10 years, the Bard Fiction Prize has deeply enriched life on campus for students and faculty alike,” Morrow says. “Students who are themselves interested in becoming writers are often both inspired and challenged by interacting with authors who aren’t much older than they are.” The inspiration seems to flow both ways: many BFP winners have forged ongoing ties to the Hudson Valley. Edie Meidav and Paul LaFarge are currently teaching at Bard; Emily Barton lives in Kingston, and Samantha Hunt in Tivoli. Applications for the 2012 prize (including three copies of a published novel; no manuscripts accepted) must be received by July 15, 2011. For more information:. 7/11 ChronograM books 53 SHORT TAKES From the fantasy future to the paleolithic past, Hudson Valley authors set the table for a summer potluck feast. Starstruck Deluxe Edition Elaine Lee, Michael Wm. Kaluta, Lee Moyer IDW, 2011, $49.99; CD $22.95, The AudioComics Company Fans of the ‘80s cult comic will cherish this sumptuous remix of High Falls resident Elaine Lee’s wig-flipping feminist space opera, featuring the Galactic Girl Guides (“It’s a tough galaxy, but somebody’s gotta live in it”), and the odd headless sex drone. The cast of AudioComics’ radio play version has a blast chewing intergalactic scenery in Firesign Theatre mode. Shorter, Faster, Funnier: Comic Plays & Monologues edited by Eric Lane & Nina Shengold Vintage Books, 2011, $16.95 Forty-four theatrical hors d’oeuvres by an exceptional collection of funny people, including Hudson Valley playwrights Mikhail Horowitz, Nicole Quinn, Edwin Sanchez, Laura Shaine, Mary Louise Wilson, and free-range editor Nina Shengold. Booksigning and performance by Actors & Writers, 7/8 at 8pm, Golden Notebook at the Kleinert/ James Arts Center, Woodstock. Grammar: A Pocket Guide Susan J. Behrens Routledge, 2010, $17.95 Woodstocker Behrens, an associate at Bard’s Institute for Writing and Thinking, sets out to demystify English grammar in this user-friendly guide for the perplexed and persnickety. Whether you’re driven insane by signs advertising “Eight Items or Less” (Fewer! Fewer!) or just want to know where to put that apostrophe, you’ll find help in these pages. Alice Bliss Laura Harrington Viking, 2011, $25.95 Playwright Harrington’s graceful debut novel is American as a Fourth of July parade, and painfully timely. In an upstate New York town where unpierced teens still say “Ma’am,” a teenage girl struggles to fill the gap left by her beloved father’s departure for Iraq. Alice and Matt are both exemplary and individualistic, and the beautifully observed details of their story are heart-wrenching. Women of the Catskills: Stories of Struggle, Sacrifice, and Hope Richard Heppner The History Press, 2011, $19.99 Woodstock Town Historian Heppner’s invaluable book explores lives rarely seen in conventional histories. His gallery of mountain women includes cleanly drawn portraits of early artists, hotel fire survivors, a temperance activist, a diarist, and a remarkable cross-dressing hunter—as well as the founder of Woodstock’s “arrival of Santa” Christmas Eve tradition. Color & Light: A Guide for the Realist Painter James Gurney Andrews McMeel, 2011, $24.99 Dinotopia author and plein-air painter Gurney offers a practical, well-organized, and informative handbook for artists of all levels. His disquisitions on light sources and color mixing are illustrated with classical paintings and Gurney’s own work: extraordinary saurian portraits and Hudson Valley landscapes, including a memorable Chronogram cover and Kingston’s Chop Suey sign. 54 books ChronograM 7/11 I’ll Never Get Out of This World Alive Steve Earle Houghton Mifflin Harcourt, 2011, $26 I n the last decade or so, celebrated singer-songwriter-activist-author Steve Earle has applied his storytelling chops to playwriting (“Karla”), political discourse (his satellite radio show “Hardcore Troubadour”), and short fiction (the 2001 collection Doghouse Roses). And as a seven-times-married recovering addict, former jailbird, Fox News irritant, and ardent opponent of the death penalty, Earle has packed a lot of living into his 56 years. So the fact that his luminous, eight-years-in-thewriting debut novel I’ll Never Get Out of This World Alive is a fascinating read should come as no surprise. What’s remarkable is that it rivals his best work as a multi-Grammy-winning songwriter. No one will be saying, “Don’t quit your day job, Steve.” For I’ll Never Get Out of This World Alive, Earle breathes life into an obscure character of music history apocrypha: the mysterious doctor who shot morphine into alcoholic Hank Williams Sr. on New Year’s Eve 1953, hastening the untimely death of the 29-year-old icon. Earle fleshes out this mystery man and christens him Joseph A. Ebersole III, MD, aka Doc, a defrocked, heroin-addicted physician. Ten years after Hank’s demise, Doc is marking time on seedy South Presa Street in San Antonio, Texas, living on the fringes, financing his habit by performing abortions and emergency medical care on prostitutes and criminals in his room at the Yellow Rose Guest Home. When Doc shoots up, the wily ghost of Hank annoys and taunts him, sometimes as the personification of shame and guilt, sometimes for reasons revealed as the story spools out. Earle inhabits the voices of several deftly defined characters (mostly Doc) to create a world of refuse and squalor, leavening it with shimmery magical realism: the specter of Williams, the occasional tantalizing evocation of pre-Columbian Indian spirits, the power of healing touch. These elements combine with in-the-pocket dialog rhythms and Cinemascope-worthy scene settings to create a palpable world in which action unfolds at a brisk bluegrass tempo. When young Mexican Graciela’s boyfriend abandons her after a life-threatening abortion, the spirited senorita becomes Doc’s assistant, touching and changing the lives of all, especially Doc, to a soul-deep degree. The story percolates hot (and funny) when Doc, Graciela, and a ragtag bunch from South Presa stand cheek-by-jowl with an ecstatic, diverse crowd to catch a glimpse of JFK and Jackie at San Antonio International Airport, only to share collective horror when the Catholic presidente is assassinated days later. As Graciela emerges from the shadows of loss with changes to body and spirit, strange happenings— whispers of miracle—arouse the attention of a local priest with serious anger management issues. In the corporeal landscape of I’ll Never Get Out of This World Alive, abortions are illegal, segregation is the law, the institutional authority of the pre-Vatican II Catholic Church is formidable, and the only folks looking out for the losers are, at face value, fellow losers. These deeply flawed, complicated holy fools, both ghostly and real, have populated Earle’s songs for decades, restricted to verses, choruses, and melodies. In I’ll Never Get Out of This World Alive, Earle gives their hard lives more facets, resulting in passages of breathtaking detail, sometimes beautiful, sometimes harrowing, yet always glowing under Earle’s loving touch, wry humor, and lyrical brevity; the pace is so expeditious that the gruesome and the glorious go down with equal ease. One hopes Earle’s fiction jones haunts him like Hank haunts Doc: relentless and never satisfied. —Robert Burke Warren Experience What will you experience at Mirabai? A Moment in the Sun John Sayles McSweeney’s, 2011, $29 D imly remembered now, the Spanish-American War—precipitated by the unexplained sinking of the USS Maine in the Havana harbor in 1898—was our nation’s first go at exporting democracy (i.e. to Cuba, Puerto Rico, the Philippines, and Guam). It announced the role we continue to play to this day, that of a proactive, global force, while demonstrating our facility for cloaking imperialist tendencies in the rhetoric of liberation. In John Sayles’s new historical novel, A Moment in the Sun, a gun-slinging brothel boss rallies an outfit of luckless Alaskan prospectors with the absurdsounding declamation, “Shall we free the oppressed Cuban from the saffron banner of Spain?” One volunteer, Hod, feels this is “something big, something real, something important in the world and that he is part of it.” Predictably disillusioned, Hod soon realizes that “men like him, homeless, desperate men, are blown about the world like cinders from a locomotive stack, and the Army is as good a place for them to end up as any.” Known primarily as a filmmaker whose distinguished body of work includes The Brother from Another Planet, Matewan, and Lone Star, Sayles is a storyteller intent on validating the experiences of the disenfranchised, portraying injustice, and elucidating paradoxes that belie the social order. His hefty war novel, which ranges across multiple fronts and cultures, ranks with the best—and avoids the didacticism that occasionally hinders his films. His representations of torture and oppression are visceral and all the more affecting for the lack of rumination. Labor and relations among workers, whether in a lead mine or a toy factory, are weightily detailed and suffused in gloom. When the author drifts into the backstory of a hospital worker, the daughter of a Chinese tenant farmer sold as a child to a Hong Kong pimp, so perfectly does he convey the mood that the reader can almost hear a bamboo flute mournfully accompanying the segues. With period touches such as an opium-addicted paperboy in lower Manhattan, sexual jokes in a minstrel show, or the public electrocution of an elephant, time and place feel at once foreign and altogether plausible. There are inspired flourishes in his use of slang: The men in the prison where President McKinley’s assassin is held are “swindlers and pete-men, gashouse pugs and forgers, sneaks and stalls, smash and grab artists, pennyweights, till-tappers, boardinghouse thieves and moll-buzzers.” The novel centers on the 25th Infantry, an actual segregated regiment of “buffalo soldiers” deployed because it was believed that people of color were immune to tropical diseases. It chronicles three men from Wilmington, North Carolina: Junior, the son of a McGill-educated physician who writes his father thoughtful accounts of military life and race relations in stunning prose; Royal, who holds a vague hope that a tour of duty will give him a foot up in the postbellum south; and Coop, a craps-shooting brawler who knows the battlefield is as close to equal opportunity as he will ever get. While the men are off doing Uncle Sam’s bidding, white supremacists stage a coup in their hometown, killing many and forcing black political and community leaders to flee. The Wilmington Massacre really did happen. The arrival of Jim Crow while the men are abroad half expecting to be honored for heroism (and simultaneously coming to comprehend that they are merely tools in a racist-colonialist plot) is the book’s central irony. As a novelist in full stride, Sayles makes us realize that the truth is simply unacceptable. —Marx Dorrity Mirabai of Woodstock Nourishment for Mind & Spirit ® Books, sacred objects and workshops that can change your life in ways you’ve never imagined. Since 1987, always a new experience. 23 Mill Hill Rd Woodstock, NY (845) 679-2100 Open Daily 11 to 7 Country Wisdom news For the price of an ounce of silver, you can subscribe to Country Wisdom News and invest in your community newspaper. Family fun • Folklore • Food Farms • Friends • and more... An annual subscription is $35. Send checks to PO Box 444, Accord, NY 12404. Information: Call 845-616-7834 or visit countrywisdomnews.com July 2: British Invasion! Authors & Music July 8: Actors and Writers: Shorter, Faster, Funnier July 9: Leslie Daniels: Cleaning Nabokov’s House July 13: Larry Beinhart: Salvation Boulevard July 14: Bar Scott: The Present Giver July 16: Edie Meidav: Lola California July 17: Michael Gotkin: Artists Handmade Houses July 23: Smith/Ratner: Who Killed Che? July 30: Marbrook, Zurhellen, & Zepettello July 31: Ed Breslin: Driving Miss Dutchie 29 Tinker Street, Woodstock, NY 12498 845-679-8000 • Open Daily • 7/11 ChronograM books 55 POETRY Edited by Phillip Levine. Deadline for our August issue is July 5. Send up to three poems or three pages (whichever comes first). Full submission guidelines:\submissions. Upon receiving a large wooden United States map-puzzle: “I didn’t realize how well America fits together.” —Brant Clemente (6 years) we are all alone together —p Seamstress Horizon, Altered Drifting I do not tell them about shadows drifting over my tongue, like hands. They think that duty is a nail. It is an art. Cloth of sky snagged on a branch, chrysalis, dress left at the threshold of dream. Once upon a time, it was the future, The rim of the world where grass was greener. It was where tomorrow came from While we slept, and where today went Once we were done with it. It was where parallel lines finally met, Where the sky and sea compared blues. It was the entrance for clouds and their exit, Where storms brewed and the moon died. The place the birds vanished in autumn, Where butterflies arrived in spring, Where tall sails foretold the ship. It was the boundary of what we knew, The threshold of what we might learn, It was the tree line, the sea level, The hill top, the purple mountains’ majesty, The saucer of all we had been, all we were, The vanishing point, The skyline. I remember that summer dad bought a boat. You were big enough to drive it alone, So I was left to myself, throwing horseshoe crabs at no one. I remember the storm When the craft, unmoored from the bay sand, Drifted from shore and You chased it down the beach and out into the bog. I waited and watched with dad As you ran ahead, past where any of us had ever been, Out onto the marsh that fed deep into the bay. You, reedy and taller than the wetland grass, Bigger than the setting sun still visible through the clouds, Disappeared into the wide blue While we struggled to hold sight of you. What I make here, is free. My hands are swallows. Wind and stone pass through my flight. What I make here cannot be bought or sold. Only lived. —Christina Lilian Turczyn Surprising Grace It was where the planes came from. I remember the thunk that beheaded the rooster and her loosening patience as she watched life run out around her in circles. It was what they took. The jars she could tighten with one good wrench against anything getting in. The fire she stoked when it had all but given out. How she could lift you, carry you, break you if it came to that and the surprising grace of her ruined hands. The care they could take. —Mary Cuffe Perez —Ted Taylor CODA Never were you lovelier than now. Come glazed and glowing Gilded with delight. I lay crumpled, The pillow, pulled to muffle my roars, Clasped to my chest. Such finely Extracted pleasure to draw Raw bellow, bawl and growl. Your gentle smile remakes this erotic Deftness as a doll’s-house blessing Youth sweeping through joy. Sex, is, for the aging, and less supple, A marvel of unfathoming depth: The mystery and mastery Of making love revealed and known, Our hundred years of life and love Proclaimed. There is a coda To even the smallest act And this holds pleasure in your face For the pleasure you have given, Your tongue’s nursing delicacy Tasting as fresh as morning. —Nigel Gore 56 poetry ChronograM 7/11 —K. A. Willis I’ll Speak to the Blue Jay A Blue jay spoke—to Me—today While on his way to feed— He fluttered by the window sill And soon he—softly—said: “Hi! Have you seen—the Crow—today? He’s—stolen all—the Seed! He fluttered off and sounded shrill Just after he had fed. “I know this—awful Crow—assayed The area—indeed— This leads me to believe the Meal Was surveyed in his Head.” I told Him that—the Crow remained— With awful cunning speed Far fleeting—from my Mind—Unreal— That probably—He’s dead— And though I’ll—never know—the way This Crow had chose to heed— This Blue jay’s words—enough—seem real— I’ll speak to Him instead. —Daniel de Sa’ The Greening The Bear Café Goya When you first behold all eighteen shades of green kept fresh with piped-in mist, piled high and plush on Brazilian hardwood, you understand A few weeks before his death My father told me of a bear. He saw it one morning On the nursing home lawn. 10:30 A.M. breakfast with Handel & Schumann via air to glean is to reap time & living by loving to thrive on a riff as Prez put it so glad the phone was dead let it remain so There’s nothing like when you roll the moist tiles of “nature’s velvet” in your hand They’ve retrained truffle pigs in Southern France to hunt the choicest squares Or young locals hike deep in and carve the green from rims of shaded boulders with X-acto knives Most of us reap our spongy sections from the string of mossyards squeezed between Long Island’s East End wineries Where tipsy tourists pay to roll around on the lushest patches, pay even more to cut their own It ambled, sniffing air and ground. It was startled by a car horn. Crossed the stone wall And in an instant was gone. An ancient physician from Oslo believes me. He’s the only one, my father says. The staff? They nod and whisper, he says. Such inhumanity in this place called a home. You don’t believe me, he says. Am I losing his mind? After all, he is 87, unable to walk, Deaf without hearing aids. It is possible you saw a bear. Possible? he asks. A bear is or is not. It is not the subject of debate. There are two possibilities, he says. Either it was there or I am mad. Then it was there, I say. Go home, he says. It’s time for my lunch, he says. My day is meals and sleep. I’ll stay and eat with you. Go home, he says. And don’t hit the bear. —Andrew F. Popper All this to feel something spring back, turn it over and find clinging dirt of black and brilliant pedigree. —Katherine Hauswirth Gardening My goldenrod, its flowers burst, Spread gently o’er your swollen bud, Sweet nectar pools to quench my thirst, Unstoppable waves in an ocean flood. Your fields so ripe, I till your soil, Upon your lilies, I take feed, And when I’ve spent your mortal coil, It is here, I spread my seed. —Tom Weigel Haven When the thunder started rolling in, a cat and a dog rained into my tiny office. Maybe they thought I could keep electricity at bay. Or that my superior intelligence would make sense of it all. I’m not a very good God but I did stroke Jerry into purrs, pat Molly’s nerves toward a ponderous sigh, a sinking back into carpet. For fifteen minutes we shared safe haven. Then the storm withdrew the sky re-blued and we went our separate ways. —Catherine Wald Sex Open Your Eyes Sex is a cochlear implant long overdue: A hard itch on your mind too pricey to scratch, A collar found on foul monkeys at the zoo, A craving with no pill, gum, or patch. A gentle touch tenses that eager spot, Playing with it amid drugs, toys, and tools. Soon your head lightens off that moist cot, And you drift to a realm of fainter rules. O, wake from that bed and listen to that praise, Dare you stand new ground as hearer and lover. But sound has a steep price in this new shrill haze For that speech impede will never recover. —Samantha Tansey It is all in the past, the worse no more Thoughts about only the good Why was it like that thought? Who knows, not even I do The confusion travels all throughout me Yet calmness has arisen The hate is half gone The path you must show now I am leaving it up to you Lead me into the world You shall not be frightened Feel free and let go —Ally Jerro-Greco (14 years) —Rick Tannenbaum 7/11 ChronograM poetry 57 Newburgh history & HEART by Anne Pyburn photos by David Morris Cunningham the minuteman statue at washIngton’s headquarters If Newburgh were a person, she’d wear pearls and silk—pearls from great-grandma, silk from the Salvation Army—a supple black leather, and just the right scent. The kind of lady who gets mentioned in both Look magazine (“All-American City,” 1952) and Oui magazine (“Towns Without Pity,” February 1979). Newburgh abounds in contrasts and grace notes. •BACKWARD GLANCES• History is alive here. Washington’s Headquarters, where the First General lived whilst foiling the Newburgh Conspiracy’s scheme to make America a monarchy, is just one stop on your historical tour. There’s the New Windsor Cantonment, a reconstruction of the Continental Army’s final encampment, where reenactors love to play and the first Purple Heart was awarded, and the Purple Heart National Hall of Honor museum. The Historical Society of Newburgh Bay and the Highlands maintains the Captain David Crawford House, a monument to the era of grand side-wheel steamers. Then there’s the faux Scottish castle built on Pollepel Island by arms dealer Francis Bannerman, who expressed the desire that his armaments collection would one day be known as “The Museum of Lost Arts.” Closed to the public for decades, Bannerman’s Castle can be toured these days—get there by guided kayak or by tour boat. And the Pollopel is far from the only tour vessel plying the shining bay amidst the Highlands; the Pride of the Hudson and the River Rose both offer Newburgh-based cruises. •MUST-SEES• Cher Vick, the editor and creator of newburghrestoration.com, relentlessly posts tempting photos of some of the city’s hundreds of real estate bargains, architectural diamonds in the rough. Asked to name a couple of Newburgh “must-sees,” she rattles off over a dozen: “The Motorcycle Museum, the Newburgh Jazz Fest . . . The Safe Harbors folks are holding the Ann Street Market and Family Fun Day on August 6. The Habitat ReStore, that’s a great place for furniture. Bric-A-Brac has furniture and candles and collectibles—it’s owned by the same people that have the Caffé Macchiato. I’m trying to give you places less mentioned than the usual bunch.” “The usual bunch” would include the international headquarters of Orange County Choppers (the custom and production motorcycle manufacturer founded by Paul Teutul and son), that rare blend of inspired iron-horse mania and family angst that made a reality show hit on the Discovery Channel’s “American Chopper.” And don’t forget the hundreds of vintage bikes housed at the Museum of Motorcycle History at 250 Lake Street just on the outskirts of the city. The “usual” waterfront scene is arguably the closest thing to a true partier’s mecca that the Hudson Valley has to offer. There’s Gully’s, the boat that rocks all summer long with free live music six nights a week, and Torches, home of a 6,000-gallon saltwater aquarium. The Blue Martini, where the region’s young and hot-blooded dress to impress for the dance floor and sip the signature drink from pint glasses in the clubby back room. Seafood and sushi, classic Italian and steak, burgers and wings—all of it swathed in spectacular river scenery and backed by an infinity of rolling mountains. 58 Newburgh ChronograM 7/11 mark mallia at the river grill ramona montevarde at safe harbors dan brown at the wherehouse betty and ed koren at bridges over time liz torrence at newburgh artisans bill imperial at imperial guitars megan wilson at edible arrangements vinny aliotta & brandon garzione at barton birks chevrolet cadillac 7/11 ChronograM newburgh 59 FREE CONCERT SERIES Music Under the Stars community pages: newburgh West Point’s Trophy Point Amphitheatre — Sunday Evenings through September 4 Kids Night with Quintette 7 Sunday, July 10 — 7:00 p.m. Pre-concert events — 6:15 p.m. Jazz Knights: Play It Again Sunday, July 17 — 7:30 p.m. Jazz Knights: The Music of Charlie Brown Sunday, July 24 — 7:30 p.m. Concert Band: Alumni Cadet Glee Club Concert Sunday, July 31 — 7:30 p.m. Become a fan of the West Point Band on Facebook and YouTube. Schedule subject to change, for latest information visit or call the concert hotline: 845.938.2617 Chronogram_living_7.1:Layout 1 6/14/11 9:24 AM Page 1 FRAME OF REFERENCE: Live in style. Dioramas in the 21st Century Rachel Vaters-Carr Jennifer Hunold Dream Home Sweet Home Embroidery on Cloth July Sale NEWBURGH THE BELLS’ ROUTE 32 94 NORTH PLANK ROAD 845.565.6000 SALE ENDS JULY 31, 2011. SEE DESIGN CENTER FOR DETAILS. ©2011 ETHAN ALLEN GLOBAL, INC. 60 Newburgh ChronograM 7/11 Exhibition runs through July 9 (845) 784-1146 the ritz theatre, where lucille ball made her stage debut in 1941. the theatre is currently undergoing renovations. •A HAPPILY HEADY MIX• Newburgh is people like Vietnam vet and Wherehouse chef Dan Brown, serving up “cosmic American comfort style” alongside vegetarian and vegan goodies in a 150-year-old building. People like painter M. E. Whitehill, great granddaughter of 19th-century master Thomas B. Pope and a retired librarian. The diversified fine arts of modern Hudson River School practitioners intersect in a cyberspace matrix of beauty and activism: Whitehill’s website promotes Vick’s preservationist efforts, and the trendy Waterfront zone just welcomed back the newly renovated and reopened West Shore Railroad station, now offering theatre and pizza in a venue designed by the team that created Grand Central Station. Factor in Downing Park—designed by the Olmsted/Vaux team that dreamed up Central Park—and you begin to glimpse the treasure trove that is, as Vick puts it on the Newburgh Restoration website, “New York’s other city.” New York’s other city has won many lovers—people like Jersey girl Tricia Haggerty Wenz, founder of Safe Harbors of the Hudson, headquartered on Lower Broadway. Safe Harbors is dedicated to “transforming lives and building communities through housing and the arts,” and those aren’t just words. Safe Harbor’s Cornerstone Residence is a rare blend of artists’ lofts, apartments, support services and amenities, and their renovation of the Ritz Theatre—the landmark home of vaudeville and trial runs for Manhattan productions, where Lucille Ball made her first stage appearance—is making great strides. The legend is that a sign posted backstage at Manhattan’s Paramount Theater warned, “If you think this audience is tough, try Newburgh.” The members of the Newburgh Actors Studio (“A Little Taste of Manhattan in the Hudson Valley”) regularly do exactly that. Abundantly blessed with many riches, the “Queen City” is anything but pampered. Newburgh’s boosters, creatives, pioneers, the river rose on the newburgh waterfront and preservationists—the Queen’s true consorts—are busy painting, hammering, building, and bringing new life and prosperity to their beloved city. The Dry Dock, a new nightclub, has recently opened up on lower Broadway across from City Hall . . . The Newburgh Brewing Company should be up and running by the end of December . . . So stay tuned and do stop in. The Queen will be delighted to make your acquaintance. •NEWBURGH: A GRACE NOTE• Nancy Billman, a Newburgh native, migrated to Hilton Head, South Carolina, where she married her late husband, Peter, a plein air painter and woodworker, and practiced her caterer’s art. They moved back into her family’s gracious 1820 Federal on Newburgh’s Montgomery Street over a decade ago and blended their talents to create the Goldsmith Denniston House, an artfully restored and just-updated-enough B&B and event venue. “In Hilton Head, kids got a Beemer given to them on their sixteenth birthdays,” Nancy says. “Those weren’t the kind of values we wanted to instill. I missed the mountains. I missed having a garden. And Peter flourished here as an artist. He always said that everywhere he looked there was a painting.” goldSmith denniston house B&B. 7/11 ChronograM newburgh 61 trickle down by Lisa Dahl, part of the exhibition “ Frame of Reference: Dioramas in the 21st Century,” through july 30 at ann street gallery •NEVER A LOSS FOR FUN• The Newburgh arts calendar is full to bursting—“Crazy Ladies” at the Railroad Playhouse, an Italian thriller at the Downing Film Center, “Art in Bloom” at the Karpeles Museum, and Hudson Valley poets at the Newburgh Free Library. The Greater Newburgh Symphony Orchestra, the Newburgh Chamber Orchestra, and the Opera Company of the Highlands in nearby New Windsor would all love to have your ear between free live jazz concerts at the Newburgh Jazz Festival—a series of 18 concerts ranging from a big band to the vintage girl group sounds and modern jazz vocals of String of Pearls—on the waterfront, Wednesdays and Thursdays in July and August. The Wherehouse on Liberty Street hosts bands like Talking Machine and Deep Chemistry, open mike nights, and parties for Outsider Magazine, a DIY local music fanzine. The Goldsmith Denniston House B&B welcomes 500 guests a year and proprietor Nancy Billman says they’re never at a loss for fun. “The younger crowd likes the waterfront,” she says of the city’s hottest restaurant and nightclub zone. “Then there are people who want to relax with a good book after they visit Washington’s Headquarters and West Point, and go out to eat someplace quieter like Beeb’s. Or grab a bite at the Alexis Diner after they’ve done the boat tour of Bannerman’s Island [the site of a simulated Scottish castle built by a munitions dealer at the turn of the century]. I mean, we’re so close to so much here.” So much indeed. Washington, Bannerman, and other notable and notorious figures out of the history books aside, both the Alexis—a deliciously over-the-top diner known for its portions and splashy décor—and the Zagat-rated and multiple “Best of Hudson Valley” winner Beeb’s American Bistro are worth the trip from anywhere. And it’s an easy trip to make from almost everywhere. Since Henry Hudson’s day, the Newburgh has been a transit hub. Modern options include Stewart International Airport, the intersection of the New York Thruway with a couple of handy interstates, the reinstituted Metro North ferry line that’ll get you to and from Beacon in 10 scenic minutes, and a water taxi back and forth to Poughkeepsie at 60 mph. w w w. ann s t r e e tg all e r y.o r g w w w. d e nn i s to n b b .co m ADVERTISER RESOURCES Ann Street Gallery The Art of Hair (845) 534-5767 Basement Solutions of the Hudson Valley (845) 564-0461 Bishop Dunn Memorial School Certapro Painters Ethan Allen Gentech LTD (845) 568-0500 Gianetta Salon & Spa Hollenbeck Pest Control Imperial Guitar & Soundworks 62 Newburgh ChronograM 7/11 Landscape Home & Garden Center Leo’s Italian Restaurant & Pizzeria Medical Arts Pharmacy (845) 561-3784 Mount Saint Mary College Newburgh Artisans (845) 565-7540 New York Eyewear (845) 562-6284 The River Grill Safe Harbors West Point Band Yobo Restaurant Mount Saint Mary College LEADING • CARING • INNOVATING ADULT & GRADUATE DEGREE INFORMATION SESSION TUESDAY, JULY 14, 2011 • 5-7 PM •• •••• OWELL AVENUE, NEWBURGH, NY 12550 • high definition optics with designer style For Adult Students: Flexible evening/weekend bachelor’s degree programs. Ask about our online/on-site programs. ADMISSIONS BARBECUE WEDNESDAY, JULY 20, 2011 High school juniors and seniors: Start your college search here! Join us for a great Sneak Peek summer barbecue lunch and learn about what the Mount can offer you. Bring questions for our students, faculty, coaches, and financial aid and admissions staff. TRANSFER STUDENT NIGHT WEDNESDAY, JULY 27, 2011 • 4-7 PM Prescription Sunglasses – Aloha! DESIGNER EYEWEAR Tiffany & Co • Giorgio Armani • Gucci • Versace • Coach Fendi • Adrienne Vittadini • Vera Wang • Calvin Klein • Lacoste Michael Kors • Dana Buchman • Diane Von Furstenburg • Nine West Joseph Abboud • Sigrid Olsen • Jahne Barnes • Republica • Disney XGames • Nautica • RayBan • Maui Jim 47 North Plank Rd. Newburgh NY 12550 845-562-6284 newyorkeyewear.net midvalleymall.com Transferring from a 2- or 4-year college? Looking to use college credits earned in the past? Bring your transcripts for our Registrar’s staff to evaluate. Talk to admissions and financial aid staff, and learn more about our degree programs for adults and traditional college students. Register online for these events at 330 POWELL AVENUE, NEWBURGH, NY 12550 • 7/11 ChronograM newburgh 63 community pages: newburgh • • • • For Graduate Students: Master’s degree programs in nursing, business and education. ©2011 France Menk I advertise in Chronogram because its readers are really cool people. Since our handmade/fair trade theme is embraced by cool folk, it seemed only natural that this would be a good way to reach them. I have had a substantial increase in new customers since posting my ad. Marge Bell Owner, Newburgh Artisans Newburgh Our services and packages in hair, skin, brow shaping, manicures and pedicures, massage and body treatments encompass traditional services with a unique and signature style. GIFT CERTIFICATES AVAILABLE Get your message across: Join the chronogram community. Call 845.334.8600 { B ES T Brow Bar IN THE H U DS O N VA L L E Y } 1158 North Ave, Beacon, NY (845) 831-2421 (conveniently located near I-84 Newburgh/Beacon bridge & Metro North) Bishop Dunn Memorial School community pages: newburgh Nestled on Mount Saint Mary College’s scenic campus is a picture-perfect place where children are taught how to learn, how to live and how to love. The place is called Bishop Dunn Memorial School. BISHOP DUNN Offering a quality Pre-K to 8th grade education and an equally unique summer enrichment camp MUSICAL INSTRUMENTS NEW, USED AND VINTAGE Sales, Service, Repairs, Rentals, Lessons We Buy, Trade & Consign Fender, Martin, Gibson, Gretsch 99 ROUTE 17K, NEWBURGH, NY 845-567-0111 Call 845-569-3496 for a tour Locally owned & operated National Award Winning • INTERIOR • EXTERIOR • RESIDENTIAL • COMMERCIAL • RESTORATION & FINISH OF LOG HOMES Call today to schedule your free estimate! I-84 Exit 6 1000’ east 226 Rt 17K Town of Newburgh 564-2744 Hours: Mon-Sat 8-5, Sun 10-4 •POWERWASHING •WALLPAPER REMOVAL • DRYWALL REPAIR • FULLY INSURED •WARRANTY 845-987-7561 Official Member Of The Orange Co. Chamber BBB Green Pro Company Safe Applications For Children & Pets FOUNDATION REPAIR EXPERTS CELLAR DOORS EGRESS WINDOWS SUMP PUMPS (845) 564-0461 fvillano@basementshv.com Licensed Engineers & Contractors 64 Newburgh ChronograM 7/11 Voted Valley’s Hudson F The Se inest By n Orange tinel & Coun Post ty Family Owned & Operated For 4 Generations!! Call today and receive 10% off your first service. Schedule Your Free Estimate Today · Quality Pro Certified · Green Pro Certified · Free Estimates · NYSPMA · 24-Hour Service · Fully Licensed & Insured RESIDENTIAL & COMMERCIAL PEST CONTROL james@hollenbeckpestcontrol.com 845-542-0000 An edgy sAlon with A greAt reputAtion, known for professionalism, quality of service, and friendly and knowledgeable staff. owner, Michelle iorio, a hair artist for 14 years, ensures that only artistic and creative individuals with a passion for hair serve her clientele. specializing in curly hair as well as all other hair types, we educate our clients on the maintenance of healthy hair and the techniques to recreate salon styles at home. other services include: nails, full body waxing and eyelash extensions. open MondAy - sAturdAy wAlk-ins welcoMe EAT HEALTHY & ENJOY EVERY MOUTHFUL. CHINA JAPAN KOREA INDONESIA Open 7 days Lunch and Dinner Reservations accepted 37 North Plank Rd. Newburgh, NY 12550 ROUTE 300 NEWBURGH, NY (845) 564-3848 YOBORESTAURANT.COM Parata Max robot for accurately filled prescriptions Phone 845-561-DRUG Have a smart phone? Check out our menu! The River Grill Nestled on Newburgh's historic Waterfront with picturesque views of the Hudson Valley and the magnificent Hudson River, The River Grill takes pride in offering outstanding food and superlative service. The river grill is open every day of the week Serving lunch & dinner 40 Front Street | Newburgh 845.561.9444 Come and enjoy an extraordinary dining experience! N ewburgh Ar tisA N s Handmade/Fairtrade Gifts From Around The World Work by Local Artists MArg e BeL L , P rOP ri e TO r (845) 565-7540 • Corner of Ann & Liberty St., Newburgh Open: Thursday - Saturday 11am - 6pm 7/11 ChronograM newburgh 65 community pages: newburgh Free delivery & pick up Food & Drink Cottage Industry The Joys & Challenges of a Home-Based Food Business By Peter Barrett Photos by Roy Gumpel T hree. Home processors are forbidden from using any commercial equipment like a large mixer, which means that Pipman relies on recipes that let the dough ferment overnight and generate gluten without kneading. She describes a typical workday: “If I get up at five, I can be done at 8:30, and then make my deliveries.” Her goal is to increase demand so that she can bake at capacity: about 70 loaves per day, four 66 food & drink ChronograM 7/11 days a week. “If I can sell more, I could just keep going until about 10, without having to add an extra day. I would be more efficient, since I’m already doing it.” She can make about 25 loaves at a time in her big old second-hand Garland double ovens, so all she would have to do is add another batch per day. Right now, her pretax net averages about $950 a month, and besides helping provide for her family, she’s obviously enjoying the work. It’s worth mentioning here that her bread is very good; it has real character and a comforting, home-baked flavor that commercial bakeries rarely achieve. And that quality is vitally important, says Mimi Fix, the author of Start & Run a Home-Based Food Business, and a passionate advocate for home processing. “Honest feedback is important; not everything is great. When you give something away, people will love it. Paying for it is a different thing. But if you’re a food person who’s businessoriented, it can really make a difference to your income.” After 30 years working in the food industry—beginning at home, then opening a bakery and café, Fix has returned to her licensed home kitchen to work. In addition to baking, writing, and consulting, she teaches regular classes on the subject at community colleges throughout the central Hudson Valley. To help people get that honest feedback, and out of concern that her students who had started businesses lacked a support group, Fix started the Hudson Valley Baking Society, where home processors can meet and share stories and ideas about good sources and markets. She hopes to start other product-specific offshoots as the community grows. Fix continues: “About 30 of the 50 states have cottage laws, but they’re all different. New York is easier than some, and stricter than others. Running a business isn’t about food at all; you need to think about the daily reality of producing, but besides cooking, there’s bookkeeping, market research, and finding people and places to sell your stuff.” Fix strongly suggests beginning modestly. “Don’t bite off more than you can chew. It’s a good time for making local, seasonal, small-batch products; if you start small you have a better chance of growing organically, with less frustration.” mor pipman baking bread at home in glenford. pipman’s home-based food business, much more bread, has faced a number of bureaucratic and regulatory hurdles since launching in 2010. A limitation that all the producers interviewed found excessive is the prohibition against 20-C exemption licensees using the Internet in any form whatsoever for marketing. While concerns about illegal interstate commerce are valid, it’s hard to imagine how informing a local mailing list or Twitter followers that one’s wares will be at some fair or farm stand on a given day could cause any harm. Fix agrees: “It’s totally unfair. The Internet is so much a part of how we communicate today. It’s like saying that you can’t use the phone.” Julia Sforza lives in Esopus, where she makes jams and jellies in her kitchen for sale under the name Half Pint Preserves. “Getting certified was easy,” she says, “but some of the other rules are a little daunting.” The limitations have “made me more creative, but it takes time to get the word out and make contacts. It can be even harder in other states, though; we’re lucky that the license is free in New York.” She expresses disappointment that making the transition from the exemption to the regular 20-C license is expensive, seeing it as a high hurdle for anybody looking to build a business. A 20-C license allows home processors to make a wider variety of foods—including acidified things like pickles—and to use the Web, but it costs $400 for a two-year permit (up 100 percent over 2007) and there’s talk that it may increase soon to $900. Beth Linskey is the owner and founder of Beth’s Farm Kitchen in Stuyvesant Falls. 30 years ago, she got a full 20-C license for her kitchen and now runs a company with 12 employees that grossed about $400,000 last year. They still make all their jams in pots on the stove, just many more types and jars than at the outset. They also do co-packing for other local producers, saving them from having to get inspected and do the canning at home. People getting their products co-packed still need to get their recipes approved by the Food Venture Center at Cornell, and the co-packers must follow the recipes exactly. Speaking of the regulations, she says “It’s much better now [than when I started] and clearer, but they could loosen up a little bit, especially with advertising; the smallest people are being penalized unfairly. And in rural, low-income areas, they should really make it easier for people to help themselves.” She encourages people to agitate for better rules, beginning at the local level, and there’s precedent: this March, Sedgwick, Maine passed the first-inthe-country Food Sovereignty law, allowing residents to “produce, process, sell, purchase, and consume local foods of their choosing.” It allows for buyers and sellers to agree to waive liability, and for farmers to sell raw milk and animals slaughtered on their farms; seven towns in three states have since followed suit. At about the same time, Michigan passed its Cottage Law, which allows for any homemade food to be sold as long at it is labeled as having not been inspected by the State Agriculture Department and bears the full name and address of the maker. Awareness of and demand for local, handmade food are clearly increasing. Linskey concurs with Fix: “People these days are really savvy, both the producers and consumers. People really want to do this [canning] and it’s going to be big this season. Don’t be afraid of canning!” Much Mor Bread is about to become an LLC; Pipman hired a lawyer to help her navigate the legalities of making the business into a real entity to protect her and prepare for growth. She finds the regulations easy enough to abide by: “if you’re doing what you’re supposed to be doing, there should be no problem,” though she finds the Internet prohibition as frustrating as everyone else does and would love to be able to sell her apple and tomato sauces. Pipman’s is a classic story about adapting to hard times and discovering a new vocation in the process. “We bought the church for me to use as a studio,” she reflects, sitting at the kitchen table surrounded by samples of her bread, jam, and sweets, with a dozen metal bowls of dough rising on the counter. “But now I wonder if maybe that’s behind me.” Mimi Fix Beth’s Farm Kitchen Peter Barrett writes prolifically about his own culinary creations at. 7/11 ChronograM food & drink 67 Our hours are 11 AM to 6 PM, Friday - Sunday. 10 Ann Kaley Lane, Marlboro, NY 12542 Phone: (845) 236-7620. My family invites your family to dine at Howellâ&#x20AC;&#x2122;s Cafe. Now Open for Dinner New look, old feel, same great food! HOURS: Mon. 7am-4pm, Tues.-Sat. 7am-9pm, Sun. Closed DOWNTOWN Goshen 10924 845-294-5561 Like Us Today 68 food & drink ChronograM 7/11 Restaurant Openings RESTAURANT . SUSHI . LOUNGE OPEN DAILY FOR LUNCH AND DINNER SERVING OUR BRUNCH MENU ON SUNDAYS 11AM-8PM VISIT THE BACKYARD). A N E W PRIVATE COCKTAIL LOUNGE AND URBAN GARDEN OASIS BEHIND BULL AND BUDDHA OUTDOOR SEATING AVAILABLE FREE PRIVATE PARKING OFF MILL STREET). 319 MAIN ST POUGHKEEPSIE, NY | 845.337.4848 BULLANDBUDDHA.COM | FIND US ON FACEBOOK! Every day, enjoy 5% off any 6 bottles of wine, 10% off any 12 bottles of wine. —Zan Strumfeld On Tuesdays receive 8% off any purchase, 13% off any 6 bottles of wine, 18% off any 12 bottles of wine Open 7 days For information on our upcoming wine school, e-mail us at ingoodtaste@verizon.net 7/11 ChronograM food & drink 69 Dry rubbeD, wooD smokeD bbQ Ribs, bRisket, Pulled PoRk,Giant tuRkey dRumsticks From the Grill steaks, Fish, chicken, VeGetables AmericAn comFort FooD Pot Pie, meatloaF, mac & cheese BISTRO WINE BAR thirsty? try one of our 12 local micro brews from our frost covered beer taps, or sip the area’s finest selection of rare tequilas, kentucky bourbons and single malt scotches. 307 main street, poughkeepsie, ny 12601 phone 845.483.8074, fax 845.483.8075 lunch, dinner & catering available Sign up today to become a Texas Roadie VIP! Gomen-Kudasai 4C ad ORGANIC & LOCAL FINE WINE/CRAFTED BEER NIGHTLY SPECIALS EARLY BIRD DISCOUNT 6/13/11 Bring this in and receive a 2"W x 2.75"D Free Appetizer** OPEN WED THRU FRI AT 5 SAT & SUN AT 2 Name: 5 CHURCH ST. • NEW PALTZ, NY 845.255.2772 SURUCHIINDIAN.COM *Available on Wednesdays only. Limited time. Not valid with any Birthday: Zip Code: Kingston, NY Give your customers the best snacks and we’ll give you the best service. **With purchase of 2 entrées. Excludes Combo Appetizer. Not We don’t spill the beans! We will not sell or rent the information this ininand receive a you provide.Bring Emails may appear your bulk email folder. Free Appetizer** 70 Name: Email: Birthday: food & drink Zip: ChronograM 7/11 Kingston, NY **With purchase of 2 entrées. Excludes Combo Appetizer. Not 500 Miron Lane Kingston, NY 12401 Phone: 845-336-7600 Call DSD Services, Inc. handles over 3000 items Call Mac 1.877.642.5622 Food & Drink Events for July “Best Sushi”~Chronogram & Hudson Valley Magazine Fleisher’s Book Launch & Block Party July 9. Join Jessica and Joshua Applestone from Fleisher’s Grass Fed & Organic Meats as they celebrate the publication of The Butcher’s Guide to Well-Raised Meat with an old-fashioned block party on John Street in Kingston. Don’t miss the pig roast, face painting, games, street performers, and live music by musicians including The New Zion Trio. Keegan Ales will sponsor Chicken $H!T Bingo and the “Dunk the Butcher” tank will help support local soup kitchen The Queens Galley. Local brewers and vendors will also join the street like Jane’s Ice Cream, The Groovy Baker, and Hickory BBQ Smokehouse. 3-6pm. (845) 338-6666;. Burgundy Wines Seminar July 16. Take a sip of the world with Millbrook Vineyards & Winery’s Summer Wine Seminar Session II, featuring both global and local wines. Try wines like Louis Latour Chassange-Montrachet 2008, Chanson Vire-Clesse 2008, and Nicholas Potel Nuits-St-Georges 2006. Bob Brink, fine wines manager at Arlington Wine & Liquor, will be the guest speaker. Reservations required. $45. 5-7pm. (800) 662-WINE;. Japanese Restaurant o saka su sh i. ne t TIVOLI 74 Broadway (845) 757-5055 RHINEBECK 22 Garden St (845) 876-7338 Rated “Excellent”~Zagat for 16yrs • “4.5 Stars”~Poughkeepsie Journal authentic rustic Italian cuisine • local ingredients New Paltz’s most exciting new restaurant Chef’s Choice Market Dinners July 20. Prepare for a four-course meal by Chef Brian Kaywork made only from local farms and producers like Gill Farms, Millbrook Winery, Sprout Creek Cheese at The Rhinecliff overlooking the Hudson River. Reservations required. $42.95. 6:30pm. (845) 876-0590;. Friends of the Farmer Festival July 30. A family-friendly day at the Copake Country Club with wine tastings, food sampling, and live music. This farm-loving festival lets guests meet and speak to those involved in the locally grown world, like farmers, growers, and winemakers. Includes day and night events like an educational panel and programming as well as a Taste of the Hudson Valley Bounty Dinner. The day also provides “little farmer” kids activities, like the fishing camp hosted by Big Willy’s Rods. Guests, $10. Families, $20. 11am-10pm.. Connecticut Wine Festival July 30 and 31. Taste what Connecticut wineries have to offer at this weekend-long festival. There will be 14 participating wineries, including Hopkins Vineyard, Land of Nod Winery, and Sunset Meadow Vineyards. Enjoy locally produced specialty foods like cheese, salsa, and jelly from vendors of the Connecticut Specialty Food Association. Gate tickets, $25. Advance tickets, $20. Under-21 and designated drivers, $10. 12-7pm Saturday, 12-6pm Sunday at the Goshen Fairgrounds, in Connecticut. (860) 677-5467;. 46 Main Street New Paltz serving fresh baked bread and handmade pastas on mismatched hudson valley farm tables in a warm and inviting setting. dinner thursday-monday 5:30-10:30 extended lounge hours 4:30-midnight friday and saturday call or email for reservations : 845-255-1426 atavolany@gmail.com B rody’s est cafe & Juice Bar Serving Healthy Food & Real Juice eat in or take out 159 W. Main Street, Goshen NY 10924 (845) 615-1118 Third Annual Black Dirt Feast August 2. A five-course meal prepared by some of the distinguished chefs in Warwick Valley and served al fresco at Scheuermann Farms and Greenhouses. The menu introduces locally grown produce with paired organic and biodynamic wines. There are three options for the main entree, including Crystal Inn Chef’s James Haurey’s wild Hudson Valley codfish, pan roasted with heirloom tomato, roasted fennel, pattypan squash and quiona ragout with a leek and sweet corn cream. All proceeds go to local charitable groups. $95. 6-9pm. (845) 258-4176;. Terrapin’s Fifth Annual BeerFEST August 6. Drink away the day with New York State-brewed beer, including tastings from Captain Lawrence Brewery, Fire Island, and Saratoga. Overlooking the Dinsmore Golf Course and views of the Hudson Valley, beer fanatics can sample more than 100 crafted beers at Terrapin Catering in Staatsburg. Some brewers will also pour special-release drinks exclusively for this event. Barbeque and vegetarian options will be available by Chef Josh Kroner, along with music and more. $35. Designated drivers, $19. 2-8pm. (845) 876-3330;. —Zan Strumfeld 7/11 ChronograM food & drink 71 Farm to Table Dining in Garrison Farm to Dining in G Farm to Table Dining inTable Garrison one philosophy Inspired Seasonal American Cuisine Valley Restaurant at The Garrison 2015 Route 9 ˙ Garrison, NY Reservations: 845.424.3604 ˙ ext. 25 one philosophy two approaches Inspired Seasonal Inspired American AmericanCuisine Cuisine Valley Restaurant at The Garrison Valley at The Garrison 2015Restaurant Route 9 ˙ Garrison, NY 2015 Route 9 • Garrison, NY Reservations: 845.424.3604 ˙ ext. 25 Reservations: 845.424.3604 • ext. 25 two approaches Refined Food Refined Comfort Food Tavern at Highlands Country Club Tavern Highlands Country 955at Route 9D ˙ Garrison, NYClub 955 Route 9D • Garrison, NY Reservations: 845.424.3254 ˙ ext. 16 Reservations: 845.424.3254 • ext. 16 Meet Sean... He Makes the Best Burgers . in the Hudson Valley La Petite Cuisine Serving breakfast and lunch in a quaint atmosphere sweet & savory crepes croque monsieurs paninis salads espresso & cafe au lait outdoor dining during the spring, summer and fall Located in the historical district of Warwick 20 Railroad Avenue 845.988.0988 72 culinary adventures ChronograM 7/11 Refined Co Tavern at Highl 955 Route 9D Reservations: 8 jennifer may Culinary Adventures Where’s the Beef? A Meat Lover’s Guide By Holly Tarson Red Devon serves grass-fed beef and locally sourced seasonal produce in bangall. H ow would you like your steak? We’ve come a long way since the days when the answer might have been simply, “medium rare.” Now steak can be dry-aged, grass-fed, flown in from Australia, or raised locally at a farm down the road. A variety of cuts abound, from NY strip and rib-eye to T-bone and tenderloin. Filet mignon was probably one of the first specific cuts to enter the high-end dining market, suggests Craig Stafford of Flatiron Steakhouse in Red Hook. He suspects this may be why it persists as the most requested cut of steak at his restaurant. But meat aficionados have also come to appreciate a marbled cut of beef on the bone. Marbling means there’s a little road map of fat that meanders through the meat, carrying tenderness and flavor wherever it goes. Dry-aging, the process of hanging the meat at a cool temperature for about four weeks, intensifies the flavor by drawing out excess moisture. If you are looking for local, the Hudson Valley has it. Grass-fed? You bet. On the bone or off, delicious steak is not far away. Flatiron Steakhouse In Red Hook, Flatiron Steakhouse is a few doors down from the one traffic light in the center of the village. To say you can’t miss it is no exaggeration. During warmer weather, sidewalk tables accommodate al fresco diners. Inside, paper-onlinen tables have been known to entertain early-dining families, and later morph into quiet two-tops in the front window for couples and friends. Larger groups can slurp down oysters and cocktails at the big table in back. Whether you are inside or out, Flatiron offers a deeply enjoyable dining experience. Frequently sourcing from the likes of Meiller’s, Migliorelli, and Northwind Farms, chef/owner Craig Stafford has crafted a scrumptious menu including numerous cuts of steak. Diners choose from six different sauces, all freshly prepared in-house.Whether you opt for the traditional steakhouse sauce made with brandy and green peppercorns or find yourself craving the adventure of habanero sauce or red onion relish, the choice is yours. Good luck passing up the shoestring fries or Brussels sprouts with wholegrain mustard. And if you like beer with your steak, Flatiron is a sure bet.They offer tasting flights of some unique and really interesting brews. Skytop Steakhouse For steak with a view, Skytop Steakhouse boasts the best panorama of Kingston. In the distance, the spires of Benedictine Hospital peek through the blanket of green treetops in summer and a palette of red, orange, and gold in the fall. Chef Ian Gunderude says their dry-aged steak is so tender, “you can cut it with a spoon.” The Skytop Steaks portion of the menu is substantial. Make it surf and turf with an add-on of crab cakes, shrimp, seared scallops or lobster tail. On weekends a roasted prime rib special awaits. Red Devon The relaxed elegance of Red Devon’s dining room coupled with their seasonal and sustainable philosophy make it a must for your culinary bucket list. Tucked just South of 199 and east of the Taconic in Bangall, Red Devon sources from local artisans and farms everything from cheese to produce to protein. In fact, much of their 100 percent grass-fed beef comes from their own Temple Farm in Millbrook. The cattle are a heritage breed named Devon. Get it? Red Devon. Chef Sara Lukasiewicz explains that as a breed, Devon cattle were meant to be raised on grass and grass alone, so the marbling is comparable to a grain finished animal, without the need for grain. At Red Devon the menus change regularly to incorporate seasonal produce and a wide variety of entrees. But have no doubt it will always include steak like the steak frites with hand-cut fries and garlic butter. Count your lucky stars if you timed it right and happen to see tenderloin among the Specials. Red Devon dry-ages their beef and butchers their steers in-house, so every few weeks a new arrival means Tenderloin will be available for a couple days until it sells out. Get it while you can. Sapore Steakhouse Bring a friend when you visit Sapore Steakhouse in Fishkill so you can sample their signature dish: a 52 ounce Porterhouse steak for two. “One or two customers finished it by themselves but it’s a rare occasion,” says manager John Lekic. T-bone and Porterhouse are similar cuts. They’re both served on the bone, with strip steak on one side and tenderloin on the other. The Porterhouse is cut from where the tenderloin is biggest, hence the large portion. Sapore’s steak is prime dry-aged and ranges from a 12 ounce filet mignon to a 24 ounceT-bone and the supersize Porterhouse. For steak lovers looking for something new to try, maybe you’d like to dip your toe into the world of big game. At Sapore you have the chance. Medallions of elk, venison and buffalo steak keep company with baby greens and roasted potatoes. Cue to Go On the Southern edge of Columbia County in Clermont, Cue to Go offers nofuss barbecue. It’s strictly a take-out joint, with a few picnic tables on the lawn if you just can’t wait until you get home to eat. Owners Lisa Platti and Brad Renner opened it as an expansion to their catering business. (So, yes, you can get a party’s worth of barbecue. Just be sure to order in advance.) They do all their smoking on the premises using hickory, oak, and maple wood. Brad developed the BBQ and Cajun dry rubs they use on the ribs. The menu is strictly barbecue. Pork, ribs, chicken. Smoked and pulled. Sandwiches and plates. The St. Louis Ribs are a little spicier than the Country Style. Both pair well with the O’Brien potatoes. (Potatoes, bacon, peppers, onions, cheese sauce—‘nuff said.) American Glory BBQ Maybe every day can’t be steak day. But is there ever a bad day for Barbecue? Joe Fierro, owner of American Glory in Hudson would certainly say no. Open seven days a week, this relative newcomer to Hudson just celebrated its first year serving St. Louis Ribs, Texas Beef Brisket and North Carolina Pulled Pork. Joe calls it American comfort food. Pick your comfort from sides like Garlic Smashed Potatoes, Mac & Cheese, Collard Greens with Ham, and Candied Jalapenos. And by all means, don’t forget a cocktail.The Bloody Marys are made with freshly ground horseradish and receive rave reviews. 7/11 ChronograM culinary adventures 73 Hawthorne Valley Farm Store Poughkeepsie’s 1st Gastropub! Inside & Courtyard seating. Upscale Tapas style plates, Signature Drinks, Craft Beers, Wine Bar. Live Blues & BBQ every Sunday, rain or shine. Fresh foods made on our farm! Certified organic, artisan breads, pastries, cheese, yogurt, raw milk, sauerkrauts and more! 202 main st poughkeepsie, ny 845-473-4294 tues – fri : 4pm to 2am sat & sun : 12pm to 2am full menu served until closing 1.5 miles east of the Taconic Parkway at the Harlemville/Philmont exit 20 minutes from Hudson • 15 minutes from Chatham Monday – Saturday 7:30 to 7 • Sundays 9 to 5 Interested in taking a tour of the farm, sampling foods made on the farm, or finding out about other on-farm activities? Call 518-672-7500 x 231. FARM STORE | 327 County Route 21C, Ghent, NY 12075 | 518-672-7500 Farm Market- Fresh local produce sweet corn, tomatoes, zucchini, summer squash, cucumbers, peppers, peaches apricots, and more Garden Center- Everything to nourish and maintain your garden and outdoors including annuals, perennials, hanging baskets, soil & mulch Ice Cream- Soft serve custard and a variety of hard ice cream flavors Outdoor Beer Garden now open! Live music every weekend 845-986-1059 or 845-986-5959 Route 94 & Warwick Turnpike, Warwick, New York All You Can Eat* MONDAY - THURSDAY $19.95 Adults $9.95 Kids 8 & under FRIDAY - SUNDAY $21.95 Adults $10.95 Kids 8 & under * Order must include combination of sushi, sashimi and roll. 26 Raymond Ave, Poughkeepsie, NY • 845.471.5245 • 74 culinary adventures ChronograM 7/11 ribs and sides from american glory bbq in hudson. A casual, elegant bistro in downtown Goshen serving fresh and delicious fare. ★★★★!– Times Herald-Record (Jan. 14, 2011) Big W’s Roadside Bar-B-Q If smoky barbecue is your passion, venture to Big W’s Roadside Bar-B-Q in Wingdale. Chef/owner Warren Norstein has been known to offer multiple samples to diners until they find a favorite. He’s not happy until every customer is completely satisfied.The meats are dry-rubbed with spices before they go into the offset smoker. They’re not mopped with what Norstein calls “garbage pail sauce” (ketchup and vinegar stirred in a bucket with a canoe paddle). Instead, the sauces are cooked with layers of “vinegary, fruity, oniony” flavors and served on the side. As a Frenchtrained chef who worked in Manhattan for 16 years, he brought serious culinary expertise to his barbecue business venture. He started by selling ribs and pulled pork out of the smoker on the back of a truck. To make his family dinner easy, he used to put chickens in the smoker to bring home later. But customers noticed the chickens and persisted in regularly buying them all. So he officially added chicken to the menu. Warren describes them as a succulent beautiful piece of smoked bbq that retains its moisture at the low temperature and doesn’t get stringy. As demand grew (and yes, it grew!), he expanded, smoking more and more meat each day, and still selling out in an hour or two. In a few years it made sense to open a sit-down restaurant. He’s been smoking and serving at the location in Wingdale ever since. Customers love the pork and the chicken. But the brisket is threatening to take the lead. They come in and ask, “Can I get that soft sliced steak that you do?” “They don’t know what to call it, but they like it,” says Norstein. Woody’s All Natural When it comes to meat, it’s impossible to ignore the quintessential hamburger. While you can find them just about everywhere, they don’t all compare to the burgers at Woody’s All Natural in Cornwall. If you’ve grown suspicious of the label “all natural” in the grocery store, this is one time you can surely trust it.The hamburger meat comes from grass-fed beef. The restaurant has its own garden near the trestle on Taylor Road. In the summer, daily harvests of herbs, vegetables, and heirloom tomatoes fill their recipes. They use Jane’s Ice Cream in the shakes. And Pine Island red onions are thinly sliced and flash fried to make light, fluffy Onion Hay. Manager Nancy Edwards works seven days a week to ensure the quality of the food. And the consensus seems to be these burgers don’t leave you with postburger regret. Edwards says, “When you eat one of our burgers, you really do feel good after.” Lunch Dinner Tues-Fri: 11:30am-2:30pm Tues-Thurs: 5-9pm Fri & Sat: 5-9:30pm 134 W. Main St, Goshen, NY Reservations accepted. Wine • Beer 845.294.2810 Please also The Goshen Gourmet Café visit: 18 W. Main St, Goshen, NY B A K E RY & D E L I C AT E S S E N LOCAL 4 SUSTAINABLE 4 ORGANIC 4 HEALTHY 4 TASTY Baked Goods, Organic Coffee, Skin Care Products, Ice Cream, Snacks, Eggs, Cheeses, Milk, Grass-fed Meats, Free-Range Chicken, Eco-Friendly Products, Fresh Produce Thursday - Friday 11am - 7pm Saturday 10am - 6pm Sunday 11am - 5pm Monday-Wednesday CLOSED 33 Broadway, On the Rondout 845-802-0265 Your New Neighborhood Market! RESOURCES American Glory BBQ, Hudson Big W BBQ, Wingdale Sapore Steakhouse, Fishkill Flatiron, Red Hook Skytop Steakhouse, Kingston Red Devon, Millbrook Woody’s All Natural, Cornwall Cue to Go, Clermont 7/11 ChronograM culinary adventures 75 AT K I SR EM S TA U INDIAN R ANT & B U FFE T LUNch: Mon-Fri 11:00 - 2:30pm 10% OFF DINNER EvERyDAy 2:30pm - 10:00pm with Coupon We Specialize in Catering • Free Delivery • We Serve Full Menu 50 Raymond Ave, Poughkeepsie, NY 845-473-5850 Full Line Organic C of old Cuts and Hom e Cooking Delicatess en ip We now sh s r to meat orde on ati any destin Open 7 Days 845-255-2244 79 Main Street New Paltz Local Organic Grass-Fed Beef • Lamb • Goat • Veal • Pork • Chicken • Wild Salmon N H ~ N A ~ N P Custom Cut • Home Cooking Delicatessen Nitrate-Free Bacon • Pork Roasts • Beef Roasts tastings directory Bakeries Wild Hive Farm Bakery Spend $50 or more and receive only $4.95! tastings directory Bone-in or Boneless Ham: smoked or fresh Local Organic Beef • Exotic Meats (Venison, Buffalo, Ostrich) • Wild Fish 2411 Salt Point Turnpike, Clinton Corners, NY (845) 266-5863 Cafés The Bee’s Knees Café 989 Broome Center Road, Preston Hollow, NY (518) 239-6234 Bistro-to-Go 948 Route 28, Kingston, NY (845) 340-9800 (845) 339-9310 Tues - Sat 5-10pm Brody’s Best Café & Juice Bar Babycakes Café 159 W. Main Street, Goshen, NY (845) 615-1118 1-3 Collegeview Avenue, Poughkeepsie, NY (845) 485-8411 Crafted Kup 44 Raymond Avenue #1, Poughkeepsie, NY (845) 483-7070 Twisted Foods 446 Main Street, Rosendale, NY (845) 658-9121 5371 Albany Post Road, Staatsburg, NY (845) 889-8831 hugh@terrapincatering.com Escape from the ordinary to celebrate the extraordinary. Let us attend to every detail of your wedding, bar/bat mitzvah, corporate event or any special occasion. On-site, we can accommodate 150 guests seated, and 250 for cocktail events. Off-site services available. Terrapin’s custom menus always include local, fresh, and organic ingredients. Delis Jack’s Meats & Deli 79 Main Street, New Paltz, NY (845) 255-2244 Pubs & Taverns Toad Holly Pub Photo: Jennifer May 713 Route 32, Tillson, NY Orange COunty Farmers museum Open Sat & Sun 10am-4pm or by appt JULY 16 MOvie Night iN the Park Movie starts at 8:50pm aUgUSt 6 MOvie Night iN the Park Movie starts at 8:50pm Local Produce! ✩U-Pick✩Blueberries ✩ ✩Farm ✩ Store ✩Farm ✩ Animals Mini-Golf ✩Edible ✩ ✩IPM✩Farming ✩ aUgUSt 21 aNtiqUe trUck ShOw Tractor Pull • Chicken BBQ visit our website for details: 850 rte 17k, Montgomery (845) 457-2959 76 tastings directory ChronograM 7/11 5755 Rte 209 Kerhonkson✩KelderFarm.com 517 Warren Street, Hudson, NY (518) 751-2155 34 Depot Street, Pittsfield, MA (413) 499-2400 286 Main Street, Great Barrington, MA (413) 528-8100 Gourmet take-out store serving breakfast, lunch, and dinner seven days a week. Featuring local and imported organic foods, delicious homemade desserts, sophisticated four-star food by Chefs Richard Erickson and Jonathan Sheridan. Off-premise full-service catering and event planning for parties of all sizes. Terrapin Catering 310 Wall Street Kingston, NY Baba Louie’s Woodfired Sourdough Pizza Handcrafted with fresh, all natural ingredients. Italian brick-oven woodfired pizzas made with sourdough crust & fresh mozzarella. Choose from our creative signature pizzas or build your own! Heaping salads with fresh greens, house made soup, pasta specials, lunchtime sandwiches & ciabatta panini. Family friendly! Delicious gluten-free and vegan options available everyday! Catering Hardcore Tapas elephant options, and numerous side dishes like collard greens, cheese grits, garlic mashed potatoes, mac & cheese, cornbread, and creamy ole country coleslaw. All menu items are prepared fresh daily and all BBQ is smoked on site using local wood. Snug Harbor 38 Main Street, New Paltz, NY (845) 255-9800 Restaurants A Tavola 46 Main Street, New Paltz, NY (845) 255-1426 American Glory BBQ 342 Warren Street, Hudson, NY (518) 822-1234 American Glory is a restaurant specializing in “legendary wood smoked regional BBQ of the United States, and classic American comfort foods.” In addition to the extensive BBQ fare, the menu includes a wide selection of grilled burgers, steaks and fish, along with an assortment of fresh salads, several vegetarian Bistro Lilly 134 West Main Street, Goshen, NY (845) 294-2810 Bull and Buddha 319 Main Street, Poughkeepsie, NY (845) 337-4848: an inspired dining experience in a chic yet casual setting. Upstairs is Orient, Hudson Valley’s newest and most elegant Ultra Lounge. Orient sets a new standard for destination nightlife and an experience once unavailable outside of Manhattan’s Meat Packing district. Elephant 310 Wall Street, Kingston, NY (845) 339-9310 Gilded Otter 3 Main Street, New Paltz, NY (845) 256-1700 and brewed locally! Golden Buddha Thai Cuisine 985 Main Street, Fishkill, NY (845) 765-1055 Gomen Kudasai — Japanese Noodles and Home Style Cooking 215 Main Street, New Paltz, NY (845) 255-8811 Gunk Haus 387 South Street, Highland, NY (845) 833-0866 Howell’s Café 27 W. Main Street, Goshen, NY (845) 294-5561 Karma Lounge Tavern at Highland Country Club 201 Main Street, Poughkeepise, NY (845) 473-4294 955 Route 9D, Garrison, NY (845) 424-3254 ext 16 Karma Road Organic Cafe 11 Main Street, New Paltz, NY (845) 255 1099 info@karmaroad.com Winner of “Best Vegetarian Restaurant in the Hudson Valley” 2010. Friendly, casual breakfast, lunch, dinner, snacks, juices and award-winning smoothies for a delicious, healthy alternative to standard fare. GlutenFree aplenty! Steps from the Rail-Trail in historic downtown. Open 8am-8pm, 7 days. Find us on Facebook! Kavos 4 North Clover Street, Poughkeepsie, NY (845) 473 4976 kavosgyros@gmail.com Kismat 50 Raymond Avenue, Poughkeepise, NY (845) 473-5850 La Petite Cuisine 20 Railroad Avenue, Warwick, NY (845) 988-0988 LaBella Pizza Bistro 194 Main Street, New Paltz, NY (845) 255-2633 Leo’s Italian Restaurant and Pizzeria 22 Quaker Avenue, Cornwall, NY (845) 534-3446 1433 Route 300, Newburgh, NY (845) 564-3446 Osaka Restaurant 18 Garden Street, Rhinebeck, NY (845) 876-7338 or (845) 876-7278 Terrapin Restaurant and Bistro 6426 Montgomery Street, Rhinebeck, NY (845) 876-3330 custsvc@terrapinrestaurant.com Voted “Best of the Hudson Valley” by Chronogram Magazine. From far-flung origins, the world’s most diverse flavors meet and mingle. Out of elements both historic and eclectic comes something surprising, fresh, and dynamic: dishes to delight both body and soul. Serving lunch and dinner seven days a week. Local. Organic. Authentic. Texas Roadhouse 500 Miron Lane, Kingston, NY (845) 336-7600 The Artist’s Palate 307 Main Street, Poughkeepsie, NY (845) 483-8074 Installed in a building once occupied by a Golden Era clothing store, M. Schwartz, The Artist’s Palate restaurant has brought back life to Main Street in Poughkeepsie. Designers have reworked the interior space of the 70-seat dining room to combine cosmopolitan elegance with an edgy industrial accent. Like the décor, the menu showcases innovation: An extensive array of wines, handcrafted beers and unique cocktails complement our revolving seasonal menu. Towne Crier Cafe Pawling, NY (845) 855-1300 Vanderbilt House Yobo Restaurant Want to taste the best Sushi in the Hudson Valley? Osaka Restaurant is the place. Vegetarian dishes available. Given 4.5 stars by the Poughkeepsie Journal. Visit our second location at 74 Broadway, Tivoli, NY, (845) 757-5055. Route 300, Newburgh, NY (845) 564-3848 The River Grill 1946 Campus Drive (Route 9), Hyde Park, NY (845) 452-9600 40 Front Street, Newburgh, NY (845) 561-9444 Rock & Rye Tavern 215 Huguenot Street, New Paltz, NY (845) 255-7888 Rusty’s Farm Fresh 5 Old Farm Road, Red Hook, NY (845) 758-8000 Suruchi — A Fine Taste of India 5 Church Street, New Paltz, NY (845) 255-2772 Sushi Village 26 Raymond Avenue, Poughkeepsie, NY (845) 471-5245 Serving delectable sushi and sashimi, in addition to innovative maki rolls, fresh seafood and other japanese cuisine. Everything served is made to order. Join us for “all you can eat” sushi every day of the week! Monday - Thursday; $19.95 (adults) and $9.95 (kids under 8), Friday - Sunday; $21.95 (adults) and $10.95 (kids under 8). Enjoy Thai cooking by Real Thai Chefs 161 Main Street, Philmont, NY (518) 672-9993 info@vanderbilt-house.com Culinary Institute of America American Bounty Restaurant, imaginative cuisine celebrating the diversity of foods of the Americas; Apple Pie Bakery Café, sumptuous baked goods and café cuisine; Escoffier Restaurant, culinary traditions of France with a contemporary touch; Ristorante Caterina de’ Medici, seasonal ingredients and authentic dishes of Italy; and St. Andrew’s Café, menus highlighting locally and sustainably sourced ingredients. “Golden Buddha Restaurant gets Rave Reviews!” ~Poughkeepsie Journal 7/10 Sun & tues-Thurs 11:30am-9:30pm Fri & Sat 11:30am-10:30pm Let our family Closed Mon serve yours 985 Main St, Fishkill, NY (845) 765-1055 On Route 52, only 1/2 mile from I-84 exit 12 Next to the beverage store, directly across from Chase bank (cvs plaza) Cooking classes now in progress - call for reservations serving beer and wine visit Snacks Mister Snacks, Inc. 500 Creekside Drive, Amherst, NY (800) 333-6393 steve@mistersnacks.com Wine & Liquor Brewery Ommegang 656 County Highway 33, Cooperstown, NY (607) 544-1800 Rosendale Wine and Spirits Route 32, Rosendale, NY 7/11 ChronograM tastings directory 77 tastings directory LaBella Pizza Bistro voted Best Pizza in The Hudson Valley. We serve more than just great pizza, including catering for any occasion. Our dishes feature LOCALLY GROWN organic produce! We offer a healthy WHOLE GRAIN PIZZA CRUST! Vegan Pizza is now available as well. business directory Accommodations The New York House 110 Center St., Sharon Springs, NY (518) 369-2164 Aspects Gallery Inn & Spa Woodstock, NY (917) 412-5646 liomag@gmail.com The 1850 House Rosendale, NY Alternative Energy Hudson Valley Clean Energy, Inc (845) 876-3767 Animal Sanctuaries Woodstock Farm Animal Sanctuary Willow, NY (845) 679-5955 Antiques Antique Fair and Flea Market Route 29, Greenwich, NY (518) 331-5004 fairgroundshows@aol.com business directory Fed On Lights Antiques Corner of Market & Livingston Streets, Saugerties, NY (845) 246-8444 The Eclectic Eye 16-18 Railroad Avenue, Warwick, NY (845) 986-5520 theeclecticeye@gmail.com Appliances Gentech LTD 3017 Route 9W, New Windsor, NY (845) 568-0500 Gentechltd@yahoo.com Architecture Marlys Hann Architect Bertoni Gallery Ruge’s Subaru N & S Supply 1392 County Road 13, Sugar Loaf, NY (845) 469-0993 6444 Montgomery Street, Rhinebeck, NY (845) 876-7074 info@nssupply.com Clark Art Institute Williamstown, MA (413) 458-2303 Country Gallery 1955 South Road Square, Poughkeepsie, NY (845) 297-1684 Green River Gallery 1578 Boston Corners Road, Millerton, NY (518) 789-3311 Lady Audrey’s Gallery 52 Main Street, Millerton, NY (518) 592-1303 Mark Gruber Gallery New Paltz Plaza, New Paltz, NY (845) 255-1241 Mill Street Loft’s Gallery 45 45 Pershing Avenue, Poughkeepsie, NY (845) 471-7477 info@millstreetloft.org Mill Street Loft’s Gallery 45 features yearround exhibits of works by a wide variety of distinguished Hudson Valley artists as well as students from the Art Institute of Mill Street Loft, the Dutchess Arts Camps and art courses and workshops. Mill Street Loft provides innovative educational arts programming for children and adults of all ages and abilities in Poughkeepsie, Beacon, Millbrook & Red Hook. Norman Rockwell Museum 9 Route 183, Stockbridge, MA (413) 298-4100 One Mile Gallery 475 Abeel Street, Kingston, NY (845) 338-2035 onemilegallery@gmail.com River Winds Gallery 150 Main Street, Beacon, NY (845) 838-2880 161 Main Street, Andes, NY (845) 676-3858 Samuel Dorsky Museum of Art North River Architecture Scott and Bowne 3650 Main Street, PO Box 720, Stone Ridge, NY (845) 687-6242 Art Galleries & Centers Ann Street Gallery 104 Ann Street, Newburgh, NY (845) 562-6940 X 119 vwalsh@safe-harbors.org FRAME OF REFERENCE: DIORAMAS IN THE 21ST CENTURY: This exhibition highlights a group of thirteen artists who explore the theme of self-created worlds of dioramas, while addressing a variety of contemporary concerns, including psychological and social issues, natural environments, and virtual realities. Artists featured in the exhibition are and Rachel Vaters-Carr. Exhibition runs through to Saturday, July 9, 2011 Artview Gallery 14 Main Street, Chatham, NY (518) 392-0999 Back Door Studio 9 Rock City Road, Woodstock, NY (845) 679-3660 sydhap@aol.com 78 business directory ChronograM 7/11 1 Hawk Drive, New Paltz, NY 27 North Main Street #1, Kent, CT (860) 592-0207 info@scottandbowne.com Seven Pillars New Lebanon, NY (518) 794-8777 Springfield Museums 21 Edwards Street, Springfield, MA Storm King Art Center (845) 534-3115 Vivo Fine Art 105-A Mill Hill Rd., Woodstock, NY Artisans Shandaken Artist Tour Audio & Video Beverages Esotec (845) 246-2411 sales@esotecltd.com Choose Esotec to be your wholesale beverage provider. For 25 years, we’ve carried a complete line of natural, organic, and unusual juices, spritzers, waters, sodas, iced teas, and coconut water. If you are a store owner, call for details or a catalog of our full line. We’re back in Saugerties now! Body & Skin Care Maureen DiCorcia Aesthetics 6 Lagrange Avenue, Poughkeepsie, NY (845) 454-1909 mdicaesthetics@aol.com Book Publishers SUNY Press Bookstores Golden Notebook 29 Tinker Street, Woodstock, NY Mirabai of Woodstock 23 Mill Hill Road, Woodstock, NY (845) 679-2100 The Hudson Valley’s oldest and most comprehensive spiritual/metaphysical bookstore, providing a vast array of books, music, and gifts for inspiration, transformation and healing. Exquisite jewelry, crystals, statuary and other treasures from Bali, India, Brazil, Nepal, Tibet. Expert Tarot reading. Broadcasting WDST 100.1 Radio Woodstock Woodstock, NY Building Services & Supplies Cabinet Designers 747 Route 28, Kingston, NY (845) 331-2200 Countryside Woodcraft 2368 Route 66, Chatham, NY (518) 392-8400 Lawrence@countrysidewoodcraft.com Ghent Wood Products 483 Route 217, Hudson, NY (518) 672-7021 H. Houst & Son Woodstock, NY (845) 679-2115 Herrington’s Hillsdale, NY: (518) 325-313 Hudson, NY: (518) 828-9431 Chatham, NY: (518) 392-9201 (800) 453-1311 Hollenbeck Pest Control (845) 542-0000 james@hollenbeckpestcontrol.com Markertek Video Supply Kitchen Cabinet Company 17 Van Kleeck Drive, Poughkeepise, NY (845) 471-6480 Auto Sales & Services Jenkinstown Motors, Inc. L Browe Asphalt Services 37 South Ohioville Road, New Paltz, NY (845) 255-2500 (518) 479-1400 New England Wine Cellars (800) 863-4851 Riverview Powerwashing Service PO Box 547, Marlboro, NY (845) 797-6967 Williams Lumber & Home Centers (845) 876-WOOD Cinemas Rosendale Theater Collective Rosendale, NY Upstate Films 6415 Montgomery St. Route 9, Rhinebeck, NY (845) 876-2515 132 Tinker Street, Woodstock, NY (845) 679-6608, NY Clothing & Accessories Christina Faraj (917) 755-5301 christina@thebrafitexpert.com Clothing & Accessories Judy Go Vintage 848 Route 32, Tillson, NY judyvintage@gmail.com New York Eyewear 47 North Plank Road, Newburgh, NY (845) 562-6284 White Rice 306 Main Street, Great Barrington, MA (413) 644-9200 Woodstock Design 9 Tinker Street, Woodstock, NY (845) 679-8776 Collaborative Workspace Beahive Kingston 314 Wall Street, Kingston, NY bzzz@beahivebeacon.com Computer Repair All Computer Services 158 Vineyard Ave Highland, NY (845) 834-2351 Is your computer running slow or infected? We can fix that!! We do web design, remote assistance as well as computer networking. We can also repair cracked screens as well as charging ports. We offer a FREE DIAGNOSIS. Ask about our membership program for only $20 a month. Consignment Shops Past N’ Perfect 1629 Main Street (Route 44), Pleasant Valley, NY (845) 635-3115 A quaint consignment boutique that offers distinctive clothing, jewelry, accessories, and a unique collection of high-quality furs and leathers. Always a generous supply of merchandise in sizes from Petite to Plus. Featuring a diverse & illuminating collection of 14 Kt. Gold, Sterling Silver and Vintage jewelry. Enjoy the pleasures of resale shopping and the benefits of living basically while living beautifully. Conveniently located in Pleasant Valley, only 9 miles east of the Mid-Hudson Bridge. Cooking Classes Natural Gourmet Cookery School 48 West 21st Street, New York, NY (212) 645-5170, Fax (212) 989-1493 info@naturalgourmetschool.com Country Clubs Copake Country Club 44 Golf Course Road, Copake Lake, NY (518) 325-4338 Craft Galleries Crafts People 262 Spillway Road, West Hurley, NY (845) 331-3859 Representing over 500 artisans, Crafts People boasts four buildings brimming with fine crafts; the largest selection in the Hudson Valley. All media represented, including: sterling silver and 14K gold jewelry, blown glass, pottery, turned wood, kaleidoscopes, wind chimes, leather, clothing, stained glass, etc. Custom Home Design and Materials Atlantic Custom Homes 2785 Route 9, Cold Spring, NY Equestrian Services Con-Tack Panorama Drive, Tivoli, NY (845) 757-4442 con-tack@webjogger.net Frog Hollow Farm Events Caramoor Center for Music and the Arts, Inc Katonah, NY (914) 232-1252 Connecticut Wine Festival Goshen Fairgrounds: Route 63, Goshen, CT EMPAC at Rensselaer Troy, NY (518) 276-3921 Hudson Music Festival New Genesis Productions New Kingston Film Festival Phoenicia Festival of the Voice Phoenica, NY (888) 214-3063 Rosendale Street Festival Adams 42 Bridge Street, Great Barrington, MA (413) 528-9697 Earthgoods Natural Foods Inc. 71 Main Street, New Paltz, NY (845) 255-5858 Hudson Valley Bounty (518) 392-9696 Kingston Farmers’ Market Wall Street, Uptown Kingston, NY (845) 853-8512 Kingston Natural Foods Market 33 Broadway, On the Rondout in Kingston, NY (845) 802-0265 Mother Earth’s Store House 1955 South Road, Poughkeepsie, NY (845) 296-1069, 249 Main Street, Saugerties, NY (845) 246-9614, 300 Kings Mall Court, Route 9W, Kingston, NY (845) 336-5541 Founded in 1978, Mother Earth’s is committed to providing you with the best possible customer service as well as a grand selection of high quality organic and natural products. Visit one of our convenient locations and find out for yourself! 850 Route 17K , Montgomery, NY (845) 457-2959 Pennings Farm Market & Orchards 1955 South Road Poughkeepsie, NY 1955 South Road 1955 South 845.297.1684 Poughkeepsie,Road NY Poughkeepsie, 845.297.1684 NY 845.297.1684 4/26/2011 11:18:33 AM MKTG15927_COUGAL.indd 1 4/26/2011 11:18:33 AM MKTG15927_COUGAL.indd 1 4/26/2011 11:18:33 AM Sunflower Natural Foods Market Bradley Meadows Shopping Plaza Woodstock, NY (845) 679-5361 info@sunflowernatural.com Shop healthy & live well! Mon-Sat 9-9, Sun 10-7 Sunflower Natural Foods Market, your local organic grocer since 1978. We have a huge selection of 100% certified organic produce, local milk, cheese & eggs. We offer a wide variety of supplements, homeopathic remedies & vitamins. We boast a large hair, skin & body care department and bulk section with coffee, pasta, beans and more. Pick up your ‘to go’ items and all the healthy snacks you could imagine! The quality you expect from the dealer & the service you love from your local business. Farms Kelder’s Farm West Point Band Kinderhook Farm info@wildearthprograms.org Wild Earth, a not-for-profit located in the Shawangunk Ridge region of the Hudson Valley, offers and supports experiences in nature that are inspiring, educational and fun, while renewing and deepening connections with ourselves, others and the Earth. Our programs, which draw on a broad spectrum of teachings from indigenous cultures to modern natural sciences, offer adventure and fun, primitive skills and crafts, awareness games, and story and song, facilitated by multi-generational mentors. Experience at: Expe Experience rienceat:at: Sterling silver charms from $25. Sterling silver charms from $25. 161 South Route 94, Warwick, NY (845) 986-1059 5755 Rte 209, Kerhonkson, NY Wild Earth Programs Sterling silver charms from $25. Orange County Farmers MuseumMKTG15927_COUGAL.indd 1 20 Mountain View Ave., Woodstock, NY splendoratechno@yahoo.com (845) 938-2617 FFRRIIEENNDDSS MAKE IT UNFORGETTABLE... MAKEITITUNFORGETTABLE... UNFORGETTABLE... MAKE Berkshire Co–Op Market Rosendale, NY Splendora Techno Party Laughter and Laughter FLaughter R I E N Dand Sand Ghent, NY (518) 929-3076 Financial Advisors JSA Financial Group 7 Livingston Street, Rhinebeck, NY (845) 876-1923 jeff@jsafinancial.com We are an independent financial firm that has been helping people establish & maintain their long-term financial goals through all aspects of Financial Planning. We also offer our clients the option to utilize socially responsible investments. Securities & Advisory Services offered through business directory Esopus, NY (845) 384-6424 Farm Markets & Natural Food Stores Scott, Daniel & Donna Over 30 Years’ Experience We’re proud to be your local auto repair alternative! (845) 255-2500 37 South Ohioville Road, New Paltz, NY 7/11 ChronograM business directory 79 Commonwealth Financial Network— Member FINRA/SIPC, a Registered Investment Adviser. Third Eye Associates, Ltd (845) 750-7335 38 Spring Lake Road, Red Hook, NY (845) 752-2216 Liggans Insurance Gardening & Garden Supplies Deer Defeat (518) 755-1086 mail@deerdefeat.com The Landscape Home and Garden Center 226 Route 17k, Newburgh, NY (845) 564-2744 Northern Dutchess Botanical Gardens 389 Salisbury Turnpike, Rhinebeck, NY (845) 876-2953 Graphic Design Annie Internicola, Illustrator Hair Salons Dennis Fox Salon SALES 8am - 8pm Monday - Friday 8am - 5pm Saturdays SERVICE business directory 8am - 7pm Monday - Friday 8am - 3pm Saturdays 845.876.7074 rugessubaru.com 6444 Montgomery St., Rhinebeck, NY 12572 6400 Montgomery Street 2nd Floor, Rhinebeck, NY (845) 876-1777 Home Furnishings & Decor Berkshire Woodworkers Guild Bumble and Hive In the Courtyard at 43 East Market Street, Rhinebeck, NY (845) 876-2625 The Carpet Store Corner of Route 213 & 32, Rosendale, NY (845) 658-8338 Colors Home 14 Railroad Avenue, Warwick, NY (845) 544-7111 Ethan Allen Route 32, 94 North Plank Road, Newburgh, NY (845) 565-6000 Lounge High Falls, NY (845) 687-9463 Nest Egg County Store 84 Main Street, Phoenicia, NY (845) 688-5851 Silken Wool 36 & 56 Main Street, Warwick, NY (845) 988-1888 Tender Land Home 64 Main Street, Phoenicia, NY (845) 688-7213 The Futon Store Route 9, Poughkeepsie, (845) 297-1933 INVEST IN A SUSTAINABLE FUTURE Vision of Tibet 7 Livingston Street Rhinebeck, NY 12572 PHONE: 845-876-1923 FAX: 845-876-4105 Integrate Social Responsibility Into Your Financial Plan Comprehensive Financial Planning Insurance Sustainable Investing Contact us today to discuss your investments goals, dreams and needs for your future. Securities and Advisory Services offered through Commonwealth Financial Network®, Member FINRA, SIPC, a Registered Investment Adviser. This communication is strictly intended for individuals residing in the states of CA,CT,FL,IL,MA,MD,ME,MI,NC,NH,NJ,NY,OH,VA. No offers may be made or accepted from any resident outside these states due to various state regulations and registration requirements regarding investment products and services. 80 business directory ChronograM 7/11 William Wallace Construction 378 Main Street, Rosendale, NY (845) 658-3838 Wickham Solid Wood Studio 578 Main Street, Beacon, NY (917) 797-9247 Home Improvement Basement Solutions of the Hudson Valley (845) 564-0461 Certapro Painters (845) 987-7561 Insurance 2039 Route 32, Rosendale, NY (845) 658-8348 Interior Design Van Maassen Interiors 3304 Route 343, Suite 1, Amenia, NY (845) 373-8400 Internet Services DragonSearch (845) 383-0890 dragon@dragonsearch.net Site Optimized (845) 363-4728 Jewelry, Fine Art & Gifts Dreaming Goddess 44 Raymond Avenue, Poughkeepsie, NY (845) 473-2206 Newburgh Artisans 87 Ann Street, Newburgh, NY (845) 565-7540 Kitchenwares Warren Kitchen & Cutlery 6934 Route 9, Rhinebeck, NY (845) 876-6208 Landscaping Coral Acres — Keith Buesing, Topiary, Landscape Design, Rock Art (845) 255-6634 Garden Gate Landscape Design Rhinecliff, NY (845) 876-5198 Landscaping Samarotto Design Group (800) 797-0598 information@samarottodesigns.com Lawyers & Mediators Jane Cottrell (917) 575-4424 Mediation is the best opportunity for the parties, not courts or juries, to control the outcome of a dispute. Experienced lawyer and mediator certified in US and UK. Choice of mediation techniques. Landlord/tenant, debtor/creditor, commercial/business, wills/trusts, arts/ creative, employment. Free consultation. Pathways Mediation Center (845) 331-0100 Schneider, Pfahl & Rahmé, LLP Woodstock: (845) 679-9868, New York City: (212) 629-7744 Wellspring (845) 534-7668 Martial Arts Woodstock Aikido At the Byrdcliffe Barn, Upper Byrdcliffe Road, Woodstock, NY (845) 679-8153 A traditional United States Aikido Federation affiliated dojo situated in the Byrdcliffe artist community in Woodstock, NY. We have the extreme privilege of training under Harvey Konigsberg, Shihan. Moving & Storage Hudson Power Movers (845) 380-2203 Music Deep Listening Institute, Ltd 77 Cornell Street, Suite 303, Kingston, NY (845) 338-5984 info@deeplistening.org Musical Instruments Imperial Guitar & Soundworks 99 Route 17K, Newburgh, NY (845) 567-0111 Networking Rosendale Chamber of Commerce Rosendale, NY Organizations Pet Services & Supplies Dog Love, LLC 240 North Ohioville Road, New Paltz, NY (845) 255-8281 Personal hands-on boarding and supervised playgroups. 40x40 fenced play area. Four 5x10 kennels in insulated kennel room with windows, mats and classical music. Major morning activity. Walks every two hours. Homemade food and yummy treats. Photography Fionn Reilly Photography Saugerties, NY (845) 802-6109 France Menk Photography (845) 750-5261 iam@france-menk.com 330 Powell Avenue, Newburgh, NY (845) 569-3225 mt.scoutsurvival@gmail.com New York Military Academy 78 Academy Avenue, Cornwall-on-Hudson, New York (845) 534-3710 admissions@nyma.org New York Military Academy is an important part of America’s independent school heritage. Today, we offer a rigorous global curriculum for students who actively seek to be set apart for excellence in a structured program that enables them to enter college inspired, engaged, and ready for the future. Photosensualis SUNY New Paltz School of Fine and Performing Arts (845) 616-7834 Country Wisdom News — Subscribe to Country Wisdom News, Ulster County’s newest source for good news — age old and modern thoughts on food, the land, and the home. An annual subscription is $35. Send checks to PO Box 444, Accord, NY, 12404. 15 Rock City Road, Woodstock, NY (845) 679-7995 New Paltz, NY (845) 257-3860 Prostate Cancer 101 Hurley, NY (845) 338-9229 The Williams Lake Project Rosendale, NY hvbranchcoordinator@gmail.com Performing Arts Bard College Public Relations Bard College, Annandale-on-Hudson, NY (845) 758-7900 Bethel Woods Center for the Arts Bethel, NY (800) 745-3000 Falcon Music & Art Productions 1348 Route 9W, Marlboro, NY (845) 236 7970 Jacob’s Pillow Dance Festival (413) 243-0745 over 20 years experience. Special services include shadow-box and oversize framing as well as fabric-wrapped and French matting. Also offering mirrors. Woodstock Framing Gallery 31 Mill HIll Road, Woodstock, NY (845) 679-6003 Pools & Spas Foxx Pools by Charles Burger 3730 Rte. 9W, Highland, NY (845) 691-6795 Ne Jame Pools, Ltd. (845) 677-7665 Printing Services Fast Signs 1830 South Rd Suite 101, Wappingers Falls, NY (845) 298-5600 455@fastsigns.com Powerhouse Theater Vassar Campus (845) 437-5599 Starling Productions The Rosendale Theater, Rosendale, NY (845) 658-8410 astarlingproduction@gmail.com The Richard B. Fisher Center for the Performing Arts at Bard College Annandale-on-Hudson, NY (845) 758-7900 WAMC — The Linda 339 Central Ave, Albany, NY 518-465-5233 The Linda provides a rare opportunity to get up close and personnel with world-renowned artists, Academy Award–winning directors, headliner comedians and local, regional, and national artists on the verge of national recognition. An intimate, affordable venue, serving beer and wine, The Linda is a night out you won’t forget. Real Estate Kingston’s Opera House Office Bldg. 275 Fair Street, Kingston, NY (845) 399-1212 Contact Bill Oderkirk (owner/manager) 3991212@gmail.com Patty Curry (845) 687-0232 x108 patty@westwoodrealty.com Schools Bishop Dunn Memorial School (845) 569-3496 Cary Institute of Ecosystem Studies 2801 Sharon Turnpike, Millbrook, NY (845) 677-5343 College of Poetry 7 West Street, Warwick, NY (845) 469-7620 Hawthorne Valley Association 327 County Route 21C, Ghent, NY (518) 672-4465 Mid-Hudson Valley, NY (845) 514-9927 admin@ulstertutors.com. Private Tutoring & Mentoring Relationships: Standardized Test Prep - SAT/ACT/SSAT, Regents, HS/College Mathematics, Physics & Natural Sciences, English Reading/Writing, Music Theory and Instrumentation, Field Studies, Critical & Creative Intellectual Development. Competitive rates from highly skilled educators. Serving the Mid-Hudson Valley. Veterinary Care Center For Veterinary Care Millbrook 680 New York 343, Millbrook, NY (845) 677-8800 Video Production BRAVE Hudson Valley / New York City Shoes Vineyard Pegasus Comfort Footwear New Paltz, NY (845) 256-0788 Woodstock, NY (845) 679-2373 Stoutridge Vineyard 10 Ann Kaley Lane, Marlboro, NY (845) 236-7620 Specialty Food Shops The Big Cheese Web Design 402 Main Street, Rosendale, NY (845) 658-7175 icuPublish PO Box 145, Glenham, NY (914) 213-2225 mtodd@icupublish.com Edible Arrangements 900 Ulster Avenue, Kingston, NY (845) 339-3200 10 IBM Road Plaza, Poughkeepsie, NY (845) 463-3900 EdibleArrangements.com Weddings Go-Go Pops HudsonValleyWeddings.com 64 Main Street, Cold Spring, NY (845) 806-5600 120 Morey Hill Road, Kingston, NY (845) 336-4705 judy@hudsonvalleyweddings.com The only resource you need to plan a Hudson Valley wedding. Offering a free, extensive, online Wedding Guide. Hundreds of weddingrelated professionals. Regional Bridal Show schedule, links, wed shop, vendor promotions, specials, and more. Call or e-mail for information about adding your wedding-related business. Immortal Elixir Beverage Corporation info@gotcottonmouth.com Stained Glass DC Studios 21 Winston Drive, Rhinebeck, NY (845) 876-3200 info@dcstudiosllc.com Tattoos Hudson River Tattoo 724 Warren Street, Hudson, NY (518) 828-5182 hudsonrivertattoo@gmail.com Custom tattoo parlor with friendly cozy environment. 18 years experience as professional tattoo artist with wide range of skill in any style. Preference towards American traditional clean bold TATTOOS! SkinFlower Tattoo Phoenicia, NY (845) 688-3166 Tourism Safe Harbors of the Hudson ROOTS & WINGS / Rev. Puja Thomson P.O. Box 1081, New Paltz, NY (845) 255-2278 puja@rootsnwings.com Rev. Puja A. J. Thomson will help you create a heartfelt ceremony that uniquely expresses your commitment, whether you are blending different spiritual, religious, or ethnic traditions, are forging your own or share a common heritage. Puja’s calm presence and lovely Scottish voice add a special touch. “Positive, professional, loving, focused and experienced.” Wine & Liquor In Good Taste Town Tinker Tube Rental 45 Main Street, New Paltz, NY (845) 255-0110 ingoodtaste@verizon.net Bridge Street, Phoenicia, NY (845) 688-5553 Learn Photoshop — Stephen Blauweiss (845) 562-6940 Ulster County Tourism 10 Westbrook Lane, Kingston, NY (845) 340-3566 Vanderbilt Mansion National Historic Site Hyde Park, NY Workshops Kingston, NY (845) 338-0331 Writing Services Peter Aaron info@peteraaron.org 7/11 ChronograM business directory 81 business directory US Green Building Council, New York Upstate Chapter, Hudson Valley Branch Storm Photo Picture Framing Ulster Tutors Mountain Scout Survival School Country Wisdom News 334 Wall St., Kingston, NY (845) 338-8753 Tutoring Mount Saint Mary College Ice Age to the Digital Age The 3D Animation Art of Blue Sky Studios on view June 11 through October 31 From sketch to screen, see the animazing art behind the movies, Ice Age, Robots, and Rio, oh my! RIO & IceAge™ ©2011 Twentieth Century Fox Film Corporation. All Rights Reserved. nrm.org • open daily • 413-298-4100 • 9 Rt. 183, Stockbridge, MA Pissarro’s People Through October 2 Sterling and Francine Clark Art Institute Williamstown, Massachusetts 413 458 2303 clarkart.edu 82 berkshire travel guide ChronograM 7/11 Detail of Apple Harvest, 1888, by Camille Pissarro. Dallas Museum of Art, Munger Fund A fresh look at one of the masters of French Impressionism Berkshire Travel Guide Christopher Duggan Mass Appeal The Beauty and Bounty of the Berkshires By Peter Aaron Jessica Gaynor Dance performing on the Inside/Out stage in 2010 at jacob’s pillow in becket, massachusetts. O ccupyingWashington..” 7/11 ChronograM berkshire travel guide 83 JACOB’S PILLOW “ Two-plus months, more than 300 total dance-related events, companies traveling from all over the globe: the Pillow isn’t messing around. “ D A N C E FESTIVAL 2011 June 18 – August 28 – The New York Times DanzAbierta Lar Lubovitch Dance Company July 20–24 LDP/Laboratory Dance Project July 27–31 Tangueros del Sur July 6–10 Featuring world premieres, company debuts, live music, emerging dance artists, and legendary choreographers Visit online for artist videos. Tickets start at $22! • 84 berkshire travel guide ChronograM 7/11 413.243.0745 • jacobspillow.org Photos Carlos Furman, Yong Hoon Han, Antoine Tempe, and Todd Rosenberg July 13–17 the red lion inn in stockbridge, massachusetts, has been welcoming visitors for over 200 years.). Illustrious Past Nothing says small-town America quite like the art of Norman Rockwell. The beloved Saturday Evening Post cover illustrator is one of the world’s most recognized artists, and his delightful creations are alive with generation-spanning appeal. Rockwell spent his last years in picturesque Stockbridge, the home of the Norman Rockwell Museum, drawing, literally, from members of the nearby community to be his inspirational subjects. The museum opened in 1969 and is the Berkshires’ most popular year-round attraction, housing 574 original paintings and drawings, along with many of Rockwell’s most iconic images and a personal archive of over 100,000 items. Sweet Summer Sounds The Boston Symphony Orchestra’s summer home since 1937, Tanglewood is the Northeast’s leading seasonal venue for classical music. Set on a glorious estate near Lenox, the property has two performance buildings: the open-air Serge Koussevitsky Music Shed and the cathedral-like Seiji Ozawa Hall. Each year it attracts upward of 350,000 visitors for both the Tanglewood Music Festival, which offers chamber and choral music, musical theater, contemporary works, and pop (JamesTaylor and Garrison Keillor’s “A Prairie Home Companion” are recurring favorites), and the Tanglewood Jazz Festival. In addition to hosting the BSO under the baton of renowned conductor James Levine, the site also sponsors the Tanglewood Music Center Fellowship Program for advanced musical study. Great, Indeed The charming yet cosmopolitan Great Barrington has its own acclaimed entertainment venue: the Mahawie Performing Arts Center, a restored 1905 vaudeville theater that presents music, dance, theater, opera, and classic films in a resplendently historic space. But when it comes to eating and shopping, this restaurant-and-store-packed town should be near the top on your itinerary. The antiques trade is the biggest retail draw, and in addition to the many such merchants in town and nearby Sheffield are those offering books, toys, apparel, and more. A wealth of worthwhile eateries includes Baba Louie’s, Naji’s, Café Adam, John Andrew’s Restaurant, Bizalion’s, Rubiner’s Cheesemongers, Castle Street Café, and the Route 7 Grill. Luxury in Lenox For lavish accommodations it would be difficult to surpass Blantyre, a breathtaking English country Tudor estate in Lenox that once belonged to moneyed merchant Robert W. Paterson and is now recognized as one of the world’s finest hotels. Modeled after Paterson’s wife’s ancestral home in Scotland and constructed at the dawn of the 20th century, Blantyre rests on 117 sweeping acres, and, along with its grand main house, boasts four private cottages, an 11-room carriage house, two championship croquet courts, four tennis courts, a heated swimming pool, a spa, a health club, and an award-winning restaurant. Food for the Ears Northampton’s Feeding Tube Records is a scrappy indie music shop and label whose owners—which include locals Thurston Moore of SonicYouth and music scribe Byron Coley—brag of “a selection of vinyl so stunning in its weirdness and complexity, we can guarantee you will leave with an empty wallet and a full heart.” Called “NoHo” thanks to an influx of Manhattanites, the arts-dominated Northampton has retailers, bars, and bistros catering to students from the Five Colleges (Smith, Amherst, Mount Holyoke, and Hampshire colleges and the University of Massachusetts Amherst) and a thriving music scene via Iron Horse Music Hall, Pearl Street, the Elevens, the Academy of Music, and the Calvin and Pines theaters (nearby Easthampton has the Flywheel arts collective). Vinyl diggers also frequent the town’s Newbury Comics location and the one in nearby Amherst, along with John Doe Jr. Records and Books in Greenfield and Mystery Train Records in Amherst. Where Great Dance Rests Recently honored with a National Medal of the Arts by President Barack Obama, Jacob’s Pillow Dance has been kicking up its heels since 1933 and is America’s longest-running international dance festival. “The Pillow’s” 163-acre spread in Becket is a registered national landmark that each year attracts an average of 80,000 visitors from around the world, who flock to experience its over 50 resident dance companies, hundreds of free performances and events, prestigious training program, and extensive archives. Famous for presenting world premieres and international dance in many styles and traditions, the center is comprised of several indoor and outdoor stage facilities and has nurtured the careers of Martha Graham, Jack Cole, Alvin Ailey, and Merce Cunningham. Pleasant Dreams Another long-running Becket institution is the legendary Dream Away Lodge, a gemlike, 200-year-old farmhouse remade as a restaurant, bar, and music venue and hidden away along the edge of the October Mountain State Forest. Rumored to have been a brothel and speakeasy during Prohibition, the lodge was founded by the larger-thanlife Mama Maria Frasca and her three musical daughters, and in 1975 was anointed with a visit from Bob Dylan and members of his Rolling Thunder Revue (the house is featured in the tour film Renaldo and Clara). Now run by ex-actor Daniel Osman, the eclecticly decorated Dream Away presents the finest in acoustic-based acts. 7/11 ChronograM berkshire travel guide 85 whole living guide PEACEFUL WARRIORS Aikido & the Force of Love by wendy kagan illustration by annie internicola R oll open the barn doors in a Woodstock artists’ colony and you’ll witness a scene of beauty and grace. Men and women enrobed in white and black perform a fluid dance of power and restraint. Sometimes they spin like human pinwheels, thumping the padded floor, yet in another breath they’re standing firm, ready to thwart one another with what seems like the barest flip of the thumb or wrist. With light streaming through the antique windows, it’s less like a scene in an action flick than it is a Japanese painting— elegant and precise yet with strong Catskills motifs. In many ways, the martial art of Aikido is painting a brushstroke of bold serenity across the region. It took root here in the Byrdcliffe barns, where Woodstock Aikido came to life almost 25 years ago as the realized vision of its founder, Harvey Konigsberg Sensei. One of only a handful of non-Japanese Aikido instructors in the world to hold the rank of seventh degree black belt, and also a master painter, Konigsberg inspires almost pious devotion among students both here and at the New York Aikikai in Manhattan, where he also teaches. One student half-jokingly describes the 71-year-old sensei as “the rabbi I never had”; several disciples live in the area just to be around Konigsberg and his dojo. Encouraged by their teacher, a few senior students have gone on to open their own dojos in surrounding towns such as Phoenicia, Kingston, and Kripplebush. Others have woven the discipline’s mind-body-spirit connection into their work off the mat in surprising ways, spreading the tenets of nonviolence that distinguish Aikido from other martial arts. The Protective Samurai Developed in the early 20th century, Aikido—the art of peace—is one of the youngest martial arts and perhaps the most spiritually evolved. Its founder, Morihei Ueshiba—often called O-Sensei, or “Great Teacher”—died in the same year of the Woodstock peace-and-love music fest, 1969. And such was his way.While Ueshiba was an expert at several kinds of martial arts as a young man, around midlife he experienced an awakening: He realized that the way of the warrior is to manifest love rather than breed aggression. In this light the warrior’s goal is not to destroy or slaughter but to protect all living things in a spirit of unity. A peaceable martial art was born. On a typical Saturday morning at Woodstock Aikido, Konigsberg rings the cow bell, its soft sound heralding the beginning of class. When the sensei demonstrates the first technique, he uses few words and hardly seems to move at times, making his mastery of the forms look effortless. As the class progresses, with groups of two or three enacting techniques on the mat, it’s easy to see how Aikido’s ideals of nonviolence come through in the physical practice. 86 whole living ChronograM 7/11 There are no punches or kicks. Instead one student role-plays the beginning of an aggressive act—such as a hand outstretched to strike—while her partner counters the attack with techniques designed to neutralize or redirect their energy. Sometimes the move is a throw, sending the attacker somersaulting through the air, and sometimes it’s a pin that renders the partner immobile yet leaves him unharmed. Concentrating on the core of the body—the source of “ki,” or life force, just below the navel—practitioners flow through circular movements that harmonize and blend with each other, resolving conflict instead of escalating it. Yet Aikido is not soft; it is quite powerful. “If you have to, you can do damage,” says Konigsberg later in the dojo’s common room, which is adorned with a few of the sensei’s luminous paintings. “Within each technique you can issue harm or choose not to. Aikido has a life and death aspect; this is what it was based on. But it’s moved to a point where we take care of our partner. You have the flowing quality of dance but the edge of a martial art, which gives it a certain center.” Why do you need to protect an attacker who wants to hurt you? “In some cases you can’t,” says Konigsberg. “But if you have the option, the same principles and techniques that will protect him will also protect you.” True Empowerment A slender 50-something woman throws a burly younger man easily to the ground. A child tussles with a man four times his age and twice his size, while a prison guard tumbles with a Wall Street honcho up from the city for the weekend. The discipline draws practitioners from all walks of life, and anyone can partake in the dynamic, spinning kaleidoscope that is Aikido. More than just roughhouse play, this is a martial art that can save your life. Ralph Legnini, a West Shokan-based musician and fourth degree black belt who teaches Woodstock Aikido’s children’s classes, will never forget the day when his many years of practice crystalized in one New York City minute. About seven years ago, Legnini was eating lunch in a Manhattan bistro when a big guy came in and started harassing people. “He seemed totally nuts. He was taking people’s food and preaching about the Lord.” The man came right up to Legnini with a verbal assault and a threat of “I’m going to cut you in half,” reaching into his pocket for what Legnini thought might be a knife (he learned later that it was). Despite having one arm in a cast from recent surgery, Legnini was able to use his good arm in a classic Aikido move to grip his attacker and pin him down.When the police arrived soon after to take the man into custody, it took three officers to restrain him. Legnini recalls, “He was yelling, ‘Get me away from that guy, he was doing voodoo on me!’” The officers were so impressed by Legnini’s moves that they later started studying Aikido themselves. Nowadays, Legnini is a part of the martial art’s growing Catskills presence. In December 2010, heeding the encouragement of his primary teacher, Konigsberg Sensei, he opened Shandaken Aikido on Main Street in Phoenicia. Here Legnini teaches about four classes a week for kids, teens, and adults— all well received by the community. He is already thinking of expanding to a larger space. Legnini says many children and parents are drawn to Aikido because unlike most other martial arts it is noncompetitive. In the kids’ classes that he teaches in both Woodstock and Phoenicia, there is no testing and no tiered system of belt colors. The format is based on respect and cooperation. Yet kids feel empowered as they learn to move from their center and master skills that let even a first-grade girl hurl a grownup man to the ground. “This is the beauty of Aikido,” Legnini explains to his Woodstock kids’ group after demonstrating a technique. “You don’t have to be bigger or stronger than your opponent—as long as the technique is fluid and the mind is free and confident.” Self-Defense and More Practitioners of all ages can benefit from the martial art’s potential perks: improved cardiovascular health; increased strength, flexibility, balance, and coordination; greater focus and attention; a calm mind and a relaxed body. Bob Wilcox, a fifth degree black belt who runs his Kingston Aikido dojo out of a built-from-scratch green building on East Chester Street, says the martial art takes a certain type: people who are interested in not only self-defense but also personal development. “It’s about being kind to people,” says Wilcox. Yet Wilcox finds that Aikido’s cooperative aspect is easily misunderstood. “People think that means you’re just going along with things,” he says. “That’s not the case. Everyone has the same goal—to resolve conflict peacefully—but you actually need to be somewhat aggressive to learn Aikido properly.You have to role-play and really attack people. That way when someone is truly threatening, you can maintain your center and not allow emotion to come into play. You can put them down gently, and that takes practice.You have to reach deep into yourself to really do that.” Wilcox is quick to point out Aikido’s joyful aspects—such as learning to fall and roll, which many practitioners find the most fun part of the practice. Some of his students have used these skills in real-life situations such as slipping on ice or wiping out on a bicycle without getting hurt. Perhaps that’s what keeps so many students coming back. In operation since 1999, Kingston Aikido has a membership that Wilcox describes as solid and growing. The schedule offers two or three classes a day, including kids’ classes taught by Marilyn St. John, who like Wilcox has studied for years with Woodstock’s Konigsberg Sensei. A Path of Harmony To practice Aikido’s tenets of love and compassion in the company of a highly realized teacher is one thing; but to bring it off the mat and into your life and work is quite another. Such is the case with Eric Schneider, a lawyer with offices in Kingston who bases his style on Aikido’s ideals of cooperation and peace. Going against the grain of the contentious personalities that usually preside over courtroom litigation, Schneider reaches for a different kind of power—gentler, but no less potent—to argue his cases.This unusual approach has earned him some limelight moments, including a 1997 article in the New York Times that profiled his “peacefully aggressive” style. “If my adversary is angry and combative, as so many litigators are, I don’t return it,” says Schneider. “When their brains are splashed with adrenaline they are actually harming their own effectiveness. I get that much more soft and try to make strong arguments with love.” Schneider, who has been practicing Aikido for over 10 years, mostly at Konigsberg’s Woodstock dojo, keeps a copy of O-Sensei’s book of aphorisms, The Art of Peace, on his desk and uses Aikido techniques for breathing and positive thinking to calm himself and still the tension in his body before a high-profile case. These methods have helped him win even despite tough odds. A few years ago Schneider had a client in a felony trial who had confessed to a police officer on tape. A guilty verdict seemed inevitable.Yet during the trial Schneider reached into his “ki” and managed to stay loose and confident while the opposing lawyer was rigid and prosecutorial. The jurors liked him. To a stunned courtroom they pronounced Schneider’s client “not guilty.” It’s Aikido’s most basic principles that make it such a powerful martial art—whether on the mat or in the street or courtroom. “The highest form of any art is to simplify,” says Konigsberg. “I had a kid come into the dojo a couple of years ago who said, ‘How do you guys get tough?’ I said, ‘We’re not tough, we just train to be more spontaneous and more natural. This is an art to become more natural.’” Resources Woodstock Aikido (845) 679-8153 Kingston Aikido (845) 679-0506 Shandaken Aikido (845) 750-5516 Eric Schneider, Esq., Kingston (845) 339-6733 7/11 ChronograM whole living 87 High Ridge Traditional Healing Arts Acupuncture Herbal Medicine Allergies Women’s Health Weight Management Carolyn Rabiner, L. Ac., Dipl. C.H. Board Certified (NCCAOM) 87 E. Market St, Suite 102 Red Hook, NY 845-758-2424 Daily Hatha Yoga Classes & 200 hour Yoga Teacher Trainings Some insurances accepted Saturday hours available 13 Sapphire Road, Monroe, NY 10950 ~ 845.782.5575 The Natural Gourmet Cookery School For more than 20 years people around the world have turned to Natural Gourmet’s avocational public classes to learn the basics of healthy cooking. They come to the Chef’s Training Program to prepare for careers in the burgeoning Natural foods Industry. With the growing awareness of the effect that food has on health and well-being, there is a great demand for culinary professionals who can prepare food that is not only beautiful and delicious, but health-supportive as well. Our comprehensive Chef’s Training Program, the only one of its kind in the world, offers preparation for careers in health spas and restaurants, bakeries, private cooking, catering, teaching, consulting, food writing and a variety of entrepreneurial pursuits. Please browse our website to see how much we can offer you! TelePhoNe: 212-645-5170 FaX: 212-989-1493 48 weST 21ST STreeT, New York, NY 10010 emaIl:INFo@NaTuralGourmeTSChool.Com 88 whole living ChronograM 7/11 VANISHING ART River of Ancient Wisdom AN INTIMATE FESTIVAL RETREAT. DISCOVER. HEAL. OF WHAT MAY BE AUGUST 24 â&#x20AC;&#x201C;28th, 2011 BLUE DEER NEW LEBANON, NEW YORK CENTER 3ALONS s 0OETIC !CTION s -USIC s 3OCIAL 3CULPTURE s 'ALLERIES ARTISTS & GUESTS upCoMiNg shaMaNiC prograMs: 2OBERT +ELLY $OROTHEA 2OCKBURNE July $AVID15 ,EVI 3TRAUSS #AROLEE July 6â&#x20AC;&#x201C;10 & august 19 3CHNEEMANN #HRISTOPHER "AMFORD $REW $ELLINGER 7ENDY 4REMAYNE 0HONG "UI 2AYMOND Living With Totem Community Fire (free event) &OYE 3TERRETT 3MITH #HARLES 3TEIN "ISAN 4ORON &RED *OHNSON 2OBIN "ECKER with Eliot Cowan 9UVAL 2ON 9AKOV 2ABINOVICH -ERYLaugust 'ROSS #HARLOTTE -ANDELL 'EORGE 1UASHA 19 â&#x20AC;&#x201C; 21 3USAN 1UASHA 0IR :IA )NAYAT +HAN 0ETER ,AMBORN 7ILSON AND MANY OTHERS July 23â&#x20AC;&#x201C;28 Healing Camp: Traditional Huichol Shamanic Healing with Eliot Cowan July 29â&#x20AC;&#x201C;31 Journey to the Heart of the Land with Scott Sheerin Introduction to Plant Spirit Medicine SM august 26 â&#x20AC;&#x201C; 28 Replenish Your Heart: Reconnecting to Divine Rhythm septeMBer 2 â&#x20AC;&#x201C; 4 The Medicine Wheel as Lifeway with Joan Henry & Jon Delson WEBSITE SEVENPILLARSHOUSE ORG Blue PHONE Deer Center | Margaretville, New york | (845) 586â&#x20AC;&#x201C;3225 The Path of Fulfillment It is human nature to yearn for understanding and strive for fulfillment. To realize our deepest aspirations, we need to follow an authentic path that helps us actualize our innate completeness. Over the course of two days Rinpoche will share his lineage blessings and guide us on this sacred journey. 2 days of teachings & meditation with His Eminence Shyalpa Rinpoche at Buddhafield in Millerton, New York Sat, July 23 and Sun, July 24, 2011 For more information and to register, call: 860-435-9904 or email: info@shyalparinpoche.org VANISHING ART AN INTIMATE FESTIVAL OF WHAT MAY BE AUGUST 24 â&#x20AC;&#x201C;28th, 2011 NEW LEBANON, NEW YORK Upcoming 2011 programs Hiking in the catskills robert Thurman & Friends July 1 - 4, 2011 Lu Jong: Tibetan Healing Yoga Tulku Lobsang July 21 - 24, 2011 SEVENPILLARSHOUSE ORG 3ALONS s 0OETIC !CTION s -USIC s 3OCIAL 3CULPTURE s 'ALLERIES integrating Buddhism & psychotherapy mark Epstein and robert Thurman august 26 - 28, 2011 challenge Your Body, mind & spirit: a Hiking, Yoga and cleansing spa Weekend Jill pettijohn & robert Thurman september 8 - 11, 2011 The Joy of the Yogini: Womenâ&#x20AC;&#x2122;s retreat colleen saidman Yee september 16 - 18, 2011 110 Center St., Sharon Springs, NY 13459 518-369-2164 Featuring six guest bedrooms with private baths â&#x20AC;˘ Fully air conditioned â&#x20AC;˘ Queen beds â&#x20AC;˘ Breakfast included â&#x20AC;˘ Free WiďŹ 2 Suites include a sofa sleeper in a separate, private room. Working with Your Enemies robert Thurman & sharon salzberg september 23 - 25th, 2011 Catskill Mountains Phoenicia, New York For more information and to register please visit: Tel. 845-688-6897 7/11 ChronograM whole living 89 HILLARY HARVEY Flowers Fall By Bethany Saltman Yet, though it is like this, simply, flowers fall amid our longing, and weeds spring up amid our antipathy. — Dogen Zenji, Genjokoan Taking the Attachment Parenting Challenge: A Week in Italy! T his month T and I are celebrating our 10th anniversary. I just looked through some pictures of our gorgeous, crazy Buddhist wedding at Opus 40. Man. I always used to say that marrying T was the best thing I ever did for my family, being the football-playing, normal, supernice guy that he is, a far cry from the moody bookworms of my past. But in fact, marrying T was the best thing I ever did for myself. For the same reasons, but more, too. Not the least of which is our life as parents, together. This wild road of self-study, of learning how to be bodhisattvas, of learning what it means to love—each other, our child, the whole catastrophe (as Daido Roshi used to say). And so, as parents who, like most, feel deeply grateful for our lives, but stretched, too, we figured it would be nice to take a moment (a week to be exact) to be alone, to celebrate our 10 years of marriage. I’ve never been to Europe and was dying to go. So after much hemming and hawing, we decided to take the plunge. By the time this hits the stands, T and I will be in Italy, and Azalea will be with T’s parents, her beloved Jean and Pop-Pop. It’s not like we have never been away from her before. We have stolen away for a few weekends over the last five years, done several retreats, and gone on many dates. However, traveling abroad, and for so long, feels pretty radical. We planned the trip last year, when Azalea was four, figuring that by the time she was five, she would be even more okay with a big separation than she was then. Unfortunately, this may not be so. In fact, maybe because of our impending trip, and kindergarten looming ahead, or some combination of it all, along with the inevitable mystery that is always guiding any human unfolding, Azalea is feeling more tender than usual, a little more fearful, actually less secure. Yikes. This morning when I asked her what she wanted to do today, she responded, “Be with mama.” And so, when I randomly received Natural Life magazine in the mail, and then read the article called “Separation Anxiety?” by the well-known author and turbo-attachment-parenting advocate Naomi Aldort, I was in a perfect position to receive her teaching, such as it is. “By nature, there is no such thing as ‘separation anxiety,’” Aldort writes. “Instead, there is a healthy need of a child to be with her mother [sic]. Only a deprivation of a need creates anxiety.…The concept ‘separation anxiety’ is the invention of a society that denies a baby and child’s need for uninterrupted connection. In this vein, we can deprive a child of food and describe her reaction as ‘hunger anxiety,’ or we can let her be cold and call her cries ‘temperature anxiety.’” In another paragraph, Aldort writes, “We create anxiety when we deprive, manipulate, and try to stir the child with our expectation that she be what she is not.” Reeling from the words deprivation, denies, uninterrupted connection, deprive (again), hunger, cold, deprive!!, manipulate, I felt a need to tell Aldort how I felt. So I wrote her an e-mail. 90 whole living ChronograM 7/11 Hi Ms. Aldort, I write a monthly column called Flowers Fall in a Hudson Valley magazine on being a Buddhist mom, which I am. I just read your piece in Natural Life and might discuss it in my next column, and I was wondering if you might like to comment and/or be interviewed. In a nutshell, while I agree with much of your basic premise about how our culture seeks to cut the cord way too soon and privileges independence ridiculously early (and from the Buddhist perspective of interdependence, quite impossibly), I find some of your language to be very harsh toward parents, and accusatory, and I don’t see how that helps anyone. Saying that we are “denying and manipulating” our kids feels mean and could easily lead to already anxious parents feeling more wound up, which ultimately lands with their children. Guilty parents don’t tend to offer themselves “authentically,” to use your word. And she responded right away: Dear Bethany, […] Generally, I give lots of credit to parents and count on them to be able to depart from old dogma without feeling guilt or taking it personally. I do often put in words like, “No need to feel guilty....it is a learning process.” In a way I don’t treat parents with soft gloves. Neither does Zen Buddhism. I think parents can only make progress from facing the truth head on. It is ruthless kindness.When we drag a person out of the stormy water, we don’t do it kindly, and yet it is the kindest action. I hear what Aldort’s saying, though, for the record, Zen practice, as I know it anyway, is nothing if not devoted to delivering its profoundly tender message of perfection with skillful means. Guilt and shame aren’t usually that skillful. But I digress. I appreciated her willingness to go there with me, a stranger, and to add some softening caveats like “it is a learning process.” And, in fact, much of what she says about how to trust and respect children and their needs I totally agree with, and I admire her very much. And when I told her in another e-mail about our trip, and asked for her take on it, she admitted that she does not know Azalea, and that there are no rules that fit all. However, she added, “The child who is ripe for separation will have only good sense of herself and her independence. Never anxiety. Even one premature experience can delay that sense of confidence for years and leave marks for life.” Only? Never? For life? I guess the main thing Aldort and I completely disagree on is certainty. It’s as though she knows something the rest of us don’t, like exactly how everything works. Confidence is one thing, and it can be developed by truly trusting each moment, but to be that sure about a complex human process actually scares me. Do I feel ambivalent about going? Totally. Do I think that our lives and relationships are more mysterious than anything that can come out of one trip or most single decisions? Absolutely. While I won’t be able to report back on whether or not this trip will scar Azalea for life, I will write when we return and describe what I can see as the effects of our having taken up this challenge with our hearts and eyes open. I know for sure that I will miss Azalea, and that she will miss me. I wonder what else we are all missing. whole living guide New Paltz Community Acupuncture Women’s Amy Benac, M.S., L.Ac. $25-$40 a session (You decide what you can afford) & Effective, affordable acupuncture in a beautiful community setting Please see Whole Living Directory listing for more info A unique boutique with something for everyone! 21 S. Chestnut Street, New Paltz TEL: 845-255-2145 JoIn us braevent fitting m 2, 2pmY2 7p L Ju Echo Boutique 470 Main, Beacon, NY 845.440.0047 Beacon Services offered echobeacon.com Personal bra fit consultations & wardrobing Wine & Hors Devours to be served In home fit parties, ladies night of wine and lingerie shopping Post Mastectomy fittings and product consultation Fitting for mommies from during pregnancy, nursing, and after Judy Swallow MA, LCAT, TEP PSYCHOTHERAPIST • CONSULTANT Active Release Techniques maintain their certification in ART® doctors attend yearly continuing education and re- Dr. David Ness (845) 255-1200 Active Release Techniques (ART®) is a patented soft tissue treatment system that heals injured muscles, tendons, fascia (covers muscle), ligaments, and nerves. It is used to certification by ART®. Acupuncture Creekside Acupuncture and Natural Medicine, Stephanie Ellis, L.Ac. repetitive strain injuries and nerve entrapments 371 Main Street, Rosendale, NY (845) 546-5358 like carpal tunnel syndrome, and sciatica. 10 years in Rosendale - new name and loca- ART® is also used before and after surgery tion! Specializing in the treatment of chronic treat acute or chronic injuries, sports injuries, to reduce scar tissue formation and build up. ART® works to break up and remove scar tissue deep within and around injured muscles, tendons, ligaments, and nerves. The injured muscle, joint, ligaments, and nerves are moved through a range of motion while a contact is held over the injured structure. This breaks up the scar tissue and heals the tissue faster than traditional treatments. ART® doctors are trained in over 500 hands-on protocols and must undergo rigorous written and practical examination to become certified. In order to and acute pain, fertility and gynecological issues, pregnancy support, digestive issues, and addictions and other emotional issues. Private treatment rooms. Sliding scale, no-fault, many insurances. High Ridge Traditional Healing Arts, Oriental Medicine — Carolyn Rabiner, L Ac 87 East Market Street, Suite 102, Red Hook, NY (845) 758-2424 Rubenfeld Synergy® Psychodrama Training ~ 25 Harrington St, New Paltz, NY 12561 (845) 255-5613 H YPNOCOaCHING m I N d / B O d Y I N T e G r a T I O N Hypnosis • Holistic nurse consultant• coacHing Manage Stress • Apprehensions • Pain • Improve Sleep Release Weight • Set Goals • Change Habits Pre/Post Surgery • Fertility • Gentle Childbirth Immune System Enhancement Past Life Regression • Intuitive Counseling Motivational & Spiritual Guidance Relax • Release • Let Go • Flow HYPNOSIS f O r B I rT H I N G Kary Broffman, r.N., C.H. 845-876-6753 7/11 ChronograM whole living directory 91 whole living directory 917-755-5301 • Christina@thebrafitexpert.com Claudia Coenen, MTP, CT CREATIVE COUNSELING FOR TRANSFORMATION Specializing in loss, transition, death and life changes Offering companionship and inspiration on your life’s journey back to wholeness. Featuring individual sessions, workshops, inspirational talks. Hoon J. Park, MD, PC 1772 South Road, Wappingers Falls, NY (845) 298-6060 New Paltz Community Acupuncture — Amy Benac, L Ac 21 S. Chestnut Street, New Paltz, NY (845) 255-2145 Medical Aesthetics of the Hudson Valley 166 Albany Avenue, Kingston, NY (845) 339-LASER (5273) Body-Centered Therapy can afford). As a community-style practice, Irene Humbach, LCSW, PC — Body of Wisdom Counseling & Healing Services treatments occur in a semi-private, soothing (845) 485-5933 space with several people receiving treatment By integrating traditional and alternative $25-$40 sliding scale (you decide what you at the same time. This allows for frequent, affordable sessions while providing high quality care. Pain management, relaxation, 914-475-9695 (cell) claudia@thekarunaproject.com issues, anxiety, depression, trigger point headaches, TMJ, smoking cessation, Gyn release, insomnia, fatigue, recovery support, GI issues, arthritis, muscle tension, therapy/healing approaches, including BodyCentered Psychotherapy, IMAGO Couples’ Counseling, and Kabbalistic Healing, I offer tools for self healing, to assist individuals and couples to open blocks to their softer heart energy. Ten-session psycho-spiritual group for women. chemo relief, immune support, allergies, menopausal symptoms, general wellness, and much more. whole living directory • Integrating Talk & Body-Centered Therapy • IMAGO Couples Relationship Counseling • Blended Family Counseling • Integrated Kabbalistic Healing • Exceptional Marriage Mentoring (couple to couple) Irene HumbacH, LcSW, Pc Office in Poughkeepsie (845) 485-5933 SearchLight Medical 2345 Route 52, Suite 1F Hopewell Junction, NY (845) 592-4310 Healing mind, body, and spirit combining traditional medical practice, clinical hypnotherapy, 12-step work, and Reiki energy healing. stress-related illness hypertension • asthma • headache • gastrointestinal disturbance • chronic fatigue • fibromyalgia & chronic lyme anxiety/depression panic • phobia • insomnia eating disorder, weight loss, and smoking cessation Kristen Jemiolo, MD American Board of Family Medicine, Diplomate American Society of Clinical Hypnosis, Certification Poughkeepsie (845) 485-7168 For more information visit Dr. David Ness (845) 255-1200 Dr. David Ness is a Certified Chiropractic Sports Practitioner, Certified Active Release Techniques (ART®) Provider, and Certified Kennedy De- Alexander Technique compression Specialist. In addition to traditional chiropractic care, Dr. Ness utilizes ART® to Institute for Music and Health remove scar tissue and adhesions from injured Rhinebeck & Millbrook, NY (845) 677-5871 muscles, ligaments, tendons, and nerves. Dr. Ness also uses non surgical chiropractic traction to decompress disc herniations in the spine. If you have an injury that has not responded to Aromatherapy treatment call Dr. Ness today. Healthy Place Joan Apter Integrated Health Care for Women Chiropractic (845) 679-0512 joanapter@earthlink.net Also see Massage Therapy. Art Therapy Deep Clay Art and Therapy New Paltz/Gardiner and New York City, NY (845) 255-8039 deepclay@mac.com Red Hook, NY (845) 758-3600 Counseling Claudia Coenen, MTP, CT (914) 475-9695 claudia@thekarunaproject.com IONE — Healing Psyche Michelle Rhodes LCSW ATR-BC, 25 years (845) 339-5776 experience providing individual and group IONE is a psycho-spiritual counselor, qi psychotherapy and inter-modal expressive arts healer and minister. She is director of the therapy. Brief intensive counseling for teens Ministry of Maåt, Inc. Specializing in dream and adults, psychoanalytic psychotherapy, phenomena and women’s issues, she facili- child and family play therapy, parent coun- tates Creative Circles and Women’s Myster- seling, and “Dreamfigures” a clay art therapy ies Retreats throughout the world. Kingston group for women. and NYC offices. For appointments contact Kellie at ioneappointments@gmail.com. Astrology Planet Waves Kingston, NY (845) 797-3458 “Feel The Difference.” R Mention our July Chronogram ad when scheduling appointment and receive: One hour massage for $65 ($85 value)* Check out our website for other specials! *New Clients Only. Offer expires July 31st, 2011. R Specializing in: Reducing Pain, Lowering Stress Levels Enhancing Athletic Performance Relieving the Discomforts of Pregnancy 92 whole living directory ChronograM 7/11 Body & Skin Care Located in the Gold’s Gym LaGrange 258 Titusville Rd Poughkeepsie, NY (845) 485-6820 Made with Love CranioSacral Therapy Michele Tomasicchio — Holistic Health Practitioner New Paltz, NY (845) 255-4832 essentialhealth12@gmail.com Headaches? TMJ? Insomnia? Pain? Brain trauma? Depression? CranioSacral is a (845) 674-3715. gentle approach that can create dramatic Handcrafted skin care products using natural sions deep in the body to relieve pain and ingredients, pure essential oils and phthalate- dysfunction and improve whole-body health free fragrance oils. No parabens, petroleum or and performance. If you need help feeling carcinogenic chemicals are used. vibrant call or e-mail for a consultation. improvements in your life. It releases ten- Dentistry & Orthodontics life changes. He has successfully helped his clients to heal themselves from a broad Dr. Jane McElduff spectrum of conditions, spanning terminal 616 Route 52, Beacon, NY (845) 831-5379 cancer to depression. The Center also Holistic Orthodontics — Dr. Rhoney Stanley, DDS, MPH, Cert. Acup, RD Kara Lukowski, CAS, PKS, E-RYT offers hypnosis, massage, and Raindrop Technique. 107 Fish Creek Road, Saugerties, NY (845) 246-2729 and (212) 912-1212 243 Fair St, Kingston, NY 845-633-0278 kara@karalukowski.com I believe in expansion and gentle forces. Kara Lukowski is a Clinical Ayurvedic Specialist Too much pressure squeezes out essential who helps clients with disorders of digestion, blood supply and there is no support for tooth weight, circulation, skin, reproduction, chronic movement. I do not recommend extraction of fatigue, emotional instability and more. Offering permanent teeth. When teeth are extracted, one-on-one counseling with supportive guid- the bone that holds the teeth is lost and the ance. You will receive a personalized nutrition skin of the face sags. With aging, this is exag- plan, lifestyle recommendations, custom gerated. As a holistic practitioner, I consider organic herbal formulas, aromatherapy, yoga the bones, teeth, and face components of therapy and body therapies. the whole. Dental treatment has an impact on whole health. The amount of plaque and Kary Broffman, RN, CH calculus on the teeth is correlated with that in blood vessels. Movement in orthodontics (845) 876-6753 Karyb@mindspring.com affects the balance of the cranium, the head, 15 plus years of helping people find their and the neck. To support holistic treatment, balance. As a holistic nurse consultant, she I am certified in acupuncture and a regis- weaves her own healing journey and education tered dietician, trained in homeopathy and in psychology, nursing, hypnosis and integrative cranial osteopathy. At every visit, I do cranial nutrition to help you take control of your life and treatments for balance. I offer functional ap- to find True North. She also assists pregnant pliances, fixed braces, invisible braces, and couples with hypnosis and birthing. invisalign. I treat snoring and sleep apnea as well as joint and facial pain. We welcome accepted. Payment plans available. Stephen Eric Enriquez, DMD 12 Hudson Valley Professional Plaza, Newburgh, NY (845) 562-3370 Stone Ridge, NY (845) 687-2252 nplumer@hvi.net At Kripalu, we invite you to breathe—to intentionally pause the ongoing demands of life, bring your attention inward, and rediscover your authentic nature. Conscious engagement with the breath connects you with the intelligence and power of the life force within and around you. Whenever you are faced with a challenge—on the yoga mat, in a relationship, at work, or with your health—you can draw on a deep sense of ease, purpose, and mastery to create positive change. We call it the yoga of life. read kripalu.org/onlinelibrary/whydopranayama join the conversation Stockbridge, Massachusetts 800.741.7353 kripalu.org kripalu.org Nancy is an intuitive healer, spiritual counselor and long time yoga teacher. Would you like to relieve stress, anxiety, fear, and pain and increase your vitality, joy, and balance and Fitness Trainers connect to one's True Self? Nancy guides one to release blocked or stuck energy that shows Mountainview Studio up as dis-ease/illness/anxiety/discomfort/fear 20 Mountain View Avenue, Woodstock, NY (845) 679-0901 mtviewstudio@gmail.com and supports one to open to greater self- Herbal Medicine & Nutrition Empowered By Nature (845) 416-4598 lorrainehughes@optonline.net Lorraine Hughes — Herbal Wellness Guide, offers Wellness Consultations that therapeutically integrate Asian and Western Herbal Medicine and Nutrition with their holistic philosophies to health. This approach acceptance, integration and wholeness. Omega Institute for Holistic Studies (800) 944-1001 The Option Institute Sheffield, MA (413) 229-2100 Hospitals Kingston Hospital, Member of HealthAlliance of the Hudson Valley constitutional profile and imbalances. Please 396 Broadway, Kingston, NY (845) 331-3131 info@hahv.org visit the website for more information and Kingston Hospital is a 150-bed acute care upcoming events. hospital with a commitment to continuous is grounded in Traditional Chinese Medicine with focus placed on an individual's specific improvement. In addition to the new, state-of- Holistic Health the-art Emergency Department, a full compliment of exceptional, patient-focused medical John M. Carroll and surgical services are provided by staff with 715 Rte 28, Kingston, NY (845) 338-8420 dedicated and experienced professionals. John is a spiritual counselor, healer, and include: The Family Birth Place, Wound Healing teacher. He uses guided imagery, morphol- Center, Hyperbaric Oxygen Center, Cardiology ogy, and healing energy to help facilitate Services and Stroke Center. With the only accredited Chest Pain Center in the Hudson Valley, other specialized programs WEEKEND RETREAT FOR TEEN GIRLS Facilitated by Amy Frisch, LCSW Come discover yourself... a little art, a little yoga, a little R&R for the teenage soul. July 8, 9, 10 and July 15, 16, 17 Montgomery, NY Tuition: $250 For more information call: 845-706-0229 or visit: 7/11 ChronograM whole living directory 93 whole living directory children, teenagers, and adults. Insurance Nancy Plumer, Energy Healing and Spiritual Counseling and breathe… Northern Dutchess Hospital pregnant and/or caring for a newborn. Heather Rhinebeck, NY is a Certified Infant Massage Instructor, so Sharon Hospital 50 Hospital Hill Road, Sharon, CT (860) 364-4000 Vassar Brothers Medical Center 45 Reade Place, Poughkeepsie, NY (845) 454-8500 Hypnosis Dr. Kristen Jemiolo Poughkeepsie, NY (845) 485-7168 mysite.verizon.net/resqf9p2 38 East Market Street, 2nd Floor, Rhinebeck, NY (845) 876-2626 rsvp.mhvs.org rsvp@mhvs.org, info@mhvs.org psychologist with doctorate in clinical psychol- The Mid-Hudson Vegetarian Society, Inc. in Poughkeepsie. how to prepare for the marathon of labor and how to lose their mummy tummies. Heather and the other therapist also specialize in pain & stress management and sports massage. Skin care services available. Ask about our monthly massage memberships. Hudson Valley Therapeutic Massage — Michele Tomasicchio, LMT, Vesa Byrnes, LMT 7 Prospect Street, New Paltz, NY (845) 255-4832 hvtmassage@gmail.com and love to do with freedom from discomfort bad habits; manage stress, stress-related ill- and pain. address other issues. Change your outlook. Gain control. Make healthier choices. Certified Hypnotist, two years training; broad base in Psychology. Also located in Kingston, NY. Integrated Kabbalistic Healing Irene Humbach, LCSW, PC (845) 485-5933 Integrated Kabbalistic Healing sessions in person and by phone. Six-session introductory class on Integrated Kabbalistic Healing based on the work of Jason Shulman. Also see Body-Centered Therapy Directory. Massage Therapy Body Central you resume the activities you need to do Jesse Scherer LMT New Paltz, Kingston and NYC (914) 466-1517 Jessemassage@gmail.com how to change to a more healthful, crueltyfree lifestyle. Members and friends participate in talks, potlucks, a youth group, and other activities; and get discounts at participating stores and restaurants. Osteopathy Psychotherapy Amy R. Frisch, LCSW New Paltz, NY (845) 706-0229 Debra Budnik, CSW-R New Paltz, NY (845) 255-4218 long- or short-term work. Aimed at identifying Joseph Tieri, DO, & Ari Rosen, DO, 3457 Main Street, Stone Ridge; 138 East Market Street, Rhinebeck, NY (845) 687-7589 and changing self-defeating attitudes and Drs. Tieri and Rosen are NY State Licensed Osteopathic Physicians specializing in Osteopathic Manipulation and Cranial Osteopathy. Please visit our website for articles, links, behaviors, underlying anxiety, depression, and relationship problems. Sliding scale, most insurances accepted including Medicare/Medicaid. NYS-licensed. Experience working with trauma victims, including physical and sexual abuse. Educator on mental health topics. Located in New Paltz, one mile from SUNY. books, and much more information. Treat- Jesse delivers sessions based on the clients Irene Humbach, LCSW, PC ment of newborns, children, and adults. By individualized needs, addressing injury reha- (845) 485-5933 appointment. Body of Wisdom Counseling and Healing bilitation, muscular stagnation, flexibility, and stiffness due to lyme and other chronic illness, as well as relaxation and restorative massage. Pharmacies Services. See also Body-Centered Therapy directory. Utilizing Neuromuscular and other Specific Medical Arts Pharmacy Janne Dooley, LCSW, Brigid’s Well Deep Tissue Techniques; with strength and 37 North Plank Road, Newburgh, NY (845) 561-DRUG New Paltz, NY (347) 834-5081 Janne@BrigidsWell.com precision, Jesse supports the body’s natural inclination to move from a place of strain and fatigue to its preferred state of flexibility, suppleness and integrity. Also: Maya Abdominal Therapy, Sports Massage, Medical Massage. Medicine Chest Pharmacy 408 Blooming Grove Turnpike, New Windsor, NY (845) 561-5555 Some Insurance Accepted. Physical Therapy Joan Apter (845) 679-0512 joanapter@earthlink.net Woodstock Physical Therapy 2568 Route 212, Woodstock, NY (845) 679-9767 care, health consultations, spa consultant, classes and keynotes. Offering full line of MD Imaging 692 Old Post Road, Esopus, NY (347) 731-8404 ellen@consciousbodyonline.com Young Living Essential oils, nutritional supplenon-toxic cleaning products. 1 Webster Avenue Suite 307, Poughkeepsie, NY (845) 483-5352 Deep, sensitive and eclectic massage therapy Mid-Hudson Rebirthing Center New England Patient Resources with over 24 years of experience working with a (845) 255-6482 (518) 398-0051 Physicians Emotional Release, Facials, Stones. Animal ments, personal care, pet care, children’s and Meditation cal/emotional issues. Techniques include: deep tissue, Swedish, Craniosacral, energy balancing, and chi nei tsang (an ancient Chi- Rangrig Yeshe nese abdominal and organ chi massage). (860) 435-9904 info@shyalparinpoche.org Optometrists Rhinebeck Eye Care she understand what a woman experiences (845) 828-0215, 454 Warren Street, Hudson, NY (845) 876-2222 - 6805 Route 9, Rhinebeck NY physically, mentally and emotionally when 94 whole living directory ChronograM 7/11 Brigid’s Well is a psychotherapy and coaching practice. Janne specializes in childhood trauma, addictions, codependency, relationship issues, inner child work, EMDR and Brainspotting. Janne’s work is also informed by Emotional Intelligence and Interpersonal Neurobiology. Coaching for all life transitions as well as Mindful Parenting, Mindful Eating and Spirited Midlife Women. Call for information or free 1/2 hour consultation. grade Essential Oils; Raindrop Technique, wide variety of body types and physical/medi- massage. Recently having her first child, cated across the street from Vassar College Traditional insight-oriented psychotherapy for Conscious Body Pilates & Massage Therapy Heather specializes in prenatal/postpartum adults, young adults, and adolescents. Lo- Stone Ridge Healing Arts Luxurious massage therapy with medicinal 258 Titusville Road, Poughkeepsie, NY (845) 485-6820 handsonmassagewellness@yahoo.com and certification in psychoanalytic work with benefits of a plant-based diet and showing 17 Glen Pond Drive, Red Hook, NY (845) 876-7222 Hands On Massage & Wellness, Inc. — Heather Kading, LMT, CIMI ogy and five years of post-doctoral training lifestyle, educating the community about the problems? Headaches? Numbness or tin- Increase self-esteem and motivation; break sports performance; enhance creativity and works to promote the vegetarian and vegan Do you have chronic neck, back or shoulder a blend of soft tissue therapies, we can help learning, memory, public speaking, and whole living directory with life satisfaction and growth. Licensed new bundle of joy. She also teaches women New Paltz, NY (845) 389-2302 and despondency; relieve insomnia; improve terns of thought and behavior that interfere Mid-Hudson Vegetarian Society, Inc. gling? Or do you just need to relax? Utilizing headaches, chronic pain); overcome fears approach with focus on understanding pat- she can teach you how to bond with your Sharon Slotnick, MS, CHT ness, and anger; alleviate pain (e.g. childbirth, Organizations Psychics Psychically Speaking (845) 626-4895 or (212) 714-8125 gail@psychicallyspeaking.com Psychologists Newsletter sign up on website. FB page:. Judy Swallow, MA, LCAT, TEP 25 Harrington Street, New Paltz, NY (845) 255-5613 Julie Zweig, MA, Certified Rosen Method Bodywork Practitioner, Imago Relationship Therapist and NYS Licensed Mental Health Counselor 66 Mountain Rest Rd, New Paltz, NY (845) 255-3566 julieezweig@gmail.com Meg F. Schneider, MA, LCSW Rhinebeck, NY (845) 876-8808 I work with adolescents and adults struggling with depression, anxiety, anger, eating disor- Emily L. Fucheck, Psy D dered behaviors, loneliness and life transitions. Poughkeepsie, NYC (845) 380-0023 I’ve helped teens and adults with substance Offering therapy for individuals and couples, emotional and sexual abuse. My approach is adults and adolescents. Insight-oriented psychodynamic, linking the painful past with abuse and trauma connected to physical, current and cognitive problems, which reframes negative beliefs allowing for positive outcomes. I also practice EMDR, a technique for relieving distress by exploring critical memories. Michelle Rhodes LCSW ATR-BC New Paltz/Gardiner and New York City, NY (845) 255-8039 deepclay@mac.com 25 years experience providing individual and group psychotherapy and inter-modal expressive arts therapy. Brief intensive counseling for teens and adults, psychoanalytic psychotherapy, child and family play therapy, parent counseling, and “Dreamfigures” a clay art therapy group for women. Reflexology Soul 2 Sole Reflexology, Arlene Spool 701 Zena Highwoods Road, Kingston, NY (845) 679-1270 Relief from Stress & Tension. Relaxing foot or hand massage, Raindrop Technique or Reiki Session; private Green healing space or yours! (‘Sole Traveler’). My clients report relief from stress, carpal tunnel, circulation, insomnia, toxins, radiation & chemo side effects + balance; more energy. Sessions start $32. Always There Home Care (845) 339-6683 Resorts & Spas Aspects Gallery Inn & Spa Woodstock, NY (917) 412-5646 liomag@gmail.com Phoenicia, NY (845) 688-6897 ext. 0 menla@menla.org Giannetta Salon and Spa 1158 North Avenue, Beacon, NY (845) 831-2421 New Age Health Spa (800) 682-4348 Retreat Centers Blue Deer Center 1155 County Route 6, Margaretville, NY (845) 586-3225 Established in 2005, Blue Deer Center is America’s leading shamanic retreat center providing intimate retreats of indigenous ancestral traditions from around the world. Upcoming programs include Plant Spirit MedicineSM trainings, traditional Huichol healing, Celtic, Sufi, Xhosa (South African) and Native American retreats. Discover your sacred song! Splitting Up? the eMpowered, reSponSible ChoiCe... Tarot Tarot-on-the-Hudson — Rachel Pollack Rhinebeck, NY (845) 876-5797 rachel@rachelpollack.com Mediation Design Your Own Future Nurture Your Children Preserve Your Assets Thermography Susan Willson, CNM, CCT Rodney Wells, CFP 845-534-7668 (845) 687-4807 Women’s Health Team Northrup Contact Theresa Haney, (845) 489-4745 theresahaney@teamnorthrup.com We are a league of entrepreneurial men and women from all over the world, who are aligned with the work of women’s wellness pioneer, worldrenowned author, and one of the country’s most respected authorities on women’s health, Dr. Christiane Northrup. Team Northrup was founded in 2002 by Dr. Northrup, daughter Kate Northrup Moller and sister Penny Northrup Kirk. We are all independent associates with our product partner, USANA Health Sciences, which makes the highest quality supplements, skin-care and weight management products manufactured to pharmaceutical standards available. Dr. Northrup has used these products and has recommended them in her books and to her patients for the past sixteen years. As members we have an affiliation with the authors of The Healthy Home; Simple truths to protect your family from hidden household dangers by Dr. Myron Wentz and Dave Wentz, Vanguard Press, 2011. Buttermilk Falls Inn & Spa 220 North Road, Milton, NY (877) 7-INN-SPA (845) 795-1310 Make Yoga Jai Ma Yoga Center 69 Main Street, Suite 20, New Paltz, NY (845) 256-0465 Established in 1999, Jai Ma Yoga Center offers a wide array of Yoga classes, seven days a week. Classes are in the lineages of Anusara, Iyengar, and Sivananda, with certified and experienced instructors. Private consultations and Therapeutics available. Owners Gina Bassinette and Ami Hirschstein have been teaching locally since 1995. July 2, 5–7pm Deep Listening Institute Opening Reception for the Art on Wall Series with David Whalen “Setting down the Pen & Brush” - Breath Empowered Art Digital Paintings using Breath and Head Motion Through months of July & August Deeplistening.org Compassionate Transpersonal Counseling Women’s Mysteries Teachings Ministerial Studies Red Phoenix Rising! Dream Retreat Bretagne, France June 17-20, 2011 womensmysteries@gmail.com 845-339-5776 Kripalu Center for Yoga and Health Stockbridge, MA (800) 741-7353 Woodstock Iyengar Yoga Woodstock, NY (845) 679-3728 Yoga Society of New York — Ananda Ashram 13 Sapphire Road, Monroe, NY (845) 782-5575 Imago Relationship Therapy julieezweig@gmail.com 7/11 ChronograM whole living directory 95 whole living directory Residential Care Menla Mountain Retreat & Conference Center SH_HWC_Chronogram_JulyAug2011_Layout 1 6/9/2011 3:37 PM Page 1 When seeking optimal health and wellness for you and your family, there are many paths you can take. But truly understanding all your options can be an overwhelming and time-consuming process. Wouldnâ&#x20AC;&#x2122;t it be great to have your very own personal healthcare Concierge who can coordinate all of your healthcare needs? The Health & Wellness Concierge gives patients exclusive access to Sharon Hospitalâ&#x20AC;&#x2122;s network of physicians, resources, and programs to develop a seamless plan of care. He can recommend the ideal physician, facilitate appointments, or suggest classes that reflect the specific needs of you and your family. Jim Hutchison is a compassionate, clinical professional --- available by phone, email or appointment to provide personalized answers and referrals based on your individual, private, and confidential consultations. Simply call 877.364.4202, Monday through Friday, 8:30 am to 4:30 pm or email concierge@sharonhospital.com. Welcome to a truly unique level of medical care --- compliments of Sharon Hospital. With our Health & Wellness Concierge, the way should be refreshingly clear. 50 Hospital Hill Road, Sharon, CT | 860.364.4000 | sharonhospital.com 96 medicine and healing ChronograM 7/11 Medicine & Healing Patient-Focused Medicine Healing the New-Fashioned Way By Ann Hutton Pediatrician Dr. Adeola Ayodeji attending to one of Greater Hudson Valley Family Health Center’s youngest patients during a well-child visit. C hanges in medical technology occur so rapidly that healing professionals are compelled to update their knowledge and training just to stay current. Meanwhile, the rest of us amble on with a pedestrian vocabulary of medical procedures until something happens, like an illness or a physical breakdown. It might suddenly seem that amazing new diagnostic instruments are available, that outpatient services have been drastically expanded, and our basic understanding of medical terms is lagging. A brief survey of what’s new is in order. Digital Imaging Medical practitioners and facilities of the Hudson Valley region offer some of the best in medical technological advancements. Many area dentists are now using Diagnodent lasers and intraoral cameras to augment digital X-ray appliances, for example. Digital imaging not only minimizes radiation exposure due to the fewer number of images taken, but also offers the advantage of easily stored and retrieved patient images for reference and transfer purposes. Most medical facilities have converted to digital imaging as a regular practice in lieu of film radiographs. Certainly digital mammography is faster, safer, and more precise in terms of deciphering exactly what is seen on a patient’s image.When a radiologist can zoom in and enhance a picture—and do it almost instantly—a patient’s results can be determined immediately and with greater accuracy. In Kingston, the consolidation of the Fern Feldman Anolick Breast Center at Benedictine Hospital and The Greenspan Center for Women’s Health at Kingston Hospital is culminating in a new, state-of-the-art Center for Breast Health, to be located in the Thomas A. Dee Cancer Center on the Benedictine Hospital campus. Lead mammographer Gail Muench says that when the new center opens in the fall, the comprehensive program will include not only mammography and ulstrasound, but also breast MRI and breast specific gamma imaging (BSGI). Ultrasonography is an imaging technique using high-frequency sound waves that are sent through body tissue to produce an image—a sonogram— on a viewing screen. BSGI, a technology not currently offered in the region, involves injecting a nuclear contrast medicine into tissue, and is particularly useful in detecting cancers smaller than one centimeter. Mammography remains the first method of detection for breast cancers but doesn’t always relay complete and clear diagnostic information. Ultrasonography, BSGI, and breast MRI, which shoots cross-sectional pictures behind the breast and deep into the chest wall, are all used for more complete auxiliary diagnoses. Muench and her associates are very pleased about soon having BSGI in their array of options. “Patients won’t have to wait the typical six-months for doctors to watch questionable lesions when deciding to biopsy or not,” says Muench. “There will be a learning curve for us, but it’s very exciting. That six-month wait was always a problem for us, and it’s very stressful for the patient.” Minimally Invasive Techniques Minimally invasive techniques in surgery requiring only very small incisions have begun to reach science fiction levels of wonder. Dr. Elisa Burns of Mount Kisco Medical Group reports how robotically assisted, laparoscopic surgery has altered gynecological treatments, offering patients less pain, a lower risk of infection, minimal scarring, decreased blood loss, and faster recovery times. “Patients who have undergone minimally invasive hysterectomies are now going home the day of or the day after surgery, and generally go back to work within one to two weeks,” Dr. Burns says. “We are now also performing minimally invasive surgery for endometrial cancers. At Northern Westchester Hospital, we use their da Vinci robot, a sophisticated and precise tool.” It has a 3-D, high-resolution video feature that provides better visualization of the robotic surgical process. Burns says that some cancer patients can undergo surgery one day and be released the next. Endovascular surgery is another minimally invasive technique performed by radiologists, neurologists, neurosurgeons, cardiologists, and vascular surgeons, accessing regions of the body via major blood vessels. Interventional radiology can be used to diagnose pathology by injecting a radio-opaque dye that can be seen on live X-ray or fluoroscopy, and to treat these with image-guided instruments like needles and catheters. Both are offered at MD Imaging/Valley Endovascular in Poughkeepsie, where trauma is minimized for patients of aortic aneurysms, atherosclerosis, vascular injury, and other coronary diseases, reducing both infection rates and recovery time, as well as shortening hospital stays. Dr. Gary Grossman, medical director at MD Imaging, describes how a 7/11 ChronograM medicine and healing 97 Medicine Chest P h arma cy • Free prescription delivery & pick up • Prescriptions filled while you wait in under 5 minutes • Competitively priced • We carry a full line of vitamins. • We accept all insurance plans. Prostate Cancer? Don’t be an “Oh No Ostrich!” • Meet with our survivor support group • Learn more about your options • Be educated and encouraged • Make an informed decision Meetings: First Tuesday of every month – 4:30 PM At: Hurley Reformed Church, Main Street, Hurley Bring your wife or close companion. You’ll find friends here. M-F 8:30am-7:00pm Sat 8:30am-3:00pm Sun 8:30am-1:00pm 845-561-5555 408 Blooming Grove Trnpk (Route 94) New Windsor, NY THERMOGRAPHY • Able to detect the first signs of breast cancer up to 10 years before any other procedure. • Painless, No-Risk Breast, Regional, and Full-Body Scans. • FDA approved in 1982 for adjunct breast screening. • With early detection you have more options! For more information call Susan Willson, CNM, CCT Certified Clinical Thermographer 845-687-4807 98 medicine and healing ChronograM 7/11 Need help now? Call – (845) 338-9229, 338-1805, 338-1161 Prostate Cancer 101 a 501 (c) (3) IRS approved non-profit organization Your Education and Support group since 1995 prostatecancer101.org catheter device inserted into a blood vessel that supplies an ailing or damaged organ can introduce chemotherapy or blood-blocking material directly. “For example, instead of undergoing major surgery for removal of a fibroid tumor, a patient has the option where we can actually put a catheter in the uterine artery and inject some material that will cause the fibroid to shrink, avoiding a traditional six-week recovery from hysterectomy. That can be done on an outpatient basis as well.” Transforming the Patient Experience Other kinds of technological advances are transforming patients’ experience of medical service in simple, but vastly improved, ways. As facilities are newly built or reconfigured, consideration for efficiency, safety, and patients’ emotional well-being are more often taken into consideration. At Benedictine Hospital, a member of Health Alliance of Hudson Valley, a new Pre-Surgical Testing Unit will provide all the tests required before surgery in one location, to accomplish health history reviews and physical exams in one visit. And the new Infusion Therapy Center, also located on the Benedictine campus, will provide chemotherapy, IV therapy, injections, blood product transfusions, and other outpatient therapeutic services, in 12 private and two semiprivate treatment areas, outfitted with flat screen TVs, comfortable recliners, free WiFi, and a patient nourishment station. The conversion to electronic patient medical record keeping is another way hospitals are utilizing new technologies. Dr. John Horiszny, president of the medical staff and director of the hospitalist program at Northern Dutchess Hospital in Rhinebeck, talks about the multiphase project of digitizing patient information. “Before we went live with our current system, information about patients could be in many different places,” says Dr. Horiszny. “Their vital signs could be on a chart at bedside, their X-rays in the radiology department; reports from consultants, lab results, and microbiology results could all be on separate computer programs. This new system puts everything together, and physicians can look at a single page to access all the pertinent information for their patients.” Dr. Horiszny emphasizes that the system is internal to all Health Quest offices and is password protected, accessible only to doctors or others directly responsible for patients. At Greater Hudson Valley Family Health Center in Newburgh, where electronic health records and patient information are also being implemented, the new building has more than three times as many exam rooms as the old one. Spokesman Ken Mackintosh reports that a wait-time study showed it used to take an average of 45 minutes for a patient to be put in direct contact with a nurse, primarily due to the dearth of exam rooms. By simply installing more rooms, patients receive faster attention in a more streamlined protocol. “In this environment, a ‘patient-centered medical home,’ a comprehensive array of medical needs is coordinated all in one setting, from primary care to follow-ups, referrals testing, dental care, and behavioral health care,” says Mackintosh. “As well as chemical dependency and substance abuse treatment services, we also provide full pharmacy and limited radiology services.” Greater Hudson holds triple designation as a federally qualified health center, a community health center, and a NYS-licensed diagnostic and treatment center. Mackintosh reiterates, “Just because you’re providing care for people without choice doesn’t mean they don’t deserve the best.” Innovations in medical technology seem to indicate a trend towards a more humane and empathetic experience. Compassionate, personalized care is seen to be a vital element in meeting individual needs, and, in fact, usually does so more efficiently. RESOURCES Benedictine Hospital Greater Hudson Valley Family Health Center Health Alliance of the Hudson Valley Health Quest Kingston Hospital MD Imaging Mount Kisco Medical Group Northern Dutchess Hospital Northern Westchester Hospital Valley Endovascular Fibromyalgia Chronic Pain Recovery Seminar with Lecturer and Neurology-Based Chiropractor Dr. Ford F. Franklin What do you do when the medications don’t work? 7 Warning Signs of Fibromyalgia 1. Brain Fog/Fibro Fog 2. Short Term Memory Loss 3. Getting Lost in Conversation 4. Muscle Pain 5. Fatigue 6. Inability to Sleep 7. Short Temper/Irritability Wed. July 13th, 6pm • Wed. July 20th, 6pm This is a must-attend seminar for anyone suffering from Fibromyalgia and Chronic Pain Call (845) 758-3600… Seating is limited! look us up at orfibrofix.com New England Patient Resources P A RT N E R S I N C O M M U N I C AT I O N Do you need help reviewing medical bills and benefits? An ABC News report states medical bill error rates may be as high as 80%. Yet only about 5% of patients find these mistakes Not sure what you doctor is saying and not asking the right questions? 80 % of doctors in a Consumer Reports survey think you should have someone trained accompany you to visits to help both them and you Are you caring for a chronically ill family member? NEPR offers caregiver relief services to give you a break Do you have a family member in a nursing home far from you? We can visit and ensure they are receiving care you pay for Do you need to learn more about an illness? Obtain another opinion? Find a clinical trial? We are a full-service patient advocacy agency. Many of our services are available nationwide. Our network includes physicians, nurses, psychologists, insurance experts and many others. 518-398-0051 7/11 ChronograM medicine and healing 99 Esteemed Reader of Our Magazine... John M. Carroll H ,T ,S C EALER EACHER PIRITUAL OUNSELOR “ John is an extraordinary healer whom I have been privileged to know all my life and to work with professionally these last eight years. His ability to use energy and imagery have changed as well as saved the lives of many of my patients. Miracles still do happen.” —Richard Brown, MD Author Stop Depression Now “ John Carroll is a most capable, worthy, and excellent healer of high integrity, compassion, and love.” —Gerald Epstein, MD Author Healing Visualizations Massage and Acupuncture also available with Liz Menendez See John’s website for schedules of upcoming classes and events johnmcarrollhealer.com or call 845-338-8420 Enjoy the summer sun! Safely. It’s time to get out and enjoy the sun, but remember it is important to protect your eyes from harmful ultraviolet radiation. Block those UV rays with our exclusive lines of sunglasses from Maui Jim, Kaenan and Kawasaki. Plus, we can convert any existing frame into sunglasses for you. dr. Madigan & dr. Gibbons - optometrists 454 Warren Street 6805 Route 9 hudSon 518-828-0215 RhinEbEck 845-876-2222 Astor Square 5th Ave behind nolita A collection of life-changing columns from the Publisher of Chronogram. Laurie R. Mallis, MD is happy to announce the opening of her AVAILABLE AT INDEPENDENT BOOKSTORES THROUGHOUT THE HUDSON VALLEY Holistic Medical Practice Licensed Acupuncturist & Reiki Master Western Trained Physician with over 25 years experience Reiki Medical Acupuncture Mei Zen Cosmetic Acupuncture SEARCH L IGHT MEDICAL © Your Path To Better Health “This book contains lozenges of meaning that dissolve in the mind. The pieces surprise us with their eloquent articulation of profound ideas. They stimulate in us the urge to grow and develop.” -Claudio Naranjo Call for a complimentary Mei Zen Cosmetic Acupuncture consultation 845-592-4310! 2345 Route 52, Suite 1F, Hopewell Junction, NY 12533-3219 Acupuncture by M.D. Hoon J. Park, MD, P.C. Board Cer tified in Physical Medicine and Rehabilitation Auto and Job Injuries • Arthritis • Strokes • Neck/Back and Joint Pain • Carpal Tunnel Syndrome • Acupuncture • Physical Therapy • Joint Injections • EMG & NCS Test • Comprehensive Exercise Facility 298-6060 1772 South Road Wappingers Falls, NY 12590 ½ mile south of Galleria Mall most insurance accepted including medicare, no fault, and worker’s compensation 100 medicine and healing ChronograM 7/11 WPT ad for 7-11 Chronogram Medicine Healing:by Mark@LaRoccaBrandingAdv Handcrafted healing. B e t t e r Ba l a nce B et te r He a l th For “hands-on care,” call us: 845-679-9767 Most insurances accepted. Judith Muir M.M. M.AmSAT Alexander Technique Private Lessons from a founding member of AmSAT Judithmuir.com (845) 677-5871 Rhinebeck, Millbrook 2568 Route 212 • Woodstock, NY Body Central massage and bodywork studio ancient practices are the new modern medicine... 845 876 7222 17 glen pond drive red hook ny 12571 bodycentralmassage.com massage shiatsu acupuncture insurance accepted Specializing in Stress Management and Injury Recovery 7/11 ChronograM medicine and healing 101 IN PARTNERSHIP WITH Hudson Black Arts and Cultural Festival PIANOSUMMER AT NEW PALTZ FESTIVAL AND INSTITUTE –– JULY 9-29 –– Vladimir Feltsman, Artistic Director PianoSummer presents three exceptional weeks of concerts, competitions, recitals, master classes, galas, and lectures; all open to the public. July 9 PianoSummer Faculty Gala Robert Roux, Phillip Kawin, Alexander Korsantia, Susan Starr, Paul Ostrovsky, Robert Hamilton, Vladimir Feltsman Works by Mozart, Brahms, Rachmaninoff, Liszt, Paganini-Liszt, Prokofiev, Scriabin July 16 Robert Plano Recital “I have watched him hold audiences in spellbound silence, then compel them to rocket out of their seats…he combines an almost supernatural range of sound and color with phenomenal musicianship, technique, and charisma.” - Paul Harvey Jr., Paul Harvey News Beethoven-Liszt, Symphony #2 in D major Liszt, From the 2nd Year of Pilgrimage – Italy July 23 Jon Nakamatsu Recital “Nakamatsu is a poet of the keyboard, a songful player who taps into the lyrical energy of a melodic line and spins it with the utmost sensitivity.” -Phil Greenfield, The Sun Rameau, Gavotte et 6 doubles (variations) from Suite in A minor Brahms, Sonata #1 in C major, Op 1 Liszt, 3 Sonetti del Petrarca: Liszt, “Apres une lecture de Dante” Fantasia quasi Sonata July 29 Symphony Gala with the Hudson Valley Philharmonic Mozart, “Marriage of Figaro” Overture Piano Concerto – performed by the winner of the Jacob Flier Piano Competition Elgar, “Enigma Variations” Visit for a complete listing of festival and institute events. 2 0 1 1 I n t e r n at I o n a l M u s I c F e s t I v a l J UN E 25th — A UGUST 10 t h | KATONAH, NY Orchestra of St. Luke’s Orchestra-in-Residence Operas: HMS Pinafore Sara Chang • Guillaume Tell Dancing at Dusk Pops, Patriots & Fireworks American Roots Music Kelli O’Hara David Grisman Emerson String Quartet Music from Jefferson’s Monticello Family Concerts Oumou Sangaré Kelli O’Hara Sonidos Latinos: Celebrating 3 Brazilian Masters Oumou Sangaré Pops, Patriots and Fireworks Jazz: John Scofield • Christian McBride NY Philharmonic Box Office – 845.257.3880 Tickets online at Festival concerts begin at 8:00 p.m. 102 forecast ChronograM 7/11 Christian McBride The world’s greatest artists right in your backyard. FOR TICKETS AND INFORMATION 914 • 232 • 1252 | caramoor.org jack wade the forecast event listings for JULY 2011 Estelle Bajou and Rita Rehn star in the world premiere of "Jackass Flats" at the Shadowland Theatre in Ellenville this month. Destination Revelation It’s almost five o’clock in the morning, Valentine’s Day, 1952. A worldly-wise housewife, her young daughter, and her recently married sister-in-law are driving through Las Vegas. Just hours before, the mother, Kay (Rita Rehn), was excited to give her daughter, Lana Dee (Amelia Rose Allen), a gift she would never forget—driving to a place called Jackass Flats in Mercury, Nevada. But the sister-in-law, Virginia “Ginny” (Estelle Bajou), a Mormon country girl from Utah, unexpectedly drops in during the middle of the night, inviting herself on the road trip. Although the two women’s views on life clash throughout their journey, the three generations in the car get to their destination just in time to come together and witness an important turning point in the American evolution. “Jackass Flats” will run through July 10 at Ellenville’s Shadowland Theatre in its premiere production. Seventeen years after writing the first draft of “Jackass Flats,” Napanoch-based couple C. C. Loveheart and John Simon completed the play. While still in the making, “Jackass Flats” was the winner of the Maxwell Anderson Award for best unproduced play of 1997. The play dives into the development of a motherdaughter relationship with a gambling and philandering husband and father. Actor/writer/director Loveheart, who has appeared on television shows like “Law and Order” and “One Life to Live,” began writing the story in 1995. Her husband, veteran music producer Simon, who has worked with musicians like The Band, jumped on as coauthor two years later. The play is somewhat autobiographical; Kay is loosely modeled on Loveheart’s mother, a tough cookie but a well-respected homemaker who put family above everything. Loveheart also filters in her own Las Vegas experiences through nine-year-old tomboy Lana Dee. Kay and Ginny are the classic odd couple whose mismatched experiences create the play’s comic tension. As 19-year-old Ginny tries to hold onto her Mormon moral perspective, she turns to Kay, a 40-year-old Vegas veteran, for guidance as she faces her new lifestyle and the unfamiliar world she married into. Both Kay and Ginny question their marriages and their husbands’ loyalty; Ginny realizes that even her values have contradictions; Lana Dee learns what the real world is all about. Jackass Flats is a place of revelation for the three, where through love and survival, they discover more about themselves. Although the men are spoken about, they are merely background noise in the play. The only other “character” present is the radio that plays cigarette advertisements and 1950s hits like “Tennessee Waltz.” According to Brendan Burke, Shadowland’s artistic director and the director of the play, “Jackass Flats” is an innovative ensemble piece for women. “It’s got three great women’s roles. It’s difficult to find shows with roles that women can really enjoy and explore. That was a major priority while looking for a piece.” The play, in a truncated form, was read at Shadowland’s Ulster County Playwright Festival in 2009. Now, it’s finally ready for its first full run. “I think it’s a great play that could eventually be published and have a life beyond here,” says Burke. “Jackass Flats” will be staged through July 10 at the Shadowland Theatre in Ellenville. Thursday-Saturday, 8pm, $30; Sunday, 2pm, $25. Senior and Student Discount, $2. (845) 647-5511;. —Zan Strumfeld 7/11 ChronograM forecast 103 Keep it Cool Beat the heat with one of our refreshing beverages (845) 246-2411 º» thirstcomesfirst.com º» sales@esotecltd.com DISCOVER HOW CAPABLE YOU ARE. 845-629-4866 MT.SCOUTSURVIVAL@GMAIL.COM MAUREEN DICORCIA AESTHETICS M at the Arlington Center for Wellbeing FACIALS SPA BODY TREATMENTS BARE EScENTUALS MAKE UP WAXING MASSAGES 6 Lagrange Avenue Poughkeepsie, NY 12603 845 454 1909 mdicaesthetics@aol.com Maureen was the director of Spa Services at the Wellness Center for Hyde Park for 18 years. Come visit us in our new location. Call or email for menus and prices. 104 forecast ChronograM 7/11 The science behind environmental solutions FREE PUBLIC EVENTS Wappinger Creek Week Discovery Hike Thursday, July 7th at 5:00 p.m. This family-friendly interpretive walk along Wappinger Creek will engage children and adults in hands-on activities. Explore a wetland habitat and sample macroinvertebrates. Reservations are required. Dire Predictions: Understanding Global Warming Friday, July 15th at 7:00 p.m. Climatologist Michael Mann will discuss how climate change will influence the world we live in, from sea level rise and severe weather, to changes in freshwater availability. CIVIC KINGSTON NY A FORUM FOR ENGAGEMENT JULY 14 6-9 PM Kevin Cahill / NY State Assembly Mike D’Arcy / Kingston Nbhd. Watch Elizabeth Hare / ReadyCollective Tom Hoffay / Kingston Alderman Ivan Lajara / Daily Freeman Brian Mahoney / Chronogram An Environmental Vision for the Future Friday, August 26th at 7:00 p.m. A lecture by Peter Kareiva, chief scientist for The Nature Conservancy. Kareiva will talk about how to quantify nature’s assets and how to move conservation from a special interest to the people’s choice. Cary Institute of Ecosystem Studies • 2801 Sharon Turnpike • Millbrook • N.Y. Rebecca Martin / Kingston Land Trust Scott Tillitt / BEAHIVE Help us consciously create a vibrant community. We’ll use an organized creative thinking process to explore the issues that matter most and more importantly, act on them. refreshments provided Stella May Gallery Theatre 5 Sterling St. (corner of Greenkill Ave.) Kingston, NY Twitter #civickingstonny (845) 677-7600 x 121 Discover Historic Hyde Park Vanderbilt Mansion National Historic Site Ahead of the Curve The sculpted hemline, the skinny cargo. Linen that’s tinted striped, refined. Silk with a slouch. Little black dresses, like moths to a flame. Inside & Out Gray pinks and moody blues. 9 Tinker St., Woodstock, NY 12498 845-679-8776 woodstockdesign@gmail.com 7/11 ChronograM forecast 105 FRIDAY 1 JULY Body / Mind / Spirit Anusara Yoga Class 9:30am. $15-$17. Vikasa on the Hudson Yoga Studio, Cold Spring. (914) 588-8166. Private Angelic Channeling 11:30am. $125. Mirabai Books, Woodstock. 679-2100. Prenatal Yoga 6pm-7:15pm. $18. The Yoga Way, Wappingers Falls. 227-3223. Zumba 7pm. $5. Roundout Valley Resort, Accord. jenniferlee1433@aol.com. Classes Tango New Paltz Beginners 6pm, intermediate 7pm, practica 8pm. $15/$50 4-part series. The Living Seed Yoga & Holistic Center, New Paltz. 256-0114. Dance Dancing Under the Stars 8pm. Music by Alan Thompson's Little Big Band. Lesson at 7:30pm. $10/$8. PS21, Chatham. (518) 392-6121. Events Chatham Farmers Market 4pm-7pm. Chatham Real Food Market Co-op, Chatham. (518) 392-3353. Alex Wood: Acrylic 5pm-8pm. Duck Pond Gallery, Port Ewen. 338-5580. Oasis II 5pm-8pm. Paintings by Deirdre Leber. ASK Arts Center, Kingston. 338-0331. Impressions and Reflections 5:30pm-7pm. Paintings by Suzanne C. Ouellette. Hammertown, Rhinebeck. 876-145. Christie Scheele: Fullness of Time: Celebrating a Twelve-Year Gallery Partnership 8pm-10pm. Albert Shahinian Fine Arts Upstairs, Rhinebeck. 505-6040. Body / Mind / Spirit Zumba 10am. $10. Rosendale Recreation Center, Rosendale. jenniferlee1433@aol.com. Psychic Saturday 12pm-5pm. With Suzy Meszoly and Adam Bernstein. $30/20 minutes. Sage Center for the Healing Arts, Woodstock. 679-5650. Supply and Demand 2pm-3pm. Breast pump info session. Waddle n Swaddle, Poughkeepsie. 473-5952. Aston Magna 8pm. Lecture at 7pm. $30/$25 seniors/$90 series. Bard College, Annandale-on-Hudson. 758-7887. Phoenicia Phirst Phriday 8pm. Featuring We Are One and Sarah Bowman, followed by open mike. $3. Arts Upstairs, Phoenicia. 688-2142. The New Swing Sextet 8pm. Live @ The Falcon, Marlboro. Stacey Earle and Mark Stuart 8pm. $15. Rosendale Cafe, Rosendale. 658-9048. High Irons 8:30pm. Towne Crier Cafe, Pawling. 855-1300. A Chorus Line 8pm. Woodstock Playhouse, Woodstock. 679-4101. Community Playback Theatre 8pm. Improvisations of audience stories. $8. Community Playback Theatre, Highland. 691-4118. Jackass Flats 8pm. Shadowland Theater, Ellenville. 647-5511. Preview: Hamlet 8pm. Hudson Valley Shakespeare Festival. $30/$25.50 seniors and students/$21 children. Hudson Valley Shakespeare Festival, Garrison. 265-9575. Workshops Family: Artmaking with Nina Katchadourian Call for times. $600/$375. Millay Colony, Austerlitz. (518) 392-4144. The Saturday Night Bluegrass Band 8pm. $10. Rosendale Cafe, Rosendale. 658-9048. Maryse Smith 8pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. Danny Maseng, Jewish scholar, playwright, and composer, presents a workshop connecting ideas of love, humanity, God, and violence. Traveling the world to spread his knowledge of Judaism, Maseng will stop in Kingston to talk about and explore these subjects by looking at sacred texts, songs, and poetry, as well as leading communal singing. Bruce Chilton, professor of religion at Bard College, Unitarian/Universalist Congregation in Kingston’s Reverend Dr. Jan Carlsson-Bull, St. Gregory’s Reverend Gigi Conner, and others will conclude the workshop with a “Turning Toward Peace Circle.” General admission, $36; reserved seating, $55. July 9. 2-5pm. Temple Emanuel.. The River Jazz/Blue Belles 7:30pm. Fundraiser Concert for Wall Street Jazz Festival. $15/children free. Beahive Kingston, Kingston. Gentlemen Prefer Blondes: Winnakee Land Trust Fundraiser 7:30pm. $50. Center for Performing Arts, Rhinebeck. 876-3080. Breakaway with Robin Baker 8pm. High Falls Cafe, High Falls. 687-2699. God, Love, and Violence: A Mystical Journey of Healing The Greyhounds Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. Margaret and Craig Call for times. Inside Look Play workshops (semi-staged workshops). Powerhouse Theater, Poughkeepsie. 437-5599. Hugh Brodie & The Cosmic Ensemble 8pm. Live @ The Falcon, Marlboro. The Holmes Brothers 8:30pm. Blues. Unison Arts and Learning Cent, New Paltz. 255-1559. Music F2M Call for times. Powerhouse Theater, Poughkeepsie. 437-5902. Rosetta Watts 7:30pm. Jazz. BeanRunner Cafe, Peekskill. (914) 737-1701. Zumba with Alicia 10am-11:30am. Cornell St. Studios, Kingston. 331-0191. Kids Yoga 4:30pm-5:30pm. $16.50. The Yoga Way, Wappingers Falls. 227-3223. Theater Chris Webby and DJ Styles 7pm. The Chance Theater, Poughkeepsie. 486-0223. Classes Kids The Outpatients 9pm. Wherehouse, Newburgh. 561-7240. The Big Band Sound 7pm. Summer Sunset Concert Series sponsored by Millbrook Arts Group. Thorne Building, Millbrook.. The 2011 Woodstock Beat 8pm. Benefit concert for the Woodstock Byrdcliffe Guild. Maverick Concerts, Woodstock. 679-8217. Gardiner Greenmarket 4pm. Gardiner Library, Gardiner.. Glen David Andrews and Band 9pm. New Orleans Hell's-a-Fire dance all night. Club Helsinki Hudson, Hudson. (518) 828-4800. Teri Roiger & John Menegon 5pm-7pm. Jazz. Bread Alone Cafe, Rhinebeck. 876-3108. Dance Freestyle Frolic 8:30pm-2am. Barefoot, smoke, drug and alcohol free. $7/$3 teens and seniors. Center for Symbolic Studies, Tillson.. Back to the Garden 1969 8:30pm. Towne Crier Cafe, Pawling. 855-1300. Off Hour Rockers 8:30pm. Gloria's Grill, New Windsor. 565-4870. Events Don Byron New Gospel Quintet 9pm. Club Helsinki, Hudson. (518) 828-4800. Meet the Animals Tour Call for times. 90-minute tour and talk. Catskill Animal Sanctuary, Saugerties. 336-8447. The Brian Wilson Shock Treatment 9pm. With Spiv UK and Armedalite Rifles. $5. Market Market Cafe, Rosendale. 658-3164. Kingston Farmers' Market 9am-2pm. Featuring Crafts on John Street. Kingston Farmers' Market, Uptown Kingston. 853-8512. The Myles Mancuso Band 9:30pm. 12 Grape Music and Wine Bar, Peekskill. (914) 737-6624. Pakatakan Farmers' Market 9am-2pm. Round Barn, Halcottsville. 586-3326. Reddan Brothers Band 9:30pm. Rock. National Hotel Bar and Grill, Montgomery. 457-1123.. Bing Bang Boing Festival 11am-4pm. Family friendly matinee event. Historic Warehouse, Catskill. (518) 943-3400. Those Two Guys 7:30pm. Fusion of technical skill with wild imagination to create mind-boggling slapstick humor. $25/$20 members/$10 children. PS21, Chatham. (518) 392-6121. Music DJ Aoiki Keoki 10pm-4am. Orient Ultra Lounge, Poughkeepsie. 337-3546. The Outdoors Balsam Mountain Hike Call for times. Frost Valley YMCA, Claryville. 985-2291 ext. 205. Spoken Word Chronogram Open Word 7pm. Poetry/prose/performance event. Beahive, Kingston. 246-8565. Theater A Chorus Line 8pm. Woodstock Playhouse, Woodstock. 679-4101. Toni Brown Band Call for times. Wherehouse, Newburgh. 561-7240. Gentlemen Prefer Blondes 8pm. $24/$22 seniors and children. Center for Performing Arts, Rhinebeck. 876-3080. Oil Paintings and Etchings by Robert Axelrod 3pm-6pm. Long Year Gallery, Margaretville. 586-3270. Mary Miller Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. Jackass Flats 8pm. Shadowland Theater, Ellenville. 647-5511. New York Comic Book Art Show 3pm-6pm. Joyce Goldstein Gallery, Chatham. (518) 392-2250. Professor Louie and The Cromatix Call for times. The Bearsville Theater, Woodstock. 679-4406. New Works by Jenny Fowler, Jessica Poser, and Mau Schoettle 5pm-7pm. Kingston Museum of Contemporary Art, Kingston.. Woodstock Concert on the Green 1pm-6pm. Mr. Roper, The Gary K Band, Beki Brindle, Peter Head, Paul McMahon, The The Band Band. Woodstock Village Green, Woodstock. 679-3224. SATURDAY 2 JULY Art 106 forecast ChronograM 7/11 SUNDAY 3 JULY Body / Mind / Spirit CoSMic Yoga with Elizabeth 11am-12:15pm. $12. Chapel of Sacred Mirrors, Wappingers Falls. Events Woodstock Farm Animal Sanctuary: A Day at the Farm 11am-4pm. Learn more about the animals who have been given a second chance at life. $10/$5 children. Woodstock Farm Animal Sanctuary, Willow. 679-5955. Cold Spring Village Community Day Parade 2pm. Garrison Art Center, Garrison. 424-3960. Ultimate Frisbee Casual Pickup Games 3pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Minnewaska Distance Swimmers Association Test 5:30pm. Moriello Park, New Palt. Parent/Child Sewing Class 12:30pm-1:30pm. Through July 31. $72 series. Waddle n Swaddle, Rhinebeck. 876-5952. Celebrate Independence Day Children's Program 1:30pm. See the Revolution through the eyes of a Continental soldier. $8/$ seniors/$4 children. Mount Gulian Historic Site, Beacon. 831-8172. Music Reddan Brothers Band 3pm. Rock. Wherehouse, Newburgh. 561-7240. Melissa Frabotta 6pm. Acoustic. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Lugwrench 7:30pm. Towne Crier Cafe, Pawling. 855-1300. Don Byron New Gospel Quintet 8pm. Featuring DK. Live @ The Falcon, Marlboro. Elly Wininger and Dave Kearney 8pm. Harmony, Woodstock. 679-7760. The Lucky Five 8pm. Swing. Club Helsinki Hudson, Hudson. (518) 828-4800. Tony Bennett 8pm. With special guests The Belle Brigade. $25-$77. Belleayre Mountain, Highmount. (800) 942-6904 ext. 344. Spoken Word Improv Nation 8pm. Troupe of A&W improvisers directed by Denny Dillon. Maverick Concerts, Woodstock. 679-8217. Theater Jackass Flats 2pm. Shadowland Theater, Ellenville. 647-5511. A Chorus Line 2pm. Woodstock Playhouse, Woodstock. 679-4101. Gentlemen Prefer Blondes 3pm. $24/$22 seniors and children. Center for Performing Arts, Rhinebeck. 876-3080. MONDAY 4 JULY Body / Mind / Spirit Active Seniors Program 9am-10am. $1.50. Pine Hill Community Center, Pine Hill. 254-5469. Prenatal Yoga 4pm-5:15pm. $90 6 weeks/$15 class. Bliss Yoga Center, Woodstock. 679-8700. Women's Healing Circle 6:30pm-8pm. With Adrienne DeSalvo. $10. Sage Center for the Healing Arts, Woodstock. 679-5650. Zumba 6:30pm. $10. MaMa, Stone Ridge. jenniferlee1433@aol.com.. Events Independence Day 10am-4pm. A day of Revolutionary War activities. Knox's Headquarters, New Windsor. 561-5498. The Grand Celebration: The Red, White and Blue Pageant 12pm. Parade, trivia and more. Washington's Headquarters, Newburgh. 562-1195. Korean BBQ Night 6pm. $15. Bull and Buddha, Poughkeepsie. 337-4848. Poker Nights 7pm-10pm. Bull and Buddha, Poughkeepsie. 337-4848. ART BOSCOBEL image provided Oil Tank Map of the World by Cal Lane is being exhibited as part of the "Current" exhibit, Garrison Art Center's annual sculpture show at Boscobel through October 10. Memory of a Sphere “We wanted to take art outside of our own four walls,” says Carinda Swann, director of the Garrison Art Center. She is speaking of “Current,” the center’s sixth survey of contemporary sculpture, at Boscobel in Garrison. The show runs until October 10. Completed in 1808, Boscobel has one of the great Hudson River views—looking out on West Point and Constitution Island. Its house is considered a premier example of Federal architecture. The grounds comprise 45 acres. “A lot of people questioned it initially: ‘What do you mean you’re going to put modern sculpture on the grounds of Boscobel?’ But it’s been a happy marriage. People love it,” observes Swann. Walking through Boscobel’s lawns and gardens, visitors stumble upon artworks unexpectedly, as if upon trysting lovers. Serendipity improves art; in a sense, serendipity is art. “For the artists in our show, it’s fantastic exposure, because probably 40,000 to 50,000 people come through there in the summer,” notes Swann. As a nod to the Hudson Valley Shakespeare Festival, which is held at Boscobel, Judy Sigunick created two ceramic portraits of Shakespearean heroes: Viola and Cesario from “Twelfth Night.” In fact, the two characters are one: Viola adopts the guise of a boy, and the name Cesario, after being shipwrecked on the coast of Illyria. “They stand and welcome people as they enter the rose garden,” explains Swann. Al Landzberg’s Double Cee is a minimal steel work that—as the title hints—looks like two letter Cs joined together. Both ends are pointed, suggesting the horns of a bull. It’s a miniature treatise on symmetry, reposing beneath a low tree. Martha Posner sculpted 15 site-specific dancers out of twisted honeysuckle vines. The larger-than-life figures prance by a pond, beneath a stand of birches. The Garrison Art Center has been pursuing Cal Lane for several years. The reclusive sculptor carves lacy patterns into found metal materials, such as shovels, wheelbarrows and dumpsters, with a welding torch. “Current” includes her oil tank with a map of the world incised into it. Lane has said she feels like a “guilty bystander” while our nation fights wars for oil. She recently received a commission to cut a pattern into a 62-foot submarine, in Tivat, Montenegro. Spheres by Grace Knowlton resembles five deflated soccer balls, made of steel and copper. The pieces sit near a tall geyserlike fountain. Spheres has a profound silliness. The title is ironic; Knowlton often uses the motif of the crushed sphere. In fact, absent spheres recur in the show. Cal Lane represents the earth as a flattened map. Balance at 45 by Alex Kveton is like a red stylized hand holding an absent sphere. Mother and Child by Jennie M. Currie implies that the Earth is the daughter of the sun—two spheres (though both represented by circles). Posner’s dancers—might they be playing ball? If I were titling the show, I’d be tempted to choose “Memory of a Sphere.” All the sculptures are for sale, with proceeds going to the Gillette Scholarship Fund, which allows any adult or child in need to attend classes at the Garrison Art Center. Each summer, the organization offers a three-week program for young children, then another three weeks for high school students. Both programs focus on the visual arts. “Current” will be exhibited at Boscobel, 1601 Route 9D, Garrison, until October 10. (845) 265-3638;. —Sparrow 7/11 ChronograM forecast 107 Music Kids Events Events Jermaine Paul CD Release Show Call for times. Wherehouse, Newburgh. 561-7240. Picasso Kids: Beach Explorers 3-5 years 10:45am-11:30am. $65 series/$15 drop-in. Waddle n Swaddle, Poughkeepsie. 473-5952. Ultimate Frisbee Casual Pickup Games 5:30pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Chatham Farmers Market 4pm-7pm. Chatham Real Food Market Co-op, Chatham. (518) 392-3353. Kid's Yoga Class Kids 5pm-6pm. Ages 5-12. Inner Light Health Spa, Hyde Park. 229-9998. Move with Me: 8- 18 months 12:15pm-1pm. $72 series/$15 drop-in. Waddle n Swaddle, Rhinebeck. 876-5952. Gardiner Greenmarket 4pm. Gardiner Library, Gardiner.. Art Life Drawing Sessions 7:30pm-9:30pm. $13/$10 members/$48/$36 members series. Unison Arts & Learning Center, New Paltz. 255-1559. Body / Mind / Spirit Spirit Guide Readings 12pm-6pm. Psychic Medium Adam Bernstein. $40/$75. Mirabai Books, Woodstock. 679-2100. Pounds Off Weight Loss Group 7pm-8pm. Pine Hill Community Center, Pine Hill. 254-5469. Music Kids' Open Mike 7pm. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. 7pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. THURSDAY 7 JULY Art Belly Dance with Barushka 7pm-8:30pm. Open Space, Rosendale. (917) 232-3623. Art Hamptons Events Benefit for the Bridges of New York Transitional Services of Orange County Call for times. Featuring The California Guitar Trio. The Bearsville Theater, Woodstock. 679-4406. Ultimate Frisbee Casual Pickup Games 12:30pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Solopreneurs Sounding Board 6:30pm. Advisory board meets group therapy for your work. $10/members free. Beahive, Beacon. 418-3731. Film The Band's Visit 8:30pm. PS21, Chatham. (518) 392-6121. Kids Dutchess Arts Camp Call for times. Ages 4-14. Through Aug 5. Poughkeepsie Day School, Poughkeepsie.. The Art of Summer Series: 1-3yo 9:30am-10:15am. 4 week series. $50. Waddle n Swaddle, Poughkeepsie. 473-5952. Children's Summer Camps and Teen Classes 10am-3pm. Through August. Check website for specific camps and classes. Wallkill River School and Art Gallery, Montgomery. 457-ARTS. Music High Frequency Channeling: Archangel Metatron and Master Teachers 7pm-8:30pm. With Suzy Mezoly. $20. Sage Center for the Healing Arts, Woodstock. Blues & Dance with Big Joe Fitz & The Lo-Fi's 7pm. High Falls Cafe, High Falls. 687-2699. California Guitar Trio 7pm. $40. The Bearsville Theater, Woodstock. 679-4406. Community Music Night 8pm-9:45pm. Six local singer-songwriters. Rosendale Cafe, Rosendale. 658-9048. Workshops Advanced Channeling Practice Sessions 7pm-9pm. $20/$15. Mirabai Books, Woodstock. 679-2100. WEDNESDAY 6 JULY Body / Mind / Spirit Music C. Lavender + S2K + No Milk Classes Mother/Daughter Belly Dancing Class 7:30pm. $20/4 weeks $69/mother daughter $118. Casperkill Rec Center, Poughkeepsie. (914) 874-4541. Discover Ancient Greece: King Midas or All That Glitters is not Gold 1pm. Kingston Library, Kingston. 331-0507. Call for times. International art fair. Marion Royael Gallery, Beacon.. Talking Machine Call for times. Wherehouse, Newburgh. 561-7240. Music Chris Neumann and Simple Machines 8pm. Folk. Club Helsinki, Hudson. (518) 828-4800. Earth, River, Sky 5pm-7pm. Landscape paintings of the Hudson Valley by Jane Bloodgood-Abrams. Locust Grove, Poughkeepsie. 454-4500. Patrick Murphy McDowell 8:30pm. Blues, rock, jazz. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Bridge Music Broadway Benefit for The Belleayre Music Festival and Roxbury Arts Group 8pm. $150. Belleayre Mountain, Highmount. (800) 942-6904 ext. 344. Leo & the Lizards 8pm. Rock. Gail's Place, Newburgh. 567-1414. Hot Club of Cowtown 8pm. $15. Rosendale Cafe, Rosendale. 658-9048. Life Drawing Sessions 7:30pm-9:30pm. $13/$10 members/$48/$36 members series. Unison Arts & Learning Center, New Paltz. 255-1559. Body / Mind / Spirit Astrological Readings Call for times. Astrologer Alexander Mallon. $90. Mirabai Books, Woodstock. 679-2100. Active Seniors Program 9am-10am. $1.50. Pine Hill Community Center, Pine Hill. 254-5469. Feldenkrais 11am-12pm. Mountainview Studio, Woodstock. 679-0901. Mama's Group with Breastfeeding Support 11:30am-1pm. Waddle n Swaddle, Rhinebeck. 876-5952. Buckwheat Zydeco 8:30pm. Towne Crier Cafe, Pawling. 855-1300. David Kraai & Amy Laber 8:30pm. Classic rock. Rock City Live, Woodstock. Peter Sando 8:30pm. American Glory, Hudson. (518) 822-1234. Miss Angie's Karaoke 9pm. The Bearsville Theater, Woodstock. 679-4406. Dave Mason with Alex Drizos 9pm. $40. The Bearsville Theater, Woodstock. 679-4406. The Outdoors Sonny Landreth and Trio 9pm. Club Helsinki Hudson, Hudson. (518) 828-4800. Pith in For Parks 5:30pm-8pm. Work on Mount Beacon's White Trail. Mount Beacon, Beacon. 473-4440. Theater Wuthering 6pm. Apprentice Company Productions. The Frances Lehman Loeb Art Center, Poughkeepsie. 437-7745. A Chorus Line 8pm. Woodstock Playhouse, Woodstock. 679-4101. Jackass Flats 8pm. Shadowland Theater, Ellenville. 647-5511. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. Body / Mind / Spirit Hypnosis for Working Mothers and Mothers-to-be 6:30pm-8:30pm. $40. Waddle n Swaddle, Poughkeepsie. 473-5952. Medical Intuitive Connection 6:30pm-8:30pm. With Darlene Van de Grift. $20. Sage Center for the Healing Arts, Woodstock. 679-5650. Zumba Fitness Class 6:30pm. $7. Pine Hill Community Center, Pine Hill. 254-5469. Zumba 7pm. $5. Roundout Valley Resort, Accord. jenniferlee1433@aol.com. Gathering with Clark Strand 6:30pm-9pm. Weekly meeting & conversation on excess and green living in the Mind Body Spirit. $10. Sage Center for the Healing Arts, Woodstock. 679-5650. Classes Woodstock Farm Festival 3:30pm-8pm. Farmers Market, children's activities, food by local chefs, live music, entertainment. Maple Lane, Woodstock.. Minnewaska Distance Swimmers Association Test 5:30pm. Minnewaska State Park and Preserve, New Paltz.. 108 forecast ChronograM 7/11 Doug Munro, Jerry Z & Mike Clark 7pm. Opening Nina Sheldon. Live @ The Falcon, Marlboro. Brian Dewan 8pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. Prenatal Yoga 6pm-7:15pm. $80 6 weeks/$15 class. Jai Ma Yoga Center, New Paltz. 256-0465. Events Todd Mack and Caroline Mack Call for times. Gypsy Joint, Great Barrington. (413) 644-8811. Aston Magna 8pm. Lecture at 7pm. $30/$25 seniors/$90 series. Bard College, Annandale-on-Hudson. 758-7887. Mama's Group with Breastfeeding Support 1:30pm-3pm. Waddle n Swaddle, Poughkeepsie. 473-5952. Wondrous Watercolors with Fran Sutherland 2pm-5pm. Weekly through July 20. $140/$120 members. Barrett Art Center, Poughkeepsie. 471-2550. 4 Guys in Disguise Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. Magnets 7:30pm. Jazz. BeanRunner Cafe, Peekskill. (914) 737-1701. Yoga at the Pavilion 6pm-7:15pm. $115 series/$15 class/$90 series members/ $12 class members. Mohonk Preserve, Gardiner. 255-0919. Hudson Valley in Watercolor 9am-Friday, July 8, 4pm. Woodstock School of Art, Woodstock. 679-2388. The Deadbeats Call for times. Wherehouse, Newburgh. 561-7240. Helen Avakian 7:30pm. Acoustic. $10/$8 students, seniors and members. Howland Cultural Center, Beacon. 831-4988. Zumba 6pm. $10. MaMa, Stone Ridge. jenniferlee1433@aol.com. Fundamentals of Drawing and Painting 9am-1pm. Weekly through July 20. $180/$160 members. Barrett Art Center, Poughkeepsie. 471-2550. Kids The Hot Rod Band 6:30pm-8:30pm. Lycian Centre, Sugar Loaf. 469-2287. The Metaphysical Center Interfaith Worship Service 11:30am. Interfaith/metaphysical prayer, meditation, lecture. Guardian Building, Poughkeepsie. 471-4993. Classes 3rd Annual Midsummer Night of Music and Dance 7pm. Featuring Liron Peled of Raquy and the Cavemen. $10. Studio 208, Cornwall-on-Hudson. 534-1208. Music Together Babies Only: Birth - 9mo 9:30am-10:15am. Weekly series. $145. Waddle n Swaddle, Poughkeepsie. 473-5952. The Lindsey Webster Band 8pm. Motown/R&B. Bull and Buddha, Poughkeepsie. 337-4848. In 2009, Beacon resident and composer Joseph Bertolozzi created Bridge Music, a percussion suite made from the clanks and clatters of Bertolozzi striking hammers and other objects against the Mid-Hudson Bridge. Speakers mounted at two listening stations along the bridgeâ&#x20AC;&#x2122;s pedestrian walkway broadcast Bertolozziâ&#x20AC;&#x2122;s compositions through October 31. You can listen to Bridge Music year-round on 95.3FM in Waryas Park, Poughkeepsie and Johnson-Iorio Park, Highland. Free and open to public.. Book Reading and Yoga As Muse Experience 6:30pm. With Catherine Holm, Bhavi Rivais, and Tanya Robie. Inquiring Mind Bookstore, New Paltz. 255-8300. Acoustic Thursdays with Kurt Henry 6pm. High Falls Cafe, High Falls. 687-2699. PHOTO: FIONN REILLY TUESDAY 5 JULY Classes FRIDAY 8 JULY Tango New Paltz Beginners 6pm, intermediate 7pm, practica 8pm. $15/$50 4-part series. The Living Seed Yoga & Holistic Center, New Paltz. 256-0114. Theater Nightingale Call for times. Martel Musical workshops concert readings of works-in-progress. Powerhouse Theater, Poughkeepsie. 437-5599. A Midsummer Night's Dream 6pm. Apprentice Company Productions. Outdoor Ampitheater, Poughkeepsie. 437-5902. Berkshire Playwrights Lab 7:30pm. Edith: by Kelly Masterson. Mahaiwe Performing Arts Center, Great Barrington, Massachusetts. (413) 528-0100. A Chorus Line 8pm. Woodstock Playhouse, Woodstock. 679-4101. Jackass Flats 8pm. Shadowland Theater, Ellenville. 647-5511. Forever Plaid 8pm. $25. Lycian Centre, Sugar Loaf. 469-2287. Gentlemen Prefer Blondes 8pm. $24/$22 seniors and children. Center for Performing Arts, Rhinebeck. 876-3080. The 39 Steps 8pm. River Valley Rep Theatre. $30/$25. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. SATURDAY 9 JULY Art Artist Walk-Throughs of Palermo Retrospective 2pm. Josiah McElheny. Dia: Beacon, Beacon. 440-0100. Simplifying the Landscape 9am-4pm. Weekly through July 28. Woodstock School of Art, Woodstock. 679-2388. Photographing the Nude in the Landscape 1pm-5pm. Weekly through July 29. $230/$210members +$80 model fee. Barrett Art Center, Poughkeepsie. 471-2550. The Reactive Photographer 11am-2pm. Weekly through July 28. $180/$160 members. Barrett Art Center, Poughkeepsie. 471-2550. Dance Collages and Assemblages 3pm-5pm. Jayne Feinberg Stuecklen. The Small Gallery at Valley Artisans Market, Cambridge. (518) 677-2765. Dance Dancing Under the Stars 8pm. Music by Alan Thompson's Little Big Band. Lesson at 7:30pm. $10/$8. PS21, Chatham. (518) 392-6121. First Annual Small Works Art Auction 4pm-5:30pm. 100 works of art will be on auction, each 6 x 8 inches. 12 Market Street, Ellenville. 210-4416. Tero Saarinen Company Triple Play 8pm. BardSummerscape opening event. $20-$55. Bard College, Annandale-on-Hudson. 758-7900. Tero Saarinen Company Triple Play 8pm. BardSummerscape opening event. $20-$55. Bard College, Annandale-on-Hudson. 758-7900. New Works by Steve Blumenthal and Elizabeth Ocskay 5pm-7pm. Wallkill River School and Art Gallery, Montgomery. 457-ARTS. 23rdAnnual 2011 July 22, 23 & 24 2011 CONCERT SCHEDULE Dodds Farm 44 CR 7D Hillsdale NY MUSIC AND HISTORY PLAY ON. $10 YOUTH SUNDAY over 40 acts on 4 stages JULY 3 SATURDAY SUNDAY JULY 9 JULY 10 A Three Day Community of Folk Music & Dance at the Foot of the Berkshires Mainstage Concerts, Workshops, All Day & Late Night Dancing, Activities 4 Kids, Family Stage, Craft Village, International Food Court Bramwell Tovey, Conductor TuEsdAY $20 LAWN SATURDAY MONDAY SATURDAY LAWN 4-pACk THURSDAY fridAY JULY 12 JULY 16 JULY 25 Folk*Blues*Celtic*Folk Rock*Bluegrass*Cajun*Zydeco Roots*Americana*Contra, Square & Family Dancing Swing*World*Storytellers*Jugglers*Mime Mary Chapin Carpenter, Greg Brown, Red Horse, Luther Guitar Jr Johnson, Buskin & Batteau, Solas, Gandalf Murphy & the Slambovian Circus of Dreams, The Clayfoot Strutters, Wild Asparagus, Tidal Wave, CJ Chenier & the Red Hot Louisiana Band, Red Molly, Susan Werner, Roger the Jester,The Storycrafters, Spuyten Duyvil, Mary Gauthier, Brother Sun, others JULY 30 AUG 4 LAWN ON SALE AUG 5 JANET - 866 325-2744 JACKSON Join us for our 5 Year Celebration! July 18th from 4-6pm at our Kingston location SATURDAY AUG 6 $10 YOUTH fridAY SUNDAY AUG 12 AUG 14 KINGSTON 900 Ulster Avenue 845-339-3200 EVENTS ALL WEEKEND POUGHKEEPSIE 10 IBM Road Plaza 845-463-3900 WEdNEsdAY fridAY AUG 17 SUNDAY AUG 19 AUG 21 EdibleArrangements.com The picnic basket, new and improved. Watermelon Festival with dipped pineapple. ©2011 Edible Arrangements, LLC. All rights reserved. Available in a variety of sizes. Containers may vary. Featuring the new Jersey Symphony Orchestra SUNDAY SpECIAL EXHIBIT AUG 28 The Doors, Janis Joplin, and Jimi Hendrix: The Art and Artifacts of the ICONS Who Defined a Generation JULY 16 - OCT 30 Tickets at EVENT GALLERY SEpT 23 DAVID BROMBERG SEpT 30 JOHN HAMMOND OCT 22 SHAWN MULLINS NOV 11 pURE pRAIRIE LEAGUE BethelWoodsCenter.org Bethel Woods Box Office • Ticketmaster 1.800.745.3000 At the site of the 1969 Woodstock festival • BETHEL, NY ALL dATEs, AcTs, TimEs ANd TickET pricEs suBjEcT TO cHANgE WiTHOuT NOTicE. A sErvicE cHArgE AppLiEs TO EAcH TickET pricE. Add $5 TO ALL TickET pricEs dAY-Of-sHOW. LAWN 4-pAcks AvAiLABLE fOr A LimiTEd TimE ONLY ANd sALEs mAY ENd AT ANYTimE. 7/11 ChronograM forecast 109 BWCA-CAL-CHRONOGRAM-JULY.indd 1 6/13/11 2:10 PM Photography of Egypt/Eternal Light 5pm-7pm. Sarite Sanders, with paintings by Adah Frank. Oriole 9, Woodstock. 679-8117. Big Wide World. 5pm-7pm. Juried group show of multi-media works GCCA Catskill Gallery, Catskill. (518) 943-3400. Leah Macdonald: Soliloquy 5pm-7pm. Galerie BMG, Woodstock. 679-0027. Productive Steps 5pm-11pm. Mount Tremper Arts, Mount Tremper. 688-9893. Sympathy for the Devil 6pm-9pm. John D Wolf and son, John A Wolf. Wolfgang Gallery, Montgomery. 769-7446. Architecture Omi Season Opening 6:30pm. Omi International Arts Center, Ghent. (518) 392-4568. Body / Mind / Spirit Energy Cultivation, Body Preparation and Shaping for Healing and Personal Power 1am-5pm. Hawks Brother Kirouana Paddaquahum. $65. Sage Center for the Healing Arts, Woodstock. 679-5650. Zumba 10am. $10. Rosendale Recreation Center, Rosendale. jenniferlee1433@aol.com. Reflexology 10am-4:30pm. 45 minute sessions with Lorraine Hughes. $45. Inner Light Health Spa, Hyde Park. 229-9998. Book Launch: The Butcher's Guide to Well-Raised Meat 3pm-6pm. Pig roast, games, live music, other food vendors, and childrens' activities. John Street, Kingston. 338-6666. Diana Jones 8pm. $10. Rosendale Cafe, Rosendale. 658-9048. Filmmaker and Performance Artist Barbara Hammer 5pm. Showing clips and reading from her memoir. $10/$5 members. Woodstock Artists Association and Museum, Woodstock. 679-2940. New York Uproar 9:30pm. Souls, blues. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Beahive Barks: Beacon Dog Park Fundraiser 8pm-11pm. Beahive, Beacon. 418-3731. Film The General and Dog Shy 7pm-9pm. Silent comedies with live piano accompaniment. Crandell Theatre, Chatham. (518) 766-5892. Kids Splash! Family Style Class 11:30am-12:30pm. Birth to 7 years. Play instruments, dance together, share and sing. Waddle n Swaddle, Rhinebeck. 876-5952. Alla Prima Portrait 9am-Sunday, July 10, 4pm. $215. Woodstock School of Art, Woodstock. 679-2388. Zumba with Alicia 10am-11:30am. Cornell St. Studios, Kingston. 331-0191. PHOTO: Paula Court Dance Music Events Classical Guitarist Jason Vieaux Call for times. Maverick Concerts, Woodstock. 679-8217. Walking Tour of Port Ewen Call for times. Anne Gordon. Town of Esopus Public Library, Port Ewen. 338-5580. Dale Fisher Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. Meet the Animals Tour Call for times. 90-minute tour and talk. Catskill Animal Sanctuary, Saugerties. 336-8447. Lick the Road Call for times. Wherehouse, Newburgh. 561-7240. Kingston Farmers' Market 9am-2pm. Featuring The Healthy Eating Series, preserving fruits. Kingston Farmers' Market, Uptown Kingston. 853-8512. Pakatakan Farmers' Market 9am-2pm. Round Barn, Halcottsville. 586-3326. Millerton Farmers' Market 9am-1pm. Local food, music, demos. Dutchess Avenue and Main Street, Millerton. (518) 789-4259. Pine Island Black Dirt Farmers Market 10am-2pm. Pine Island Town Park, Pine Island.. Woodstock Arts Board Garden Tour 10am-4pm. 8 gardens, 3 mini-lectures, light luncheon in the gardens, to benefit the new Woodstock Playhouse. $40. Woodstock Playhouse, Woodstock. 679-4101. Historic Hurley's 61st Annual Stone Houle Day 10am-4pm. Guides, re-enactments, organ recitals, chef demos, children's activities. $15/$12 students and seniors/$2 children 5-12. Hurley Reformed Church, Hurley. 331-4121. Woodstock Farm Animal Sanctuary: A Day at the Farm 11am-4pm. Learn more about the animals who have been given a second chance at life. $10/$5 children. Woodstock Farm Animal Sanctuary, Willow. 679-5955. Long Dock Park Celebration with Uncle Rock 1pm. Also, Arm-Of-The-Sea Theater, The Big Takeover, WeMustBe . Long Dock Park, Beacon.. 110 forecast ChronograM 7/11 A Midsummer Night's Dream 6pm. Apprentice Company Productions. Outdoor Ampitheater, Poughkeepsie. 437-5902. Jackass Flats 8pm. Shadowland Theater, Ellenville. 647-5511. Gentlemen Prefer Blondes 8pm. $24/$22 seniors and children. Center for Performing Arts, Rhinebeck. 876-3080. Mount Tremper Arts Summer Festival Classes Union Cyclist International Mountain Bike World Cup Call for times. Windham Mountain, Windham. (518) 734-4300. Artist Talk: Richard Bosman 4pm. Kleinert/James Arts Center, Woodstock. 679-2079. The Adventures of Mr. Toad 11am. Hampstead Stage Company. $9/$7 children. Center for Performing Arts, Rhinebeck. 876-3080. New Moon VortexHealing Group Session 6pm-7:30pm. $20. Sage Center for the Healing Arts, Woodstock 679-5650. 29th Annual DeLisio Memorial Golf Tournament Call for times. Benefits the Special Olympics of New York, Hudson Valley Region. $105. Woodstock Golf Club, Woodstock.. Woodstock Poetry Society & Festival Reading 2pm. Featuring Poets Allen Fischer and Barbara Ungar. The Colony Cafe, Woodstock. 679-5342. A Chorus Line 8pm. Woodstock Playhouse, Woodstock. 679-4101. God, Love and Violence: A Mystical Journey of Healing 2pm-5pm. With Danny Maseng. Workshop/music/ritual. $36/$55. Temple Emanuel, Kingston. 338-8131. Tero Saarinen Company Triple Play 8pm. BardSummerscape opening event. $20-$55. Bard College, Annandale-on-Hudson. 758-7900. Spoken Word Theater Babywearing Bonanza 2pm-3pm. Waddle n Swaddle, Poughkeepsie. 473-5952. Berkshire Dance Collective: Cultivating Community through Music and Dance 7:30pm-11pm. Guided warm up followed by free-form dancing to DJ'd music. Sruti Berkshire Yoga Center, Great Barrington, Massachusetts. (413) 329-4933. Vixen Dogs Band 10pm. Dance music. Pawling Tavern, Pawling. 855-9141. Baby Splash! Development Through Music: Birth-18 months 10:30am-11:15am. Waddle n Swaddle, Rhinebeck. 876-5952. Introductory Orientation Workshop 11:30am-1:30pm. Postures, breath, and relaxation, along with an overview of classical yoga practice. $15. The Yoga Way, Wappingers Falls. 227-3223. Woodstock Diamond Dance Festival 7pm. $12. Woodstock Diamond Sokolow Dance Theater, Woodstock. 679-7757. Kevin Crane Band 8:30pm. Towne Crier Cafe, Pawling. 855-1300. The Distant Boys 1pm. Contemporary. $5. Northeast-Millerton Library, Millerton. (518) 789-3340. Judi Silvano and Friends 5pm-7pm. Jazz. Bread Alone Cafe, Rhinebeck. 876-3108. John Street Jam 7:30pm-10pm. Caleb Hawley, Barnaby Bright, James Krueger, Jenee Halstead, Attila Vural, Matt Singer, Zach Hurd, Joanna Chapman-Smith. $5. John Street Jam at the Dutch Arms Chapel, Saugerties. johnstjam.net. Lisa Lipkin 7:30pm. Acoustic. BeanRunner Cafe, Peekskill. (914) 737-1701. Library Jam 3 Benefit Concert 7:30pm. Fundraising benefit for the 2011 Music in the Annex Concert Series. $5. Northeast-Millerton Library, Millerton. (518) 789-3340. Tommy Tune in Steps in Time with the Manhattan Rhythm Kings 8pm. $25-$66. Belleayre Mountain, Highmount. (800) 942-6904 ext. 344. James Krueger 8pm-9:30pm. Hyde Park Library Annex, Hyde Park, 229-7791. Marilyn Crispell 8pm. $12. Colony Cafe, Woodstock. 679-5342. Soul Purpose 8pm. Motown. $20. Rosendale Theater, Rosendale. 658-8989. Through the end of August, leading contemporary artists will create and present new works in this fourth annual festival. Surrounded by the Catskill Mountains, MTA will exhibit a variety of art, including theatre, music, and dance. Brian Rogers/ The Chocolate Factory Theaterâ&#x20AC;&#x2122;s Hot Box on Saturday, July 23 takes an avant-garde cinematic experience into the dance idiom. Inspired by movies like Apocalypse Now, this piece uses a vocabulary of pans, zooms, and cuts for a loud and violent show choreographed for three performers. Every Friday night during the festival a Food for the Arts Barbecue will feature performances and music along with food from MTAâ&#x20AC;&#x2122;s organic garden. $20 per show. $95, season tickets. July 9 through August 21. Mt. Tremper. (845) 688-9893;. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. Forever Plaid 8pm. $25. Lycian Centre, Sugar Loaf. 469-2287. Workshops Painting Outside the Lines 9:30am-Sunday, July 10, 5pm. Art-making workshop with Melissa Harris. $225. Melissa Harris Art Studio, Hurley. 340-9632. The Poet's Tool-Box: Figures of Speech and Thought 10am-12pm. Weekly through August 27. $150. College of Poetry, Warwick. 294-8085. Kiln Workshop with Eileen Sackman 12pm-5pm. Saturday Ceramics Workshop Series. $85/$65 members. Barrett Clay Works, Poughkeepsie. 471-2550. Writing from the Heart: How Personal is Too Personal 1:30pm-3:30pm. Weekly through August 27. $150. College of Poetry, Warwick. 294-8085. Do You Know Which Body You're In? 7pm-9pm. $20/$15. Mirabai Books, Woodstock. 679-2100. SUNDAY 10 JULY Body / Mind / Spirit Events Open Horse & Pony Show Call for times. Woodstock Riding Club, Woodstock. 657-8005.. 8th Annual Sawyer Motor Car Show 1pm-6pm. With live music. Saugerties. 246-3412... Film Project Nim 2pm. Followed by a panel discussion with author Betsy Hess and those involved in the original study. $10. Crandell Theatre, Chatham. (518) 766-589 The Ralph and Dexter Project Call for times. Wherehouse, Newburgh. 561-7240. St. Petersburg String Quartet 4pm. Maverick Concerts, Woodstock. 679-8217. Will Stratton and the Wailing Wall 6pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. Spoken Word Book Signing with Lucas and Siegel 3pm-5pm. Author of Nu-Shu: A Hidden Language of Women in China. Wallkill River School and Art Gallery, Montgomery. (845) 457-. Theater Jackass Flats 2pm. Shadowland Theater, Ellenville. 647-5511. A Chorus Line 2pm. Woodstock Playhouse, Woodstock. 679-4101. The 39 Steps 2pm. River Valley Rep Theatre. $30/$25. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. Gentlemen Prefer Blondes 3pm. $24/$22 seniors and children. Center for Performing Arts, Rhinebeck. 876-3080. Forever Plaid 3pm. $25. Lycian Centre, Sugar Loaf. 469-2287. A Midsummer Night's Dream 6pm. Apprentice Company Productions. Outdoor Ampitheater, Poughkeepsie. 437-5902. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. Workshops Pregnancy 101 2pm-4:30pm. Second session July 20. $40. Waddle n Swaddle, Poughkeepsie. 473-5952. MONDAY 11 JULY Body / Mind / Spirit Active Seniors Program 9am-10am. $1.50. Pine Hill Community Center, Pine Hill. 254-5469. Kirtan with Prema Mayi Call for times. Mudita Yoga Center, Kingston. 750-6605. Soul Energy Readings 12pm-6pm. $40/$75. Mirabai Books, Woodstock. 679-2100. The Art of Energetic Healing 10am-5pm. With Suzy Meszoly. Sage Center for the Healing Arts, Woodstock. 679-5650. Prenatal Yoga 4pm-5:15pm. $90 6 weeks/$15 class. Bliss Yoga Center, Woodstock. 679-8700. CoSMic Yoga with Elizabeth 11am-12:15pm. $12. Chapel of Sacred Mirrors, Wappingers Falls. Zumba 6:30pm. $10. MaMa, Stone Ridge. jenniferlee1433@aol.com. Classes Forming Living Ideas & Experience-based Learning Call for times. The Nature Institute, Ghent. (518) 672-0116. Split Bill with The Marc Black Band & The Amy Fradon Band 8pm. Opening Nina Sheldon. Live @ The Falcon, Marlboro. Dance They Might Be Giants 8pm. $27-$34. Mahaiwe Performing Arts Center, Great Barrington, Massachusetts. (413) 528-0100. Woodstock Diamond Dance Festival 3:30pm. $12. Woodstock Diamond Sokolow Dance Theater, Woodstock. 679-7757. Tero Saarinen Company Triple Play 3pm. BardSummerscape opening event. $20-$55. Bard College, Annandale-on-Hudson. 758-7900. The Woodstock Psychic Wisdom Meetup 7pm-8:30pm. Psychic enrichment circle. $20/$10 members. Sage Center for the Healing Arts, Woodstock. 679-5650.. MUSIC ETHEL james ewing Ethel plays at Maverick Concerts in Woodstock on July 16. For the Momentclassical. Rounding out the evening are more mesmerizing items by Julia Wolfe, David Lang, and Huang Ruo. ;. —Peter Aaron 7/11 ChronograM forecast 111 Summer Drawing Intensive: Life Drawing Workshop 10am-Friday, July 22, 5:30pm. $950/$850 early bird. Shuster Studio, Hudson. shusterstudio@yahoo.com. Events Korean BBQ Night 6pm. $15. Bull and Buddha, Poughkeepsie. 337-4848. Mixer Tuesday, July 12, 5:30pm - 7:30pm hosted by labella Pizza bistro and Dedricks Pharmacy and Gifts 194 Main St, New Paltz, NY 845-255-2633 Kids Film Dutchess Arts Camp Call for times. Ages 3-12. Through July 29. Dutchess Day School, Millbrook.. Salvation Boulevard 8:30pm. Presented by Woodstock Film Festival. Upstate Films, Woodstock. 679-6608. Summer Camp on the Farm Call for times. Ages 4-9. Common Ground Farm, Fishkill. Kids Summer Sings 7:30pm. Gretchen Rueckheim of the Hudson Valley Choral Society leads the audience as they sing choral works. $10/$8 members. PS21, Chatham. (518) 392-6121. Picasso Kids: Beach Explorers 3-5 years 10:45am-11:30am. $65 series/$15 drop-in. Waddle n Swaddle, Poughkeepsie. 473-5952. Kid's Poetry Corner 3:45pm-4:30pm. Phillip, Piper & Friends. Woodstock Farm Festival, Woodstock.. Kid's Yoga Class 5pm-6pm. Ages 5-12. Inner Light Health Spa, Hyde Park. 229-9998. Theater Music A Midsummer Night's Dream 6pm. Apprentice Company Productions. Outdoor Ampitheater, Poughkeepsie. 437-5902. Jon Cobert 8pm. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Workshops Spoken Word Susan Richards Writing Workshop 9am-Friday, July 15, 3:30pm. Woodstock Writers. $600. Call for location. info@woodstockwriters.com. HV DSLR Meetup 7pm. Focus on audio equipment and techniques to use with DSLR video cameras. Beahive Kingston, Kingston. 338-3515. Navigating the Shift 7pm-9pm. Judith Wyman. $20/$15. Mirabai Books, Woodstock. 679-2100. TUESDAY 12 JULY Art Life Drawing Sessions 7:30pm-9:30pm. $13/$10 members/$48/$36 members series. Unison Arts & Learning Center, New Paltz. 255-1559. Body / Mind / Spirit Pounds Off Weight Loss Group 7pm-8pm. Pine Hill Community Center, Pine Hill. 254-5469. Yoga Sutras Chanting and Study with Shawn 7pm-8pm. Mudita Yoga Center, Kingston. 750-6605. Classes Belly Dance with Barushka 7pm-8:30pm. Open Space, Rosendale. (917) 232-3623. Theater The Wild Duck 3pm. By Henrik Ibsen. $45. Fisher Center, Annandaleon-Hudson. 758-7900. At the Turning of the Tide 7pm. Arm of the Sea puppet theater. Ellenville Farmers Market, Ellenville. 647-5530. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. THURSDAY 14 JULY Art Life Drawing Sessions 7:30pm-9:30pm. $13/$10 members/$48/$36 members series. Unison Arts & Learning Center, New Paltz. 255-1559. Body / Mind / Spirit Mother/Daughter Belly Dancing Class 7:30pm. $20/4 weeks $69/mother daughter $118. Casperkill Rec Center, Poughkeepsie. (914) 874-4541. PostPartum Adjustment 1:30am-1am. $12/$80 series. Waddle n Swaddle, Poughkeepsie. 473-5952. Events Active Seniors Program 9am-10am. $1.50. Pine Hill Community Center, Pine Hill. 254-5469. Ultimate Frisbee Casual Pickup Games 12:30pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Film Topsy Turvy 8:30pm. PS21, Chatham. (518) 392-6121. Music Replica Unplugged Call for times. Wherehouse, Newburgh. 561-7240. High Frequency Channeling: Archangel Metatron and Master Teachers 7pm-8:30pm. With Suzy Mezoly. $20. Sage Center for the Healing Arts, Woodstock. Workshops Writing Poetry, Short Story, Novel, Memoir or Creative Non-fiction (and Getting It Published) 6:30pm-8:30pm. $60 series/$15 each. Call for location. 679-8256. WEDNESDAY 13 JULY Body / Mind / Spirit Qi Gong 8:45am-9:30am. $5. Sacred Space Healing Arts Studio, Beacon. 742-8494. Working Mom Support Groups 5:30pm-7pm. Waddle n Swaddle, Rhinebeck. 876-5952. Zumba 6pm. $10. MaMa, Stone Ridge. jenniferlee1433@aol.com. Yoga at the Pavilion 6pm-7:15pm. $115 series/$15 class/$90 series members/$12 class members. Mohonk Preserve, Gardiner. 255-0919. Comfort Measures 6pm-9pm. This class will give you practical hands on tools to help during labor and birth. $65. Waddle n Swaddle, Poughkeepsie. 473-5952. Heart Opening Channeling 7pm-8:30pm. With Nancy Leilah Ward. $20. Sage Center for the Healing Arts, Woodstock. 679-5650. 112 forecast ChronograM 7/11 Events Poker Nights 7pm-10pm. Bull and Buddha, Poughkeepsie. 337-4848. Music N e w Pa lt z ChaMber of CoMMerC e Vegetarian Summer Dinners 7pm. $65. Beacon. (917) 803-6857. Woodstock Farm Festival 3:30pm-8pm. Farmers Market, children's activities, food by local chefs, live music, entertainment. Maple Lane, Woodstock.. Bindlestiff Family Cirkus Summer Skills Workshops 9am-Friday, July 15, 12pm. Ages 9-13. Juggling basics, tumbling low tightwire, stilts, clowning and performance skills. $175. Morris Memorial, Chatham. (518) 828-7470. Fran Sutherland â&#x20AC;&#x153;Scene @ Seventyâ&#x20AC;? featured at LaBella through Aug. 18th Classes. 473-4440. Doody Calls. Limb Loss Support Group 6pm. Taconic Resources for Independence, Poughkeepsie. 485-7709. Zumba Fitness Class 6:30pm-7:30pm. $7. Pine Hill Community Center, Pine Hill. 254-5469. Gathering with Clark Strand 6:30pm-9pm. Weekly meeting & conversation on excess and green living in the Mind Body Spirit. $10. Sage Center for the Healing Arts, Woodstock. 679-5650. Zumba Fitness Class 6:30pm. $7. Pine Hill Community Center, Pine Hill. 254-5469. Events Ultimate Frisbee Casual Pickup Games 5:30pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Civic Kingston NY 6pm-9pm. A forum to engaging citizens in creating a vibrant community, using an organized creative thinking process. Stella May Gallery Theater, Kingston. 418-3731. Creating a Harmony of History, Community and Farmland with the Best of the Hudson Valley. “We’re Always Growing.” Kingston Farmers’ Market Local apples, fresh, sweet corn & so much more! Every Saturday through November 19th 9:00 am to 2:00 pm, Rain or Shine Crafts on John Street 1st & 3rd Saturdays Healthy Eating Series 2nd & 4th Saturdays Storytelling Series 3rd Saturday Wall Street · Uptown Kingston 845-853-8512 SPONSORED BY ® Chronicling New York in Bloom Public Gardens and Parks of New York State New York 2012 Calendar THE LINDA WAMC’S PERFORMING ARTS STUDIO 339 CENTRAL AVENUE ALBANY Six Weeks in Photographs by Ted Spiegel Saratoga How Three-Year-Old Filly Rachel Alexandra Beat the Boys and Became Horse of the Year Brendan o’Meara JUL 8 / 9pm ThE Landmarks oF nEw York Hudson RiveR Towns Highlights from the Capital Region to Sleepy Hollow Country JUL 15/ 89 PM -DOORS PM- SHOW DANCING ON THE AIR RORY BLOCK JUL 13 / 8pm JUL 14 / 8pm A FOOD FOR THOUGHT FILM JUL 21 / 67PMPM--RECEP FILM ISLE OF KLEZBOS JUL 22 / 8pm An Illustrated Record of the City’s Historic Buildings Fifth Edition Barbaralee Diamonstein-Spielvogel mike freeman available at your local independent bookstore or online at drifting two weeks on the hudson photographs by HaRdie TRuesdale text by Joanne MicHaels ee excelsior editions An imprint of State University of NewYork Press PRODUCERS FACEOFF JUL 23 / 8pm JUL 28 / 8pm NOW SERVING BEER AND WINE! With Concessions from The Daily Grind TICKETS ONLINE AT THELINDA.ORG OR CALL 518.465.5233 x4 7/11 ChronograM forecast 113 Maverick concerts Kids Move with Me: 8- 18 months 12:15pm-1pm. $72 series/$15 drop-in. Waddle n Swaddle, Rhinebeck. 876-5952. Aunt Helen's Closet 1pm. Grades K-6. Kingston Library, Kingston. 331-0507. suNdaY, JulY 3, 4 pM • Miró Quartet Music suNdaY, JulY 3, 8 pM • actors & Writers: iMprov NatioN saturdaY, JulY 9, 8 pM • JasoN vieaux, guitar suNdaY, JulY 10, 4 pM • st. petersburg striNg Quartet With peter kolkaY, bassooN saturdaY, JulY 16, 8 pM • ethel striNg Quartet suNdaY, JulY 17, 4 pM • trio solisti (Pre-concert Lecture 3Pm) With coMposer saturdaY, JulY 23, 8 pM • perrY beekMaN, vocals & guitar With bar scott aNd terrY blaiNe suNdaY, JulY 24, 4 pM • leipzig striNg Quartet suNdaY, JulY 31, 4 pM • aNdreW russo aNd Frederic chiu, duo piaNos Free: YouNg people’s coNcerts, saturdaYs at 11aM JulY 9, 16, 30, august 6 General Admission $25 • Students $5 Book of 10 tickets $175 • Limited reserved seats $40 Tickets at the door, online, or by phone 800-595-4TIX(4849) 120 Maverick road • Woodstock, NeW York 845-679-8217 • Elissa Jones and Clarissa Cupero 6:30pm-8:30pm. Lycian Centre, Sugar Loaf. 469-2287. Theater Rupa & The April Fishes 8pm. Live @ The Falcon, Marlboro. Open Book 8pm. Acoustic. Whistling Willies, Cold Spring. 265-2012. Grupo Fantasma 8pm. Latin funk. Club Helsinki Hudson, Hudson. (518) 828-4800. Petey Hop Open Mike 8:30pm. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Rhinebeck Toastmasters Club 7pm-9pm. Practice public speaking in the comfortable atmosphere. Ulster County Office Building-6th Floor, Kingston. 338-5184. Theater February House Call for times. Martel Musical workshops concert readings of works-in-progress. Powerhouse Theater, Poughkeepsie. 437-5599. Wuthering 6pm. Apprentice Company Productions. The Frances Lehman Loeb Art Center, Poughkeepsie. 437-7745.. The Wild Duck 8pm. By Henrik Ibsen. $45. Fisher Center, Annandaleon-Hudson. 758-7900. FRIDAY 15 JULY Art Art Studio Tour 2011 Reception 5pm-7pm. Featuring 15 artists in Ancram, Copake and Hillsdale: photographers, painters, ceramicists, furniture makes. Roe-Jan Community Library, Hillsdale. (518) 325-4101. Prenatal Yoga 6pm-7:15pm. $18. The Yoga Way, Wappingers Falls. 227-3223. Full Moon Meditation and Guided Relaxation 6:30pm-7:30pm. Mudita Yoga Center, Kingston. 750-6605. Transformation With Shamanic Sound 6:30pm-8:30pm. Grandmother Barbara Threecrow. $20. Sage Center for the Healing Arts, Woodstock. 679-5650. Zumba 7pm. $5. Roundout Valley Resort, Accord. jenniferlee1433@aol.com. Reiki Circle and Sound Healing Meditation 7pm. $20. Partners in Massage, Hyde Park. 229-9133. Classes Tango New Paltz Beginners 6pm, intermediate 7pm, practica 8pm. $15/$50 4-part series. The Living Seed Yoga & Holistic Center, New Paltz. 256-0114. hudson River Dance New Kingston Film Festival shorts, documentaries, animation, features A u gu st 6-7, 2011 l i ve m u s i c food independent film m e e t th e f i l m m a k e r s u n d e r th e s ta r s Tattoo st. Hudson 518-828-5182 724warren NY 114 forecast ChronograM 7/11 please go to for program and directions Frenchy and the Punk 9pm. Bohemian world cabaret. Market Market Cafe, Rosendale. 658-3164. Nicole Hart & "The Hart Attack" Band 9:30pm. Blues. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Body / Mind / Spirit D I N N E R McPeake 8:30pm. Towne Crier Cafe, Pawling. 855-1300. Acoustic Thursdays with Kurt Henry 6pm. High Falls Cafe, High Falls. 687-2699. Spoken Word bright sheNg Reservoir Music 5th Anniversary Party 8pm. $10. The Bearsville Theater, Woodstock. 679-4406. Dancing Under the Stars 8pm. Music by Berkshire Bop Society. Lesson at 7:30pm. $10/$8. PS21, Chatham. (518) 392-6121. Events Chatham Farmers Market 4pm-7pm. Chatham Real Food Market Co-op, Chatham. (518) 392-3353. Gardiner Greenmarket 4pm. Gardiner Library, Gardiner.. Berkshire Playwrights Lab New Play Benefit 7:30pm. Mahaiwe Performing Arts Center, Great Barrington, Massachusetts. (413) 528-0100. Music Backbeat Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. Myles Mancuso Call for times. Wherehouse, Newburgh. 561-7240. Alva Nelson 7:30pm. Jazz. BeanRunner Cafe, Peekskill. (914) 737-1701. Roger Paul Mason and Jake Plourde 8pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. Handball Call for times. Inside Look Play workshops (semi-staged workshops). Powerhouse Theater, Poughkeepsie. 437-5599. Summer Acting Intensive Call for times. Using a mix of improv, text, and theater games we will hone our acting skills, awareness, and get outside of our own experience as individuals. $225. Call for location. 389-5889. Cymbeline 6pm. Apprentice Company Productions. Outdoor Ampitheater, Poughkeepsie. 437-5902. Forever Plaid 8pm. $25. Lycian Centre, Sugar Loaf. 469-2287. Gentlemen Prefer Blondes 8pm. $24/$22 seniors and children. Center for Performing Arts, Rhinebeck. 876-3080. Anything Goes 8pm. Woodstock Playhouse, Woodstock. 679-4101. The 39 Steps 8pm. River Valley Rep Theatre. $30/$25. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. The Andrews Brothers 8pm. Shadowland Theater, Ellenville. 647-5511. The Wild Duck 8pm. By Henrik Ibsen. $45. Fisher Center, Annandaleon-Hudson. 758-7900. SATURDAY 16 JULY Art Art Omi Open Studio Weekend Call for times. Tour the studios of 30 artists from around the world, with dinner & dancing under the stars, music by Sambaland. Omi International Arts Center, Ghent. Art Studio Tour 11am-4pm. Featuring 15 artists in Ancram, Copake and Hillsdale: photographers, painters, ceramicists, furniture makes. Call for location.. Shandaken Art Studio Tour 11am-5pm. Call for location.. Horse Eye to Eye 1pm-3pm. Pat Travis, pastel drawings, Connie Fiedler, oils. Fovea, Beacon. 765-2199. Quick, Down and Dirty 4pm-6pm. Focus on outdoor furniture & landscape/ garden accessory constructions. Woodstock Byrdcliffe Guild, Woodstock. 679-2079. Laura Gurton 4pm-7pm. Thaddeus Kwiat Projects, Saugerties. (917) 456-7496. Oil Paintings by Rose Stock 4pm-7pm. The Art and Zen Gallery, Poughkeepsie. 473-3334. Children of the Cheyenne Nation 5pm-9pm. Fovea, Beacon. 765-2199. Interior/Exterior 6pm-8pm. Stephen Walling, Patty Neal, Scott Foster and Joseph Maresca. Carrie Haddad Gallery, Hudson. (518) 828-1915. Sight of Sound 8pm. Collaborative photography and music performance. $15/$12 in advance. Stella May Gallery Theater, Kingston. 331-7955. Body / Mind / Spirit Zumba 10am. $10. Rosendale Recreation Center, Rosendale. jenniferlee1433@aol.com. Couples Birthing Yoga 10am-12pm. $60 per couple. Saugerties. 514-4124. From Passion to Purpose: Discovering Your Authentic Life 1pm-5pm. With James Porter and Lev Natan. $45. Mudita Yoga Center, Kingston. 750-6605. Classes Zumba with Alicia 10am-11:30am. Cornell St. Studios, Kingston. 331-0191. Poetic Landscape 1pm-Sunday, July 17, 4pm. $120. Woodstock School of Art, Woodstock. 679-2388. Dance Moving Together: A Day of Dance & Wellness for Families Call for times. Day of classes by the dance troupe The Dance Monks. MaMa, Stone Ridge. 687-8890. Tere O'Connor Dance 8pm. $20. Mount Tremper Arts, Mount Tremper. 688-9893. Freestyle Frolic 8:30pm-2am. Barefoot, smoke, drug and alcohol free. $7/$3 teens and seniors. Center for Symbolic Studies, Tillson.. Events The Outdoors Meet the Animals Tour Call for times. 90-minute tour and talk. Catskill Animal Sanctuary, Saugerties. 336-8447. Ice Age Geology Walk 2pm. Greenport Conservation Area, Greenport. (518) 392-5252 ext 210.. Pirates of Esopus Kayak Paddle Pals Scavenger Hunt 12:45pm. Geo. Freer Park Beach, Kingston. groups. yahoo.com/group/KingstonPaddlePals. Farm to Table in the Fields 5pm-9pm. Katchkie Farm, Kinderhook. clctrust.org/farm-to-table. Music Videos & Voices of the Valley 10pm. $10. Rosendale Theater, Rosendale. 658-8989. Film Voices of Modern Dance Film Event 5pm. Woodstock Diamond Sokolow Dance Theater, Woodstock. 679-7757. Kids Jack and the Beanstalk 11am. $9/$7 children. Center for Performing Arts, Rhinebeck. 876-3080. Music Dos Diablos Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. Young People's Concert: Trio Solisti 11am. $5/children free. Maverick Concerts, Woodstock. 679-8217. Woodstock Concert on the Green 1pm-6pm. Norm Wennet, Sarah Perrotta, Two Dark Birds, Native Tongue Dance, Marc Black Shakey Ground. Woodstock Village Green, Woodstock. 679-3224. Jeff Otis & Larry Balestra 2pm. Jazz. Robibero Family Vineyards, New Paltz. (845) 255-9463. Teri Roiger & John Menegon 5pm-7pm. Jazz. Bread Alone Cafe, Rhinebeck. 876-3108. Phil Lesh & Bob Weir 7pm. $32.50 lawn/$59.50 . Bethel Woods Center for the Arts, Bethel. (866) 781-2922. Riverbank Banjo Band 7pm. Summer Sunset Concert Series sponsored by Millbrook Arts Group. Thorne Building, Millbrook.. Oz Noy, Vic Juris, Jay Anderson & Adam Nussbaum 7pm. Opening: Manual Transmission. Live @ The Falcon, Marlboro. Tin Pan Band 7:30pm. Jazz. BeanRunner Cafe, Peekskill. (914) 737-1701. Alice in Wonderland Call for times. $6/$5 in advance. On the Wharf Theater, Sugar Loaf. 469-2287. Anything Goes Call for times. Woodstock Playhouse, Woodstock. 679-4101. Cymbeline 6pm. Apprentice Company Productions. Outdoor Ampitheater, Poughkeepsie. 437-5902. Gentlemen Prefer Blondes 8pm. $24/$22 seniors and children. Center for Performing Arts, Rhinebeck. 876-3080.. Marji Zintz 8:30pm. Acoustic. Yum Yum Noodle Bar, Woodstock. 679-7992. American Babies 9pm. $15/$10. The Bearsville Theater, Woodstock. 679-4406. Eilen Jewell 9pm. With Special Guest Zoe Muth and The Lost High Rollers. Club Helsinki Hudson, Hudson. (518) 828-4800. Smokin' Aces 9pm. High Falls Cafe, High Falls. 687-2699. John Shrader band 9:30pm. Rock. Bridgewater Bar and Grill, Kingston. 340-4272. Otis and the Hurricanes 9:30pm. Cajun/zydeco. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. The Virginia Wolves 10pm. With The Five Points Bands. $10. Rosendale Theater, Rosendale. 658-8989. Rozz Morehead,Gospel, 7:30pm, Park The Wild Duck 8pm. By Henrik Ibsen. $45. Fisher Center, Annandaleon-Hudson. 758-7900. Friday, August 5 “Latte Lecture”, 9am, Ralph and Ralph, Children’s music,11:30am, Train Museum Justin Kolb and Friends,6 hands piano recital,1:30,Park The Kintchen Sink, Cabaret, 3pm, STS Playhouse Dennis Yerry & AnnOsmond,Jazz,5pm, Wesleyan church Voices of Distinction, Concert,7:30pm,Park Workshops Paper Marbling 9am-4pm. CCCA. Columbia-Greene Community College, Hudson. (518) 828-1481 ext.3344. Plein Air Pastel Workshop 9am-4pm. Barrett Art Center, Poughkeepsie. 471-2550. Gong Workshop 10am-5pm. With Don Conreaux. $125. Sage Center for the Healing Arts, Woodstock. 679-5650. Saturday, August 6 SUNDAY 17 JULY Art “Latte Lecture”, Art Omi Open Studio Weekend Call for times. Tour the studios of 30 artists from around the world, with country brunch. Omi International Arts Center, Ghent. (518) 392-4568. Catholic Church Ralph and Ralph, Children music,11:30pm,Train Museum Justin Kolb an Friends, 6 hands Piano Recital, 2pm. Park The Kitchen Sink,Cabaret,4:30pm, STS Playhouse Art Studio Tour 11am-4pm. Featuring 15 artists in Ancram, Copake and Hillsdale: photographers, painters, ceramicists, furniture makers. Call for location.. Shandaken Art Studio Tour 11am-5pm. Call for location.. Uncle Rock, Children’s: Music,4pm Train Museum Robert Esfomes, World Music, 5 pm, Methodist Church Don Giovanni, Opera,7pm, Park Body / Mind / Spirit CoSMic Yoga with Elizabeth 11am-12:15pm. $12. Chapel of Sacred Mirrors, Wappingers Falls. Introduction to Kinesiology 2pm-4pm. $15-$30. Inner Light Health Spa, Hyde Park. 229-9998. John Schrader Band 8:30pm. Singer/songwriter. American Glory, Hudson. (518) 822-1234. Thursday , August 4 The Andrews Brothers 8pm. Shadowland Theater, Ellenville. 647-5511. Beyond a Simple Folk Song 8pm. Helen Avakian, Terry Champlin, Kevin Becker, John Martucci. $10/$8. Cunneen-Hackett Arts Center, Poughkeepsie. 486-4571. Ethel String Quartet 8pm. Maverick Concerts, Woodstock. 679-8217. 2011 Air Pirates Radio Theater 8pm. Railroad Playhouse, Newburgh. Fundamental Principles of Sound Energy 2pm-5pm. With Philippe Garnier. $40. Sage Center for the Healing Arts, Woodstock. 679-5650. Fat City 8pm. Blues. The Wherehouse Restaurant, Newburgh. 561-7240. August 4, 5, 6, 7 Forever Plaid 8pm. $25. Lycian Centre, Sugar Loaf. 469-2287. Creedence Clearwater Revisited 8pm. $25-$66. Belleayre Mountain, Highmount. (800) 942-6904 ext. 344. Gala Orchestra Concert 8pm. Windham Chamber Music Festival. $35/$30 seniors/$25 contributors/$5students. Windham Performing Arts Center, Windham. (518) 263-5165. GET YOUR TICKETS NOW Theater Sunday,August 7 “Latte Lecture”,9:00am, Power of song, children choir workshop, 1pm, MethodistChurch Simon Shaheen, World Music, 2pm, Park Vivaldi’s Gloria, Choral, 4pm,Park Exploring the Buddhadharma 4pm-5:30pm. Mudita Yoga Center, Kingston. 750-6605. Classes Ashokan Guitar Camp Call for times. World class guitar classes and workshops, practical music theory, mini-concerts, many levels served. Ashokan Center, Olivebridge. 657-8333. Events. Ultimate Frisbee Casual Pickup Games 3pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Minnewaska Distance Swimmers Association Test 5:30pm. Rosendale Recreation Center, Rosendale.. The Phoenicia Festival Of The Voice Foundation Kingston Farmers' Market 9am-2pm. Featuring The Storytelling Series with Laurie McIntosh. Kingston Farmers' Market, Uptown Kingston. 853-8512. 18 Events in 4 Days - 7 Venues Within Walking Distance Film Voices of Modern Dance Film Event 3pm. Woodstock Diamond Sokolow Dance Theater, Woodstock. 679-7757. Kids DROP TV Summer 2011 Production 10am-5pm. Learn the media production skills to create and produce DROP TV, an award winning, show. Children's Media Project, Poughkeepsie. 485-4480. (888)214-3063 7/11 ChronograM forecast 115 Color&#x20AC;&#x2122;t.. Events Chatham Farmers Market 4pm-7pm. Chatham Real Food Market Co-op, Chatham. (518) 392-3353. Gardiner Greenmarket 4pm. Gardiner Library, Gardiner.. theater powerhouse theater Thrill to Power Dixie Sheridan For the past 26 years, Vassar College and New York Stage and Film have presented the summer Powerhouse Theater season at Vassar, where audiences can experience the challenges and excitement of plays as they’re being developed. Under the leadership of Artistic Director Johanna Pfaelzer, Powerhouse supports established and upcoming artists. During the season, the directors and actors dorm on the Vassar campus, constructing a creative environment. “I think what’s important about the work we do here is that we support and protect these artists in their process,” says Pfaelzer. “I think they come here because they have the opportunity to work with really amazing collaborators. They have this amazing audience that really engages with them in the process of finding the play.” Past Powerhouse residents include writers Christopher Durang, Steve Martin, and John Patrick Shanley; directors Mark Brokaw, Liz Swados, and David Warren; and actors Chris Cooper, Philip Seymour Hoffman, and Meryl Streep. The 2011 season kicks off Powerhouse’s 27th year with returning writers Duncan Sheik, Steven Sater, and Patricia Wettig, while also introducing talents like Gabriel Kahane, Ed Hime, and Mona Mansour. There are a few international artists as well, including Australian writer Joanna Murray-Smith. “This is a really ambitious season. For whatever reason, the projects we’re working on right now have a real theatrical scale to them, which is exciting to see. I think if anything it’s the scope of what these writers are tempting to do. This year is about size and scale,” says Pfaelzer. The Powerhouse Theater season continues through July 31. Full subscription, $170; matinee subscription, $59.50. Single ticket prices: mainstage, $35; Martel musicals, $30; Inside Look series, $20; Reading Festivals, free. (845) 437-5599.. —Zan Strumfeld MAIN STAGE INSIDE LOOK PLAY WORKSHOPS F2M by Patricia Wettig; directed by Maria Mileaf Through July 10 Freshman year of college is always a challenge, especially if you’re changing from female to male. Starring Talia Balsam (“Mad Men”), “F2M” shows how the transition not only affects a body but also a famous family. Margaret and Craig by David Solomon; directed by Sheryl Kaller July 1-3 Mario Cantone (“Sex and the City”) takes on the role of 1970s female impersonator Craig Russell, performing as women like Judy Garland and Bette Davis. Craig and childhood best friend, author Margaret, battle with the demons of fame. Their relationship changes and grows when they encourage one another when no one else dared to. A Maze by Rob Handel; directed by Sam Buntrock July 20-31 How does a graphic novelist, a musician, and a young girl recreating her identity interconnect with each other? See how the highly theatrical “A Maze” takes on power, love, addiction, and the impulse to create. Starring Daniel Oreskes (“Billy Elliot”) and Rebecca Naomi Jones (“American Idiot”). MARTEL MUSICAL WORKSHOPS Handball by Seth Zvi Rosenfel; directed by Candido Tirado July 15-17 A handball court is the place for growing relationships in the heat of a New York City summer. Rob Morrow (“Northern Exposure”) joins the cast of multiple generations of men who explore how people of different backgrounds, social classes, and values can depend on and betray one another. The Nightingale book and lyrics by Steven Sater; music by Duncan Sheik; directed by Moises Kaufman July 8-10 Returning creators of the Tony Award-winning “Spring Awakening” bring their wild imaginations into their musical version of the Hans Christian Anderson fable “The Nightingale.” The story slips into the world of a young emperor and his yearning for something outside his palace walls. SPECIAL MUSICAL PRESENTATION February House music and lyrics by Gabriel Kahane; book by Seth Bockley; directed by Davis McCallum July 14-16 1940s Brooklyn Heights: artists including poets W. H. Auden and composer Benjamin Britten shack up together for comfort and inspiration in a time of war. Based on a true story, “February House” shows the dynamic influences artists have on one another. Starring Santino Fontana from “Billy Elliot.” READING FESTIVALS Piece of My Heart music and lyrics by Bert Berns; book by Daniel Goldfarb, Brett Berns, Cassandra Berns; directed by Leigh Silverman July 29-31 The daughter of songwriting dynamo Bert Berns is on a quest to learn about her father. Writing hits like “Twist and Shout” and “Under the Boardwalk,” Berns’ short life is revealed and celebrated in this musical. With Linda Hart (“Catch Me If You Can,” “Hairspray”) and Jarrod Spector (“Jersey Boys”). Wuthering by Mark Lindberg (July 7, 14, 21, 28) A Midsummer Night’s Dream by William Shakespeare (July 8-11) Dream Play by August Strindberg; new version by Caryl Churchill (June 22-25) Cymbeline by William Shakespeare (July 15-18) Condensed versions of the classics are performed by the Powerhouse Apprentice Company. Mark Lindberg’s “Wuthering” is a “Soundpainted” dance theater piece based on Wuthering Heights and set to a 1979 disco album by composer John Ferrara. The Island Musical by Dar Williams; directed by Jeremy Dobrish July 17 When the inhabitants of a beautiful island find out one of its elements is extremely valuable, they must face the outside world and reclaim what was once theirs. Before becoming a national hit, singer/songwriter Dar Williams started writing plays her senior year of high school and studied theater at Wesleyan University. July 29-31 Powerhouse’s Readings Festivals showcase the earliest stage of play development. The cast and director meet for just four days going over the piece. One of the more popular parts of the Powerhouse season, audiences can be the first to witness possible plays for upcoming seasons (“F2M” was read at 2010’s Readings Festival). APPRENTICE PLAYS 7/11 ChronograM forecast 117 Kids Dance Kids Yoga 4:30pm-5:30pm. $16.50. The Yoga Way, Wappingers Falls. 227-3223. Moving Together: A Day of Dance & Wellness for Families Call for times. Day of classes sponsored by the Dance Monks. Mountain View Studio, Woodstock. 679-0901. Music Chimps in Tuxedos Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. The Dan Brother Band Call for times. Wherehouse, Newburgh. 561-7240. In The Pocket 7pm. Meiser Park, Wappingers Falls.. ILan' Ban' 7:30pm. Acoustic. BeanRunner Cafe, Peekskill. (914) 737-1701. John Snyder and Cyrus Gengras 8pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. The Mahavisnu Project 8pm. Live @ The Falcon, Marlboro. Bereznak Brothers 8:30pm. With Rob Carlson and the Benefit Street Band. Towne Crier Cafe, Pawling. 855-1300. Reality Check 8:30pm. Rock. La Puerta Azul, Millbrook. 677-2985. Eric Bibb 9pm. Blues. Club Helsinki Hudson, Hudson. (518) 828-4800. Cracker 9pm. $25. The Bearsville Theater, Woodstock. 679-4406. Phineas and the Lonely Leaves 9:30pm. Acoustic. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. The Outdoors Godspell 8pm. $24/$22 children and seniors. Center for Performing Arts, Rhinebeck. 876-3080. Twilight Firefly Hike 8:30pm-9:30pm. Mud Creek Environmental Learning Center, Ghent. (518) 828-4386 ext. 3. Theater Forever Plaid 8pm. $25. Lycian Centre, Sugar Loaf. 469-2287. Anything Goes 8pm. Woodstock Playhouse, Woodstock. 679-4101. Wild Duck 8pm. By Henrik Ibsen. $45. Fisher Center, Annandaleon-Hudson. 758-7900. Workshops Marketing and Advertising Workshop Call for times. Poughkeepsie Grand Hotel, Poughkeepsie. 790-1721. SATURDAY 23 JULY Art Daisy Craddock: New Work 6pm-8pm. John Davis Gallery, Hudson. (518) 828-5907. Brian Rogers/The Chocolate Factory Theater Hot Box 8pm. $20. Mount Tremper Arts, Mount Tremper. 688-9893. a corn roast and The Healthy Eating Series. Kingston Farmers' Market, Uptown Kingston. 853-8512. Electronics Recycling Day 9am-1pm. Municipal Center, Beacon. 337-0375.. Kids Baby Splash! Development Through Music: Birth-18 months 10:30am-11:15am. Waddle n Swaddle, Rhinebeck. 876-5952. Bubble Trouble with Jeff Boyer 11am. $9/$7 children. Center for Performing Arts, Rhinebeck. 876-3080. Music Rosendale Street Festival Call for times. 6 Stages, 74 bands and short flix. Rosendale, Rosendale.. Rosa Wallace 10:30am. Acoustic. Taste Budd's Chocolate and Coffee Cafe, Red Hook. 758-6500. Teri Roiger & John Menegon 5pm-7pm. Jazz. Bread Alone Cafe, Rhinebeck. 876-3108. Ray Blue 7:30pm. Jazz. BeanRunner Cafe, Peekskill. (914) 737-1701. Bar Scott, Perry Beekman, and Terry Blaine 8pm. Maverick Concerts, Woodstock. 679-8217. Belleayre Festival Opera 8pm. Verdi's La Traviata. $25-$66. Belleayre Mountain, Highmount. (800) 942-6904 ext. 344. Stephen Kaiser Group 8pm. Jazz. Babycakes Cafe, Poughkeepsie. 485-8411. Bill Sims Jr. with Adam Levy & The Mint Imperials 8pm. Live @ The Falcon, Marlboro. Reality Check 8:30pm. Rock. Hyde Park Brewing Company, Hyde Park. 229-8277. Woody Mann 8:30pm. With Paul Geremia. Towne Crier Cafe, Pawling. 855-1300. Beyond The Wall 9:30pm. Pink Floyd tribute. 12 Grape Music and Wine Bar, Peekskill. (914) 737-6624. In The Pocket 10pm. Covers. Bacchus, New Paltz. 255-8636. The Outdoors Godspell 8pm. $24/$22 children and seniors. Center for Performing Arts, Rhinebeck. 876-3080. Foolsgold Sanctuary 6pm-9pm. Exhibit and auction to benefit Catskill Animal Sanctuary. One Mile Gallery, Kingston. 338-2035. Spoken Word Zumba 10am. $10. Rosendale Recreation Center, Rosendale. jenniferlee1433@aol.com. Chinese Medicine Clinic 10am-4:30pm. 45 minute sessions with Lorraine Hughes. $60. Inner Light Health Spa, Hyde Park. 229-9998. Introductory Orientation Workshop 11:30am-1:30pm. Postures, breath, and relaxation, along with an overview to this classical yoga practice. $15. The Yoga Way, Wappingers Falls. 227-3223. Osho Active Meditation 12pm-1pm. Mudita Yoga Center, Kingston. 750-6605. Sound Healing Chakra Clearing Workshop 1pm-6pm. $75. Sacred Space Healing Arts Studio, Beacon. 742-8494. Doody Calls 2pm-3pm. Waddle n Swaddle, Poughkeepsie. 473-5952. Classes Abstraction and Large Scale Drawing 9am-Sunday, July 24, 4pm. $215. Woodstock School of Art, Woodstock. 679-2388. Zumba with Alicia 10am-11:30am. Cornell St. Studios, Kingston. 331-0191. 118 forecast ChronograM 7/11 Book Binding 9am-4pm. CCCA. $99. Columbia-Greene Community College, Hudson. (518) 828-1481 ext.3344. SUNDAY 24 JULY Events Ruth Lauer Manenti: Paper Blankets, Glasses and Bandages 6pm-8pm. John Davis Gallery, Hudson. (518) 828-5907. Body / Mind / Spirit Introduction to Food Preservation 10am-2pm. Learn how to preserve your garden's delicious bounty with Jay Levine. $35/$25/+$15 materials. Inner Light Health Spa, Hyde Park. 229-9998. Book Reading and Signing with Josh Margolin and Ted Sherman 7pm. Authors of The Jersey Sting. Inquiring Mind Bookstore, New Paltz. 255-8300. Theater Anything Goes Call for times. Woodstock Playhouse, Woodstock. 679-4101. Art Cause for Applause 12:30pm-4:30pm. Enjoy the work of artists, presentations, live music, performances. Railroad Playhouse, Newburgh. theartsgroupny@gmail.com. Artist Walkthroughs of Palermo Retrospective 2pm. David Reed. Dia: Beacon, Beacon. 440-0100. Body / Mind / Spirit CoSMic Yoga with Elizabeth 11am-12:15pm. $12. Chapel of Sacred Mirrors, Wappingers Falls. Vowel Sounds and Harmonic Healing 2pm-5pm. $30. Sage Center for the Healing Arts, Woodstock. 679-5650. Tao Study Group 4pm-6pm. Ageless wisdom for living in the modern world with Stephen Sharkey. $10. Mudita Yoga Center, Kingston. 750-6605. Classes Cupping Class 1pm-4pm. $60. Inner Light Health Spa, Hyde Park. 229-9998. Events 2nd Annual Kenneth Casazza Benefit Car, Truck, Bike Show and Swap Meet Call for times. Windham Mountain, Windham. (518) 734-4300. Prenatal Yoga 4pm-5:15pm. $90 6 weeks/$15 class. Bliss Yoga Center, Woodstock. 679-8700. Limb Loss Support Group 6pm. Resource Center for Accessible Living, Kingston. 331-0541. Zumba 6:30pm. $10. MaMa, Stone Ridge. jenniferlee1433@aol.com. Sound Healing Meditation 7pm-8pm. $10. Partners in Massage, Hyde Park. 229-9133., Hudson. (518) 537-2589. Hunter Stone Carving Seminar 8am-Saturday, August 6, 6pm. Learn the ancient art of stone carving. Hunter. (518) 989-6356. Events Cavorting at the Colony: Open House Benefit Party 3pm-8pm. Cocktail party fundraiser with live music. $75/$35 Colony alumni/$20 children. Millay Colony, Austerlitz. (518) 392-4144. Korean BBQ Night 6pm. $15. Bull and Buddha, Poughkeepsie. 337-4848. Poker Nights 7pm-10pm. Bull and Buddha, Poughkeepsie. 337-4848. Hudson Valley Young Artist Talent Search 12:30pm. $7/$5 17 and under. Towne Crier Cafe, Pawling. 855-1300. Dutchess Arts Camp Call for times. Ages 6-12. Through August 5. St. Paul's Parish Hall, Red Hook.. Guided Walking Tour 2pm. $3/children free. Hurley Heritage Museum, Hurley. 338-5253. Block Party Summer Arts Program for Children 9am-Friday, July 29, 3:30pm. Visual art, dance and music for ages 7-12. $300. Cornell St. Studios, Kingston. 331-0191. Ultimate Frisbee Casual Pickup Games 3pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Minnewaska Distance Swimmers Association Test 5:30pm. Rosendale Recreation Center, Rosendale... Kids Children's Summer Arts Program "Block Party!" 9am-Friday, July 29, 3:30pm. Visual art, dance and music for ages 5-12. $250. Cornell St. Studios, Kingston. 331-0191. Music 311 and Sublime with Rome 7pm. $33/$49/$85. Bethel Woods Center for the Arts, Bethel. (866) 781-2922. Summer Sings 7:30pm. Gretchen Rueckheim of the Hudson Valley Choral Society leads the audience as they sing choral works. $10/ $8 members. PS21, Chatham. (518) 392-6121. TUESDAY 26 JULY Music Chrissy O'Dell and One Hot Mess Call for times. Wherehouse, Newburgh. 561-7240. Rosendale Street Festival Call for times. 6 Stages, 74 bands and short flix. Rosendale, Rosendale.. Art Golden Acrylics Demonstration 6pm-8pm. Woodstock School of Art, Woodstock. 679-2388. Joe Tobin 1pm. Acoustic. Taste Budd's Chocolate and Coffee Cafe, Red Hook. 758-6500. Life Drawing Sessions 7:30pm-9:30pm. $13/$10 members/$48/$36 members series. Unison Arts & Learning Center, New Paltz. 255-1559. Project Mercury 3:45pm. Bertoni Gallery, Sugar Loaf. 469-0993. Body / Mind / Spirit The Leipzig String Quartet 4pm. Maverick Concerts, Woodstock. 679-8217. Dutchess Doulas 10am. Waddle n Swaddle, Rhinebeck. 876-5952. Christopher Robin Band 7:30pm. Towne Crier Cafe, Pawling. 855-1300. Pounds Off Weight Loss Group 7pm-8pm. Pine Hill Community Center, Pine Hill. 254-5469. The Outdoors Godspell 3pm. $24/$22 children and seniors. Center for Performing Arts, Rhinebeck. 876-3080. Theater The Andrews Brothers 2pm. Shadowland Theater, Ellenville. 647-5511. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. Anything Goes 2pm. Woodstock Playhouse, Woodstock. 679-4101. Putting it Together 8pm. River Valley Rep. $35/$30 students and seniors/$27 groups. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. Active Seniors Program 9am-10am. $1.50. Pine Hill Community Center, Pine Hill. 254-5469. Woodstock Farm Animal Sanctuary: A Day at the Farm 11am-4pm. Learn more about the animals who have been given a second chance at life. $10/$5 children. Woodstock Farm Animal Sanctuary, Willow. 679-5955. The Andrews Brothers 8pm. Shadowland Theater, Ellenville. 647-5511. Forever Plaid 8pm. $25. Lycian Centre, Sugar Loaf. 469-2287. MONDAY 25 JULY Body / Mind / Spirit Putting it Together 2pm. River Valley Rep. $35/$30 students and seniors/$27 groups. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. The Wild Duck 3pm. By Henrik Ibsen. $45. Fisher Center, Annandaleon-Hudson. 758-7900. Classes Woodstock Impressions 9am-Friday, July 29, 4pm. $370. Woodstock School of Art, Woodstock. 679-2388. Belly Dance with Barushka 7pm-8:30pm. Open Space, Rosendale. (917) 232-3623. Mother/Daughter Belly Dancing Class 7:30pm. $20/4 weeks $69/mother daughter $118. Casperkill Rec Center, Poughkeepsie. (914) 874-4541. Events Ultimate Frisbee Casual Pickup Games 12:30pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Film The Wild Duck 8pm. By Henrik Ibsen. $45. Fisher Center, Annandaleon-Hudson. 758-7900. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. The Blues Brothers 8:30pm. PS21, Chatham. (518) 392-6121. Workshops Workshops Two Days of Hands-on Workbench Time Call for times. With Charles Lewton-Brain. Center for Metal Arts, Florida. 651-7550. Energy Rejuvenation 2pm-4pm. $20/$15. Mirabai Books, Woodstock. 679-2100. Writing Poetry, Short Story, Novel, Memoir or Creative Non-fiction (and Getting It Published) 6:30pm-8:30pm. $60 series/$15 each. Call for location. 679-8256. Workshops Canning Workshop 6:30pm. Learn how to preserve the harvest and enjoy it throughout the year. Phillies Bridge Farm, New Paltz. 256-9108. WEDNESDAY 27 JULY Body / Mind / Spirit Kids Move with Me: 8- 18 months 12:15pm-1pm. $72 series/$15 drop-in. Waddle n Swaddle, Rhinebeck. 876-5952. Adinkra: The Talking Cloth 1pm. Ages 7 and up. Kingston Library, Kingston. 331-0507. Qi Gong 8:45am-9:30am. $5. Sacred Space Healing Arts Studio, Beacon. 742-8494. Music Working Mom Support Groups 5:30pm-7pm. Waddle n Swaddle, Rhinebeck. 876-5952. Acoustic Thursdays with Kurt Henry 6pm. High Falls Cafe, High Falls. 687-2699. Zumba 6pm. $10. MaMa, Stone Ridge. jenniferlee1433@aol.com. Still Surfin' 6:30pm-8:30pm. Beach Boys tribute band. Lycian Centre, Sugar Loaf. 469-2287. Yoga at the Pavilion 6pm-7:15pm. $115 series/$15 class/$90 series members/$12 class members. Mohonk Preserve, Gardiner. 255-0919. New Moon Class with Kara Lukowski 7:15pm-8:15pm. Mudita Yoga Center, Kingston. 750-6605. Classes Therapeutic Ice Skating 4:15pm-5:45pm. Weekly through August 31. $50. McCann Ice Arena, Poughkeepsie. 454-5800 ext. 205. Events Woodstock Farm Festival 3:30pm-8pm. Farmers Market, children's activities, food by local chefs, live music, entertainment. Maple Lane, Woodstock.. Open Mike Call for times. Wherehouse, Newburgh. 561-7240. Amy Speace 7:30pm. Singer/songwriter. $15/$12. Empire State Railway Museum, Phoenicia. 688-7501. Professor Louie & The Crowmatix 8pm. Live @ The Falcon, Marlboro. Fourth Annual Grape Jam Weekend 8:30pm. Four straight nights of over-the-top jam sessions. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Dweezil Zappa Plays Zappa 9:30pm. With special guests Flo & Eddie. $50. Bearsville Theater, Woodstock. 679-4406. Kids Kid's Yoga Class 5pm-6pm. Ages 5-12. Inner Light Health Spa, Hyde Park. 229-9998. Wuthering 6pm. Apprentice Company Productions. The Frances Lehman Loeb Art Center, Poughkeepsie. 437-7745. Hellvar 6pm-9pm. Henry Hudson Riverfront Park, Hudson. hudsonwatermusic.com. Four Guys in Disguise 7pm. Vanderbilt Mansion, Hyde Park. Last Good Tooth 8pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. Theater Missing 8pm. The true story of a father's disappearance. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. THURSDAY 28 JULY Art Life Drawing Sessions 7:30pm-9:30pm. $13/$10 members/$48/$36 members series. Unison Arts & Learning Center, New Paltz. 255-1559. Body / Mind / Spirit Active Seniors Program 9am-10am. $1.50. Pine Hill Community Center, Pine Hill. 254-5469. PostPartum Adjustment 9:30am-11am. $12/$80 series. Waddle n Swaddle, Poughkeepsie. 473-5952.. Babywearing Bonanza. Sample locally produced specialty foods. Enjoy live music. Browse for handicrafts. And more. It’s all happening at the Connecticut Wine Festival. For ticket prices, discounts, and more info, visit ctwine.com The Erotics of Doubt 7pm. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. Presented by the CT Wine Trail The Andrews Brothers 8pm. Shadowland Theater, Ellenville. 647-5511. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. Saturday Missing 8pm. The true story of a father's disappearance. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. Workshops Goshen Fairgrounds, Rte. 63, Goshen, CT Discover the vineyards and wineries along the picturesque CT Wine Trail. COL L AB ORATIVE S PACES FOR WORK + COMMUNITY Invasive Species Inventory Workshop and Inventory 6:30pm. Inventory session on the 30th at 1pm. Pine Hill Community Center, Pine Hill. 254-5469. JULY EVENTS FRIDAY 29 JULY Body / Mind / Spirit Zumba 7pm. $5. Roundout Valley Resort, Accord. jenniferlee1433@aol.com. Bright Shadows and Dark Radiance: The Chod Practice 7pm-9pm. With Dr. Craig Lennon. A psychospiritual journey incorporating Shamanic elements of Buddhist Chod, hypnosis, and shadow psychology. $20. Sage Center for the Healing Arts, Woodstock. 679-5650. The Rose Meditation 7pm-9pm. Guided meditation with Kristine Flones. $45/$40. Mirabai Books, Woodstock. 679-2100. MORE AT MEETUP.COM/BEAHIVE BEACON / 291 Main St SOLOPRENEURS SOUNDING BOARD July 5, 6:30PM BEAHIVE BARKS Beacon Dog Park Fundraiser July 9, 8–11PM KINGSTON / 314 Wall St CHRONOGRAM OPEN WORD Michael Platsky + Ron Whiteurs July 2, 7PM HV DSLR MEETUP July 13, 7PM OPEN HIVE / FILM July 28, 7PM CIVIC KINGSTON NY Forum for Engagement July 14, 6–9PM Classes Tango New Paltz Beginners 6pm, intermediate 7pm, practica 8pm. $15/$50 4-part series. The Living Seed Yoga & Holistic Center, New Paltz. 256-0114. Sunday July 30 July 31 Sponsored by Putting it Together 8pm. River Valley Rep. $35/$30 students and seniors/$27 groups. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. RENT THE HIVE FOR YOUR OWN EVENT • BEAHIVEBZZZ.COM bzzz@beahivebzzz.com Events Chatham Farmers Market 4pm-7pm. Chatham Real Food Market Co-op, Chatham. (518) 392-3353. Gardiner Greenmarket 4pm. Gardiner Library, Gardiner.. Music Gathering with Clark Strand 6:30pm-9pm. Weekly meeting & conversation on excess and green living in the Mind Body Spirit. $10. Sage Center for the Healing Arts, Woodstock. 679-5650. An Outsider Show Call for times. Wherehouse, Newburgh. 561-7240. Zumba Fitness Class 6:30pm-7:30pm. $7. Pine Hill Community Center, Pine Hill. 254-5469. Miranda Cosgrove 7pm. $86.50/$33.50/$28. Mid-Hudson Civic Center, Poughkeepsie. 454-5800. Events Die Liebe der Danae 7pm. Richard Strauss (1864-1949). $30/$60/$70/$90. Bard College, Annandale-on-Hudson. 758-7900. Ultimate Frisbee Casual Pickup Games 5:30pm. Ages 10 and up. Comeau Property, Woodstock. WoodstockUltimate.org. Taste the best of Connecticut’s wineries. Theater Piece of My Heart Call for times. Martel Musical workshops concert readings of works-in-progress. Powerhouse Theater, Poughkeepsie. 437-5599. Music Have a Grape Day Gregg Douglas Band Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. Film Steve Chizmadia 7:30pm. Acoustic. BeanRunner Cafe, Peekskill. (914) 737-1701. Open Hive/Film 7pm-10pm. Beahive, Beacon. 418-3731. Alexis P. Suter Band 8pm. Live @ The Falcon, Marlboro. Antique Fair and Flea Market August 6th & 7th - 2011 at the WASHINGTON COUNTY FAIRGROUNDS, Rt. 29, GREENWICH, NY (12 mi. East of Saratoga Springs, NY) $2 admission, (65+ $1, under-16 - FREE) Old-Fashioned Antique Show featuring 200+ dealers, free parking, great food, and real bathrooms. ($10 - Early Buyers Fridays before show) $85 - Dealer Spaces Still Available: FAIRGROUND SHOWS NY PO Box 3938, Albany NY 12203 fairgroundshows@aol.com Ph. 518-331-5004 7/11 ChronograM forecast 119 Exactly Not 8pm. Pamela's on The Hudson, Newburgh. 562-4505. 80th Annual Woodstock Library Fair 10am-5pm. Woodstock Library, Woodstock. 679-2213. The Broad Band 8pm. High Falls Cafe, High Falls. 687-2699. Bridgewater Nightclub Downtown 10am-4pm. $10. Bridgewater Bar and Grill, Kingston. 340-4272. KJ Denhert 8pm. Belleayre Jazz Club Urban Folk & Jazz. $26. Belleayre Mountain, Highmount. (800) 942-6904 ext. 344. Folk Duo Mike & Ruthy 8pm. $15/$12 members. Kleinert/James Arts Center, Woodstock. 679-2079. Fourth Annual Grape Jam Weekend 8:30pm. Four straight nights of over-the-top jam sessions. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. John Nameth Blues Band 8:30pm. Towne Crier Cafe, Pawling. 855-1300. Mountain Man 9pm. Folk. Club Helsinki Hudson, Hudson. (518) 828-4800. The Compact 9pm. Millbrook R&B, Millbrook. 224-8005. Spoken Word Joan Rivers 8pm. Mahaiwe Performing Arts Center, Great Barrington, Massachusetts. (413) 528-0100. Theater Godspell 8pm. $24/$22 children and seniors. Center for Performing Arts, Rhinebeck. 876-3080. Reading Festival 2 Call for times. The Public by Ed Hime, The Hour of Feeling by Mona Mansour, Matty's Place by Frank Pugliese, Marry Harry by Jennifer Robbins, Michael Biello & Dan Martin Sleeping Demon by John Patrick Shanley. Powerhouse Theater, Poughkeepsie. 437-5599. Missing 8pm. The true story of a father's disappearance. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. Erotics of Doubt 8:45pm. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. SATURDAY 30 JULY Art Gallery Talk 2pm. Tom Williams on Robert Smithson. Dia: Beacon, Beacon. 440-0100. Body / Mind / Spirit Zumba 10am. $10. Rosendale Recreation Center, Rosendale. jenniferlee1433@aol.com. Crystalline Convergence of Remembrance 11am-10pm. Connect with crystals & color healing vibrations, Lemurian information, sound meditation, Ancient Knowledge, Collective Intention creation & much more for our consciousness. Crystal Connection, Wurtsboro. 888-2547. Restorative Yoga 12pm-2pm. $20. Mudita Yoga Center, Kingston. 750-6605. Intensive Intuitive Connection 2pm-6pm. With Darlene Van de Grift. $45. Sage Center for the Healing Arts, Woodstock. 679-5650. Classes Zumba with Alicia 10am-11:30am. Cornell St. Studios, Kingston. 331-0191. Summer Grilling Essentials 11am. $65. Beacon. (917) 803-6857. Events Senior's Day. Kingston Farmers' Market, Uptown Kingston. 853-8512. Pine Island Black Dirt Farmers Market 10am-2pm. Pine Island Town Park, Pine Island.. Used and New Book Sale 10am-3pm. Rosendale Library, Rosendale. 658-9013. 120 forecast ChronograM 7/11 Events 9:30pm. Blues. Union Jack Pub, Poughkeepsie. 240-1968 Woodstock Farm Animal Sanctuary: A Day at the Farm Theater 11am-4pm. Learn more about the animals who have been given a second chance at life. $10/$5 children. Woodstock Farm Animal Sanctuary, Willow. 679-5955. Woodstock Farm Animal Sanctuary: A Day at the Farm 11am-4pm. Learn more about the animals who have been given a second chance at life. $10/$5 children. Woodstock Farm Animal Sanctuary, Willow. 679-5955. Godspell Friends of the Farmer Festival 11am-11pm. Copake Country Club, Copake Lake.. Disney's Aladdin by Kids on Stage Connecticut Wine Festival 1pm-7pm. 2-day festival. Locally produced specialty foods, live music, handicrafts, purchase wines and more. $25/$20 in advance/$10 DD. Goshen Fairgrounds, Goshen, Connecticut. ctwine.com. Annual Chicken Barbeque 5pm. $8-$12. Reformed Church of Shawangunk, Wallkill. 895-2952. Music Steve Black Call for times. Hyde Park Brewing Company, Hyde Park. 229-8277. The Head and The Heart Call for times. The Bearsville Theater, Woodstock. 679-4406. 8pm. $24/$22 children and seniors. Center for Performing Arts, Rhinebeck. 876-3080. 11am. $9/$7 children. Center for Performing Arts, Rhinebeck. 876-3080. Return of the Pi Clowns 3:30pm. Acrobatics, juggling, eccentric dance, live music and improvisation. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. The Erotics of Doubt 7pm. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. The Andrews Brothers 8pm. Shadowland Theater, Ellenville. 647-5511. Hudson Valley Young Artist Talent Search 12:30pm. $7/$5 17 and under. Towne Crier Cafe, Pawling. 855-1300. Connecticut Wine Festival 1pm-7pm. 2-day festival. Locally produced specialty foods, live music, handicrafts, purchase wines and more. $25/$20 in advance/$10 DD. Goshen Fairgrounds, Goshen, Connecticut. ctwine.com... Kids PHOTO: Deb Oshier Hellvar 8pm. $5. The Spotty Dog Books and Ale, Hudson. (518) 671-6006. Vixen Dogs Band Die Liebe der Danae Call for times. Richard Strauss (1864-1949). $30/$60/$70/$90. Bard College, Annandale-on-Hudson. 758-7900. Rosendale Street Festival Fourth Annual Grape Jam Weekend Seventy-four bands on six stages over two days, including The Big Heavy, Tiger Piss, The Rhodes, Dog on Fleas, Big Sister, Voodelic, and even the Kingston High School Jazz Ensemble. Plus the arts and crafts, food, and kiddie attractions you expect of a street fair. New this year is the addition of The Rosendale Theatre, where “The Hudson Valley Short Flix Fest” will show The Rosendale Theatre Collective’s locally produced short films. Free. July 23 and 24. Rosendale.. Call for times. Four straight nights of over-the-top jam sessions. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. Barbara Martin 1pm. Taste Budd's Chocolate and Coffee Cafe, Red Hook. 758-6500. Andrew Russo and Frederic Chiu 4pm. Piano duo. Maverick Concerts, Woodstock. 679-8217. The Young Lions Putting it Together Open Book Call for times. Wherehouse, Newburgh. 561-7240. 8pm. River Valley Rep. $35/$30 students and seniors/$27 groups. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. 7pm. Elly Wininger and Dave Kearney. The Colony Cafe, Woodstock. 679-5342. Missing 8pm. Live @ The Falcon, Marlboro. Young People's Concert 11am. Andrew Russo and Frederic Chiu, piano duo. Maverick Concerts, Woodstock. 679-8217. Keith Newman 2pm. Acoustic. Aroma Thyme Bistro, Ellenville. 647-3000. Teri Roiger & John Menegon 5pm-7pm. Jazz. Bread Alone Cafe, Rhinebeck. 876-3108. The Bernstein/Bard Trio 6pm-7:30pm. St. John's Episcopal Church, Kingston. 331-2252. Fourth Annual Grape Jam Weekend 7pm. Four straight nights of over-the-top jam sessions. 12 Grapes Music and Wine Bar, Peekskill. (914) 737-6624. JimmieJazz 7pm. Summer Sunset Concert Series sponsored by Millbrook Arts Group. Thorne Building, Millbrook.. Goo Goo Dolls 8pm. The true story of a father's disappearance. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. Workshops Golden Acrylics Workshop 10am-4pm. $95. Woodstock School of Art, Woodstock. 679-2388. The Real Food Factor 12:30pm-2pm. 7 keys to unlocking peace with food, your body and the stresses of life. Inner Light Health Spa, Hyde Park. 229-9998. SUNDAY 31 JULY Body / Mind / Spirit Crystal Pod: Healing the Healers Global Noize Spoken Word Opera Talk with Leon Botstein 1pm. Bard College, Annandale-on-Hudson. 758-7900. Words Words Words 3pm. Emily Barton, John Darnton and Nina Darnton. Maple Grove Restoration, Poughkeepsie. 471-9651. Theater Godspell 3pm. $24/$22 children and seniors. Center for Performing Arts, Rhinebeck. 876-3080. Putting it Together 2pm. River Valley Rep. $35/$30 students and seniors/$27 groups. Nelly Goletti Theatre, Poughkeepsie. 575-3000 ext. 7507. 7pm. With special guests Michelle Branch and Parachute. $20-$75. Bethel Woods Center for the Arts, Bethel. (866) 781-2922. 10am-6pm. Connect intimately to the “Crystal Pod” energy and crucial information. $125/$50 person in group. Crystal Connection, Wurtsboro. 888-2547. Global Noize CoSMic Yoga with Elizabeth Return of the Pi Clowns 8pm. Belleayre Jazz Club — Jazz, World Music& Electronica. $26. Belleayre Mountain, Highmount. (800) 942-6904 ext. 344. 11am-12:15pm. $12. Chapel of Sacred Mirrors, Wappingers Falls. 3:30pm. Acrobatics, juggling, eccentric dance, live music and improvisation. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. International Contemporary Ensemble Keith Newman 2pm-4pm. With June Brought. The recording of our soul imprint revealed . $20. Sage Center for the Healing Arts, Woodstock. 679-5650. 8pm. Acoustic. Aroma Thyme Bistro, Ellenville. 647-3000. Exploring the Buddhadharma Two Man Gentleman Band 4pm-5:30pm. Mudita Yoga Center, Kingston. 750-6605. 6pm. The fantastical and true story of my father's disappearance and what I found when I went looking for him. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. 8:30pm. $25. Fisher Center, Annandale-on-Hudson. 758-7900. The Woodstock Psychic Wisdom Meetup Eurydice 8pm. Walking the Dog Theater. $30/$25/$18 students. PS21, Chatham. (518) 392-6121. 8:30pm. Towne Crier Cafe, Pawling. 855-1300. 4:30pm-7pm. Give and receive psychic readings and energy healings. $20/$10 members. Sage Center for the Healing Arts, Woodstock. 679-5650. ZaZuZau Kirtan with Lee Harrington 9pm. High Falls Cafe, High Falls. 687-2699. 6:30pm-8pm. Mudita Yoga Center, Kingston. 750-6605. 8pm. The Daniel Arts Center, Great Barrington, Massachusetts. (413) 320-4175. 8pm. $20. Mount Tremper Arts, Mount Tremper. 688-9893. Marc Black Band Akashic Records Revealed The Andrews Brothers 2pm. Shadowland Theater, Ellenville. 647-5511. Missing The Erotics of Doubt theater hudson valley shakespeare festival image provided The cast of Hudson Valley Shakespeare Festival's "The Comedy of Errors" on the grounds of Boscobel in Garrison..” Yet after having directed works as varied as the Bard’s “Pericles,” “Cymbeline,” “The Tempest,” “Macbeth,” and “Titus Andronicus,” O’Brien finally felt equal to taking on the moody Dane. One impetus for his decision was meeting actor Matthew Amendt, who performed in last year’s HVSF production of “Troilus and Cressida.” O’Brien felt that this new member of his company had the stuff to overcome the built-in liabilities of the role of the brooding prince of Elsinore. “The part has a lot of pitfalls, not the least of which, it tends to make the player feel very egomaniacal,” the director says. “Consequently, productions tend to end up all centered not on the character but on the actor playing the character.” Yet Amendt showed no evidence of an expansive ego. O’Brien invited him to return this season, to face the slings and arrows of outrageous fortune.” is “The Comedy of Errors,” another chestnut previously mounted by HVSF. While this is a play “that people take for granted,” he says, “Comedy” evinces a complexity that belies the youthful age of its creator. This mad caper about twins and mistaken identity offers more than a tickle of the funny bone; O’Brien points out subplots concerning the gravitas of marriage, matters of gender identity, and observations about the shared biology of twins separated at birth. Rounding out the 2011 season is “Around the World in 80 Days,” based on the 1873 novel by Jules Verne. Its inclusion is a nod to both current fiscal realities and the shifting winds of American literacy. At a time when Shakespeare is not automatically taught in secondary school, the next generation of theatergoer is understandably skittish about the frilly verbiage of an Elizabethan playwright. Therefore, O’Brien has capitulated, albeit nobly, in order to “introduce people to us who would otherwise be afraid of Shakespeare, but we might eventually be able to bring them over to the Shakespeare side of the park.” Previous attempts at expanding the HVSF audience have included “The Complete Works of William Shakespeare (Abridged),” a frantic condensation of all 37 pieces for the theater, as well as “The Bomb-itty of Errors,” a hip-hop nod to the august farce. The Hudson Valley Shakespeare Festival once distinguished itself with youthful brashness, giving the master overtly post-modern readings. (The 2007 “Richard III” depicted the king as a bipolar despot.) But self-conscious iconoclasm is less of a priority for the festival’s next quarter-century, O’Brien says. “Increasingly, what I’ve been trying to do is get out of the way of the play and let the play do more of the work.” “Around the World in 80 Days,” “The Comedy of Errors,” and “Hamlet” will be performed in repertory at the Hudson Valley Shakespeare Festival, at Boscobel in Garrison through September 4. (845) 265-9575;. —Jay Blotcher 7/11 ChronograM FORECAST 121 by eric francis coppolino ERIC FRANCIS COPPOLINO Planet Waves Eclipse in Cancer, Chiron in Pisces F or the past couple of years we have been living under the influence of an alignment in the cardinal signs—Pluto arriving in Capricorn in 2008, followed by Saturn and Uranus making their way into Libra and Aries. These three powerhouses have been dancing around the early cardinal cross— right around where the Sun is when it changes seasons—stirring up all kinds of mischief and adventure. The cardinal cross consists of Aries, Cancer, Libra, and Capricorn. 122 planet waves ChronograM 7/11. There is an alternative, and that is about keeping your creative juices flowing and your mind alert; this takes discipline. And as my friend Abraham reminds me, it may be the only thing worthy of discipline. The July 1 eclipse is the third in a series of three eclipses—a partial solar happened first in Gemini on June 1, a total lunar in Sagittarius on June 15, and then the partial solar in Cancer on July 1. Eclipses are part of much longer cycles, and within each cluster or grouping of eclipses, each individual event is part of a different cycle (called a Saros cycle). What is interesting is that the June 1 event came toward the end of a very long Saros cycle; the June 15 one was the peak of a cycle and the July 1 eclipse is the very first in a brand-new cycle—the first eclipse of a brand-new sequence that will last for many centuries. To me, something like this is about opening up new emotional territory, never before visited. The eclipse takes place in Cancer and arrives in grand style as part of a grand cross. Yet the sign Cancer has some special meaning in terms of personal evolution, as it’s the sign of incarnation. It’s also the sign we associate with emotional grounding, family, and security. And as such an emotional sign, it would be the epicenter of the emotional healing process I’ve been describing for months now, though of course anything happening in Scorpio and Pisces would be part of that, too. And we do have this—Chiron and Neptune gathering in Pisces, plus several newly discovered but very compelling points in Scorpio. The presence of planets in the water signs, and an eclipse in one of the water signs, suggests that the emotional level is one to focus on right now, and Chiron in Pisces points to the theme of healing. Healing begins with awareness; that is the mark of Chiron. An eclipse in the sign Cancer points directly to the theme of family. I would say that the basic need for emotional healing is connected with unresolved family baggage, resentment caused by failures in relationships, social struggles including a sense of feeling like an outcast that is commonplace even among popular people, and the ongoing, sometimes subtle and sometimes overt agony of living amidst too many rules about sex. All of this points to toxic shame, a problem so pervasive we have barely begun to see it for what it is. It is difficult to see in an environment where we’re constantly shamed and where one of the most pervasive emotions is guilt. As with fear, when we encounter toxic shame, we tend to turn off our feelings so that we don’t have to experience them. This is basically the trap, and it’s everywhere—with every option we have to shut down, from drinking one of those things at Starbucks that somehow combines 25 grams of sugar with a huge dose of sodium, to indulging in endless “entertainment.” As time goes on, the pressure builds, and we see it release in destructive ways, such as people in Vancouver trashing their own city this week because their team lost the Stanley Cup. There is a lot of pent up energy. I think many people feel the psychological term “repression” is quaint, but pent up means repressed, and it’s not just all those drunk hockey fans that are experiencing the pain of this. Clearly, they were revolting against something. The subtle question is, in what ways do you feel held down, and in what ways do you rebel, or try to? Usually this kind of rebellion is not so artful; it is the destructive use of creative energy. One of the first things we do in an emotional healing phase is figure out how to put that same energy to good use. As Chiron and Neptune begin to make their way across Pisces, a transit that will last for nearly a decade, the emphasis shifts to our emotional lives. The July 1 eclipse in Cancer will influence us for the next six months to two years. So the route to healing would seem to be to enter our feelings rather than avoid them. That does not just mean negative feelings. I also mean the pleasures you want that you might deny yourself, be they emotional, aesthetic, or erotic. We tend to be pleasure-aversive in our culture; we want the clean, automated kind of highly controlled fun that does not cause us to change or take a chance. But we remain human, at least for now—we cannot live on autopilot, always looking for the safest route. Getting into your feelings doesn’t have to be a total immersion. Sometimes it’s better to approach one’s feelings from the edge, to lightly touch them and acknowledge what’s going on inside. Sometimes it works beautifully to go there with your imagination first. For many, the idea that comes with this will be something like; “I am not going to pretend anymore”—whatever that pretending may entail, and for others, it might be, “I’m going to be real about this right now,” whatever that being real might entail. Our current phase of eclipses is providing both psychological leverage to change our circumstances and restructure our lives, as well as an emotional vent for long-pent-up energy. It may seem inconvenient at times, but it’s really an opportunity. Cleanse your face with handcrafted, gentle cleansers. Your face will feel spectacular! Succulent & Oil Be Gone Foaming Face Washes 845-674-3715 No parabens, petroleum or carcinogenic chemicals are used. 7/11 ChronograM planet waves 123 Planet Waves Horoscopes Aries (March 20-April 19) How does it come to be that we get so overidentified or a situation. a) not that good at handling the stuff, and, “power” and “freedom” translate into being free from the games of others, financial and otherwise; they translate into the ability to trust your own resourcefulness, and most of all, the ability to feel what you feel without the fear of consequences. Cancer Magic Gifts that Inspire Has a New Home. We’ve moved around the corner, literally. Come and visit us at our new location: 44 Raymond Avenue Poughkeepsie, NY 845.473.2206 124 planet waves ChronograM 7/11 (June 21-July 22) The July 1 eclipse in your birth sign is. Planet Waves Horoscopes Leo (July 22-August. Virgo (August 23-September. Over 100 beers from 20 NYS breweries & all you can eat BBQ Libra (September 22-October perceives, which. Scorpio aug 6, 2011 2pm-8pm celebrating 5 years with limited, special release tastings! ticket info 845-876-3330 terrapinrestaurant.com/beerfest (October 23-November 22) Mars in Gemini may be making obvious certain splits in your opinion, desires, or intentions that have been lurking below the boards for some time. I suggest you not hold yourself as someone of “low integrity” because you have a divided opinion, or seeming inner conflict,. NOW IN TWO LOCATIONS! e t ’s g e t o u t g, l house toni r lin a ght... the d of Woodstock • 132 Tinker ST. 845-679-6608 Rhinebeck • 6415 MonTgoMery ST. 845-876-2515 Become a member today for discounted tickets and many other goodies! Visit to join and/or to sign up for our weekly email of what’s playing and showtimes. 7/11 ChronograM planet waves 125 Come see what’s brewing in Splendora’s Caldron This summer’s elixir includes techo, indie, dance, electro house and tech house. Saturday, July 16th 20 Mountain View Ave 5:30 - 10:30pm Woodstock, NY guest D.J.s Metazoa, David Electro Light and Slamboo guest VJ – DB • Decor by Jacque $5 Entrance Fee Don’t miss our Future Techo Party Aug. 13th • splendoratechno@yahoo.com Planet Waves Horoscopes Eric Francis Coppolino Sagittarius (November 22-December e-mail, which directly leads to an opportunity. Or the effect may be indirect: You’re feeling rested and like you’ve got a handle on your life, and this gives you a little more space to have ideas and engage people in conversations. One overarching message of your solar chart is enjoy what you have. Enjoy the health, the well-being, the opportunity to serve and create, that you have at this moment. Relax into this space and you will find it offers you lots of unexpected potential. Capricorn (December 22-January. Aquarius (January 20-February. Pisces (February “missing. 126 planet waves ChronograM 7/11 Susan DeStefano on ! are ook e W aceb F Got LocaL? We are a community-minded health food store that supports local farms, distributors, artisans, businesses... Hudson Valley selections include: produce, dairy, supplements, honey, baked goods, prepared goods, eggs, sauces, spices, artwork & more to come! 845.255.6482 18 Maple Lane Woodstock NY Liomag@gmail.com 917-412-5646 71 Main Street, New Paltz, NY 845-255-5858 Buddha, Darwin & da Vinci did it. So did Pink & Wrestler Killer Kowalski. Even President Clinton Aspects Inn & Day Spa A sensual retreat in the heart of Woodstock Consultations by Gail Petronio Internationally Renowned Psychic Over 20 years Experience Sessions In-Person or By Phone 845.626.4895 212.714.8125 gail@psychicallyspeaking.com did it. About 8 million Americans are doing it: Going Veggie. You can too. Contact the Mid- Hudson Vegetarian Society for info or 845-876-2626 Dennis Fox Salon Hair ∙ Nails 6400 Montgomery Street, 2nd floor above the Rhinebeck Dept. Store 845.876.1777 aroT on the hudson T with Rachel Pollack Internationally Renowned Certified Tarot Grand Master & Award Winning Novelist • Tarot Readings — Individual, or Parties • Tarot Classes and Workshops • Individual Tarot Mentoring • Mentoring and Editing in Creative Writing Telephone:845-876-5797 rachel@rachelpollack.com tues - Sat Free TickeTs! Subscribe to the 8-Day Week, Chronogram’s digital newsletter, for a chance to win free tickets each week. Recent giveaways have included: « Levon Helm and Arlo Guthrie at Brewery Ommegang « Hall and Oates at Bethel Woods « “F2M” at Powerhouse Theater « The Spampinato Brothers at Bearsville Theater 8 DAY W E E K Sign-up today for your chance to win. 7/11 ChronograM planet waves 127 Parting Shot Tom Holmes, Half Empty Heart, ice, pigment, water, burnt wood, light, 2011. July 9 through August 7, “Frozen in Frost,” an exhibition of sculptures and photographs of ice events by Tom Holmes will be shown at Beacon Artists Union. Holmes works seasonally, tracking the weather. “Ice follows the freezing mark of winter, stone and steel the exterior work space of summer,” says Holmes. “Spring begins the search for materials and fall settles all debts, emotional, physical, and intellectual.”. Portfolio:. 128 ChronograM 7/11 Getting breast cancer wasnâ&#x20AC;&#x2122;t your choice. But deciding where you go to treat it is. The diagnosis can be scary and confusing. But you can take control of your situation and get the best treatment for your cancer by choosing the coordinated, customized care at the Health Quest Breast Center. Our renowned Director of Breast Surgery, Dr. Angela Keleher, was just selected by her peers as the Top Doctor in the Hudson Valley*. At the Breast Center, Dr. Keleher leads a dedicated team of trained specialists whose goal is using the latest treatment technologies to deliver the best care possible for your specific situation. But it doesnâ&#x20AC;&#x2122;t stop there. Everything we do, from genetic and nutritional counseling to radiation oncology and rehabilitative therapies, is delivered with a caring, human touch. Ask your doctor, call (845) 483-6500 or visit for more information. *Castle Connolly Medical Ltd. HQAR1030_BreastSurgery_Ad_Chrono_FINAL.indd 1 6/9/11 2:52 PM
https://issuu.com/chronogram/docs/chronogram_0711?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Flight%2Flayout.xml&showFlipBtn=true&autoFlip=true&autoFlipTime=6000
CC-MAIN-2022-33
refinedweb
68,299
65.62
No Pylab Thanks TL;DR, Please stop advising people to use the pylab flag when using IPython. It is harmful. If you want to help IPython, try to avoid retweeting, and promoting things that use the pylab flag and make the authors aware of the issues. Use explicit import, and %matplotlib inline magic. It is better (and supports switching between inline/not inline.) This was mainly prompted by a day where I came across consecutive issues due to the pylab flag, and people happy to discover it. When IPython 1.0 was released almost 6 months ago, we had quite a few decisions to make in less than a week and loads of discussions at the last moment. One of those decisions comes and goes often: we want to get rid of this stupid pylab flag. If you look at our stable (1.0) dev doc and examples there shouldn't be a mention of the pylab flag anywhere. If there is, we will quickly remove it. Why? Because it is harmful, first to us, then to new users, to the Python community, and finally to research in general. Do you know about pylab? If you don't, please be extra careful and try to avoid it as much as possible. It is like smoking: it looks cool at first, then after a few years you realise you can live without it, but it makes you sick. You think you know what pylab does? Really? Take few seconds to think what the pylab flag is doing, then read the rest. The pylab package main purpose was to build a transition tool from other languages to Python. As it was more and more common and painful to do the same import in IPython every time when only the IPython shell was around, the --pylab flag was added. Basically, it did the following: import numpy import matplotlib from matplotlib import pylab, mlab, pyplot np = numpy plt = pyplot from IPython.core.pylabtools import figsize, getfigs from pylab import * from numpy import * Did you get it right the first time without cheating ? Are you able to say what has been imported in from pylab import * ? in from numpy import * ? Of course, that is not the only thing it does. But was it your intention to do that the last time you used pylab? Once you activate pylab mode, there is no going back. You cannot unimport things. Of course, with the %pylab magic you can always restart your kernel, but with the flag, all your kernels will start in pylab mode. Are you sure you will not need a non-pylab kernel? When using the pylab flag, your audience usually has no way of knowing that you used the flag. If I use plot(range(10)), what will happen? Will it pop up a figure ? Inline it? Or throw an error? plot(range(10)) Because I'm mean, I won't execute the cell, so that you don't know whether or not I'm running in pylab mode or not. You might think it's not a big deal, but in teaching and research it is important to communicate exactly what you are doing. len(get_ipython().user_ns.keys()) 20 %pylab Using matplotlib backend: Agg Populating the interactive namespace from numpy and matplotlib IPython 2.0-dev gives some warning, and will tell you wether it clobbers already non-built-in variables in the user namespace. len(get_ipython().user_ns.keys()) 968 Can you really tell me the 948 additional things you now have in your namespace? Not a big deal? Really? sum,all (<function numpy.core.fromnumeric.sum>, <function numpy.core.fromnumeric.all>) Both used to be <function sum>,<function all> before using pylab, and this changes the behavior of your programs! For example, it leads to non-pickable object in some cases: @treycausey on Twitter @ogrisel @myusuf3 Ah, very curious. It loads fine in IPython but not in an IPython notebook. I must have a namespace collision or something. Me: Let me guess: $ipython notebook --pylab? But $ipythonalone? IPython developed and added the rich display protocol, so we added from IPython.display import display to what import pylab does. Because matplotlib can work with different event loops, pylab added options to activate qt/gtk/osx/etc. event loops, and with the QtConsole and Notebook creation, the ability to select the inline backend, which registers display hooks. The main things users remember, and often the main message that you can read here and there is that: You need to use Pylab to get inline figures. Which is false. Inline pylab mode is a convenient method to activate inline, and set up a display hook with matplotlib. You do not need pylab to have inline images, nor do you need matplotlib. With 1.0 and above the recommended way to set up inline figures would be to use %matplotlib. The worst part is it has the side effect of making people use pylab without even knowing it. Later on, they start asking question about how to reuse a graph in matplotlib because no one ever encounters the following code any more: fig,ax = subplots(1,1) ax.plot(...) or why their script suddenly does not work in plain Python but works in IPython. Maybe not kittens, but it will force developers to explain the same things, again, and again, and again... from IPython.display import YouTubeVideo YouTubeVideo('9VDvgL58h_Y',start=4*60+27) Of course, we will not remove the --pylab flag for compatibility reasons, but please, for 2014, make the following resolutions: - Use %matplotlib [inline|qt|osx|gtx]to select the right backend/event hook. - Use explicit imports - Make people aware of the issues - Help by making no new articles/tutorials that mention --pylab If really you only have 10 seconds left, the %pylab magic is fine. As usual, this has been written in an IPython Notebook. You can send me pull request if I made mistakes, or if you have any additional remarks on why you shouldn't use --pylab.
https://matthiasbussonnier.com/posts/10-No-PyLab-Thanks.html
CC-MAIN-2019-09
refinedweb
1,006
73.37
or Join Now! I added this to my ‘Projects’ now that it is complete. Here is the Arduino code, just in case someone wants to attempt this project: #include <time> #define TIMEMSGLEN 11 // time sync to PC is HEADER followed by unix timet as ten ascii digits #define TIMEHEADER ‘T’ // Header tag for serial time sync message #define TIMEREQUEST 7 // ASCII bell character requests a time sync message byte digitValues10; byte clockPin = 8;byte latchPin = 9;byte dataPin = 10;float i=000000; //T1315258400 void setup(){ digitValues0 = 126; //01111110 digitValues1 = 12; //00001100 digitValues2 = 182;//218;//182; //10110110 digitValues3 = 158; //10011110 digitValues4 = 204; //11001100 digitValues5 = 218; //11011010 digitValues6 = 250; //11111010 digitValues7 = 14; //00001110 digitValues8 = 254; //11111110 digitValues9 = 206; //11001110 pinMode(clockPin, OUTPUT);pinMode(latchPin, OUTPUT);pinMode(dataPin, OUTPUT); Serial.begin(9600); setSyncProvider( requestSync); //set function to call when sync requiredSerial.println(“Waiting for sync message); setTime(1315241400); digitalWrite(latchPin, LOW);); digitalWrite(latchPin, HIGH); }void loop(){ if(Serial.available() ) { processSyncMessage(); } if(timeStatus()!= timeNotSet) { digitalClockDisplay(); } delay(1000);} void digitalClockDisplay(){ int hours = hour();int minutes = minute();int seconds = second(); //Convert to 12 hour formatif(hours>12) hours = hours-12; int hoursHigh = (hours/10);int hoursLow = (hours - (hoursHigh 10));int minutesHigh = (minutes/10);int minutesLow = (minutes - (minutesHigh 10));int secondsHigh = (seconds/10);int secondsLow = (seconds - (secondsHigh 10)); if(hoursHigh>0) shiftOut(dataPin, clockPin, MSBFIRST, digitValues[hoursHigh]);else shiftOut(dataPin, clockPin, MSBFIRST, 0);shiftOut(dataPin, clockPin, MSBFIRST, digitValues[hoursLow]);shiftOut(dataPin, clockPin, MSBFIRST, digitValues[minutesHigh]);shiftOut(dataPin, clockPin, MSBFIRST, digitValues[minutesLow]);shiftOut(dataPin, clockPin, MSBFIRST, digitValues[secondsHigh]);shiftOut(dataPin, clockPin, MSBFIRST, digitValues[secondsLow]); Serial.print(hoursHigh);Serial.print(hoursLow);Serial.print(Serial.print(minutesHigh);Serial.print(minutesLow);Serial.print(”:”);Serial.print(secondsHigh);Serial.print(secondsLow);Serial.println(); } void processSyncMessage() { // if time sync available from serial port, update time and return true while(Serial.available() >= TIMEMSGLEN ){ // time message consists of a header and ten ascii digits char c = Serial.read() ; Serial.print©; if( c == TIMEHEADER ) { timet pctime = 0; for(int i=0; i < TIMEMSGLEN -1; i++){ c = Serial.read(); if( c >= ‘0’ && c <= ‘9’){ pctime = (10 pctime) + (c – ‘0’) ; // convert digits to a number } } setTime(pctime); // Sync Arduino clock to the time received on the serial port } }} timet requestSync(){ Serial.print(TIMEREQUEST,BYTE); return 0; // the time will be sent later in response to serial mesg} -- Wes, Garland, TX Wes Grimes home | projects | blog 38 posts in 1381 days By subscribing to the RSS feed you will be notified when new entries are posted on this blog. CaptainSkully 1232 posts in 2496 days #1 posted 10-03-2011 04:48 AM Thank you very much from us non-programmer types. I’ve been wanting to play with an Arduino for a while. -- You can't control the wind, but you can trim your sails rassel30 6 posts in 1553 days #2 posted 10-04-2011 08:26 PM If you need someone to draw up the schematic I would be glad to see what I can do. I have AutoCAD Electrical for work and I design control systems. So I would be able to get something drawn up for ya. Let me know. PurpLev 8477 posts in 2586 days #3 posted 10-04-2011 08:33 PM very cool project -- ㊍ When in doubt - There is no doubt - Go the safer route. #4 posted 10-05-2011 04:39 AM Thanks all. Rassel30, That would probably help for others that come after that want to build one. I used six 74hc595 chips and six uln2003a chips. A bad attempt at a schematic is on a previous post. Each LED is wired to a 220ohm resistor, and all the LEDs are wired to the 5v out of the Arduino. I made it to sit on my desk, so I did not bother adding setting buttons, and instead wrote a simple C# app that sends it the computer’s time periodically. A nice addition would be switches for setting the time, and code to handle the user input in the Arduino. I will probably revisit this later. #5 posted 10-05-2011 06:18 PM I tried to trace the lines from your schematic but it is so small it’s hard to do. If you could sent me a bigger image of it I’m sure I could draw something up. Especially since I might try something like this. #6 posted 10-06-2011 04:39 AM LJ shrunk the image when I uploaded it. Try this instead: lew 10433 posts in 2693 days #7 posted 10-07-2011 03:00 AM Cool Clock!! --
http://lumberjocks.com/WesGrimes/blog/25736
CC-MAIN-2015-27
refinedweb
754
51.28
Write a script to identify similarity from two string. Davide Santangelo Jun 15 Implement a similarity method that compares two strings and returns a number representing the percent similarity between the two strings. The method must be able to calculate the minimum number of operations you must do to change 1 string into another. In other words the the Levenshtein distance is the model. def similarity(string1, string2) # ... return similarity_percentage end Did you find this post useful? Show some love! dev.to is where software developers stay in the loop and avoid career stagnation. Signing up (for free!) is the first step. Classic DEV Post from Apr 26 Every developers 'oh my god I get it' moment. Discussing every developers 'oh my god I get it' moment. Rust solution for similarity of strings. It uses iterative approach with dynamic programming fashion. It creates a matrix of values and the bottom last cell has the number of changes needed to make the 2 strings similar. I used the explanation from Wikipedia here. The dynamic part work by first starting with prefix of both strings (Single characters at first) and them working it's way onwards to the complete string. It checks the similarity and computer the distance between the sub-strings, by checking if insertion, deletion, or substitution help to make the sub-strings similar. The last computer value will be the value of the differences of both the strings. If the name of the algo was not given in the challenge, I would have gone with LCS (due to familiarity with the algo) and it would be good enough, as it works on the same principle but does not take substitutions into account. I loved working on this, and it introduced me to a new algo; but please add some examples (test cases). A little more explanation using the examples would help a lot. The question just feels like try and implement this algo. Some test cases I used: Are the strings of the same length? Or how do you define similarity? Are we supposed to come up with our own model? Thanks Oskar for suggestion. I just updated the description of the challenge. Yeah, I still find the challenge too under-defined. This is interesting. I tried for a little while to come up with my own solution, but, unfortunately, when I was researching the problem, I came across an algorithm for Levenshtein Distance. I couldn't think of any solution that I liked better than the one that I found. So I thought I'd share it in case anybody else is interested. Here's a link to the original write-up I found. Essentially, from what I can tell, you create a 2-dimensional matrix. As you build the matrix, moving from top-left to bottom-right, you're weighing the cumulative cost of: The bottom right corner of the matrix ends up holding the minimum number of changes you need to make to make the two strings match. If anybody can explain the reasoning behind it to me better, I would love to hear about it!
https://dev.to/daviducolo/write-a-string-to-identify-similarity-from-two-string-286n
CC-MAIN-2018-47
refinedweb
520
66.03
Framing the problem In our last post we had to manually create two instances of our Liquid component on separate DOM nodes (you can check out the code here). With a small number of components this is okay, but what if we had to spin up a hundred components that had different props being passed to each of them? Iterating & rendering new components This is actually a very common occurrence in React, and the way you solve it is by creating a parent component that iterates and instantiates components from an array. For example, lets create a “LiquidsList” component that accepts an array of objects. Then, we’ll iterate through each of those objects and will pass them to a <Liquid /> component: var LiquidsList = React.createClass({ render: function() { var liquids = this.props.liquids.map(function(liquidObject, index){ return <Liquid config={ liquidObject } key={ index } />; }) return ( <div> { liquids } </div> ); } }); To make this work, we’ll remove all of our old ReactDOM initializations and replace it with this instead: // Create object to hold water's name, freezing & boiling points var water = { name: "Water", freezing: 32, boiling: 212 }; // Create object to hold ethanol's name, freezing & boiling points var ethanol = { name: "Ethanol", freezing: -173.2, boiling: 173.1 }; // Render our LiquidsList component! ReactDOM.render(<LiquidsList liquids={ [ethanol, water] } />, document.getElementById('container')); As you’ll see from the working code, we get the same exact result as before — except now it’s trivial to add new liquids! Simply add a new object to the array being passed through the ‘liquids’ attribute and it will instantiate a brand new component. The big idea here is that React components can include and instantiate other components, whether it be done statically or programmatically like we did here.
https://thinkster.io/tutorials/programmatically-rendering-child-components
CC-MAIN-2019-13
refinedweb
289
50.36
Making Good Time with by John H. Farr When the boss first offered a me chance to review SoftPress Systems' Freeway 1.0 web design software, I hesitated; I knew that the application was designed to appeal to desktop publishing pros already familiar with things like QuarkXPress and PageMaker, which I decidely was not. My own experience as a self-taught HTML-slinger had accustomed me to spend many hours tinkering with source code and enjoying every minute of it, kind of like adjusting the carburetors on a virtual vintage racer ("she's runnin' a little rough, better prop up the hood and take a look at the tags"). Nevertheless, I did accept the assignment, and while it's true that if you like to lay out pages, you're going to love Freeway, it's also true that this application can take you places you've never been before, especially if you're an spontaneous, creative person forced into the slow lane by HTML. Freeway is aptly named, because it doesn't limp along hobbled by an ersatz word processor engine. It doesn't edit HTML directly, and you can't tinker with the code while you're working. Instead, using an interface familiar to users of DTP applications (so I'm told), Freeway creates a "document" for you to work with. You then select a page size, and place text, graphics, and multimedia content inside moveable, resizeable"GIF boxes" and "HTML text boxes" that you draw on the page with the tools provided (you can even make your own wildly-shaped boxes, as in the example below). After you've added all your links and gotten your web pages the way you want them, Freeway lives up to its name by sending all the contents into a destination folder, where everything arrives as individual HTML files, accompanied by all the GIF, JPEG, and web-ready multimedia files you've added to your pages. What you end up with is a web site folder ready to upload to your server, all gassed up and ready to roll. Those are the dynamics. The real power in this application, however, is the way it handles graphic elements. If you draw a small square box, for example, and import a large image (automatically processed by Freeway into a GIF or JPEG), you get a cropped view with the box acting like a clear window onto the image. You can then reach in and slide the image around to get a different view, or you can shrink the image to fit the box. You can make the box bigger than the image, in which case if you resize the image to fit the box, you can get a nifty pixelated abstraction. All these tricks work with animated GIFs, too, of course. Just imagine: you can effectively crop out any part of an animation, grow it or shrink it, select it and move it all over the page. To watch it run, though, you have to select a browser from a Preview menu. And now the fun begins: you can overlap as many of these resulting images as you want! What Freeway does is export a pile of GIFs or JPEGs, mixed or otherwise, as a single GIF or JPEG, based on the format of the rearmost image. And it's very entertaining to move all those images around on the page like you were arranging photos on the kitchen table. Since the end results of all this are HTML files, hypertext fiends can make use of Freeway to produce the source code for a complicated layout and then paste it anywhere they choose--after performing a few tricks to wrench the HTML out of the designated "Publish" folder! You can also overlap animated GIFs, which Freeway will export as one big animation (see below), running at the same speed as the rearmost GIF. You can quickly create a copy of one of the animations, set the frame intervals with GIFBuilder, and hide it behind the others to act as a governor. Reshape, distort, and overlap several animations and you'll get all sorts of unpredictable combinations. For those of you who have a folder full of animated GIFs to play with, this can be a real hoot, as someone used to say. The example below is a 252 x 90 pixel animated GIF constructed in Freeway: I started with the large center animation, then drew custom GIF boxes and imported the same animation into each. Some items were sized to fit their boxes, some left normal size, and then all nine animations were overlapped in different ways, creating what Freeway calls an "image group," in this case an animated one. To enter text on the page, Freeway gives you the option of using an HTML text box, which results in normal browser-rendered print, or typing directly into a GIF box, with full formatting and editing capabilies. You can then move, resize, and transform the results in countless different ways. If you're graphically oriented, the ability to instantly move objects around, overlap them, change background colors, resize, reshape, and modify virtually everything, usually with just a mouse-click or two, will keep you up past your bedtime. And yes, you can do some of these things with other applications, but with Freeway you end up with web pages. Freeway makes it easy to build a series of successive pages and keep track of everything, too. And it has the horsepower to do amazing things: if you decide on a whim to overlap fields of HTML text (yes, you can do that), it instantly constructs the Mother of All Tables to arrange the text in various ways. The only real working drawback from a web designer's point of view is a certain awkwardness previewing pages in the browser of your choice, which you must have on your hard disk (and as for tinkering with the source code, you'd be better off going back to Freeway to move things around; anything else will land you in a wilderness of multiple table cells and clear GIFs). The way this software does the oddest and most complicated things so quickly, it sometimes makes me think it was designed by an alien intelligence of some sort. Quite the marvel. Our trip down the road was handled by a Power Macintosh 8600/200 with 96 MB of RAM, running OS 8.0; to get onto Freeway you need at least a 68040 or PowerPC Macintosh (5 or 9 MB free RAM required) or Mac OS-compatible computer with System 7.5.1 or later. The application will take up a minimum of 20 MB on your hard disk and set you back $299 for a full-price single user license. It offers a fast way to build integrated, fully-functioning, graphically-complex web sites, and for that, noting the minor HTML-related limitations, it gets a solid recommendation from this reviewer. PROS: Encourages experimentation with magical graphics capability and easy page construction; makes seamless, integrated web sites; DTP interface is familiar to many. CONS: Creates complex, hard-to-edit HTML tables; does not support frames or dynamic HTML; installs GXGraphics extension that may cause conflicts. CONCLUSION: A powerful application with few faults that lets you quickly assemble an attractive web site. Well worth investigating if you are graphically-oriented and unfamiliar with HTML. .
http://www.applelinks.com/reviews/freewayreview.shtml
crawl-002
refinedweb
1,237
54.05
pickle - C++ access to the Perl interpreter #include <pickle.hh> using namespace Pickle; Interpreter::vivify (); eval_string ("use Cwd;"); Scalar cwd = call_function ("cwd"); cout << "cwd is " << string (cwd) << endl; eval_string ("use File::Glob ':glob';"); List args = List () << "~/*.doc" << call_function ("GLOB_TILDE"); Arrayref files = call_function ("glob", args, LIST); for (size_t i = 0; i < files.size(); i++) cout << string(files[i]) << endl; Scalar doit (Scalar& n) { return double (n) * double (n); } define_sub ("main", "square", doit); cout << int (eval_string ("square(42)")) << endl; try { call_some_perl() } catch (Exception* e) { cerr << e->what(); delete e; } throw new Exception ("Your fault"); Pickle is a C++ library that allows programs to embed and interact with the Perl interpreter more conveniently than by directly using Perl's native C support. Pickle allows programs and Perl modules written in C++ to evaluate Perl code, create and examine Perl data structures, and make functions callable from Perl. It is well suited for large applications prototyped in Perl and transitioned piece by piece to C++, since it allows one to move the boundary between implementation languages quickly. It achieves this by exposing a minimally sufficient API to express the Perl language's semantics, independently of Perl's implementation. The simplicity of this approach greatly reduces the likelihood of bugs in ``glue'' code between the two languages. The rest of this document assumes knowledge of Perl and C++. Unless otherwise specified, the functions and data types here are declared in <pickle.hh> in namespace Pickle and defined in -lpickle. To use them in a C++ program, you must link with the Perl interpreter, -lperlint. Pickle uses class Scalar to hold Perl scalar values: class Scalar; The default Scalar constructor creates an undef value. You can initialize scalars with any C++ integral or floating point type, as well as types bool, string and C string ( char *). Scalar s0; // undef Scalar s1 (0); // integer Scalar s2 (3.14); // float Scalar s3 ("hello"); // string Class Scalar defines conversion operators for the same C++ types, so you can use Scalar objects where these types are expected: Scalar s; int i (s); string str (s); x = r * cos(s); As in Perl, scalars are automatically reference-counted, so memory management is not much of an issue, unless you create cyclic structures as described in "Two-Phased Garbage Collection" in perlobj. Scalar variables can hold array and hash references. Pickle defines subclasses of Scalar named Arrayref and Hashref for these two reference types. Their default constructors produce empty containers, the same as the Perl expressions [] and {}: Arrayref a; // 0-element anonymous array Hashref h; // empty hash table Arrayref and Hashref can also be constructed from scalars. By default, these constructors perform type verification, throwing an exception if the Perl reference data type does not match the C++ class. This check can be overridden by passing false as a second argument to the constructor. Arrayref a; Scalar some_func(); a = some_func(); // okay if an arrayref was returned. a = Scalar (5); // runtime error - not an array reference. Scalar x ("hello"); a = Arrayref (x, false); // may lead to a crash! The Arrayref and Hashref classes both define methods fetch and store for retrieving and inserting elements. Additionally, Arrayref overloads the [] operator, so you can use C++ array syntax to fetch arrayref elements. However, unlike fetch, [] extends the array if the given index is past the end. Arrayref a; a .push (17); // a[0] == 17 a[1] = a[5]; // a now has 6 elements! a .store (10, a .fetch (20)); // a.size() == 11 Arrayref's push method pushes a scalar onto the end of the array. size returns the array length. Hashref h; h .store ("array", a); a = h .fetch ("other"); Iteration over a hash currently is not supported. In Perl, every function takes a list of scalar arguments and returns a list of scalar results. In scalar context, the return list is forced to contain exactly one item, while in void context the result list is discarded. Pickle's call_function lets you call functions in any context - list, scalar, or void - by specifying either SCALAR, LIST, or VOID as its final argument. Because C++ does not have Perl's notion of context, call_function always returns a Scalar. By convention, list context returns an Arrayref object whose array elements are the result list. Void context returns undef. Perl subs can be called with any number of arguments. (Not if they are prototyped, but Pickle does not honor Perl prototypes.) Passing variable-length argument lists in C++ is awkward, so Pickle defines a class, List, for holding argument lists. A List object is very much like an arrayref. In fact, it contains an Arrayref and conversion operators for types Arrayref & and const Arrayref &. Lists and arrayrefs are defined as different types to make certain overloaded functions work and to emphasize their different uses. Perl also distinguishes between lists and arrays, though they are both just sequences of scalars. The default list constructor creates an empty list. The << (left bitshift) operator is overloaded for the List type similarly to the standard ostream class; it takes a scalar on the right, appends it to the list, and returns the list. It allows one to build lists using chains like this: List l; l << Scalar(3) << Scalar("caballeros"); Taking advantage of C++'s conversion and overloading rules, you could rewrite this as: List l = List () << 3 << "caballeros"; call_function requires as its first argument a Scalar, which can be the name of a function or a code reference. Then comes an optional List argument containing the function args. If no list is given, the sub is called without arguments. The calling context may be specified as the final argument. If present, it must be either SCALAR, LIST, or VOID. The default context is scalar. As an example, this code calls the function Carp::confess with argument "I'm sorry": call_function ("Carp::confess", List () << "I'm sorry"); call_function works only with user-defined subs, not Perl's builtin operators such as print. If a Scalar variable holds a package name or blessed reference, you can call methods on it using the C++ call_method method. Like call_function, it takes an optional List of the arguments and an optional context specifier. For example, this code calls the Perl method fetchrow_array on the object sth with no arguments in list context: Arrayref result = sth .call_method ("fetchrow_array", LIST); In addition to calling existing functions, Pickle allows you to evaluate strings of Perl code using the eval_string function: Scalar result = eval_string ("$x + 4 * $z"); eval_string supports only scalar context. Pickle supports creating Perl subs that call C++ functions (called extension subs or XSubs). Your C++ function may have any of three supported prototypes. The first form requires exactly one scalar argument and returns a scalar. Scalar one_arg_xsub (Scalar& arg); The following form takes an object followed by a list of name/value pairs, which Pickle loads into a hash. It is designed for methods that support the $obj->meth (name => value, ...) calling convention. Scalar arg_hash_xsub (Scalar& arg, Hashref& args); The third form is the most general. It takes a list of arguments and a context specifier and returns a list of results. List arg_list_xsub (List& args, Context context); Here context will be either LIST, SCALAR, or VOID. To make a function callable from Perl, use the define_sub function. define_sub takes as arguments a package name, a sub name, and a pointer to the XSub. This example creates a sub named doit in package main, calls it with 17 as the argument, and displays the result as an integer: static Scalar my_func (Scalar& x) { return int (x) * int (x); } // ...elsewhere... define_sub ("main", "doit", my_func); cout << int (eval_string ("main::doit (17)")) << endl; See "C++ in a Perl Program" for a more detailed example. When Perl code under the control of C++ ``dies,'' Pickle throws an exception of type Exception *. The error message can be obtained by calling its what method. The exception must be freed with delete. Example: try { eval_string ("$x = 0; 4 / $x"); } catch (Exception* e) { cerr << "Perl error: " << e->what () << endl; delete e; } XSubs created with Pickle can construct an Exception object with a Scalar argument and throw a pointer to it. Pickle deletes the object. Perl can trap such exceptions using eval. Example: Scalar my_xsub (Scalar& s) { if (double (s) < 0) throw new Exception (string ("'") .append (s) .append ("' is a negative number")); return sqrt (double (s)); } There are two ways to link Perl and C++ code together. Either a Perl program loads a module implemented in C++, or a C++ program embeds the Perl interpreter. Here, ``interpreter'' means something akin to ``virtual machine'' in Java parlance. The interpreter is the C++ object that implements the environment in which Perl programs are run. To use Pickle in a C++ program, you must link with -lpickle -lperlint. You may use the functions described in perlembed to initialize the interpreter, or you may use Pickle's simpler interface. Just allocate an object of class Interpreter, like this: Interpreter* interp = new Interpreter; There is a constructor that accepts command line arguments and an optional environment pointer like the C++ function main. This can be used to pass flags to Perl. For example, this turns on taint checks and warnings: char* argv[] = { "perl", "-Tw", "-e0" }; interp = new Interpreter (sizeof argv / sizeof argv[0], argv); Note that -e0 prevents the interpreter from trying to read a script from the standard input. The default Perl configuration will not tolerate more than one interpreter at a time in the same process. Most Pickle functions act implicitly on the ``current'' interpreter, so the Interpreter object is generally not used. You can cause Perl to shut down and free its memory by deallocating it, as in: delete interp; This will cause problems with any Perl data held in subsequently destroyed C++ objects, because the destructor will try to interact with the nonexistent interpreter. You can check to see if an interpreter has been initialized in the current process using Interpreter::ping(). If this function returns true, Perl objects may be created and manipulated. This is useful in code intended to run under either Perl or C++. As a convenience, Interpreter::vivify() is defined to construct and return a new interpreter unless one already exists, like this: Interpreter* Interpreter::vivify () { return Interpreter::ping () ? 0 : new Interpreter; } perlxs and ExtUtils::MakeMaker describe Perl's officially supported way to link C and C++ code into a Perl module. Pickle is implemented using the interface described in perlapi, but does not currently support interoperation with that interface. (It would be nice if it did, but if you know Perl's API, you are qualified to hack on Pickle and get around this limitation.) However, with the combination of define_sub and XS's BOOT keyword, the Perl API often isn't needed. Here is an example XS file that defines a sub named Foo::squarit. Indentation is used for readability, but must be removed. // Foo.xs #include <pickle.hh> using namespace Pickle; static Scalar squarit (Scalar& it) { return double(it) * double(it); } static void init () { define_sub ("Foo", "squarit", squarit); } // Always include these three here. #include <EXTERN.h> #include <perl.h> #include <XSUB.h> // Change Foo to your module's name MODULE = Foo PACKAGE = Foo BOOT: init(); Here is a Makefile.PL to build the module: # Makefile.PL # Usage: perl Makefile.PL && make use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'Foo', 'VERSION' => '0.0', 'XSOPT' => '-C++', 'CC' => 'g++', 'LD' => 'g++', 'LIBS' => '-lpickle', 'dynamic_lib' => { 'OTHERLDFLAGS' => '-Wl,-R,$(PREFIX)/lib -L$(PREFIX)/lib', }, ); And you'll need Foo.pm to load it: # Foo.pm # Usage: perl -Mblib -MFoo -le "print Foo::squarit(253)" package Foo; use XSLoader; XSLoader::load ('Foo'); 1; Refer to perlmod, ExtUtils::MakeMaker, and perlmodinstall for general information about writing and installing If included in the official Perl distribution by Larry Wall or his agent (``Pumpking''), it may be distributed under the same terms as the official Perl distribution. For other licensing arrangements, contact the author. XSLoader, perlmod, ExtUtils::MakeMaker, perlembed, perlxs
http://search.cpan.org/dist/pickle/pickle.pod
CC-MAIN-2015-14
refinedweb
1,989
63.19
Gathering Runtime Statistics¶ Problems can come up in production. When they do, you usually want forensics that show aspects of the system under load, over a period of time. Of course, you don't want the collection of such data to affect performance. What's needed is a mechanism to log data all the time, in a lightweight way, that can later be analyzed in productive ways. This system needs both built-in hooks at the Substance D framework level as well as extension points to analyze function points in the application you are writing. Three components are involved in the process of collecting statistics: substanced.statsexposes Python API to collect data and sends it to to a StatsD <> agent - The StatsD agent aggregates data and sends it to backend service - A backend service displays graphs based on stored data. The service can be self-hosted such as Graphite or it can be a SaaS solution such as DataDog. Setting Up¶ To enable statistics gathering in your site, edit your .ini configuration file and add the following lines to your [app:main] section: substanced.statsd.enabled = true substanced.statsd.host = localhost substanced.statsd.port = 8125 substanced.statsd.prefix = substanced Using DataDog with SubstanceD statistics¶ Substance D supports DataDog, a Software-as-a-Service (SaaS) provider for monitoring and visualizing performance data. DataDog installs an dogstatsd agent for sending custom metrics on your local system. The agent is based on StatsD. Using DataDog is an an easy way to get started with Substance D statistics. Sign up for an account with DataDog. This will provide you with the instructions for downloading and running the local agent. You'll need to get the agent installed before proceeding. Once you've got the agent installed, and the proper settings in your Substance D ini file, you will be able to see statistics in the DataDog user interface. Once you log into your DataDog dashboard, click on Infrastructure and you'll see any hosts configured as part of your account: The substanced entry in Apps table column is from the substanced.statsd.prefix configured in Settings up section. Clicking on that brings up Substance D specific monitoring in DataDog: Clicking settings symbol on a graph will lead you to graph editor, where you can change how DataDog interprets and renders your graphs. A good resource how the editor works is Graphing Primer. DataDog also supports Metric Alerts allowing you to send alerts when your statistics reach certain state. Logging Custom Statistics¶ Over time, Substance D itself will include more framework points where statistics are collected. Most likely, though, you'll want some statistics that are very meaningful to your application's specific functionality. If you look at the docs for the Python statsd module you will see three main types: - Counters for simply incrementing a value, - Timers for logging elapsed time in a code block, and - Gauges for tracking a constant at a particular point in time Each of these map to methods in substanced.stats.StatsdHelper. This class is available as an instance available via import: from substanced.stats import statsd_gauge Your application code can then make calls to these stats-gathering methods. For example, substanced.principal.User does the following to note that check password was used: statsd_gauge('check_password', 1) Here is an example in substanced.catalog.Catalog.index_resource() that measures elapsed indexing time inside a Python with block: with statsd_timer('catalog.index_resource'): if oid is None: oid = oid_from_resource(resource) for index in self.values(): index.index_resource(resource, oid=oid, action_mode=action_mode) self.objectids.insert(oid)
http://docs.pylonsproject.org/projects/substanced/en/latest/statistics.html
CC-MAIN-2016-50
refinedweb
594
55.95
21 January 2010 22:37 [Source: ICIS news] HOUSTON (ICIS news)--Air Products has signed an agreement with Chevron Australia to supply its liquefied natural gas (LNG) process technology and equipment for three process trains at Chevron's Gorgon Project located offshore of Western Australia, the US industrial gases major said on Thursday. The three trains will have the capacity to produce 15m tons/year of LNG. Production is scheduled to begin in 2014. Financial terms were not revealed. The Gorgon Project is operated by the Australian subsidiary of Chevron (47%) in a joint venture including the Australian subsidiaries of Shell (25%) and ExxonMobil (25%). The Gorgon gas fields are ?xml:namespace>
http://www.icis.com/Articles/2010/01/21/9327955/air-products-signs-deal-with-chevron-for-australia-lng.html
CC-MAIN-2014-52
refinedweb
112
61.87
. Folgers... (Score:5, Funny) I like the conclusion... (Score:4, Funny) It is indeed surprising AND unsurprising. The video ends with the two guys discussing "what have we learned today". FTFV: Re:eye candy (Score:5, Funny) You'll buy KDE4?!?! I've got this pirate copy of KDE4.2... It's much cheaper than the original. Re:not surprising (Score:2, Funny) 9/10 people polled also couldn't tell the difference between rabbit shit and deer shit. And nine out of ten couldn't tell the difference between your statistics and bullshit. That said it is a useful comparison. Someone who is just walking in the woods probably cannot tell rabbit shit from deer shit. A tracker or someone dependent on hunting for food certainly will. Someone who just needs to run a browser and word processor probably can't tell Windows 7 from KDE. Someone who needs to configure and administrate systems for an organisation certainly will. Also 9/10 enjoys group rapes Re:eye candy (Score:5, Funny) That's a bug in your legal system. I heard you recently voted a new president who may submit a patch. Then again, your system is so broken you may want to consider a ground up re-write., Funny) Careful, sledgehammers need no passwords. Re:not surprising (Score:5, Funny) Re:not surprising (Score:5, Funny) Nah, the dead can't talk. You know anything about putting my honda back together? Re:not surprising (Score:4, Funny) Re:eye candy :not surprising (Score:5, Funny) that's because 9 out of 10 statistics are made up 73% of the time. Re:not surprising (Score:3, Funny) Re:not surprising (Score:5, Funny) This is why I have no problem with my GF running windows. If it breaks, I don't know what to do with it anyway, so it's not my problem. Re:not surprising (Score:5, Funny) Re:not surprising (Score) I consider myself fairly computer literate and I can't tell the difference between Windows Vista and Windows Vista. Re:not surprising (Score:5, Funny) Or it would be, if you had a girlfriend. Re:not surprising (Score:5, Funny) Bucking for some informative karma I've tracked down some visual aids for our comparison: Windows 7 [redbubble.net] KDE 4 [photobucket.com] Your welcome. Re:not surprising (Score:5, Funny) Re:not surprising (Score:5, Funny) Wait, are you saying that your wife does NOT live in her own little world AND effectively communicates her wants/needs? I'm not sure you appreciate the full magnitude of your discovery, sir. Please.. go on. Re:not surprising (Score:5, Funny) Or it would be, if you had a girlfriend. #include <stdyourmom> Re:Thats it just show the eye candy. (Score:2, Funny) It's actually worse than static. It's grabbing some chunk of uninitialized video memory. Only it's being displayed (normally) at a different height/width ratio, so it looks like junk. Those images are still sitting in the video memory pool. So when I've popped up dialogs, what occasionally shows up are flashes of images that I've been viewing. This is a Seriously Bad Thing when you've been looking at NSFW graphics. I'm not kidding, either - it's happened to me a number of times. Re:not surprising (Score:1, Funny) Re:not surprising (Score:1, Funny) #include <stdyourmom> STD? no thanks Re:Welcome to Niggerbuntu (Score:3, Funny) I Sir, will have you know I'm a civilized primate and only fling poo at others during football season. Re:not surprising (Score:4, Funny) "I am not married" negates your comment. Try that when you are married :)
http://tech.slashdot.org/story/09/02/06/0912213/is-it-windows-7-or-kde-4/funny-comments
CC-MAIN-2013-20
refinedweb
620
66.74
Without LINQ, we would have to go through the values one-by-one and then find the required details. However, using LINQ we can directly query collections and filter the required values without using any looping. LINQ provides powerful filtering, ordering, and grouping capabilities that requires minimum coding. For example, if we want to find out the types stored in an assembly and then filter the required details, we can use LINQ to query the assembly details using System.Reflection classes. The System.Reflection namespace contains types that retrieve information about assemblies, modules, members, parameters, and other entities as collections are managed code, by examining their metadata. Also, files under a directory are a collection of objects that can be queried using LINQ. We shall see some of the examples for querying some collections. Array of Integers The following example shows an integer array that contains a set of integers. We can apply the LINQ queries on the array to fetch the required values. int[] integers = { 1, 6, 2, 27, 10, 33, 12, 8, 14, 5 }; IEnumerable<int> twoDigits = from numbers in integers where numbers >= 10 select numbers; Console.WriteLine("Integers > 10:"); foreach (var number in twoDigits) { Console.WriteLine(number); } The integers variable contains an array of integers with different values. The variable twoDigits, which is of type IEnumerable, holds the query. To get the actual result, the query has to be executed. The actual query execution happens when the query variable is iterated through the foreach loop by calling GetEnumerator() to enumerate the result. Any variable of type IEnumerable<T>, can be enumerated using the foreach construct. Types that support IEnumerable<T> or a derived interface such as the generic IQueryable<T>, are called queryable types. All collections such as list, dictionary and other classes are queryable. There are some non-generic IEnumerable collections like ArrayList that can also be queried using LINQ. For that, we have to explicitly declare the type of the range variable to the specific type of the objects in the collection, as it is explained in the examples later in this article. The twoDigits variable will hold the query to fetch the values that are greater than or equal to 10. This is used for fetching the numbers one-by-one from the array. The foreach loop will execute the query and then loop through the values retrieved from the integer array, and write it to the console. This is an easy way of getting the required values from the collection. If we want only the first four values from a collection, we can apply the Take() query operator on the collection object. Following is an example which takes the first four integers from the collection. The four integers in the resultant collection are displayed using the foreach method. IEnumerable<int> firstFourNumbers = integers.Take(4); Console.WriteLine("First 4 numbers:"); foreach (var num in firstFourNumbers) { Console.WriteLine(num); } The opposite of Take() operator is Skip() operator, which is used to skip the number of items in the collection and retrieve the rest. The following example skips the first four items in the list and retrieves the remaining. IEnumerable<int> skipFirstFourNumbers = integers.Skip(4); Console.WriteLine("Skip first 4 numbers:"); foreach (var num in skipFirstFourNumbers) { Console.WriteLine(num); } This example shows the way to take or skip the specified number of items from the collection. So what if we want to skip or take the items until we find a match in the list? We have operators to get this. They are TakeWhile() and SkipWhile(). For example, the following code shows how to get the list of numbers from the integers collection until 50 is found. TakeWhile() uses an expression to include the elements in the collection as long as the condition is true and it ignores the other elements in the list. This expression represents the condition to test the elements in the collection for the match. int[] integers = { 1, 9, 5, 3, 7, 2, 11, 23, 50, 41, 6, 8 }; IEnmerable<int> takeWhileNumber = integers.TakeWhile(num => num.CompareTo(50) != 0); Console.WriteLine("Take while number equals 50"); foreach (int num in takeWhileNumber) { Console.WriteLine(num.ToString()); } Similarly, we can skip the items in the collection using SkipWhile(). It uses an expression to bypass the elements in the collection as long as the condition is true. This expression is used to evaluate the condition for each element in the list. The output of the expression is boolean. If the expression returns false, the remaining elements in the collections are returned and the expression will not be executed for the other elements. The first occurrence of the return value as false will stop the expression for the other elements and returns the remaining elements. These operators will provide better results if used against ordered lists as the expression is ignored for the other elements once the first match is found. IEnumerable<int> skipWhileNumber = integers.SkipWhile(num => num.CompareTo(50) != 0); Console.WriteLine("Skip while number equals 50"); foreach (int num in skipWhileNumber) { Console.WriteLine(num.ToString()); } Collection of Objects In this section we will see how we can query a custom built objects collection. Let us take the Icecream object, and build the collection, then we can query the collection. This Icecream class in the following code contains different properties such as Name, Ingredients, TotalFat, and Cholesterol. public class Icecream { public string Name { get; set; } public string Ingredients { get; set; } public string TotalFat { get; set; } public string Cholesterol { get; set; } public string TotalCarbohydrates { get; set; } public string Protein { get; set; } public double Price { get; set; } } Now build the Icecreams list collection using the class defined perviously. List<Icecream> icecreamsList = new List<Icecream> { new Icecream {Name="Chocolate Fudge Icecream", Ingredients="cream, milk, mono and diglycerides...", Cholesterol="50mg", Protein="4g", TotalCarbohydrates="35g", TotalFat="20g", Price=10.5 }, new Icecream {Name="Vanilla Icecream", Ingredients="vanilla extract, guar gum, cream...", Cholesterol="65mg", Protein="4g", TotalCarbohydrates="26g", TotalFat="16g", Price=9.80 }, new Icecream {Name="Banana Split Icecream", Ingredients="Banana, guar gum, cream...", Cholesterol="58mg", Protein="6g", TotalCarbohydrates="24g", TotalFat="13g", Price=7.5 } }; We have icecreamsList collection which contains three objects with values of the Icecream type. Now let us say we have to retrieve all the ice-creams that cost less. We can use a looping method, where we have to look at the price value of each object in the list one-by-one and then retrieve the objects that have less value for the Price property. Using LINQ, we can avoid looping through all the objects and its properties to find the required ones. We can use LINQ queries to find this out easily. Following is a query that fetches the ice-creams with low prices from the collection. The query uses the where condition, to do this. This is similar to relational database queries. The query gets executed when the variable of type IEnumerable is enumerated when referred to in the foreach loop. List<Icecream> Icecreams = CreateIcecreamsList(); IEnumerable<Icecream> IcecreamsWithLessPrice = from ice in Icecreams where ice.Price < 10 select ice; Console.WriteLine("Ice Creams with price less than 10:"); foreach (Icecream ice in IcecreamsWithLessPrice) { Console.WriteLine("{0} is {1}", ice.Name, ice.Price); } As we used List<Icecream> objects, we can also use ArrayList to hold the objects, and a LINQ query can be used to retrieve the specific objects from the collection according to our need. For example, following is the code to add the same Icecreams objects to the ArrayList, as we did in the previous example. ArrayList arrListIcecreams = new ArrayList(); arrListIcecreams.Add( new Icecream {Name="Chocolate Fudge Icecream", Ingredients="cream, milk, mono and diglycerides...", Cholesterol="50mg", Protein="4g", TotalCarbohydrates="35g", TotalFat="20g", Price=10.5 }); arrListIcecreams.Add( new Icecream {Name="Vanilla Icecream", Ingredients="vanilla extract, guar gum, cream...", Cholesterol="65mg", Protein="4g", TotalCarbohydrates="26g", TotalFat="16g", Price=9.80 }); arrListIcecreams.Add( new Icecream {Name="Banana Split Icecream", Ingredients="Banana, guar gum, cream...", Cholesterol="58mg", Protein="6g", TotalCarbohydrates="24g", TotalFat="13g", Price=7.5 }); Following is the query to fetch low priced ice-creams from the list. var queryIcecreanList = from Icecream icecream in arrListIcecreams where icecream.Price < 10 select icecream; Use the foreach loop, shown as follows, to display the price of the objects retrieved using the above query. foreach (Icecream ice in queryIcecreanList) Console.WriteLine("Icecream Price : " + ice.Price); Reading from Strings We all know that a string is a collection of characters. It means that we can directly query a string value. Now let us take a string value and try to find out the number of upper case letters in the string. For example, assign a string value to the variable aString as shown below. string aString = "Satheesh Kumar"; Now let us build a query to read the string and find out the number of characters that are in upper case. The query should be of type IEnumerable. IEnumerable<char> query = from ch in aString where Char.IsUpper(ch) select ch; The query uses the Char.IsUpper method in the where clause to find out the upper case letters from the string. The following code displays the number of characters that are in upper case: Console.WriteLine("Count = {0}", count); Reading from Text Files A file could be called a collection, irrespective of the data contained in it. Let us create a text file that contains a collection of strings. To get the values from the text file, we can use LINQ queries. Create a text file that contains names of different ice-creams. We can use the StreamReader object to read each line from the text file. Create a List object, which is of type string, to hold the values read from the text file. Once we get the values loaded into the strings List, we can easily query the list using LINQ queries as we do with normal collection objects. The following sample code reads the text file, and loads the ice-cream names to the string list: List<string> IcecreamNames = new List<string>(); using( StreamReader sReader = new StreamReader(@"C:Icecreams.txt")) { string str; str = sReader.ReadLine(); while (str != null) { IcecreamNames.Add(str); } } The following sample code reads the list of strings and retrieves the name of ice-creams in descending order: IEnumerable<string> icecreamQuery = from name in IcecreamNames orderby name descending select name; We can verify the result of the query by displaying the names using the following code: foreach (string nam in icecreamQuery) { Console.WriteLine(nam); } The following code displays the names and verifies the result of the query: foreach (string nam in icecreamQuery) { Console.WriteLine(nam); } Similar to collections used in above examples, the .NET reflection class library can be used to read metadata of the .NET assembly and create the types, type members, parameters, and other properties as collections. These collections support the IEnumerable interface, which helps us to query using LINQ. LINQ has lot of standard query operators which can be used for querying different objects that support IEnumerable interface. We can use all standard query operators, listed in the following table, against objects. Summary In this article, we saw some examples to query different objects using LINQ operators. We can use LINQ queries on any object that supports IEnumerable. By using LINQ, we can avoid using looping methods to loop through the collections and fetch the required details. LINQ provides powerful filtering, ordering, and grouping methods. This will reduce our coding as well as the development time.
https://www.packtpub.com/books/content/linq-objects
CC-MAIN-2017-39
refinedweb
1,905
56.66
kylomas 411 Posted January 21, 2015 I am trying to call StrCmpLogicalW which compares strings in what some people call "natural sort order". This means that the numeric portion of a string is compared seperately from the alpha portion. This is useful for sorting filename lists. However, I am not getting the results that I expect. This is the MS doc for StrCmpLogicalW. This function wants pointers to null terminated unicode strings for input. The following code is my attempt at that but is returning invalid comparisons. #include <array.au3> local $SHLWapi = dllopen('shlwapi.dll'), $rslt, $aFL = ['File50','File10','File12','File38','File00100','File001'] for $1 = 0 to ubound($aFL) - 2 $rslt = LC($aFL[$1],$aFL[$1+1]) ConsoleWrite(stringformat('%-15s %3s %-15s', _ $aFL[$1], _ $rslt, _ $aFL[$1+1]) _ & @CRLF & @CRLF) next dllclose($SHLWapi) func LC($str1, $str2) local $tagLC = DllStructCreate('char S1[1024];char S2[1024]') dllstructsetdata($tagLC,'S1',$str1) dllstructsetdata($tagLC,'S2',$str2) ConsoleWrite($tagLC.S1 & ' is being compared to ' & $tagLC.S2 & @CRLF) Local $Ret = DllCall($SHLWapi, 'int', 'StrCmpLogicalW', 'ptr', DllStructGetPtr($tagLC,'S1'), 'ptr', DllStructGetPtr($tagLC,'S2')) return (@error) ? msgbox(0,'ERROR','Error returned from DLLCall = ' & $Ret) : $Ret[0] endfunc I am suspicious of the way I am setting up the structure and pointing to each element in the function call. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Share this post Link to post Share on other sites
https://www.autoitscript.com/forum/topic/166944-natural-sort-order-strcmplogicalw-call-help/
CC-MAIN-2018-43
refinedweb
254
58.89
In this article, I will walk you through a series of best practices in Java code profiling, using NetBeans 6.0. The approach is to show a realistic session of profiler-driven code optimization, using the NetBeans Profiler as the core tool. Hunting for a real-world example Too many articles, including most of my own production, are limited by sample projects that must “fit”. But using real-world code adds a whole new dimension of meaning – and readers don’t need to trust the author when he concludes that techniques shown through a contrived example will be effective in real applications. So I picked a real project: iText, a popular open-source Java library for PDF generation and manipulation. Many developers will be familiar with it or use it indirectly (for example, iText is a dependency of many Java report generators and other tools that output PDF). Also, the work performed by iText is both complex and CPU-bound, so it’s a good profiling test bed. My principle here is to use profiling techniques to learn something interesting about a complex project. And if we’re lucky, find performance problems and investigate their solution, with the help of these techniques and in particular of the NetBeans Profiler. Moreover, I selected a project that I knew only as a user, but whose source code I’ve never read before and an internal architecture I’m not familiar with. Thus I’ll not be in advantage over the reader, and we can learn together. The right tool for the right job The NetBeans Profiler is not the ideal tool for every optimization-related task. This is not due to any limitations, but because profilers are best for fine-grained or low-level performance investigation. Imagine a Java EE reporting application that’s not scaling well. The bottleneck could be some inefficient algorithm, but it can also be due to bad application server tuning, inefficient SQL queries, excessive use of remote calls, and many other factors. At this stage of the investigation, you’ll often prefer different tools. For example, GlassFish offers detailed monitoring capabilities, and most database servers provide tools to spot heavy queries. A profiling tool can still help here though; the NetBeans Profiler integrates well with application servers. But in my experience this integration is more suited to profiling sections of Java EE code that are hard to test outside the container. Once you’ve narrowed the bottleneck to a specific subsystem, at the very least to your own application code or, hopefully, something more specific like “the front-end report generation code”, then it’s the time to start using a code profiler. Identifying a problem – and benchmarking it If you plan to follow this article’s step by step, you need to first set up your environment as explained in the box “Installation and setup”. In the project, open the class examples/com.lowagie.examples.objects.tables.AddBigTable. This is one of iText’s standard samples and was selected because it’s complex enough to be interesting for our purposes. Indeed, this sample creates a ~120Kb, 26-page PDF file filled with a very big table. Not your average HelloWorld sample! Installation and setup You can follow the steps in this article with any release of NetBeans 6.0 that supports Java development. The Profiler is a built-in feature. Start by creating a project using New Project>Java>Java Class Library. Then visit iText’s download page at SourceForge (sf.net/project/showfiles.php?group_id=15255) and from the iText group get the itext-src-2.0.6.tar.gz file (or the equivalent zip). Unpack it and copy the top-level com directory into your NetBeans project’s src folder. At this point some classes will report compilation errors due to missing dependencies. To solve that, in the same download page go to the extrajars group and download the files bcmail-jdk14-137.jar and bcprov-jdk14-137.jar. Add those to the project’s libraries, and NetBeans should compile the whole project without errors. Now we just need to add the sample code. Again in the download page, go to the tutorial group and get the file tutorial.tar.gz. Unpack it and copy the folder examples to the NetBeans project root. In the project’s Properties (Sources/Source Package Folders), click Add Folder and select the examples folder. After the rebuild, you’ll notice that four packages contain compilation errors; these are examples that use other dependencies, like JFreeChart or the Servlet API. We’re not going to use this part, so you can just delete the four packages, and we’re ready to go. A good profiling session should be like any good scientific experiment. You must isolate the code you want to test from other code, and also avoid interference from environment “noise”. This sample is already well isolated. It does nothing beyond creating the PDF file; also there’s no alien code involved: no database access, no middleware. There is a potential source of environment noise, however: file I/O. The sample program writes the document to a PDF file, but this I/O operation is not relevant to what we are measuring. A larger application that uses iText would probably compose the PDF to a memory stream and serve it to some GUI, perhaps store it in a cache; but most likely it wouldn’t write it to a disk file. The first step towards our profiling goal, then, is to get rid of the file I/O. This is easy to accomplish. I changed the AddBigTable class, replacing “new FileOutputStream(…)” with “new ByteArray OutputStream(…)”. Notice that the memory stream is big enough to hold the entire finished PDF content, so there won’t be reallocations of this buffer to spoil benchmarking precision. Check out the resulting code in Listing 1 (with changed parts in bold); Figure 1 shows the project loaded in NetBeans. public static void main (String[] args) { //step1 Document document = new Document(PageSize.A4.rotate(), 10, 10, 10, 10); try { //step2 PdfWriter writer = PdfWriter.getInstance( document, new ByteArrayOutputStream(120000)); // step3 document.open(); //step4 //... omitted for space: build the document } catch (Exception de) { de.printStackTrace(); } // step5 document.close();} Figure 1. The iText project in NetBeans Benchmarking Profiling and benchmarking are of course related disciplines, so before continuing it’s interesting to go through an exercise in benchmarking*1. The basic requirement is avoiding the “Two Deadly Sins of Java Benchmarking”: dead code and short runs. Dead code happens when a benchmark is so simple that smart optimizers notice some code is computing data which is never used – so they just eliminate that code and execution times drop to the floor. This is not the case with our current code, however. Even though I don’t use the produced ByteArrayOutputStream for any purpose, I know that the path from iText’s core through multiple layers of I/O objects (like its PdfWriter), and into the byte array stream, is very complex – complex enough that the optimizer in the JVM won’t kill it. However, the program is still guilty of short run: short programs will run mostly in interpreted mode, so the measured results will be meaningless. From the command line, I measured 1.890 seconds with HotSpot Client 6.0u3 on a Pentium-IV 2,4GHz, which is not too bad. Ideally though, total execution time would be in the range of tens of seconds to a few minutes, to allow for JVM warm-up (initialization, classloading and dynamic optimization). This is easy to fix: just add a loop that repeats the test several times. I renamed the original main() method to test(), and added a new main() that takes the repeat number from the arguments. See the new method in Listing 2. public static void main (String[] args) { int times = Integer.parseInt(args[0]); for (int i = 0; i < times; ++i) { long t = System.currentTimeMillis(); new AddBigTable().test(); t = System.currentTimeMillis() - t; System.out.println(t); } } To set up and run this benchmark, go to the project’s Properties>Run>Main Class, click Browse and select our AddBigTable class. In the same page make Arguments=10. Confirm changes and run the project. I did that for a few recent Java virtual machines; Table 1 shows the results. For CPU-bound work, the increasing sophistication of JVM technology continues to extract more and more from the same hardware. In this particular test, HotSpot Server 6.0*2 saves 20% of your CPU, compared to release 1.4.2 of the same JVM, or 10% when compared to 5.0 Runtime Performance HotSpot Client 1.4.2u16 843ms HotSpot Server 1.4.2u16 703ms HotSpot Client 5.0u13 750ms HotSpot Server 5.0u13 625ms HotSpot Client 6.0u3 672ms HotSpot Server 6.0u3 562ms Table 1. iText’s benchmark on Sun JVMs from 1.4.2 up to 6.0; results are best of 10 cycles of each test Profiling CPU usage We’re a couple pages into the article and yet no use of the NetBeans Profiler. This is an important best practice though: planning before profiling. Now we are at the point where powerful tools should really help (and not just entertain us with beautiful data visualizations). Booting the Profiler is easy. Just run Profile>Profile Main Project and sit comfortably while watching the results come in… That, however, is not a very productive approach. I’ve spent too much time doing exactly this and waiting for the right moment to click “Reset data”, “Take snapshot” or similar buttons in several profilers. What we really need is data from an “area of interest”, and to have it discretized per iteration of the test, not accumulated for multiple iterations (the first iterations often have meaningless “cold start” performance). That’s why my top new profiling feature in NetBeans 6.0 is Profiling Points. In AddBigTable.java, go to the test() method’s first line, right click it and choose Profiling>Insert Profiling Point. Select the Reset Results type, accept the defaults for other options and finish the wizard. Then go to the last line of the same method, and create a Take Snapshot profiling point. Figure 2 shows the first page of the Profiling Point creation wizard Figure 2. Creating a Profiling Point Having created the two profiling points, we’ll collect a snapshot of each run of the test() method. Since the AddBigTable program loops, invoking this method several times, the Reset Results profiling point is important to avoid accumulation of an execution’s performance data with that for the previous one. There are other very useful types, like Stopwatch (which prints the execution time of a code section) and Timed Take Snapshot (for taking a snapshot at a fixed time after reaching the profiling point). Now start the profiler with Profile>Profile Main Project. Select CPU and make sure the Entire Application and Use defined Profiling Points options are checked; also set the Filter option to Profile only project classes (see Figure 3). Figure 3. Starting the profiler With these settings we instruct the Profiler to observe code execution performance only for classes from our project. As profiling has a significant probe effect (it slows down the observed program), the Profiler allows you to minimize this through several filtering options. The Advanced settings dialog also lets you fine-tune profiling precision. For this experiment, however, the default settings will do, and you can click Run to start the profiling session. The result of this session should be similar to Figure 4, with ten new snapshots collected. Just look at the last snapshot, which is already “good” (fully optimized execution). You can inspect the results in the Call Tree page (top-down view), in the Hot Spots page (bottom-up view), or in the Combined page, which is split between these two views. Figure 4. The NetBeans Profiler, focusing on method execution time The ByteBuffer.formatDouble() method’s “hot spot” can be easily identified. Apparently, this method alone takes ~20% of all the running time of the test, which is surely too long for a single method in a project as complex as iText. So, like vultures over rotting meat, let’s dive into the code, hoping to find something that can be optimized. Double click the formatDouble() method in the Call Tree page to show its source code (see Listing 3). This method’s purpose is no rocket science: it just formats a double value into a String, with up to six digits of decimal precision. But the code is huge. If a static flag, HIGH_PRECISION, is set to true, the method just relies on Java SE’s DecimalFormat class. But if HIGH_PRECISION==false (the default), there follows a slab of code that’s guaranteed to violate every size and complexity limit enforced by code validation tools. public static String formatDouble (double d, ByteBuffer buf) { if (HIGH_PRECISION) { // “Straight” formatting code DecimalFormat dn = new DecimalFormat(“0.######”, dfs); return dn.format(d); } // else... 200 lines(!) with custom formatting code. } Now, the obvious – and ironic – fact is that we’ve landed in code that was obviously optimized before. This is after all a mature project. What happens, one may ask, if HIGH_PRECISION is set to true? Not a pretty outcome. With HotSpot Server 6.0u3, the best individual running time goes from 562ms to 1,610ms! As in the original code, formatDouble() takes 20% of the total time, that means 112ms out of the total 562ms. With HIGH_PRECISION==true, as no other code is affected by this flag (I checked this), formatDouble() is consuming 72% of the total time. There’s a 1,030% slowdown for a single method, and a 186% slowdown for the whole test. The usual suspect It’s not surprising to find that DecimalFormat is a bottleneck. It’s a well-known fact that java.text’s formatters are broken performance-wise. DecimalFormat objects are very expensive to create since their constructors compile the format strings into an optimized representation that makes each parsing/formatting operation very fast. This is only good, though, if you can reuse each formatter for a large number of operations; but these objects are not thread-safe, so reuse opportunities are limited. The result is that any multithreaded application – even those with container-managed threads like Java EE apps – are forced to continuously recreate formatters, what can be very expensive. The best is enemy of the good Voltaire was hardly thinking about computer programming when he wrote this famous quote, but it serves us well. In the context of code optimization, almost any code can be enhanced a little further – but once any sufficiently complex code is “good enough”, the additional optimization effort increases exponentially as you slowly approach the ideal of perfect, fastest-possible code. The developer who noticed that SimpleDateFormat was chewing an insane amount of cycles may have jumped too early to the “perfect” solution: an extremely optimized, customized code that performs the required formatting as efficiently as physically possible in Java*3. But is this really necessary? Aren’t there alternative solutions which wouldn’t lead to a method that’s so massive and hard to maintain? Analyzing iText’s ByteBuffer class*4, you can see that it’s not thread-safe, because of several mutable fields and no synchronization. This is the common design of most buffer-esque objects: they are not often shared, and if they are, they’re better synchronized in upper layers. But this means that the optimization shown in Listing 4 is valid. Here I created a shared DecimalFormat object, limiting the sharing to multiple invocations on the same ByteBuffer instance. As the buffers are never shared, the thread-safety limitation of DecimalFormat is meaningless. I performed the tests again with HIGH_PRECISION==true. The result was 1,047ms; much better than the original result with this option set, but still a significant slowdown (86% worse) over the score for HIGH_PRECISION==false. public class ByteBuffer extends OutputStream { ... private static final DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.US); private DecimalFormat dnCached = new DecimalFormat(“0.######”, dfs); ... public static String formatDouble(double d, ByteBuffer buf){ if (HIGH_PRECISION) { if (buf == null) { DecimalFormat dn = new DecimalFormat(“0.######”, dfs); return dn.format(d); } else { buf.append(buf.dnCached.format(d)); return null; } } ... } This formatDouble() method is tricky: though static, it can be invoked with a ByteBuffer argument – an “optional this”. If a buffer is received, the formatted value is appended to the buffer; otherwise (i.e. null is passed), the formatted value is returned. So a good hypothesis is that I didn’t obtain all the speedup I wished for, because there are many invocations with buf==null, and I couldn’t optimize this case to reuse the formatter. Back to the Profiler Profilers are not only good for finding bottlenecks and performance bugs. They are also great for validating and refining your findings in an iterative and interactive process that should lead to the desired code enhancement. In the same Call Tree page shown in Figure 4, right click the formatDouble() method and choose Show Back Traces. Now you have a new tab labeled “Back traces for: formatDouble”, showing all code paths that end in that method (see Figure 5). You’ll see two branches. The top one shows traces where the immediate caller of formatDouble() is the append(double) instance method, which passes this to its parameter buf. In the bottom branch, the caller is a static method formatDouble(double), which passes null for this parameter. Figure 5. The Back Traces tab We could imagine that the second branch is guilty for the remaining slowness; but a quick look at the numbers proves this not to be true. Even though each invocation in the “slow path” is very expensive, there are very few such invocations – a total of 130, compared to 157,532 invocations in the “fast path”. The “Time [%]” column in the same tab confirms that virtually all execution time goes to the fast-path branch. This means that the remaining slowness is not caused by an excessive number of DecimalFormat instantiations. It comes from the execution of this object’s format() method, which is still slower than the highly customized code that ByteBuffer.formatDouble() has for the HIGH_PRECISION==false case. Correct? Perhaps. There is one potential flaw in this conclusion: we don’t know how many ByteBuffer objects are being created. Consequently we don’t know how many times our optimized instance field (DecimalFormat dnCached) is being created. It’s time for a different profiling strategy. Profiling memory allocation Start the Profiler again, now with Profile>Profile Main Project, Memory. Accept the defaults for all options and run a new profiling session. Now we have more interesting results: each test iteration allocates 9,440 instances of ByteBuffer and 9,571 instances of DecimalFormat (this is after optimization – remember that the shared formatting object is only used for one of two possible code paths into formatDouble()). The original unoptimized code would allocate 166,973 instances of DecimalFormat per iteration. I managed to cut 95% of these allocations (as well as the expensive constructions involved), so my instincts say there’s not much to be gained by cutting the remaining 5%. The remaining cost of the simpler formatting code should come from the execution of DecimalFormat.format(), not from the construction of DecimalFormat objects. That’s game over for our analysis of formatDouble(). The method is already very close to an optimum implementation if DecimalFormat is to be used. See the box “Next step for formatDouble()?” for additional findings that are a final part of the optimization of that method – but follow me here in the investigation of the NetBeans Profiler. Next step for formatDouble()? In the investigation of iText summed up in the body of the article, I was able to optimize ByteBuffer.formatDouble()’s “straight” formatting code significantly (using SimpleDateFormat). But not enough to compete with the performance of the existing optimized formatter. Profiling and optimization are hard, but even more difficult is making tradeoffs. Specifically, is the optimized code good enough to be preferable – if not by default, then at least in some circumstances – over the existing custom formatter? There’s no easy answer. The original straight code was clearly unacceptable. You’ll notice, if you read iText’s full ByteBuffer.java, that the HIGH_PRECISION flag has its value hardwired. The shipping iText binary is compiled with HIGH_PRECISION==false, and this option can only be changed by editing the source code and recompiling the library. Now, the optimized straight code makes my benchmark only 86% slower (instead of 186%) than the custom format code. This is still significantly slower, so certainly iText users would prefer to keep using the existing optimized formatter. Or not? Speed is not everything, and the name of the HIGH_PRECISION flag implies of course that when it’s set to false some loss of precision is expected. Indeed, the optimized formatter performs some approximations like this one (edited): if (Math.abs(d) < 0.000015) { return “0”; } This truncates many close-to-zero numbers, killing their sixth decimal position (plus roughly one bit of the fifth). There are additional approximations in the code. An experiment talks louder than any hypothesis, so I executed the program twice, first with HIGH_PRECISION set to false and then setting the flag to true – with both runs writing the PDF content to a file as the original code did. The default low-precision setting produced a document with 119,262 bytes, but the high-precision document was significantly bigger: 135,007 bytes. Then I instrumented the program to format each value with both algorithms and dump the results. To my surprise, I saw that the optimized algorithm used only two decimal digits of precision for all numbers! Here’s a typical output for this instrumented run: hi: 91.333344, lo: 91.33 hi: 18, lo: 18 hi: 1, lo: 1 hi: 333.818176, lo: 333.82 hi: 91.333344, lo: 91.33 hi: 18, lo: 18 hi: 1, lo: 1 hi: 333.818176, lo: 333.82 I discovered that my comparison is not fair. I’m comparing an algorithm that formats with six decimal digits of precision against one that goes only to two decimal places. I fixed this by simply changing the format string to “0.##”. Touché: the PDF was created with 119,262 bytes, identical to the optimized formatter (which is also a good validation of our new code if we consider DecimalFormat as the “canonical” formatter). As a result, the execution time went down to 984ms. This is still 75% worse than the optimized formatter, so it doesn’t change matters a lot… Unless the full precision is useful. If PDF files contain a large number of floating-point numbers, I’d expect additional precision to have an impact on the quality of the documents. I tried to measure this, but without success; the “high-precision” PDF looked identical to the “low-precision” one to my bare eyes (on 1280x1024 resolution and using Adobe Reader 8.1). Perhaps the problem is that the test document is too simple for us to detect the difference – it’s just a huge table with heading and borders, and loads of dummy alphanumerical data filling the cells. But a program that produces PDFs with complex, high-precision graphics – say, a CAD tool – may result in a perceivable advantage for the high-precision flag, especially when printing the PDF on a high-DPI printer or plotter. I will have to leave this conclusion to iText’s developers and advanced users. If we consider that the high-precision output could be useful in some scenarios, the enhanced formatter might be a good option even with a significant speed hit. In this case I’d leave HIGH_PRECISON==false as default, but provide some means of changing it. (It’s also possible that I picked a sample that depends on formatDouble()’s performance much more than usual.) The Memory Results view in Figure 6 shows the top allocations, which may be good enough for solving some performance diagnostics. Sometimes you’ll also need to consider the containment relationships between several classes: for example, most char[] objects are private fields of String or StringBuffer/StringBuilder objects, and all HashMap$Entry objects are used inside HashMap instances. So you can easily spot some common behaviors of iText; for example it creates a large number of Strings – which is not surprising since it’s a document-processing library. What seems less natural is that iText also allocates a good number of AbstractList$Itr objects. This doesn’t look like an unavoidable cost of the task being performed. Figure 6. Top allocated objects by heap usage We’ve found a place that deserves further inspection. We’ll need require additional profiling data: run a new memory profiling session, this time activating the option Record stack trace for allocation. Now, for each class listed in the Memory Results tab, the NetBeans Profiler enables a context menu item: Show Allocation Stack Traces. In Figure 7 you can see all code locations where iterators are allocated. Java’s iterators often cause performance problems, because they are heap-allocated objects. They create additional costs as well: their “fail-fast” behavior makes their implementation more complex, requiring additional indirections and polymorphic calls inside loops. That’s why, in performance critical code, I avoid iterators like the plague*5. Figure 7. Allocation stack traces for list iterators Most iterators identified in Figure 7 are being created gratuitously, in methods like Phrase.getChunks() and PdfLine.toString(). The static type of iterated collections is always ArrayList, and iterators are used just for walking the collections (there are no other operations, like remove()). This shows that iText is optimized to avoid using collection interfaces (like List), when such flexibility is not necessary. In this case, why use iterators? Using loops with get() and size() would be faster. A good excuse for iterators is dealing with collections whose static type is an interface, because you either don’t have access to more specialized access methods, or aren’t sure of their performance traits. In particular, iterating an arbitrary List with indexing is a potential disaster, because if the list happens to be a LinkedList, the random access methods are available but they’ll crawl, of course. Both of these top iterator-allocating methods could benefit from indexed access and other optimizations. See Listing 5. The toString() method has two small problems. First, it uses StringBuffer (instead of the much better StringBuilder API of Java SE 5.0+); this is probably a concession to compatibility with older runtimes. Second, toString() does not preallocate the size of the buffer, which is difficult to estimate, because each PdfChunk.toString() may return a string with a different size. But in my experience, even a very raw and conservative estimation – say line.size()*16, where 16 is a (somewhat arbitrary) small size per chunk – is much better than no estimation at all (which often causes excessive reallocation). // class PdfLine: public String toString() { StringBuffer tmp = new StringBuffer(); for (Iterator i = line.iterator(); i.hasNext(); ) { tmp.append(((PdfChunk) i.next()).toString()); } return tmp.toString(); } // class Phrase: public ArrayList getChunks() { ArrayList tmp = new ArrayList(); for (Iterator i = iterator(); i.hasNext(); ){ tmp.addAll(((Element) i.next()).getChunks()); } return tmp; } There’s a similar problem in the getChunks() method: the new ArrayList that accumulates elements taken from the current object (Phrase itself is a list) lacks preallocation. This case could also benefit from a conservative estimation, e.g. new ArrayList(size()). So there you go – no less than five optimization opportunities in just two methods totalling 14 lines of code. Should we go ahead and execute all five? This requires, as usual, some additional thought. Of course I’d need to have more experience with the iText codebase to determine if each of these optimizations is worth its cost (e.g., the cost of having less maintainable/readable code, if you think that iterators are better than explicit indexed access). In any case, this is a good opportunity to remember that efficient programs are not created only with a handful of super optimizations with order-of-magnitude gains (also known as “having fun”). They are also created with hundreds of tiny optimizations which in aggregate can make a very significant difference. Walking the heap The Heap Walker is another major new feature of the Profiler in NetBeans 6.0. Performance problems can often be diagnosed on a relatively high-level, with coarse summary information like “too many instances of X are being allocated”. But sometimes this isn’t enough; you need finer-grained data like “too many instances of X are allocated as fields of Y”. This leads to diagnostics like “perhaps I should lazy-initialize these fields since they’re rarely used”. To help handling these situations is the role of the Heap Walker. In order to test this feature, run a new profiling session (any profiling mode will do) and in the middle of the program’s execution run Profile>Take Heap Dump. Pick Profiled project as the destination, stop the profiling session and open the heap dump (it’s available in the Saved snapshots window). Heap dumps will be opened by the Heap Walker, as in Figure 8. Figure 8. The Heap Walker The Heap Walker’s default Summary view shows some basic statistics, like the total number of bytes in the whole heap. But this tool is more valuable for collecting very fine-grained data. Start selecting the Classes view. This shows a tabulation of instance counts and heap sizes per class, similar to the Memory Results tab of the memory profiling snapshots. The difference is that now you can select a class and right click Show in Instances view. This brings a three-pane view. The Instance pane lists every single instance of the class (instances may be grouped in blocks of 500). Select any individual instance, and you see its fields in the Fields pane and the objects that point to it in the References pane. This information about references is usually the most interesting. For example, when inspecting a random Phrase object from iText, you’ll be able to see the whole tree of objects forming the PDF document’s object model. You can verify that a certain Phrase object is contained by a PdfPCell[] array, which is in a PdfPRow object, and so forth. The structure below the PdfPCell[] array seems to be a simple tree (each object having a single parent). Were I an iText developer, I would of course know this tree structure beforehand and wouldn’t be surprised with this piece of the heap dump. On the other hand, if I got a different dump than expected, e.g, with several live references to the same PdfPRow object, this could be evidence of some problem, such as a memory leak or bugs in the document construction algorithms. Indeed, heap walking tools are often as useful for debugging as they are for profiling, if not even more handy. Conclusions The focus of this article was to illustrate profiling techniques on a real-world example and concentrate on the major new features in the NetBeans 6.0 Profiler: Profiling Points and the Heap Walker. (Incidentally, there are many other improvements we didn’t cover, such as comparison of memory snapshots, drill-down graphs, integration with JMeter, and support for JDK 6’s dynamic attachment facility.) As you could see from our sample profiling sessions, code profiling and optimization can be a laborious, trial-and-error process. You may need to write new code just to support this work, even if you have access to the best tools; then you’ll spend most of your time thinking about the consequences of each code tweak. In my experience, the actual code optimization is often the easiest part. It’s often obvious, once you fully understand the problem. Writing high performance code is difficult, but it is much easier with good tools. And the NetBeans Profiler is one of the best tools anywhere for that job: it automates repetitive tasks like taking snapshots at the right moment, runs efficiently so as to not break your creative mood with long pauses, and makes a lot of data easily accessible through clear visualizations. If you go through the steps in this article following it as a tutorial, you’ll notice that the time spent in the Profiler (e.g., running a particular command) is minimal. That’s the mark of a great tool: not getting in your way – because you’re paid to build engines, not to use screwdrivers. Footnotes 1 Profiling is the investigation of a program’s runtime behavior, specifically for this article, behavior, i.e. finding out how much computing resources are used and breaking up this use into specific regions or activities of the program. Benchmarking is assessing a program’s performance against some baseline. In application projects, you might create benchmarks for regression tests: if today’s build is 10% slower than yesterday’s build, that’s a performance regression. Profiling and benchmarking share some common issues, like avoiding dead code. The major technical difference is that benchmarks run at full speed, while profiling typically impacts the performance of the measured program. That’s because profiling must report fine-grained information about the subject, and this requires significant resources. 2 To test with HotSpot Server, set VM Options to --server in the project properties’ Run page. 3 I don’t know the history of iText’s development, so this is really just a hypothesis that serves my reasoning here. 4 From iText’s com.lowagie.text.pdf package; no relation to java.nio.ByteBuffer. 5 Remember that Java 5’s enhanced-for does not avoid iterators; it only hides them from you: for (T item: items) will walk the items collection with an iterator. Incidentally, iterators are great candidates to be “lightweight objects”. This new language feature may appear in future JVMs; see John Rose’s Multi-language VM proposal at Another solution (specific to iterators and other objects that are typically used in local scope) is automatic stack allocation (driven by escape analysis), an optimization the HotSpot team is researching but which has not been implemented in production JVMs from Sun up to now. Links More information about the NetBeans Profiler iText, the PDF manipulation library that’s the victim of this article’s experiments Osvaldo Pinali Doederlein is a software engineer and consultant, working with Java since 1.0beta. He is an independent expert for the JCP, having served for JSR-175 (Java SE 5), and is the Technology Architect for Visionnaire Informatica. Holding an MSc in Object Oriented Software Engineering, Osvaldo is a contributing editor for Java Magazine and has a blog at java.net/blog/opinali.
https://netbeans.org/community/magazine/html/04/profiler.html
CC-MAIN-2020-24
refinedweb
5,826
54.93
Hi, I´m trying to read this sensor´s output data in a TI environment but it´s giving me some problems. I tried to do exactly like arduino´s library LPS25H.cpp does. //CTRL_REG1 txBuf[0] = 0x20; txBuf[1] = 0xB0 ; // 0b10110000 High performance and 12.5Hz output data rate config i2cTrans.writeCount = 2; i2cTrans.writeBuf = txBuf; i2cTrans.readCount = 0; i2cTrans.readBuf = NULL; i2cTrans.slaveAddress = 0x5D; do{ error=I2C_transfer(handle, &i2cTrans); }while(!error); error=0; .... ////////Lecturas//////////////////// txBuf[0]=0x28; i2cTrans.writeCount = 1; i2cTrans.writeBuf = txBuf; i2cTrans.readCount = 3; i2cTrans.readBuf = rxBuf; i2cTrans.slaveAddress = 0x5D; do { error = I2C_transfer(handle, &i2cTrans); }while(!error); error=0; barom=(rxBuf[2] << 16 | (uint16_t)rxBuf[1]<<8 | rxBuf[0]); barom=barom/4096; I2C_close(handle); But the values of the rxBuff are all the same and the average values are so different every time I play the programme. Hello. I edited your post to format your code better; you can see the changes by clicking on the pencil icon in the upper right corner of the post. Can you explain more about your setup and your results? Are you using our LPS25H carrier board? What microcontroller and what I2C library or code are you using? (Where are the i2cTrans object and the I2C_ functions defined?) What value do you see in rxBuf when the values are all the same, and what do you mean by average values? i2cTrans I2C_ rxBuf You should make sure you are using the correct casts to combine the rxBuf bytes. Our library does this: return (int32_t)(int8_t)ph << 16 | (uint16_t)pl << 8 | pxl; so you might need to do this in your code: barom=((int32_t)(int8_t)rxBuf[2] << 16 | (uint16_t)rxBuf[1]<<8 | rxBuf[0]); Kevin I´m using a TI-RTOS Launchpad 2650 and I´m editing it with code composer studio. The objective is to read the values from the Altimu v10(gyro,acelom,magnetom and barom). I´ve made all readings correctly except from the barometre´s ones. The problem is that when I read the values on the rxBuf, those three values always are the same, for example rxBuf[0]=47 rxBuf[1]=47 rxBuf[2]=47. I get this values debugging it step by step and if I run the programme again those values are identical but with another value. I just noticed you aren't setting the most significant bit of the register address. As the datasheet says: In order to read multiple bytes incrementing the register address, it is necessary to assertthe most significant bit of the sub-address field. In other words, SUB(7) must be equal to 1while SUB(6-0) represents the address of the first register to be read. Could you try using 0xA8 instead of 0x28 for the value of txBuf[0] in your read code? txBuf[0] Thanks, it finally worked. I didn´t realize of the SUB(7) value
https://forum.pololu.com/t/lps25h-problems-reading-output-data/12941
CC-MAIN-2017-51
refinedweb
481
67.65
une 2006 Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Creating a Forward Button Posted by sage703 at 6/30/2006 10:52:23 PM I'd like to create a 'forward' button that allows my users to scroll ahead to the beginning of the next .swf. I'm trying to use code such as the following but nothing is happening: fwdBtn.onRelease = function() { gotoAndStop("storage"); } Any ideas on why this is not worki... more >> trying to make a link Posted by asli at 6/30/2006 9:16:13 PM hello, i am inserting a flash eyecandy to my .htm dreamweaver page and i am trying to turn that little movie/candy to a button that will link to a new html page on my site. I dont knwo flash too well but I was able to create the button but I couldnt see the option that will allow me to giv... more >> using graphics to tween Posted by bmitchell at 6/30/2006 8:48:32 PM I am new to Flash and am having difficulty making a motion and/or shape tween between two graphic files. Can anyone steer me in the proper direction? Thanks!... more >> Is it possible to recenter an entire movie (all layers at once)? Posted by d_macman at 6/30/2006 6:12:43 PM Hi All, I was playing around with a logo transition and I like the final, but the original layout was a little upper left of center. I added a circle behind the logo at the end and now the circle clips off at the top. I would like to recenter everything at once, but don't know how or if po... more >> Changing Frame Rate Posted by FreeFallSF at 6/30/2006 5:10:08 PM Well, I'm a Flash novice and just built my first full animation. It is fairly jerky, and I assume that increasing the frame rate would help that. Is there anyway to change the frame rate of the document and have it automatically add frames appropriately, or am I going to have to do it manual... more >> Resetting a Movie Clip back to Frame 1 as a button. Posted by alexfierro at 6/30/2006 4:40:05 PM Pretty sure this is easy, but here's the situation. I have 4 movie clips with buttons in them with onMouseOver's goto frame 2. But I only want one movie clip on frame 2 at a time. Is there anyway inside a movie clip button to onMouseOver reset a different movie clip back to frame one? ... more >> Re: play music tracks in flash Posted by dgram361 at 6/30/2006 4:16:23 PM This is very confusing. ... more >> Flash text file not working correctly in netscape 7.2 Posted by snowtrav at 6/30/2006 4:06:24 PM Hello, I created a flash file with buttons that are set by a txt file and up untill yesterday i had no problems but yesterday i changed the url in the text file to another address and know the netscape 7.2 browser will not display the changes, it keeps displaying the old addresses. I am fig... more >> Don't see what you're looking for? Search DevelopmentNow.com. flash to TXT Posted by addgel at 6/30/2006 3:05:37 PM can anyone help in this prob. i just want to send few value from flash to a txt file. ... more >> ASP in Flash Posted by Bah10dah at 6/30/2006 2:32:49 PM Is it possible to import/insert an asp page into a flash movie? Thanks in advance for your time and effort... Cheers... more >> Fullscreen projector without scaling?..possible? Posted by createmedia at 6/30/2006 2:12:52 >> Fullscreen projector without scaling?..possible? Posted by createmedia at 6/30/2006 2:11:55 >> swfobject help Posted by squarefish at 6/30/2006 12:29:38 PM Hi there I have been trying to implement the fix for the click to control using the swfobject on the site the first link shows how the site should look with trasparent backgrounds, and the second using swfobject w... more >> Check this out .. i never had this before ! Posted by eddymilner at 6/30/2006 12:05:26 PM Hello to evry one .. so there is the problem : i dont know about you but i dont see any thing when i put 'www' ! what the problem ? ... more >> Flash Player Network Distribution Posted by eripley at 6/30/2006 11:43:12 AM I am attempting to use a network group policy - software installation to distribute Flash Player 9 to all of my network clients (mixture of Windows 2000 and XP Professional). I have obtained a license and downloaded the relevant MSI file, created a deployment package and tested on a client. Su... more >> Match List Draw Line Posted by jen_designs NO[at]SPAM hotmail.com at 6/30/2006 10:05:13 AM I am creating an online quiz using flash. I want to able to create a match list question where there is a term on one side and a definition on the other. I want the user to be able to draw a line from the term and match it to the defintion. Any ides on how to do this? ... more >> PROBLEM WITH PROJECTOR Posted by ivalki at 6/30/2006 5:38:03 AM HI ALL I;m having a problem with a flash project : When i export to projector(.exe) format i cannot see a drop shadow for a movieclip that appears when i start the usual .swf project I;m really very mad about this .. Does anyone know something about this ? ??? Thanks. Valki. ... more >> Looping segments of FLV Posted by Doublezer0 at 6/30/2006 1:47:33 AM Heya I have a video in FLV format embed into my document. I added an instance on the stage before export. Now between frame 73 and frame 120 I have a loop. When I loop this by manipulating the timeline it has a side effect. The movie jerks as it tracks back to the first frame in the ... more >> Installing help Posted by Drak Samus at 6/30/2006 12:50:38 AM [b]I downloaded it with IE, and then the animetion showed up and it said that it was fully installed, but how do I use it? there's now icon on the desktop...Please Help Me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/b] :sad; ... more >> Newbie JSFL problems in mx2004 Posted by stephenhorne100 at 6/30/2006 12:18:03 AM I'm trying to use JSFL to automatically generate some content in FLA files, but having problems. For instance, the following script... var genTemplateFilename = ""; var genFLAFilename = ""; ... more >> Draging pictures Posted by socks198915 at 6/30/2006 12:00:00 AM Ok so I have all the puctures in different layers. I convert one of them to a movie clip and put this in the action box: on (press) { startDrag (""); } on (release) { stopDrag (); } But it dosn't work and I get this: **Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 1: Mo... more >> Downloading IE flash player using Firefox Posted by XJFan at 6/30/2006 12:00:00 AM I currently cannot download anything while using my MSN browser. I'm not all too sure of what the problem is at the moment, but I need to have the newest version of Flash in order to accomplish what I want to use it for. Firefox is my main browser but certain websites only work optimally with ... more >> Problems scrolling dynamic text box. Please help! Posted by Spindrift at 6/30/2006 12:00:00 AM Hi guys, Thanks for checking out me post! I'm trying to scroll a dynamic text box. There's only one frame to play with due to the way the site has been built. There's a few things I've tried but it never works - no matter how many tutorials I check out or how many changes I make; I j... more >> Problem inserting Flash Video into Dreamweaver Posted by James Noon at 6/30/2006 12:00:00 AM Hi I have inserted a flash video onto a blank page, uploaded all files but the video does not display and IE syays there is a javascript error. Please see Thanks, James ... more >> Help Uploading Posted by Savannah678 at 6/30/2006 12:00:00 AM I am VERY new to Flash. I bought a template and figured out how to change everything that I needed to in the first day. Now its been about a month since then, and I cannot find any forums or tutorials on how to upload it to my website. I am sure some of you could help me in a matter of minutes... more >> Flash Player distribution Posted by idebono at 6/30/2006 12:00:00 AM Hi, 2 Questions: 1. From where can I download just the latest version of Flash Player to install on my PC and to distribute it as a merge module with setups I author. 2. I've had major problems with the Windows Installer error 1406, when I was trying to register flash.ocx and the exi... more >> changing getURL from local to absolute... Posted by everythingstaken at 6/29/2006 9:29:57 PM hey all - i have been assigned to complete a website that was originally developed by an external vendor using Flash. while i have had Flash for quite awhile, i never really explored the power of it. now, i'm in desperate need of help and i submit to you, o gurus. it's a menu system... more >> Flash Movie Load Posted by kelly NO[at]SPAM herco at 6/29/2006 8:38:25 PM When creating a Flash Movie and burning it onto a disk, how do you get the movie to automatically load when you put the cd into the computer? What is the process? Thank you?... more >> import avi save fla Posted by Arctic Mongoose at 6/29/2006 8:15:25 PM Hi, New to flash and scripting. I have about a 1000 .avi files to import(embed,separate sound,encode low flash 8) into a pre-made template (5 timeline layers and a graphic), position and attach a separated video item and audio item. Then save as a .fla files under an edited file name. I... more >> focus rectangle Posted by Im out of ideas at 6/29/2006 8:09:15 PM Can someone tell me how to make a focus rectangle visible without tabbing. i.e. via code something like that below: I know its possible because I've done it before and can't remember how I did it. Thanks in advance. my_txt.onSetFocus = function () { my_txt._focusrect._visible = ... more >> Microsoft Update Kills Flash? Posted by kitchjr at 6/29/2006 7:42:53 PM The problem: A coworker and myself are unable to view Flash animations or videos and we are also unable to install Flash 8 or 9 or 7. We previously had Flash 8 Player installed and working. As of the past two days or so - Flash has disappeared from our systems and we cannot install it. T... more >> graphic fill? Posted by TYPuk at 6/29/2006 7:31:29 PM (MX Prof 04) Hey Is it possible to fill an object with a graphic from the library rather than a solid colour, gradient or bitmap? If so please explain ^_^ Thanks TYP... more >> Rotation Text Problem Posted by eddymilner at 6/29/2006 7:21:22 PM Hello to avry one ... have small problem , i am not flash expert but still understand rotation function it's easy but not with text field ! [b] //this is macromedia exemple var my_fmt:TextFormat = new TextFormat(); my_fmt.font = "my font"; this.createTextField("my_txt", this.g... more >> Question about Pencil Tool properties Posted by AlMostabed at 6/29/2006 6:17:52 PM hi, i need to know this option in pencil tool properties & difference about them : Scale ( Normal - Horizontal - Vertical & None ) Cap ( None & Square ) thanks inadvance... more >> Close a SWF window Posted by cf_coletta at 6/29/2006 6:13:12 PM I have a project that requires a close button. The final project will a swf file. Not a HTML file and not an exe file. I just want to be able to click on a btn and close the flash player. Is this possible? ... more >> Box Around Flash objects in IE browser Posted by mike warf at 6/29/2006 6:09:36 PM I am doing a site with flash buttons and every tim i go to a new page and roll over the buttons section a bounding box comes up around everything that is flash. When you roll over it, it tells you to click to activate this control. it works fine in mozilla but not in explorer. I havent had... more >> Need help with drag and drop game, Urgent! Posted by shush at 6/29/2006 5:56:53 PM Hi I have created a drag and drop game, the drag and drop is working alright however once the right word has been placed in the box, and moves on to the next question the previous correct answer stays where it was placed, how can i get it to snap back to its original location? Also when the ri... more >> Continuous Slideshow Posted by LucianF at 6/29/2006 5:47:16 PM I'm trying to create a simple product slideshow (similar to this [u][/u]) that continuously moves from right to left and then loops when it reaches the end. The images load from an xml file. Any help would be appreciated. ... more >> Skin doesn't show on flv Posted by fmbns at 6/29/2006 5:34:33 PM The skin shows up when I test the page locally, however, when I upload the page and test it online there are no controls or skin for the flv. I am progressively streaming from a server. The auto hide is turned off. I'm sure there is an easy fix. Help me! Cori ... more >> Same swf file, different database content displayed Posted by gordob at 6/29/2006 4:59:25 PM I have built a Flash file that displays database content. I would like to use the exact same Flash swf file on different HTML pages, but display different content from my database connection. How does one basically go about achieving this (I don't like cookie solutions)? My database has a ... more >> Making a Dynamic, Query-able .swf Posted by Peter_geoghegan at 6/29/2006 3:47:32 PM Hello, I'll direct your attention to ID software's homepage,. You can see by looking at the source that each blog entry headline is a reference to an .swf file with a query. For example: ... more >> loadVariablesNum... how to pass ampersand Posted by DogBot at 6/29/2006 3:34:32 PM I am using loadVariablesNum to load variables that contain urls. The problem is the URLs hace ampersands in them(&) Is there a way to escape the ampersands?... more >> Importing Keynote 3 (QuickTime) Files Posted by spagonz at 6/29/2006 3:31:46 PM I found that when I export a Keynote (Version 3) file to Flash, I loose a whole lot of functionality, namely motion. Has anyone attempted to import a Keynote (Version 3) file, that was saved as a QuickTime file, into FLASH? If so, did you experience any degredation from the original Keynote fi... more >> how create this effect...please help newbie Posted by jnc1965 at 6/29/2006 3:23:32 PM I saw this effect on the website template at templatemonster and was wondering if someone know how has a tutorial how to do it you go here to preview templatemonster.com/website-templates/10795.html I like the way the blocks transition from one pic to another any help would be greatly... more >> PHP/MYSQL Content Updating Posted by r_barlow at 6/29/2006 3:17:27 PM Hey, I have a flash movie that uses PHP to pull data from a MYSQL database. Everything works great; however, whenever I update any records in the database, those updates are not displayed in the movie... even if I refresh the page. In order to view the new content, I have to delete all m... more >> QuickTime with Transparent Background Posted by Kelvin Chen at 6/29/2006 1:18:20 PM Hi I am having problems in publishing a file done in Flash- a logo spinning, and I want the background to be transparent. Under Publish Settings, I have the following: ALPHA: Alpha-transparent Layer: Auto And checked the Flatten (Make self-contained). However when I import the file in... more >> Looking for graphic artists in flash Posted by mouseit101 NO[at]SPAM gmail.com at 6/29/2006 12:59:45 PM Currently working on a game in flash, the first one is on newgrounds: If you are interested please respond below. Programers are welcome too, although there is less of a need. Currently working on: Fronts of buildings for cities (13 different ones) var... more >> blank page flashes between SWF pages Posted by liamfahy at 6/29/2006 12:14:49 >> Static text as mask doesn't work Posted by Gary at 6/29/2006 10:31:09 AM I'm creating a button that uses static text as both content and as a mask (to create an inner shadow effect). The static text is in a symbol. It looks perfect in the IDE, but when I test the movie or publish it, the mask doesn't work. I originally had the text in a graphic symbol and that... more >> Need to know how to play a MC then play another MC Posted by SugnaShane at 6/29/2006 4:35:41 AM Hi All, I Need to know the following: Say I have 4 MC's and I want to play them one after another what is the best way to do it. Shane... more >> · · groups Questions? Comments? Contact the d n
http://www.developmentnow.com/g/68_2006_6_0_0_0/macromedia-flash.htm
crawl-001
refinedweb
3,073
70.84
Van February 15, 2012 at 7:22 am Hello. First of all thank you for your work. Now question: I’m trying your sample with regular apple developer program. server - MacOS device - iPhone4 iOS 5.0.1 1 - Create new AppID that looks like “com.apple.mgmt.COMPANY.PRODUCT_NAME” (this is not very clear from README). 2 - Intall web.py (not easy step but this is general question, not mdm related) 3 - Perform other steps from README, server address is ip-address. 4 - Update SSL config strings in server.py to avoid warning at start: from web.wsgiserver import CherryPyWSGIServer from web.wsgiserver.ssl_builtin import BuiltinSSLAdapter ssl_cert = “Server.crt” ssl_key = “Server.key” CherryPyWSGIServer.ssl_adapter = BuiltinSSLAdapter(ssl_cert,ssl_key,None) 5 - Launch server 6 - Install CA certificate and Enroll configuration at device. 7 - While Enroll installing I get such strings in console: com.apple.launchd[1] (com.apple.managedconfiguration.mdmd[209]) <Warning>: (com.apple.managedconfiguration.mdmd) Check-in of Mach service failed. Already active: com.apple.managedconfiguration.mdmdpush-dev mdmd[209] <Warning>: Unable to bootstrap_check_in() to namedDelegatePort ‘com.apple.managedconfiguration.mdmdpush-dev’. APS connections will not persist past process lifetime. com.apple.launchd[1] (com.apple.managedconfiguration.mdmd[209]) <Warning>: (com.apple.managedconfiguration.mdmd) Check-in of Mach service failed. Already active: com.apple.managedconfiguration.mdmdpush-prod mdmd[209] <Warning>: Unable to bootstrap_check_in() to namedDelegatePort ‘com.apple.managedconfiguration.mdmdpush-prod’. APS connections will not persist past process lifetime. 8 - Send “DeviceInfo” command – nothing happens in device’s console for about 10 minutes. THIS IS PROBLEM 9 - Send push notification (not mdm command) to app, in console I see almost immediatelly: unknown mdmd[273] <Notice>: (Note ) MDM: mdmd starting… unknown profiled[275] <Notice>: (Note ) profiled: Service starting… unknown mdmd[273] <Notice>: (Error) MDM: Rejecting MDM push dictionary because it does not contain the “mdm” key unknown mdmd[273] <Notice>: (Note ) MDM: Network reachability has changed. unknown mdmd[273] <Notice>: (Note ) MDM: Network reachability has changed. unknown mdmd[273] <Notice>: (Note ) MDM: mdmd stopping… /p> Any thoughts what can be wrong with my MDM configuration (step 7,8)? Van February 28, 2012 at 10:17 am Hello. I have use your advice about manual MDM-formatted push message and it work. If I send push notification [“aps”:{“alert”:“My first push notification!”,“sound”:“default”},“mdm”:“A0433A31-2B0B-41FD-B79B-002F8C1A28D7”] when device connect to server and perform action (lock at least, don’t test another yet). So problem is with MDM-push-notification part of server. I have send request to join enterprise program but doubt I’m already accepted. So this mean even with developer profile you are able to implement MDM :). I will try to investigate why server from post doesn’t work fine. If server’s code have some error and I’ll find it - I’ll post here. Thanks for help. david_schuetz February 21, 2012 at 1:50 pm Hey, first, thanks for that update to the CherryPy configuration. Those errors thrown the first time a client connected were annoying, but not so annoying that I ever looked into fixing it. :) As for the problems you’re having… The notifications you copied in step 7 are normal (or at least, I see them too). Are you successfully enrolling? That is, does the server show response of Authenticate and TokenUpdate commands? I’m assuming it did, and that you’re using the device token in the “normal” push notification you sent in step 9. Problem is, if step 9 is working (that is, if the message is at least getting to the client), then you’ve got APNS service working. Unless the test message sent in 9 is from a different network than what your test server is running on? For example, if you use an online service to test the push notification… In that case, I’d look into whether local network rules are preventing the outbound connection to Apple’s APNS servers. You can try sending the proper MDM-formatted push message via whatever system you used in step 9, if it’ll allow you to create the right message (which it might not). I simply added the “{‘mdm’:’<pushmagic token>’}” property to a normal message, which gives an error on the device because of the extraneous “aps:” dict, but the mdm daemon processes the command anyway. That’s all I can think of at the moment, that the push message simply isn’t getting from your sever to Apple’s servers, or perhaps if it is, the push cert might not be correct. Van February 28, 2012 at 11:28 am I found why device don’t receive notification from server. I testing with developer provisioning profile, so must use gateway.sandbox.push.apple.com as notification server. But server was configured to use gateway.push.apple.com. To use sandbox I’m changed APNSNotificationWrapper param: “wrapper = APNSNotificationWrapper(‘PushCert.pem’, True)” It was False. dschuetz February 29, 2012 at 11:14 am Ah! good catch. I thought developer push certs could use either server, but that they should use the sandbox when testing. Or perhaps that’s just how you created the certificate in the first place. I’ll try to make a note of that, it might trip up someone else too. :) Starks June 17, 2012 at 11:30 pm Hi david_schuetz, I met the same error which Van mentioned. After the device enrolled, I can send mdm command to the device and get response from it. However, when I tried to send normal apns message to device such as {“aps”,{“alert”:”Hello”}}, I got error from iPCU console: <Notice>: (Error) MDM: Rejecting MDM push dictionary because it does not contain the “mdm” key After that I add the mdm key with push magic, it shew the “MDM: Ignoring extra keys in push dictionary” warning. Then I confused if the mdm framework supports the normal apns message(not contain “mdm” key) or not? Many thanks. Darth Null June 18, 2012 at 9:05 am Ideally, the MDM push message should not contain an “aps” key, but only the “mdm” key. However, the APNS library I used doesn’t let you send such a message (though it can easily be modified to do so). The “ignoring extra keys” warning shouldn’t affect anything. You can’t use the MDM push enrollment to send “normal” APNS messages to the device (like the alert you describe above). To do that you’ll need to send to another client designed to accept such alerts. Yannick August 24, 2012 at 10:10 am Hi, I tried sending an InstallApplication command, the device receives it, prompt for installation and fails silently without nothing happening, sending a ManagedApplicationList command after a while shows the app with a status of failed. Tried with both a custom app and itunes free app.
https://darthnull.org/security/2012/02/15/mdm-changes-comments/
CC-MAIN-2019-04
refinedweb
1,136
57.27
IPythonBell 0.9.1 Python line & cell magic to notify the programmer when a line/cell has completed execution## About IPython Bell is a simple magic for IPython, which notifies the user when the current line/cell has finished execution. This is particularly useful for long tasks. This also works in IPython QT and IPython Notebook. It can also notify you via. OS X Notification Center. ## Installation IPython bell can be installed as a standard Python package: `cd ipython-bell/ && python setup.py install` This can be imported into an IPython shell session using either: `import ipybell` or `%load_ext ipybell` Although you probably want it to load when IPython loads, in which case, edit your IPython profile file (by default `~/.ipython/profile_default/ipython_config.py`) and add `ipybell` to : c.TerminalIPythonApp.extensions = [ 'ipybell' ] (you may need to create this). ##` -- (default) prints an audible bell character to `stdout` (doesn't work in Notebook). * **Mac System Beep** `osx` -- system beep (Mac OS X only). * **Notification Center** `nc` -- Notification Center (Mac OS X 10.8+ only) * **Notification Center (silent)** `ncsilent` -- Notification Center, just popup (Mac OS X 10.8+ only) Specified as follows (in this case, for Notification Center): In [1]: %bell -n nc print 'hello' hello In[2]: %%bell -n nc import time time.sleep(5) - Downloads (All Versions): - 14 downloads in the last day - 49 downloads in the last week - 174 downloads in the last month - Author: Sam Whitehall - License: MIT - Requires IPython (>=1.00) - Package Index Owner: samwhitehall - DOAP record: IPythonBell-0.9.1.xml
https://pypi.python.org/pypi/IPythonBell/0.9.1
CC-MAIN-2015-22
refinedweb
254
56.76
How can I create a copy of an object in Python? To get a fully independent copy of an object you can use the copy.deepcopy() function. For more details about shallow and deep copying please refer to the other answers to this question and the nice explanation in this answer to a related question. How can I create a copy of an object in Python? So, if I change values of the fields of the new object, the old object should not be affected by that. You mean a mutable object then. In Python 3, lists get a copy method (in 2, you'd use a slice to make a copy): list('abc') a_copy_of_a_list = a_list.copy() a_copy_of_a_list is a_listFalsea_copy_of_a_list == a_listTruea_list = Shallow Copies Shallow copies are just copies of the outermost container. list.copy is a shallow copy: 'foo': set('abc')}] lodos_copy = list_of_dict_of_set.copy() lodos_copy[0]['foo'].pop()'c'lodos_copy[{'foo': {'b', 'a'}}] list_of_dict_of_set[{'foo': {'b', 'a'}}]list_of_dict_of_set = [{ You don't get a copy of the interior objects. They're the same object - so when they're mutated, the change shows up in both containers. Deep copies Deep copies are recursive copies of each interior object. 0]['foo'].add('c') lodos_deep_copy[{'foo': {'c', 'b', 'a'}}] list_of_dict_of_set[{'foo': {'b', 'a'}}]lodos_deep_copy = copy.deepcopy(list_of_dict_of_set) lodos_deep_copy[ Changes are not reflected in the original, only in the copy. Immutable objects Immutable objects do not usually need to be copied. In fact, if you try to, Python will just give you the original object: tuple('abc') tuple_copy_attempt = a_tuple.copy()Traceback (most recent call last): File "<stdin>", line 1, in <module>AttributeError: 'tuple' object has no attribute 'copy'a_tuple = Tuples don't even have a copy method, so let's try it with a slice: tuple_copy_attempt = a_tuple[:]tuple_copy_attempt = a_tuple[:] But we see it's the same object: is a_tupleTruetuple_copy_attempt Similarly for strings: 'abc's0 = s[:] s == s0Trues is s0Trues = and for frozensets, even though they have a copy method: frozenset('abc') frozenset_copy_attempt = a_frozenset.copy() frozenset_copy_attempt is a_frozensetTruea_frozenset = When to copy immutable objects Immutable objects should be copied if you need a mutable interior object copied. 0].append('a') copy_of_tuple_of_list(['a'],) tuple_of_list(['a'],) deepcopy_of_tuple_of_list = copy.deepcopy(tuple_of_list) deepcopy_of_tuple_of_list[0].append('b') deepcopy_of_tuple_of_list(['a', 'b'],) tuple_of_list(['a'],)tuple_of_list = [], copy_of_tuple_of_list = tuple_of_list[:] copy_of_tuple_of_list[ As we can see, when the interior object of the copy is mutated, the original does not change. Custom Objects Custom objects usually store data in a __dict__ attribute or in __slots__ (a tuple-like memory structure.) To make a copyable object, define __copy__ (for shallow copies) and/or __deepcopy__ (for deep copies). from copy import copy, deepcopyclass Copyable: __slots__ = 'a', '__dict__' def __init__(self, a, b): self.a, self.b = a, b def __copy__(self): return type(self)(self.a, self.b) def __deepcopy__(self, memo): # memo is a dict of id's to copies id_self = id(self) # memoization avoids unnecesary recursion _copy = memo.get(id_self) if _copy is None: _copy = type(self)( deepcopy(self.a, memo), deepcopy(self.b, memo)) memo[id_self] = _copy return _copy Note that deepcopy keeps a memoization dictionary of id(original) (or identity numbers) to copies. To enjoy good behavior with recursive data structures, make sure you haven't already made a copy, and if you have, return that. So let's make an object: 1, [2])c1 = Copyable( And copy makes a shallow copy: is c2Falsec2.b.append(3) c1.b[2, 3]c2 = copy(c1) c1 And deepcopy now makes a deep copy: 4) c1.b[2, 3]c3 = deepcopy(c1) c3.b.append( Shallow copy with copy.copy() #!/usr/bin/env python3import copyclass C(): def __init__(self): self.x = [1] self.y = [2]# It copies.c = C()d = copy.copy(c)d.x = [3]assert c.x == [1]assert d.x == [3]# It's shallow.c = C()d = copy.copy(c)d.x[0] = 3assert c.x == [3]assert d.x == [3] Deep copy with copy.deepcopy() #!/usr/bin/env python3import copyclass C(): def __init__(self): self.x = [1] self.y = [2]c = C()d = copy.deepcopy(c)d.x[0] = 3assert c.x == [1]assert d.x == [3] Documentation: Tested on Python 3.6.5.
https://codehunter.cc/a/python/how-can-i-create-a-copy-of-an-object-in-python
CC-MAIN-2022-21
refinedweb
689
60.21
If statements: Do you really need them in your code? - select the contributor at the end of the page - An if statement lets your program know whether or not it should execute a block of code. Comparison-based branching is a core component of programming. The concept of an if-else or switch block exists in almost every programming language. While there's nothing really wrong with using if statements, it can help to avoid them when possible. Why, you might ask? Programming without if statements challenges you to think out of the box. You will have to learn other ways to structure your code, which may make it more readable. Plus, it can help you become more comfortable with data-driven and/or object oriented solutions. Of course, writing without if statements might not always be the right answer. In fact, sometimes trying to avoid if statements will make the code less readable. But this exercise will help you see that there are other ways. Take a look at some examples below of code without the use of conditionals (if, switch, ternaries) to show you how to avoid if statements. Example 1: Count the odd numbers in an arrayOfNumbers: // Example input let arrayOfNumbers = [1,4,5,9,0,-1,5]; // *********** // Instead of: // *********** let counter1 = 0; arrayOfNumbers.forEach(number => { let remainder = Math.abs(number%2); if (remainder === 1) { counter1++; } }); console.log(counter1); // *********** // How about: // *********** let counter2 = 0; arrayOfNumbers.forEach(number => { let remainder = Math.abs(number%2); counter2 = counter2 + remainder; }); console.log(counter2); In this example, we're taking advantage of the fact that the result of modulus 2 operation is always either 1 (for odd) or 0 (for even). Example 2: Write a function that takes a date object argument, and returns the string "weekend" or "weekday" // *********** // Instead of: // *********** let weekendOrWeekday1 = inputDate => { let day = inputDate.getDay(); if (day === 0 || day === 6) { return "weekend"; } else { return "weekday"; } // Or, for ternary fans: // return (day === 0 || day === 6) ? "weekend" : "weekday"; }; console.log(weekendOrWeekday1(new Date())); // *********** // How about: // *********** let weekendOrWeekday2 = inputDate => { let day = inputDate.getDay(); let labels = { 0: "weekend", 6: "weekend", default: "weekday" }; return labels[day] || labels['default']; }; console.log(weekendOrWeekday2(new Date())); Did you notice that the if statement condition has some data in it? It tells us which days are weekends. We'll watch for this pattern, extract the data presented in the if statement into an object, and use that instead. Example 3: (A bit more advanced) Write the function doubler; based on the type of input, it will do the following: When the input is - A number, it doubles it (i.e. 5 => 10, -10 => -20) - A string, it repeats every letter (i.e. 'hello' => 'hheelloo') - A function, it calls it twice - An array, it calls itself on all elements of that array - An object, it calls itself on all the values of that object // *********** // Instead of: // *********** let doubler1 = input => { switch(typeof input) { case "number": return input + input; case "string": return input.split('').map(letter => letter + letter).join(''); case "object": Object.keys(input).map(key => input[key] = doubler1(input[key])); return input; case "function": input(); input(); } }; console.log(doubler1(-10)); console.log(doubler1('hey')); console.log(doubler1([5, 'hello'])); console.log(doubler1({a: 5, b: 'hello'})); console.log(doubler1(function() { console.log('callme'); })); // *********** // How about: // *********** let doubler2 = input => { let operationsByType = { 'number': input => input + input, 'string': input => input.split('').map(letter => letter + letter).join(''); 'function': input => { input(); input(); }, 'object': input => { Object.keys(input).map(key => input[key] = doubler2(input[key])); return input; } }; return operationsByType[typeof input](input); }; console.log(doubler2(-10)); console.log(doubler2('hey')); console.log(doubler2([5, 'hello'])); console.log(doubler2({a: 5, b: 'hello'})); console.log(doubler2(function() { console.log('callme'); })); Again, notice how the data (which operations should be done for which type) was all extracted out of the switch statement into an object, then the object was invoked with the correct parameter. Now that you've seen a few examples of coding without if statements, what are your thoughts? Applied reasonably, programming without if statements can make your code better. If nothing else, it will help you see alternative solutions. And that’s a valuable skill for any coder.
https://www.pluralsight.com/blog/it-ops/if-statements
CC-MAIN-2021-43
refinedweb
693
50.23
DataOptions : simple structure holding the options on how the data are filled. Definition at line 28 of file DataOptions.h. #include <Fit/DataOptions.h> Default constructor: use the default options. Definition at line 34 of file DataOptions.h. use errors on the x coordinates when available (default is true) Definition at line 55 of file DataOptions.h. use integral of bin content instead of bin center (default is false) Definition at line 48 of file DataOptions.h. use expected errors from the function and not from the data Definition at line 54 of file DataOptions.h. use the function range when creating the fit data (default is false) Definition at line 52 of file DataOptions.h. use all errors equal to 1, i.e. fit without errors (default is false) Definition at line 53 of file DataOptions.h. Definition at line 47 of file DataOptions.h. normalize data by the bin volume (it is used in the Poisson likelihood fits) Definition at line 49 of file DataOptions.h. normalize data by a normalized the bin volume (bin volume divided by a reference value) Definition at line 50 of file DataOptions.h. use empty bins (default is false) with a fixed error of 1 Definition at line 51 of file DataOptions.h.
https://root.cern.ch/doc/master/structROOT_1_1Fit_1_1DataOptions.html
CC-MAIN-2020-40
refinedweb
211
57.16
We are about to switch to a new forum software. Until then we have removed the registration on this forum. For class I have to create a Visualization of Music/Sound project using Minim along with the Tablet Library to have an external input control. Both my professor and myself have looked at this code and can not understand why it's running into problems. The code itself seems to run fine when I take out line 39 (the stroke weight using the tablet pressure) but when that line of code is in, the code will only work periodically, it seems to be overriding certain functions within the code; it will basically stop the code from running properly. This is a work in progress and I'm currently added and tweaking other features within it, but this problem is putting me at an impasse. (currently) if it runs ideally the code is supposed to play David Bowie's "Space Oddity" with the left and right channels seen on the screen in gray scale, there should then be a line of which you can draw with that follows the Tablet pen (along with the pressure of the pen) to be used to draw a picture with thats color is manipulated with coded key presses. Help is very much appreciated since we can't seem to come to a conclusion of what the problem might be or how to fix it... Thank you here's the code: import codeanticode.tablet.*; import ddf.minim.*; Minim minim; Tablet tablet; AudioPlayer player; AudioInput input; AudioPlayer song; float r; void setup() { size (800, 600, P3D); smooth (); background (0); minim = new Minim (this); tablet= new Tablet(this); song = minim.loadFile("David_Bowie_Space Oddity_stereo_version.mp3", 800); song.play(); } void draw () { r = random (255); stroke (r,r,r); // line at 150 and 450 out of 600 they reach a range of 200 for(int i = 0; i < song.bufferSize() - 1; i++) { line ( i, 150 + song.left.get (i)*50, i+1, 150+song.left.get(i+1)*200); //left channel line ( i , 450 + song.right.get(i)*50,i +1,450 + song.right.get(i+1)*200); //right channel } if (mousePressed) { strokeWeight (10 * tablet.getPressure()); line (pmouseX, pmouseY, mouseX, mouseY); } if (keyPressed) { if (key == 'o' ||key == 'O'){ //orange stroke (234,123,62,255); } if (key == 'b' || key == 'B') { //blue stroke (20,44,123,255); } if (key == 'l' || key == 'L'){ //light blue stroke (122,203,191,255); } if (key == 'a' || key == 'A') { //black stroke (0,0,0,255); } if (key == 's' || key == 'S') { //skin stroke (241,234,179,255); } if (key == 'r' || key == 'R') { stroke (255,0,0,255); } } } void keyPressed () { //play and pause music... also causes song to repeat when done if (key== 'p') { if (song.isPlaying() ) { song.pause(); } //when its done tell it to play again... else if (song.position() == song.length() ) { song.rewind(); song.play(); } else { song.play(); } } } Answers @toomaj -- Please edit your post and format the code with CTRL-o to aid other forum members in reading and testing your code. I can't test this without a tablet (possibly without your same model of tablet). However, I suggest you start with a simple sketch to just test tablet pressure. Get that working, then integrate into your main sketch. Does the tablet library have example code for using the pressure? Are you sure that your tablet model supports pressure and is transmitting pressure data? Example test sketch (untested): Edit: changed point to line so that this actually shows strokeWeight. Also note: Hi Toomaj, if it's not too late... This appears to be a bug with the tablet library (or, rather the Jpen library it uses). I'm gonna guess you've changed from the default renderer to P2D or P3D? This appears to trigger the bug. There may be other renderers/libraries that are triggering the same bug if you haven't switched from the default. Try println(tablet.getPressure())and you'll see that it returns 0.0 for most sketches, working very occasionally when a particularly unusable sequence of mouse moves are attempted before using the tablet. Switch the renderer back to default (removing P2D/P3D) and watch tablet.getPressure()return accurate values again. The author of the Processing library was aware of this issue a few months ago and said he was addressing it. It appears to still be an issue so perhaps there's not much hope of an update. It may be solely the problem of the Jpen library he relies on and the delay lays with them. I'm not sure. See it here on his github page and add your feedback if it will help. There's also a hacky workaround on the same page that I'm really trying to avoid in the hope the bug gets addressed: I thought I would add that from some further reading, it appears that using certain other libraries alongside tabletproduces the same or a similar bug. To confirm, do as jeremydouglass mentioned, confirm tablet.getPressure()is sending out expected numbers and then add the libraries you need and try again so see if tablet.getPressure()now sends out 0.0 each time you try and draw with the pen.
https://forum.processing.org/two/discussion/18755/tablet-library-help-how-to-get-tablet-pressure-to-work-in-code
CC-MAIN-2019-26
refinedweb
868
71.85
52965/how-do-you-make-a-higher-order-function-in-python You have two choices to create higher-order functions: you can use nested scopes or you can use callable objects. For example, suppose you wanted to define line(a,b) which returns a function f(x) that computes the value a*x+b. Using nested scopes: def line(a, b): def result(x): return a * x + b return result Or using a callable object: class line: def __init__(self, a, b): self.a, self.b = a, b def __call__(self, x): return self.a * x + self.b In both cases, taxes = line(0.3, 2) ''' This is a multiline comment. I ...READ MORE The example below creates a background thread ...READ MORE After splitting the string, how does parsing ...READ MORE Usually the execution moves out of the ...READ MORE You can also use the random library's ...READ MORE Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE Enumerate() method adds a counter to an ...READ MORE You can simply the built-in function in ...READ MORE Hahah! Yes, you need to create a ...READ MORE Lets say we have a problem statement ...READ MORE OR At least 1 upper-case and 1 lower-case letter Minimum 8 characters and Maximum 50 characters Already have an account? Sign in.
https://www.edureka.co/community/52965/how-do-you-make-a-higher-order-function-in-python
CC-MAIN-2022-21
refinedweb
222
78.14
This is the documentation for older versions of Odoo (formerly OpenERP). See the new Odoo user documentation. See the new Odoo technical documentation. 1 Python style guide¶ In additions to these guidelines, you may also find the following link interesting: - (a little bit outdated, but quite relevant) 1.1 magic methods¶ magic methods (starting and ending with two underscores) should not have to be called directly unless you're overriding a method of the same name. magic methods are used to implement specific protocols and are called for you, either due to operator access or due to some special operation using them: # bad levels.__contains__(name) # good name in levels # very bad kw.__setitem__('nodes',nodes) # much better kw['nodes'] = nodes 1.2 .clone()¶ rarely necessary (unless you really have no idea what the type of the variable you're trying to clone is), never necessary for built-in collections: just call the constructor with your existing collection: # bad new_dict = my_dict.clone() # good new_dict = dict(my_dict) # bad new_list = old_list.clone() # good new_list = list(old_list) And don't clone manually, please: # surely you jest! values = [] for val in view_items: values += [val] # sane values = list(view_items) 1.3 the "clone and update"¶ the dict constructor takes both a single (optional) positional argument (either a dictionary-like object or an iterable of 2-tuples) and an unlimited number of keyword arguments. Thus, you can "merge" two different dictionaries into a third, new, dictionary: # bad dictionary3 = dictionary1.clone() dictionary3.update(dictionary2) # worse dictionary3 = {} dictionary3.update(d1) dictionary3.update(d2) # good dictionary3 = dict(dictionary1, **dictionary2) You can use those properties for simpler operations, such as cloning an existing dict and (re) setting a key: # no context = kw.clone() context['foo'] = 'bar' # yes context = dict(kw, foo='bar') 1.4 "manual update"¶ the signature of dict.update is the same as dict(): a single, optional, positional argument and an unlimited number of keyword arguments. Thus the following are possible: merging a dict from another one: # bad for key, value in other_dict.iteritems(): my_dict[key] = value # good my_dict.update(other_dict) Setting a bunch of keys at the same time: # bad my_dict['foo'] = 3 my_dict['bar'] = 4 my_dict['baz'] = 5 # good my_dict.update( foo=3, bar=4, baz=5) 1.5 Java dictionary creation¶ Python isn't java, it has literals: # very very very bad my_dict = {} my_dict['foo'] = 3 my_dict['bar'] = 4 my_dict['baz'] = 5 # good my_dict = { 'foo': 3, 'bar': 4, 'baz': 5 } 1.6 "temporary kwargs"¶ keyword arguments are a good way to get a bunch of unspecified supplementary arguments if e.g. you just want to forward them: def foo(**kwargs): logging.debug('Calling foo with arguments %s', kwargs) return bar(**kwargs) or if you retrieved a ready-made dict (from another function) and want to pass its content to another function or method: sessions = some_function_returning_a_dict_of_sessions() some_other_function(**sessions) but there is no point whatsoever in creating a dict for the sake of passing it as **kwargs, just provide the damn keyword arguments: # waste of time and space my_dict = { 'foo': 3, 'bar': 4, 'baz': 5 } some_func(**my_dict) # good some_func(foo=3, bar=4, baz=5) 1.7 deprecated methods (formally or informally)¶ dict.has_key(key) is deprecated, please use the in operator: # bad kw.has_key('cross_on_pages') # good 'cross_on_pages' in kw 1.8 useless intermediate variables¶ Temporary variables can make the code clearer by giving names to objects, but that doesn't mean you should create temporary variables all the time: # pointless schema = kw['schema'] params = {'schema': schema} # simpler params = {'schema': kw['schema']} 1.9 3 strikes, and the code's out¶ A bit of redundancy can be accepted: maybe you have to get the content of an axis: col_axes = [] if kw.has_key('col_axis'): col_axes = self.axes(kw['col_axis']) and a second one: col_axes = [] if kw.has_key('col_axis'): col_axes = self.axes(kw['col_axis']) page_axes= [] if kw.has_key('page_axis'): page_axes = self.axes(kw['page_axis']) But at the third strike, chances are you're going to need the thing again and again. Time to refactor: def get_axis(self, name, kw): if name not in kw: return [] return self.axes(kw[name]) #[…] col_axes = self.get_axis('col_axis', kw) page_axes = self.get_axis('page_axis', kw) The refactoring could also be an improvement of a method already called (be sure to check where the method is called in order not to break other pieces of code. Or write tests): # from def axes(self, axis): axes = [] if type(axis) == type([]): axes.extend(axis) else: axes.append(axis) return axes def output(self, **kw): col_axes = [] if kw.has_key('col_axis'): col_axes = self.axes(kw['col_axis']) page_axes = [] if kw.has_key('page_axis'): page_axes = self.axes(kw['page_axis']) cross_on_rows = [] if kw.has_key('cross_on_rows'): cross_on_rows = self.axes(kw['cross_on_rows']) # to: def axes(self, axis): if axis is None: return [] axes = [] if type(axis) == type([]): axes.extend(axis) else: axes.append(axis) return axes def output(self, **kw): col_axes = self.axes(kw.get('col_axis')) page_axes = self.axes(kw.get('page_axis')) cross_on_rows = self.axes(kw.get('cross_on_rows')) 1.10 Multiple return points are OK, when they're simpler¶ # a bit complex and with a redundant temp variable def axes(self, axis): axes = [] if type(axis) == type([]): axes.extend(axis) else: axes.append(axis) return axes # clearer def axes(self, axis): if type(axis) == type([]): return list(axis) # clone the axis else: return [axis] # single-element list 1.11 Try to avoid type-testing¶ Python is a dynamically typed languages, if you don't absolutely need to receive a list, then don't test for a list, just do your stuff (e.g. iterating on it, then caller can provide any kind of iterator or container) 1.12 Don't use type if you already know what the type you want is¶ The type of a list is list, the type of a dict is dict: # bad def axes(self, axis): if type(axis) == type([]): # we already know what the type of [] is return list(axis) else: return [axis] # good def axes(self, axis): if type(axis) == list: return list(axis) else: return [axis] plus Python types are singletons, so you can just test for identity, it reads better: # better def axes(self, axis): if type(axis) is list: return list(axis) else: return [axis] 1.13 But really, if you need type testing just use the tools python provides¶ The previous piece of code will fail if the caller provided a subclass of list (which is possible and allowed), because == and is don't check for subtypes. isinstance does: # shiny def axes(self, axis): if isinstance(axis, list): return list(axis) # clone the axis else: return [axis] # single-element list 1.14 Don't create functions just to call callables¶ # dumb, ``str`` is already callable parent_id = map(lambda x: str(x), parent_id.split(',')) # better parent_id = map(str, parent_id.split(',')) 1.15 Know your builtins¶ You should at least have a basic understanding of all the Python builtins () For example, isinstance can take more than one type as its second argument, so you could write: def axes(self, axis): if isinstance(axis, (list, set, dict)): return list(axis) else: return [axis] Another one is dict.get, whose second argument defaults to None: # very very redundant value = my_dict.get('key', None) # good value= my_dict.get('key') Also, if 'key' in my_dict and if my_dict.get('key') have very different meaning, be sure that you're using the right one. 1.16 Learn list comprehensions¶ When used correctly, list comprehensions can greatly enhance the quality of a piece of code when mapping and/or filtering collections: # not very good cube = [] for i in res: cube.append((i['id'],i['name'])) # better cube = [(i['id'], i['name']) for i in res] But beware: with great power comes great responsibility, and list comprehensions can become overly complex. In that case, either revert back to "normal" for loops, extract functions or do your transformation in multiple steps 1.17 Learn your standard library¶ Python is provided "with batteries included", but these batteries are often criminally underused. Some standard modules to know are itertools, operator and collections, among others (though be careful to note the python version at which functions and objects were introduced, don't break compatibility with the officially supported versions for your tool): # no cube = map(lambda i: (i['id'], i['name']), res) # still no cube = [(i['id'], i['name']) for i in res] # yes, with operator.itemgetter cube = map(itemgetter('id', 'name'), res) Excellent resources for this are the official stdlib documentation ( ) and Python Module of the Week (, do subscribe to its RSS feed) 1.18 Collections are booleans too¶ therefore, no need to call len: # redundant if len(some_collection): "do something..." # simpler if some_collection: "do something..." 1.19 You can append a single object to a list, it's ok¶ # no some_list += [some_item] # yes some_list.append(some_item) # very no view += [(code, values)] # yes view.append((code, values)) 1.20 Add lists into bigger lists¶ # obscure my_list = [] my_list += list1 my_list += list2 # simpler my_list = list1 + list2 1.21 Learn your standard library (2)¶ Itertools is your friend for all things iterable: # ugly my_list = [] my_list += list1 my_list += list2 for element in my_list: "do something..." # unclear, creates a pointless temporary list for element in list1 + list2: "do something..." # says what I mean for element in itertools.chain(list1, list2): "do something..." 1.22 Iterate on iterables¶ # creates a temporary list and looks bar for key in my_dict.keys(): "do something..." # better for key in my_dict: "do something..." # creates a temporary list for key, value in my_dict.items(): "do something..." # only iterates for key, value in my_dict.iteritems(): "do something..." 1.23 Chaining calls is ok, as long as you don't abuse it (too much)¶ # what's the point of the ``graph`` temporary variable? # plus it shadows the ``graph`` module, bad move graph = graph.Graph(kw) mdx = ustr(graph.display()) # just as readable mdx = ustr(grah.Graph(kw).display()) NOTE: yes, here the temporary variable graph is redendunt but sometime using such temporary variables helps debuging the code easier when you want to inspect the variable and you put breakpoint on the single line expression it's difficult to know when to do step-in and step-out. 1.24 Use dict.setdefault¶ If you need to modify a nested container for example: # longer.. harder to read values = {} for element in iterable: if element not in values: values[element] = [] values[element].append(other_value) # better.. use dict.setdefault method values = {} for element in iterable: values.setdefault(element, []).append(other_value) 1.25 Use constants and avoid magic numbers¶ # bad limit = 20 # bad search(cr, uid, ids, domain, limit=20, context=context) You should use a constant, name it correctly, and perhaps add a comment on it explaining where the value comes from. And of course it's cleaner, easier to read and there's only one place to modify. Oh and that is true not just for numbers, but for any literal value that is semantically a constant! # better DEFAULT_SEARCH_LIMIT = 20 # limit to 20 results due to screen size search(cr, uid, ids, domain, limit=DEFAULT_LIMIT, context=context)
https://doc.odoo.com/v5.0/contribute/15_guidelines/coding_guidelines_python.html
CC-MAIN-2022-27
refinedweb
1,836
56.35
- NAME - SYNOPSIS - DESCRIPTION - PACKAGE VARIABLES - TYPE-LIKE FUNCTIONS - ANONYMOUS TYPE GENERATORS - AUTOMATIC COERCION - NOTES - SEE ALSO - SOURCE REPOSITORY - AUTHOR NAME MooseX::Types::NumUnit - Type(s) for using units in Moose SYNOPSIS package MyPackage use Moose; use MooseX::Types::NumUnit qw/NumUnit NumSI num_of_unit/; has 'quantity' => ( isa => NumUnit, default => 0 ); has 'si_quantity' => ( isa => NumSI, required => 1 ); has 'length' => ( isa => num_of_unit('m'), default => '1 ft' ); DESCRIPTION This module provides types ( NumUnit and friends) for Moose which represent physical units. More accurately it provides String to Number coercions, so that even if the user inputs a number with an incorrect (but compatible) unit, it will automatically coerce to a number of the correct unit. A few things to note: since NumUnit and friends are subtypes of Num, a purely numerical value will not be coerced. This is by design, but should be kept in mind. Also NumUnit and friends are coerced by default (see "AUTOMATIC COERCION"). PACKAGE VARIABLES $MooseX::Types::NumUnit::Verbose When set to a true value, a string representing any conversion will be printed to STDERR during coercion. TYPE-LIKE FUNCTIONS Since version 0.02, MooseX::Types::NumUnit does not provide global types. Rather it has exportable type-like function which behave like types but do not pollute the "type namespace". While they behave like types, remember they are functions and they should not be quoted when called. They are null prototyped though, should they shouldn't (usually) need parenthesis. Futher they are not exported by default and must be requested. For more information about this system see MooseX::Types. NumUnit A subtype of Num which accepts a number with a unit, but discards the unit on coercion to a Num. This is the parent unit for all other units provided herein. Of course those have different coercions. NumSI A subtype of NumUnit which coerces to the SI equivalent of the unit passed in (i.e. a number in feet will be converted to a number in meters). In truth it is not strictly the SI equivalent, but whatever Physics::Unit thinks is the base unit. This should always be SI (I hope!). ANONYMOUS TYPE GENERATORS This module provides functions which return anonymous types which satisfy certain criteria. These functions may be exported on request, but are not exported by default. As of version 0.04, if a given unit has already been used to create a NumUnit subtype, it will be returned rather than creating a new subtype object. num_of_unit( $unit ) Creates an anonymous type which has the given $unit. If a number is passed in which can be converted to the specified unit, it is converted on coercion. If the number cannot be converted, the value of the attribute is set to 0 and a warning is thrown. num_of_si_unit_like( $unit ) Creates an anonymous type which has the SI equivalent of the given $unit. This is especially handy for composite units when you don't want to work out by hand what the SI base would be. As a simple example, if $unit is 'ft', numbers passed in will be converted to meters! You see, the unit only helps specify the type of unit, however the SI unit is used. Another way to think of these types is as a resticted NumSI of a certian quantity, allowing a loose specification. As with num_of_unit, if a number is passed in which can be converted to the specified (SI) unit, it is converted on coercion. If the number cannot be converted, the value of the attribute is set to 0 and a warning is thrown. AUTOMATIC COERCION Since the NumUnit types provided by this module are essentially just Num types with special coercions, it doesn't make sense to use them without coercions enabled on the attribute. To that end, this module mimics MooseX::AlwaysCoerce, with the exception that it only enables coercion on NumUnit and its subtypes. To prevent this, manually set coerce => 0 for a given attribute and it will be left alone, or better yet, just use Num as the type. NOTES This module defines the unit mm ( millimeter) which Physics::Unit inexplicably lacks. SEE ALSO SOURCE REPOSITORY AUTHOR Joel Berger, <joel.a.berger@gmail.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
https://metacpan.org/pod/release/JBERGER/MooseX-Types-NumUnit-0.04/lib/MooseX/Types/NumUnit.pm
CC-MAIN-2016-26
refinedweb
717
54.02
Tutorial-Get-Started LabTalk is a scripting language in Origin, which can be used to perform importing, data analysis and graphing and publication by writing and executing script. The LabTalk script can be executed both independently, or as a part of an analysis dialog in the Origin GUI. A LabTalk script. The LabTalk programming statements can be written from several elements, which are: system variables, commands, functions, macros, objects and X-Functions. There are many ways to run LabTalk script, the most frequent being from Script/Command Window, from .ogs files, or from a toolbar button and graphical objects. In this tutorial, you will learn: The Script Window and Command Window are most commonly used to execute LabTalk script, each supports both single and multiple lines of script execution. The Script Window has only a cursor and will execute highlighted code or code at the current cursor position when you press Enter, while the Command Window has a prompt and will execute all code entered at the prompt. The Command Window includes auto-completion and hint for X-functions and command history, and supports recall of line history, however the Command Window history is not editable as from Script Window. User should choose to run script in either windows based on his/her own needs. From Script Window type -b "Hello World" newbook; wks.ncols=4; type -a "In %H, there are $(wks.ncols) columns." loop(num,1,4) { num =; } From Command Window An alternative to type multiple lines without execution is to use Ctrl+Enter to create a new line. This can be used in both Script Window and Command Window. type -b "HELLO WORLD"; [Section1] type -a "Hello"; [Section2] type -a "World"; run.file(Test) run.section(Test, Section1) From Toolbar Buttons From Graphical Objects run.section(Test, Section2); Once a graphical object becomes a button, you can use Button Edit Mode(Edit:Button Edit Mode or Ctrl + Alt + B) to edit its properties or hold down the Alt key and double-click the button. If you use Button Edit Mode, remember to select it again to turn it off. Usage and examples of different LabTalk elements are summarized below: //Run the following script line to get the variable value @ASC = ; //Run the following script line to set the variable value to be 10 (MB) @ASC = 10; //Display string in a dialog box with Yes and No buttons type -n "Do you want to continue?"; type -a Script continues here since you clicked Yes.; //Define a string "Hello World" first string str1$ = "Hello World"; //Use the function to get the first 5 characters of the pre-defined string string strLeft$ = Left(str1$,5)$; strLeft$ = ; //should return Hello //Fill column A with a defined sequence of numbers col(A) = data(600,850,10); // Fill column A with 600 to 850 in steps of 10 def testmacro { repeat %1 { repeat %2 { type -l "="; } type; } } testmacro 2 64; // '2' is substituted for %1 and 64 for %2 System.path.program$ = ; //The directory path of Origin's executable (.EXE) file should be returned //The workbook will be named as Test1 (both long and short name) //There'll be 5 worksheets in this workbook newbook name:=Test1 sheet:=5 option:=lsname; double CubeRoot(double x) { if(x < 0) return -10^(log10(abs(x))/3); else return 10^(log10(x)/3); } double aa = CubeRoot(125); aa = ;//It should return aa=5
https://cloud.originlab.com/doc/LabTalk/Tutorials/Tutorial-Get-Started
CC-MAIN-2021-21
refinedweb
567
57
I want to define a JavaScript class, Foo. Foo = function(value){ this.value = value; }; I will create "instances" of my Foo: foo1 = new Foo(1); foo2 = new Foo(1); and I want my instances of Foo to be comparable with each other using the standard == equality operator: foo1 == foo2; // this should be true I can not find a way to do this. I thought I was on to something with the valueOf() function, but this is only useful when one side of the comparison is a primitive, not as above where both are of type object. Have I missed something really simple akin to Ruby's def ==(obj); end Not in a clean way... Foo = function (value){ this.value = value; }; Override the toString function of your own object: Foo.prototype.toString = function( ){ return this.value.toString(); } Creating two test objects: foo1 = new Foo(1); foo2 = new Foo(1); If the values of your objects is strings or numbers, you can have the javascript engine to convert your objects to a string by adding them to an empty string: alert( ""+foo1 === ""+foo2 ); //Works for strings and numbers The same thing but cleaner: alert( foo1.toString() === foo2.toString() ); //Works for strings and numbers If the values of your objects is numeric only, you can use the unary + operator to convert the object to a number: alert( +foo1 === +foo2 ); //Works for numbers However, I recommend you to both define the toString as above and also an equals: Foo.prototype.equals=function(b){return this.toString() === b.toString();} And then call it like this: alert ( foo1.equals(foo2) ); Since you now have defined toString you can: alert(foo1); // Alerts the value of foo1 instead of "[Object object]" alert("foo1: " + foo1); // Alerts "foo1: 1". Useful when debugging.
https://www.dowemo.com/article/70369/in-javascript,-compare-how-an-object-is-compared
CC-MAIN-2018-26
refinedweb
292
67.59
) Mike Gold(7) John Hudai Godel(4) Dipal Choksi(4) Pramod Singh(3) Paul Abraham(3) Catalini Tomescu(2) John O Donnell(2) G Gnana Arun Ganesh(2) Tin Lam(2) Daniel Stefanescu(2) Mikael Wiberg(2) Amit Kumar Agrawal(2) Chetan V Nadgouda(1) sayginteh (1) Gregory Nickonov(1) Manisha Mehta(1) Nakul Goyal(1) C Vinod Kumar(1) Prasad (1) Shivani (1) K Niranjan Kumar(1) John Schofield(1) Narayana Surapaneni(1) S Thangaraju(1) Patrick Lam(1) Neelam Iyer(1) Anand Narayanswamy(1) Tushar Ameta(1) des_kenny (1) Andrew McCarter(1) Avgust Ishechenkp(1) chandrakant upadhyay(1) Scott Penner(1) Joe Miguel(1) Baseem George(1) Jigar Desai(1) Chandra Hundigam(1) Giuseppe Russo(1) Vladimir 0(1) Patrick Wright(1) Sudhakar Sadasivuni(1) Gustavo Perez(1) Busila Marian(1) Kishore Chaliparambil(1) Arun Krishnaraj(1) Faraz Rasheed(1) David Lloyd(1) Doug Doedens(1) gary 0(1) Mark Verbraeken(1) Kais Dukes(1) Ramya Girish(1) Joel Pobar(1) Sushila Patel(1) Mathias Edman(1) Rajesh Krishnamurthy(1) Michael Youssef(1) james (1) ivar (1) Shakthivel A(1) Rajesh N K(1) Hemant Kathuria(1) Jibin Pan(1) sushilsaini (1) dada.bahadur (1) Rick Malek(1) mercy_gp (1) Benjamin Wootton(1) Resources No resource found PaintBrush in C# Jan 10, 2001. The article is the paintbrush application, which demonstrates the different aspects of C# language and certain namespaces. The concepts like EventHandling and class designs are also present. Reading and Wtiting XML Documents Jan 16, 2001. In this article you will see how to read and write XML documents using XML API available in .NET Framework class library. Database Explorer : Part 2 Jan 22, 2001. Attached is a C# program which is a enhanced version of the previous article on ADO.NET. Database Explorer-IV Jan 25, 2001. This is version IV of the Database Explorer, which include the support for Access Database with SQL Server. Deploying Programs in C# Mar 08, 2001. Deploying projects in Visual Studio.NET is fairly straightfoward. Most of the process is automated for you through some convenient wizards so it doesn't require much effort. Mail Merge Program Mar 16, 2001. This is a simple mail merge program. This program reads from 3 different text files (by default) and merge all the info to produce mail documents.. Reading XML Files Mar 28, 2001. In this article, I will show you how to use the XmlTextReader class to read an XML document and write data to the console. Using Delegates to Choose Right Function Apr 01, 2001. The need to call different class method based on some string passed to class is an old problem. Remoting in .NET Apr 05, 2001. .NET Remoting provides a way for application in different machines/domains to communicate with each other.. Operator Overloading Example May 14, 2001. The code uses the feature of Operator Overloading in C#. It shows how different operators are overloaded and can be used in a easy manner. Catch Hold of Device Capability Jun 05, 2001. If you are developing Mobile Application and been through the different standards in Market. FTP Explorer in C# Version 2.0 Jul 10, 2001. FTP Explorer is a GUI - FTP client application developed in C# using Visual Studio.NET Beta 1. PDF File Generator Jul 26, 2001. PDF documents are the now a days is standard in Documents Exchange over the internet,as these documents are more or less platform independent and can be viewed on virtually any platform without any formatting or changes in the file structure.. Playing with Strings Sep 18, 2001. This program explores the String class and its various methods. With this you will be able to initialize strings using different constructors and use them. To see how the methods of the 'String' class work, see the following. Hangman: Using GDI+ in ASP.NET Applications Oct 11, 2001. This example shows how you can combine GDI+ commands on a web form. Method Parameters in C# Oct 15, 2001. This article describes different method parameters such as value parameters, reference parameters, output parameters, and parameter arrays. Query Builder Oct 17, 2001. This application is that of a QueryBuilder in CSharp.This application is for Beta2 SDK version of DotNetFramework. Reading and Writing XML in C# Oct 29, 2001. In this tutorial, you will learn how to read and write XML documents in Microsoft .NET using C# language. Directory Picker Dialog Oct 30, 2001. This Directory Picker in this article is also a bit different because it uses the "Large Icon" view of the ListView to traverse through directories.. Graphics Programming in C# Dec 26, 2001. The new improved version of GDI is called GDI+. The .NET framework provides a rich set of classes, methods and events for developing applications with graphical capabilities. Developing MDI Applications in C# Jan 16, 2002. In this article, I'll explain how to write MDI applications using C# and Windows Forms. Yahtzee Program Using C#: Part II Jan 31, 2002.. Working with Strings in VB.NET Feb 05, 2002. This article is VB.NET version of Working with Strings in .NET using C#.. Another Tetris Game in C# Feb 22, 2002. Here is another version of Tetris. This program uses opaque background instead of real double buffering. Creating and Opening Microsoft Word Document from .NET Using C# Mar 08, 2002. This article is being written in response to a couple inquiries on the question, "How do I open a word document from .NET?".. Function Overriding and Its Impact During Object Initialization Mar 25, 2002. Different languages have different ways to initialize an object. C# and Java both have almost similar ways to initialize an object with few subtle differences. An Imporved LED Counter Apr 01, 2002. This in an improved version of Keeping Score with LED Counter article originally written by John O'Donnell. Reflecting Data in .NET Classes - Part IV: From Database Table Apr 08, 2002. In this article, we will be looking at how to "reflect" data from the most common data source - Database tables. XML Schema Validator Apr 16, 2002. The XML Schema Validator checks if a given XML document is well formed and has a valid schema model. A Database Component: Inserting Serializable Objects Apr 23, 2002. The attached zip file contains two projects - a database component (DLL) project and a Windows forms project called Test. Both projects are written and compiled using Visual Studio .NET version 1.0.#. Understanding Destructors in C# Jun 18, 2002. This article is about understanding the working concept of destructor in C#. As you read this article you will understand how different is C# destructor are when compared to C++ destructors. Communication Between Two Forms Jun 24, 2002. The aim of the program is to send a message between different forms. Web Forms Code Model Jul 23, 2002. ASP.NET introduces a new programming model for Web Forms to separate the code and visual elements in different files.. RSS Feed Project in .NET Aug 19, 2002. The RSS Feed project is aimed as demonstrating writing C# code to consume RSS feeds from the internet and putting the data from these RSS feeds into a database for you to use in your own applications. PDF Converter Aug 26, 2002. This is a PDF converter tool which can reads text documents and converts them to PDF documents.. How to Fill Your Own Dynamic Objects using ADO.NET Oct 02, 2002. Sometimes you need to use information of different types like strings, booleans or doubles in the same data structure. Puzzle Control Oct 15, 2002. In this application I had combined the power of C# and AI in order to solve the "puzzle problem". Database Vendor Independent Code with Improved Connection Pooling Oct 17, 2002. This article covers how to create a database application that allows you to specify different databases without writing code for different data providers. Generating Wizards using Panels Nov 15, 2002. Wizards can be generated in different ways. This article shows you how to create wizards using panels. Abstract Factory - Creational Design Pattern Jan 03, 2003. Abstract Factory simplifies the creation of different families of related or dependent objects. It provides interfaces for this purpose and does not specify the concrete classes.. Dots Game Mar 06, 2003. Here is a dots game developed using C# and GDI+. New version of the game will be coming soon. Updated ReshuffleColumns Method Mar 20, 2003. Here is an updated version of 'ReshuffleColumns' method of article DataGrid Customization by Mahesh Chand. Hotmail using C# - An HTTPMail Client under .NET Mar 21, 2003. The great thing about the POP mail protocol is that it is a well-documented open standard and writing a mail client to collect mail from a POP box a relatively painless process. Comparison between PDA/Pocket PC and Workstation Feature Apr 07, 2003. Pocket PC ships with a version of Internet Explorer, affectionately known as PIE (Pocket Internet Explorer). .NET Framework Version 1.1 - Side-By-Side Execution Apr 11, 2003. Microsoft has announced the release of the new version of the .Net Framework 1.1. As with almost everything in life, the only constant is change.. MWControls v1.0.3.0 May 05, 2003. This latest version includes Multi Select TreeView Control which lets you choose between a few different ways of selecting TreeNodes. SmallPOP: Hackish Implementation of POP RFC in .NET Jun 02, 2003. The attached source code and this article contains the details for the C# version of SmallPOP, a quick and dirty component for retrieving e-mail from POP servers. Format DateTime Values in XML Extracted From DataSet Jul 17, 2003. In this article we'll see how to specify the format of DateTime values extracted from the ADO.NET DataSet and to verify we will write formatted contents in xml file. BreakOut 3D Sep 05, 2003. I really miss those days when everything was simple and in 2D. But now it’s different, people today must have everything in 3D. So here it is, my version of breakout. Pros and Cons of ActiveX and DHTML Controls Sep 16, 2003. This document shows a comparison study of web pages using simple ASP and ActiveX Controls. By the End of this document, we arrive at a conclusion of which one to use when. Storing Data in C# Sep 17, 2003. In this article, we will talk about C# data types and how data storage works with different types of data types.. FTP Server in C# Oct 13, 2003. The attached source project is a simple FTP server implementation. This version is very early release of FTP Server.. Migrating COM/DCOM Applications in Microsoft .NET Framework Dec 09, 2003. In the current Internet scenario, various classic applications run on multiple networks. These applications could have been written using different languages like Visual Basic, Visual C++. For example, a retail organization would have different systems, such as an inventory management system, a bill of material systems, and a general ledger system, all implemented using various technologies available for application development. These systems need to be integrated to form a higher-level enterprise information system for an organization. Enhanced XP Button Control Dec 12, 2003. The enhanced XP style button is very easy to use and it supports rectangle, circle or ellipse shape with image and different colors. This control also inherit most of the properties from the Forms.Button.. Migrating from ASP to ASP.NET Jan 05, 2004. This document covers some of the more powerful features that can simplify Web development while providing a more scalable, stable, and productive environment... DataTable. DataAdapter. About Combine-different-version.
http://www.c-sharpcorner.com/tags/Combine-different-version-document
CC-MAIN-2016-36
refinedweb
1,941
59.4
. You and whose code? in spite of like improve greater focus on enterprise, a limited credit system for open-source projects and a migration process that is largely manual, :) Building a self-hosted CI/CD pipeline how to use Platypush to set up a pipeline that: Reacts to push and tag events on a Gitlab or Github repository and runs custom Platypush actions in YAML format or Python code. Automatically mirrors the new commits and tags to another repo - in my case, from Gitlab to Github. Runs a suite of tests. If the tests succeed, then it proceeds with packaging the new version of the codebase - in my case, I run the automation to automatically create the new platypush-gitpackage for Arch Linux on new pushes, and the new platypushArch package and the pippackage on new tags. If the tests fail, it sends a notification (over email, Telegram, Pushbullet or whichever plugin supported by Platypush). Also send a notification if the latest run of tests has succeeded and the previous one was failing. Note: since I have moved my projects to a self-hosted Gitlab server, I could have also relied on the native Gitlab CI/CD pipelines, but I have eventually opted not to do so for two reasons: Setting up the whole Docker+Kubernetes automation required for the CI/CD pipeline proved to be a quite cumbersome process. Additionally, it may require some properly beefed machine in order to run smoothly, while ideally I wanted something that could run even on a RaspberryPi, provided that the building and testing processes aren't too resource-heavy themselves. The alternative provided by Gitlab to setting up your Kubernetes instance and configuring the Gitlab integration is to get a bucket on the cloud to spin a container that runs all you have to run. But if I have gone so far to set up my own self-hosted infrastructure for hosting my code, I certainly don't want to give up on the last mile in exchange of a small discount on the Google Cloud services :). Installing Platypush Let's start by installing Platypush with the required integrations. If you want to set up an automation that reacts on Gitlab events then you'll only need the http integration, since we'll use Gitlab webhooks to trigger the automation: $ [sudo] pip install 'platypush[http]' If you want to set up the automation on a Github repo you'll only have one or two additional dependencies, installed through the github integration: $ [sudo] pip install 'platypush[http,github]' ~/.config/platypush/config.yaml file that contains the service configuration - for now we'll just enable the web server: # The backend listens on port 8008 by default backend.http: enabled: True Setting up a Gitlab hook tunnel.http.hook, in order Received event line with a content like this on the standard output or log file of Platypush: { "type": "event", "target": "platypush-host", "origin": "gitlab-host", "args": { "type": "platypush.message.event.http.hook.WebhookEvent", "hook": "repo-push", "method": "POST", "data": { "object_kind": "push", "event_name": "push", "before": "previous-commit-id", "after": "current-commit-id", "ref": "refs/heads/master", "checkout_sha": "current-commit-id", "message": null, "user_id": 1, "user_name": "Your User", "user_username": "youruser", "user_email": "you@email.com", "user_avatar": "path to your avatar", "project_id": 1, "project": { "id": 1, "name": "My project", "description": "Project description", "web_url": "", "avatar_url": "", "git_ssh_url": "git@git.platypush.tech:platypush/platypush.git", "git_http_url": "", "namespace": "My project", "visibility_level": 20, "path_with_namespace": "platypush/platypush", "default_branch": "master", "ci_config_path": null, "homepage": "", "url": "git@git.platypush.tech:platypush/platypush.git", "ssh_url": "git@git.platypush.tech:platypush/platypush.git", "http_url": "" }, "commits": [ { "id": "current-commit-id", "message": "This is a commit", "title": "This is a commit", "timestamp": "2021-03-06T20:02:25+01:00", "url": "", "author": { "name": "Your Name", "email": "you@email.com" }, "added": [], "modified": [ "tests/my_test.py" ], "removed": [] } ], "total_commits_count": 1, "push_options": {}, "repository": { "name": "My project", "url": "git@git.platypush.tech:platypush/platypush.git", "description": "Project description", "homepage": "", "git_http_url": "", "git_ssh_url": "git@git.platypush.tech:platypush/platypush.git", "visibility_level": 20 } }, "args": {}, "headers": { "Content-Type": "application/json", "User-Agent": "GitLab/version", "X-Gitlab-Event": "Push Hook", "X-Gitlab-Token": "YOUR GITLAB TOKEN", "Connection": "close", "Host": "platypush-host:8008", "Content-Length": "lenght" } } } These are all fields provided on the event object that you can use in your hook to build your custom logic. Setting up a Github integration ~/.config/platypush/config.yaml under the backend.github section: Received event log line like this: { ": "you@email.com", . Automated repository mirroring me git@git.you.com:you/myrepo.git /opt/repo Then add a new remote that points to your mirror repo: $ cd /opt/repo $ git remote add mirror git@github.com:/you/myrepo.git $ git fetch Then try a first git push --mirror to make sure that the repos are aligned and all conflicts are solved: $ git push --mirror -v mirror Then add a new sync_to_mirror function in your Platypush script file that looks like this:. Running tests If our project is properly set up, then it probably has a suite of unit/integration tests that.http.hook', 'git@git.you.com /tmp/repo if works on my box" issue. Serve the test results over HTTP Now you can simply serve /var/log/tests over an HTTP server and the logs can be accessed from your browser. Simple case: $ cd /var/log/tests $ python -m http.server 8000 The logs will be served on.. passed.svg or failed.svg) to e.g. /var/log/tests: []() And there you go - you can now show off a dynamically generated and self-hosted status badge on your README without relying on any cloud runner. Automatic build and test notifications Another useful feature of the popular cloud services is the ability to send notification build changes. We will also use the variable plugin to retrieve and store the latest status, so that notifications are triggered only when the status changes: from platypush.context import get_plugin from platypush.event.hook import hook from platypush.message.event.http.hook PushbulletEvent when a Pushbullet note is sent, and you can easily leverage this to build some downstream logic with hooks that react to these events. Continuous delivery GithubCreateEvent if you are using Github, and create a Platypush hook that reacts to tag events by running the logic of on_repo_push, and additionally make a package build and upload it with Twine if the tests are successful: import importlib import os import subprocess from platypush.event.hook import hook from platypush.message.event.http.hook! Continuous delivery of web applications We have seen in this article some examples of CI/CD for stand-alone applications with a complete test+build+release pipeline. The same concept also applies to web services and applications. If your repository stores the source code of a website, then you can easily create automations that react to push events and pull the changes on the web server and restart the web service if required. This is in fact the way I'm currently managing updates on the Platypush blog and homepage. Let's see a small example where we have a Platypush instance running on the same machine as the web server, and suppose that our website is served under /srv/http/myapp (and, of course, that the user that runs the Platypush service has write permissions on this location). It's quite easy to tweak the previous hook example so that it reacts to push events on this repo by pulling the latest changes, runs e.g. npm run build to build the new dist files and then copies the dist folder to our web server directory: import os import shutil import subprocess from platypush.event.hook import hook from platypush.message.event.http.hook import WebhookEvent # Path where the latest version of the repo has been cloned tmp_path = '/tmp/repo' # Path of the web application webapp_path = '/srv/http/myapp' # Backup path of the web application backup_webapp_path = '/srv/http/myapp-backup' # ...() # ... Discussion (0)
https://practicaldev-herokuapp-com.global.ssl.fastly.net/blacklight/set-up-self-hosted-ci-cd-git-pipelines-with-platypush-1818
CC-MAIN-2021-17
refinedweb
1,319
50.26
I've decided to write this article after reading the novel 'THE ASTI SPUMANTE CODE' by Toby Clements, which is a parody of 'THE DA VINCI CODE' by Dan Brown. I'm not that obsessed with any of these books, but just thought it would be more interesting to introduce UPC-A barcoding from such a perspective; though sarcastic. Almost every item we buy or own has a barcode printed on it. We see those barcodes every day, but still we don't understand what they really mean or how to generate them. The major benefit of using barcodes is to automate and improve the speed and accuracy of data collection. That's why we see them on most sellable items. One other way to look at barcodes is to think of them as one other form of cryptography that's so easy to decipher using barcode scanners. For example, a UPC-A barcode is a simple encoding of a 12 digit number into its bit representation, where 1 is represented as black vertical line and 0 represented as white vertical line. We will be creating a Java program that just does that. Note: Image Cropped From 'THE ASTI SPUMANTE CODE' Book Cover In 'The Da Vinci Code', the secret that Robert Langdon and Sophie were searching for was the Holy Grail, which the Priory of Sion has hidden for centuries. However, in 'The ASTI SPUMANTE CODE', the secret that James Crack and Emily were searching for was the greatest book that will ever be written. According to Toby Clements, 'the secret ingredients of this book - characterization, plot, setting, and so forth - what para-literalists call the Asti Spumante Code - are contained on something called the Mure-de-Paume, the legendary keystone.' While searching for the code, James Crack and Emily find a prolix, or simply what I concluded, a book. They discover under the book's red leather cover 'a rectangle of paper approximately five centimeters by three, laminated to the back of the prolix. On the piece of paper were a set of lines of differing widths and heights that could be read from right to left, or left to right, or not at all. It was a code. A barcode.' As sarcastic as this can get, it does describe what a barcode looks like. In order to be able to read the barcode, James Crack escapes to London to a bookstore owned by Donnie Dogs. Clark asks Dogs about barcodes, and Dogs explains that barcodes are named by scholars as UPC, or Universal Product Code. Manufactures buy those barcodes from UCC, or Uniform Code Council. The UPC is made up of exactly 12 digits. Each digit is represented as a stream of 7 bits, and each bit corresponds to a slice (1 for black slices and 0 for white ones). The first 6 digits for the 12-digit UPC correspond to the manufacturer code, and they are handed down by UCC. The next 5 digits correspond to the product code, and they are filled by the manufacturer. The last digit is a check digit used to help the barcode scanner make sure that it read the right code number. And as we've all seen, in a bookstore or super market, a scanner reads the barcode through red laser beams (i.e. barcode reader). In 'The ASTI SPUMANTE CODE', it is this check digit that James and Emily have to calculate in order to reach the hidden secret. Wow, what an impossible mission! The check digit is calculated by first adding the odd-spaced digits (6 characters), multiplying them by three, then adding them to the sum of the even-spaced digits (5 characters since we exclude the check digit). Then subtract from the next higher multiple of 10. For example, let's say we want to find the check digit for the following code: 31415926535. 3 * (3 + 4 + 5 + 2 + 5 + 5) + (1 + 1 + 9 + 6 + 3) = 3 * (24) + (20) = 92 ==> Check code = 100 - 92 = 8. There are many kinds of barcodes: The kind that Toby Clements refers to in his parody is UPC-A. In the UPC code, only the digits [0-9] are allowed. However, in other types of barcoding, you might have characters, symbols, or even images! In addition to the information that Dogs mentioned, there remains some useful information that we need to know about the UPC-A barcode. We can divide the 12 digit UPC code into two parts: the left 6 digits and the right 6 digits. Every digit has its predefined stream of bits based on whether it is a left or a right digit. For example, the left 3 in the following code 314159265358 would be converted into 0111101, while the right 3 would be converted into 1000010. The left, middle, and right codes are used to help the scanner (or reader) identify where the code starts and ends. The number system is a single digit which identifies the type of the product. 0 Regular UPC codes 1 Reserved 2 Weight items marked at the store 3 National Drug/Health-related code 4 Non-Food items 5 Coupons 6 7 8 9 The remaining digits should be well known by now, as explained by Dogs and as shown in the figure. This program converts a 12 digit code into a barcode. The whole idea is very simple: read a digit, convert it to its corresponding 7 bits based on whether it is on the left or the right, and then draw a vertical line for every 1, and skipping space for every 0. The program also includes a feature to let you calculate the check digit. In case you have entered a wrong check digit, the program doesn't display a barcode. UPC is the number entered by the user, and barcode is the alternating black and white lines (or slices) that we want to generate. I have used BlueJ as the environment to implement this program. So if you have BlueJ, you can easily open it, view the UML diagram, and run the Main class. Otherwise, you can always run the *.jar file or execute the Run.bat file. Main As shown in the figure above, the Main class uses the ASBarcode class, which is the major class that contains all the program's logic. The ASBarcode uses the UPCField and BarcodeLabel classes. The UPCField class inherits from the MNDigitField class, which represents a text field that allows only digits and up to maximum of N digits. This class also has two component actors (MComponentActor and NComponentActor) which act on two components (MComponent and NComponent). In our case, the MComponent is the 'Generate Check Digit' button, the NComponent is the 'Generate Barcode' button, and the action that the MComponentActor and NComponentActor do is enable or disable the buttons. ASBarcode UPCField BarcodeLabel MNDigitField N MComponentActor NComponentActor MComponent NComponent NComponent NComponentActor We have a panel (ASBarcode) containing a text field (UPCField) where the user can enter UPC-A code, a barcode label (BarcodeLabel) generated when the user clicks "Generate Bar Code" button, a label ("Enter UPC"), and two buttons ("Generate check Digit" and "Generate bar Code"). The two buttons are initially disabled. Once the user types 11 characters in the UPC-A field (UPCField), the "Generate Check Digit" button becomes enabled. The user will then click this button, and the check digit will be generated. As a result, the UPC field will now contain 12 characters, and thus the "Generate Check Digit" buttons gets disabled and the "Generate Bar Code" button gets enabled. Now, the user would click on the "Generate Bar Code" button, and the barcode will be generated based on the UPC-A code specified in the UPC field. However, before generating the barcode label, the program checks if the UPC-A code entered by the user is valid (UPC-A is valid if it is a 12 digit number and the value of the check digit is valid). In case the UPC-A code is invalid, nothing is displayed on the barcode label. ASBarcode UPCField BarcodeLabel codeProjectOrange barcodeLabel barcodePanel generateCheckDigitButton generateBarcodeButton JButton ActionEvent CheckDigitListener BarcodeListener buttonPanel upcField upcPanel The logic of the program is found in the ASBarcode() constructor, and the main method is used to test the ASBarcode class. ASBarcode() Create the Barcode Label with a slice width of 2 pixels and a slice height of 150 pixels. Let the color of slices (1) be black and of empty space (0) be orange. In case there is any other number (other than 0 or 1), then draw the red color to reflect that something went wrong. Add the barcode label to its panel. barcodeLabel = new BarcodeLabel (2, 150, Color.black, codeProjectOrange, Color.red); BarcodeListener The method below is called when the 'Generate Check Digit' button is clicked. void actionPerformed (ActionEvent e) { // Generate the check digit and append it at the end of the 11-digit UPC field upcField.generateCheckDigit (); } The method below is called when the 'Generate Bar Code' button is clicked. If the check digit is valid, the barcode is generated and displayed. public void actionPerformed (ActionEvent e) { // Generate the barcode only if the check digit is valid if (upcField.isCheckDigitValid ()) { // Set the UPC of the barcode label barcodeLabel.setUPC (upcField.getUPC()); // Validate the UPC of the barcode label barcodeLabel.validateUPC (); // Generate the barcode barcodeLabel.generateBarcode (); // Select the text in the UPC field upcField.selectAll (); } else { // Make the barcode as invalid so that nothing would be drawn on // the barcode panel. // Check BarcodeLabel.paintComponent barcodeLabel.setValid (false); } } We first start by defining the constants: // Put in front and at end of every barcode final String quiteZone = "000000000"; // Put after quite zone at the front - <a href="%22#Structure">See Figure</a> final String leftStartCode = "101"; // Put before quite zone at the end - <a href="%22#Structure">See Figure</a> final String rightEndCode = "101"; // Put in the center of every barcode - <a href="%22#Structure">See Figure</a> final String centerCode = "01010"; // Represent the <a href="%22#Bits">left UPC bits</a> for the digits final String leftCodes[] = {"0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011"}; // Represent the <a href="%22#Bits">right UPC bits</a> for the digits final String rightCodes[] = {"1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100"}; // represents the number of slices in a UPC-A final int sliceNum = 113; // 3 + 3 + 5 + (12 * 7) + (9 * 2) = 113 The quite zone, left, center, and right codes will be added to every barcode we are going to generate. We would care to know the number of slices we have in order to define the widths of the slices and of the panel that will hold them. The sliceNum is a constant equal to 113. This is the sum of the left, center, right codes (3 + 5 + 3), the 12 digits, where each digit is made up of 7 slices or bits (12 * 7), and the quite zone (9 * 2). sliceNum 113 String UPC; // UPC to be converted into barcode String barcode; // the barcode boolean valid; // UPC is valid or not? Color barColor; // The color of the slice corresponding to bit 1 Color spaceColor; // The color of the slice corresponding to bit 0 Color errorColor; // In case the bit is neither 0 or 1 (something wrong) int x; // Represents the current x coordinate of the slice int sliceWidth; // Represents the width of the slice int width; // Width of barcode label int height; // height of barcode label The constructor sets the color and size of the barcode label. //--------------------------------------------------------------------- // Constructor... // // sw is the slice width and sh is the slice height. // bc is the bar color, sc is the space color, and ec is error color. //--------------------------------------------------------------------- public BarcodeLabel (int sw, int sh, Color bc, Color sc, Color ec) { // Upc is initially invalid valid = false; // Set x initially to zero x = 0; // Set the slicewidth sliceWidth = sw; // Set the width of barcode label width = sliceNum * sw; // Set the height of barcode label height = sh; // Set the colors barColor = bc; spaceColor = sc; errorColor = ec; // Set the background color to space color this.setBackground (spaceColor); // Set the preferred size of the barcode label this.setPreferredSize (new Dimension (width, height)); } The paintComponent() method draws the barcode label by first clearing the background and then only drawing the slices if the UPC code is valid. paintComponent() //--------------------------------------------------------------------- // Paints the barcode only if it is valid... //--------------------------------------------------------------------- public void paintComponent (Graphics page) { super.paintComponent (page); // Clear the barcode before drawing page.setColor (getBackground ()); page.fillRect (0, 0, width, height); // Draw the barcode only if the UPC is valid if (isValid ()) drawBarcode (page); } This method takes care of drawing the vertical slices over the label. //--------------------------------------------------------------------- // Draws the barcode if it is not null. //--------------------------------------------------------------------- public void drawBarcode (Graphics page) { int barcodeLength; // Set x to zero x = 0; if (barcode != null) { // Get the barcode length barcodeLength = barcode.length (); // Loop over every character (0 or 1) for (int i = 0; i < barcodeLength; i++) { // Draw a white slice for the 0 if (barcode.charAt (i) == '0') { page.setColor (spaceColor); } // Draw a black slice for the '1' else if (barcode.charAt (i) == '1') { page.setColor (barColor); } // Draw a red slice to show something graphically else { page.setColor (errorColor); } // Update the coordinates x += sliceWidth; // Draw the slices at the specified coordinates page.fillRect (x, 0, sliceWidth, height); } } } The UPC must be exactly 12 digits before we can generate the barcode from it. //--------------------------------------------------------------------- // Checks if the UPC is valid. a UPC is valid if it consists // of exactly 12 digits. //--------------------------------------------------------------------- public void validateUPC () { valid = UPC.matches ("[0-9]{12}?"); } The major method that generates the barcode from the UPC field. //--------------------------------------------------------------------- // Generate the barcode from the UPC... //--------------------------------------------------------------------- public void generateBarcode () { if (isValid ()) { barcode = quiteZone + leftStartCode + leftCodes[charToInteger (UPC.charAt (0))] + leftCodes[charToInteger (UPC.charAt (1))] + leftCodes[charToInteger (UPC.charAt (2))] + leftCodes[charToInteger (UPC.charAt (3))] + leftCodes[charToInteger (UPC.charAt (4))] + leftCodes[charToInteger (UPC.charAt (5))] + centerCode + rightCodes[charToInteger (UPC.charAt (6))] + rightCodes[charToInteger (UPC.charAt (7))] + rightCodes[charToInteger (UPC.charAt (8))] + rightCodes[charToInteger (UPC.charAt (9))] + rightCodes[charToInteger (UPC.charAt (10))] + rightCodes[charToInteger (UPC.charAt (11))] + rightEndCode + quiteZone; repaint (); } } Calls the parent (MNDigitField) constructor to create a text field that only accepts digits with a maximum of N (12) digits. When exactly M (11) digits are entered, the MComponent ('Generate Check Digit' button) is acted upon (enabled). Otherwise, the action is undone (button disabled). When exactly N (12) digits are entered, the NComponent ('Generate Bar Code' button) is acted upon (enabled). Otherwise, the action is undone (button disabled). MNDigitField M //--------------------------------------------------------------------- // Create a field where user enters UPC code. //--------------------------------------------------------------------- public UPCField (JButton MButton, JButton NButton) { // Create a 12 digit field having width of 8 cols // M = 11, N = 12, MComponent = MButton, NComponent = NButton // cols = 8. <a href="%22#MNDigitField"">super</a> (11, 12, MButton, NButton, 8); } If the UPC is 11 digits long, then generate the check digit, and append it to the end of the UPC to form the 12 digit valid UPC. //--------------------------------------------------------------------- // Generates check digit and appends it to the upc field. //--------------------------------------------------------------------- public void generateCheckDigit () { // Generate check digit only if there are 11 characters if (this.howManyDigits () == 11) { String upc = this.getText (); int checksum = 0; checksum = generateCheckDigit (upc); // Append the check digit to the end of hte UPC this.setText (upc + checksum); } } Generates the check digit from the first 11 digits of the UPC field. //--------------------------------------------------------------------- // Generates check digit. //--------------------------------------------------------------------- public int generateCheckDigit (String upc) { int checksum = 0; for (int i = 1; i <= upc.length (); i++) { // even if (i % 2 == 0) checksum += charToInteger (upc.charAt (i - 1)) * 1; // odd else checksum += charToInteger (upc.charAt (i - 1)) * 3; } return ( 10 - ( checksum % 10 ) ) % 10; } Tells whether the check digit is valid. //--------------------------------------------------------------------- // Makes sure that the check digit is valid. //--------------------------------------------------------------------- public boolean isCheckDigitValid () { if (howManyDigits () == 12) { String upc = this.getText (); // The check digit entered by the user // character 12 (start at 0) int checkDigitEntered = charToInteger (upc.charAt (11)); // the generate (valid) check digit int validCheckDigit = this.generateCheckDigit (upc.substring (0, 11)); return checkDigitEntered == validCheckDigit; } return false; } This is a class that allows you to create a text field with only digits and with a maximum of N digits. Once the number of digits becomes M, an MAction is performed on the MComponent. And once the number of digits is not M anymore, an MReaction is performed. The same is true for N. Once the number of digits becomes N, an NAction is performed on the NComponent, and once the number of digits is not N anymore, an NReaction is performed. M MAction MComponent MReaction N NAction NReaction public MNDigitField (int m, int n, JComponent mComp, JComponent nComp, int cols) { // Specify the width of the text field in terms of columns super (cols); // Set M and N this.M = m; this.N = n; // create component actors this.MComponentActor = new ComponentActor (mComp); this.NComponentActor = new ComponentActor (nComp); // Set the action type to ENABLE (This is default type, but I'm // resetting to emphasize the idea) this.MComponentActor.setActionType (ComponentActor.ENABLE); this.NComponentActor.setActionType (ComponentActor.ENABLE); // Add document listener to the text field this.getDocument().addDocumentListener (new MNDocumentListener ()); } The NDigitDocument class is responsible for not allowing characters other than digits to be entered, and for not allowing the number of characters to exceed N. NDigitDocument static class NDigitDocument extends PlainDocument { public void insertString (int offs, String str, AttributeSet a) throws BadLocationException { if (str == null) return; // Don't allow number of characters to exceed N // (The +1 is because insertString is called before insertupdate) if (currentLength + 1 > N) return; // Validate that the characters of the string are digits for (int i = 0; i < str.length(); i++) { if (!Character.isDigit (str.charAt (i))) return; } super.insertString(offs, str, a); } } The MNDocumentListener class listens to the user's interaction with the textfield, and decides what to do based on the number of characters in the text field. MNDocumentListener textfield class MNDocumentListener implements DocumentListener { //----------------------------------------------------------------- // Called when users insert characters. //----------------------------------------------------------------- public void insertUpdate (DocumentEvent e) { decide (e); } //----------------------------------------------------------------- // Called when users remove characters (DEL or Back Space). //----------------------------------------------------------------- public void removeUpdate (DocumentEvent e) { decide (e); } //----------------------------------------------------------------- // Do an action based on the values of M and N. In our case, the // action is to enable or disable (reaction) the MComponent // and NComponent. //----------------------------------------------------------------- public void decide (DocumentEvent e) { Document doc = (Document)e.getDocument(); currentLength = doc.getLength (); // Enable MComponent if M digits reached // Otherwise, disable it. MComponentActor.<a href="%22#public">decide</a> (currentLength == M); // Enable NComponent if N digits reached // Otherwise, disable it. NComponentActor.<a href="%22#public">decide</a> (currentLength == N); } } This is an abstract class that performs an action and reverses this action based on a condition. The action performed is based on the actionType. abstract actionType public void decide (boolean condition) { if (condition) doAction (); else undoAction (); } This class inherits from the Actor abstract class. It acts on a Java GUI component. If the actionType is ENABLE, then this class would enable or disable a JComponent based on a condition. Actor abstract actionType ENABLE JComponent The method called in our program to enable the 'Generate Check Digit' and 'Generate Bar Code' buttons is: //--------------------------------------------------------------------- // Perform an action. //--------------------------------------------------------------------- public void doAction () { // Do nothing if no component is supplied if (component == null) return; // Perform action based on action type switch (actionType) { case ENABLE: component.setEnabled (true); break; case MAKE_VISIBLE: component.setVisible (true); break; } } The method called in our program to disable the 'Generate Check Digit' and 'Generate Bar Code' buttons is: //--------------------------------------------------------------------- // Reverse the action.. //--------------------------------------------------------------------- public void undoAction () { // Do nothing if no component is supplied if (component == null) return; // Perform reaction based on action type switch (actionType) { case ENABLE: component.setEnabled (false); break; case MAKE_VISIBLE: component.setVisible (false); break; } } I created this program and wrote the article in 2005. I got it submitted to Code Project, but at that time Java was not supported on this site. I guess now I got back the opportunity to share it with the community. I hope it would be fun... Enjoy! Just in case you wondered what ASTI SPUMANTE means. It is a "semi-dry sparkling wine produced from the Moscato di Canelli grape in the village of Asti, in the Piedmont region of It.
http://www.codeproject.com/Articles/26610/The-Asti-Spumante-Bar-Code?PageFlow=FixedWidth
CC-MAIN-2015-22
refinedweb
3,345
54.12
Programming Languages Evolution of programming languages We will go through a timeline of programming languages. These languages will include C, Cobol, Java, Basic, Pasqual, and FORTRAN. C and C++ Languages The programming language called C got its start in 1972, the first code written by Dennis Ritchie. The reason this code was developed was to create the operating system called UNIX. Its core purpose was to create fast and efficient code for the computer to run. 1972 Dennis Ritchie in 1999 1970's The C language became very popular and spread quickly throughout the 1970's. C became a popular language for programmers, and the language began to replace once-popular languages such as PL/I and ALGOL. Due to its popularity, companies began making their own languages that were nearly identical to C with only a few differences. This took place in the late 1970's and early 1980's. 1989 To solve the problem of C being copied by others, a committee was formed in 1983. This committee wanted a standard definition of C to be established so blatant copying could cease. In 1989, ANSI established a standard definition of C called ANSI C. Also, in 1983, the C++ Programming language branched off as its own separate language from C. Impact Today When UNIX was rewritten using C, this was a major step forward. Previously, operating systems had only been written using assembly language. In fact, Linux today is written using almost entirely C. Today, C++ is also an important language. It is used in popular products such as Microsoft Office, the Firefox web browser, and the Adobe PDF Reader. Here is a very simple program written in C: #include <prgm.h> main() { puts("a simple C program"); } Java 1991 Java was developed in 1991 by James Gosling and Patrick Naughton. Having originally been developed for enhanced digital television, this idea had to be scrapped due to Java being too advanced for the television industry at the time. Java went through a few name changes; it was originally called Oak, which was later changed to Green. It eventually went by the name Java, from Java coffee. 1995 The first version of Java, Java 1.0, was released by Sun Microsystems in 1995. Java proved to be a dependable, mostly error-free program that provided security; this caused many websites to incorporate Java into themselves. Java promised WORA (Write Once, Run Anywhere), which means that you can write the source code and be able to run the program on any device that has the Java app installed on it. This provided flexibility for users. 1998-1999 Throughout 1998-1999, Java 2 was released to the public. This version of Java had been released with different versions for running on different platforms. J2EE was a version that was aimed towards enterprise applications, whereas J2ME was made for mobile devices. 1997 In 1997, Sun Microsystems began the process of formalizing Java by getting it to be certified by standards, but they backed out of this process not long after they begun. In fact, even though you had to pay to use Java at one time, Sun Microsystems would release code for free. 2006 In 2006, Java's Java 2 extensions were renamed as Java EE, Java ME, and Java SE. In November of 2006, Sun Microsystems released a large amount of Java's code as free and open software. They did this under the GNU (General Public License). This process was finished in 2007, making the entirety of Java's code available. Today Today, Java runs on over 1.1 billion computers; many websites can't even function without Java. In fact, Java was used in the 2004 Mars Rovers. Here is a simple program written in Java: public class HelloWorld { public static void main(String[] args) { System.out.printIn("This is a sample program written in Java."); } } HTML 1991 In 1991, the first version of HTML (Hyper Text Markup Language) was released: HTML 1.0. This version of HTML was a merge of these new HTML tags (such as the <href> tag) and the already existing SGML (Standard Generalized Markup Language). Only twenty elements were included in HTML 1.0; thirteen of these elements are still used today. 1994 In 1994, HTML 2.0 was released and became the new standard for HTML. This new standard will last until HTML 3.2 is released. 1996 In 1996, new improvements are made to HTML; also, HTML 3.0 is released. The addition of the use of tables is introduced to better organize web pages. "Client-side Image Maps" are introduced, which allows a user to click on different areas of an image to navigate to different aspects of a web site. 1997 The first CSS W3C recommendation is introduced; the bar is set high and it would be three years before any website could conform to all of its specifications. In 1997, many arguments were had over the different attributes of HTML. HTML 3.2 was approved as the new standard for all HTML. With this standard came the removal of the <marquee> and <blink> attributes that were considered annoying and unprofessional. Also during this time was the abundant use of frames; this was a major mistake in web page construction. 1998 In 1998, HTML 4.1 is released (previously as HTML 4.0 under the codename Cougar). A major introduction is of CSS (Cascading Style Sheets); this makes it easier to customize colors, fonts, and backgrounds of a web page. 2000 In 2000, HTML and XML merged together to form XHTML. This required web pages to rewrite their code due to the non-backward compatibility. Sloppy XML code was allowed due to XML's strict standards that included correct capitalization. 2005 In 2005, Ajax is implemented into HTML used in web pages. Ajax made it easier for web pages to update and request data from cloud based applications such as email and social media. Ajax is an easier way to say: Asynchronous JavaScript+CSS+DOM+XMLHttpRequest 2008 In 2008, HTML 5 is released; this was part of a joint collaboration between Apple, Mozilla, and Opera. In 2009, XML developers have joined to further HTML5 development. HTML5 is not a standard for web pages, and it is not going to be until around 2022. Today Today, HTML is currently evolving and incorporating new attributes to better suit the needs of web site designers. Here is an example of HTML code for a table: <table height="200" width="300"> <tr> <td> This is a table! </td> </tr> </table> Resources Bartels, Angela. "Internet History: HTML Code Evolution 1.0 to 5.0 [INFOGRAPHIC]." Rackspace. N.p., n.d. Web. 18 Jan. 2013. <>. "Java logo.svg." Wikipedia. N.p., n.d. Web. 18 Jan. 2013. <>. "Java (programming language)." Wikipedia. N.p., n.d. Web. 18 Jan. 2013. <>. Anthony, Sebastian. "The evolution of computer languages (infographic)." ExtremeTech. N.p., n.d. Web. 18 Jan. 2013. <>. Ritchie, Dennis M. "The Development of the C Language*." cm.bell-labs. N.p., n.d. Web. 11 Jan. 2013. <>. Lévénez, Eric. "Computer Languages Timeline." Computer Languages History. N.p., n.d. Web. 11 Jan. 2013. <>. "C++." Wikipedia. N.p., n.d. Web. 11 Jan. 2013. <>. "File:Dennis MacAlistair Ritchie .jpg." Wikipedia. N.p., n.d. Web. 11 Jan. 2013. <>. "Dennis Ritchie." Wikipedia. N.p., n.d. Web. 11 Jan. 2013. < >. "Brief History Of The C Programming Language." Rajkishor09.Hubpages. N.p., n.d. Web. 11 Jan. 2013. <>. "How to Program in C." rajkishor09.hubpages. N.p., n.d. Web. 11 Jan. 2013. < >. Binary Binary code has been used for centuries; it wasn't introduced with computers, as it has existed before them. In 1884, binary was used in the Linotype machine. In 1875, binary was used in the ciphering system of Émile Baudot. This led to the ASCII (American Standard Code for Information Interchange) of the modern day. 1936-1937 Binary was used in the Konrad Zuse Z1 computer. This was the world's first programmable computer. In 1937, binary was used in the Atanasoff-Berry Computer. This one was the world's first programmable electric digital computer. Z1 Atanasoff-Berry Besides being used in computers and robots, binary is used for reading CDs. "Atanasoff-Berry Computer." Wikipedia. N.p., n.d. Web. 18 Jan. 2013. <>. "Binary Code." Wikipedia. N.p., n.d. Web. 18 Jan. 2013. <>. If a section of a CD is read as reflecting the laser shown onto it, it is read as a "1"; if the light is not reflected, it is read as a "0". Binary is a basic machine-level programming language that reads data by combinations of ones and zeros. For example, this might stand for an instruction: 011010 1101001 10100001 1900's Binary is a valuable language for machine level instructions. It is simple for machines to read, and higher-level programming languages can be translated into it. Today Visual Basic 1991 Microsoft Visual Basic 1.0 was released on May 20, 1991. It was available in professional and standard editions. Visual Basic combined the elements of a visual interface using graphical design and traditional programming. 1992-1993 Visual Basic 2.0 was released in the November of 1992. This version was faster and more powerful than the 1.0 version of Visual Basic (or VB). In 1993, Visual basic 3.0 was released; new tools were added to this version that included the functions of navigating through databases easier and Object Linking and Embedding. Visual Basic for Applications was released in 1993; this was designed for running in Microsoft applications such as in Microsoft Office. 1995 In 1995, Visual Basic 4 was released. This version supported Windows 95 (which was a 32-bit operating system). The Professional version of VB 4 could compile code to run on older 16-bit operating systems. Also in 1995, Visual Basic Scripting Edition was announced. This program was made to write code for web pages. A downside was that not all browsers run VB Script. 1997 Visual Basic version 5 was introduced in 1997. With this version, operating systems that ran on 16-bit systems were no longer supported by VB. There were many changes in Version 5 from version 4; in Version 5 you would be able to create customized controls and make true executables. Visual Basic version 5 was available in three different versions: Standard, Professional, and Enterprise. 1998-Today Visual Basic version 6 was released in 1998. It was released in the Microsoft package called Visual Studio 6.0. This new version included the new features of Internet features, language features, data access, controls, and more. In fact, lots of businesses and organizations are using Visual Basic 6.0 today. Mack, George. "The History of Visual Basic and BASIC on the PC." George Mack's home page. N.p., 24 Jan. 2011. Web. 22 5.01 No description byTweet Nicole Drevlowon 8 April 2013 Please log in to add your comment.
https://prezi.com/ff4xjzfmph6y/standard-501/
CC-MAIN-2017-47
refinedweb
1,830
65.93
inheriting from CombinatorialFreeModule I am trying to write a class that inherits from CombinatorialFreeModule. My problem is correctly inheriting from the element class. I have the following code: from sage.sets.family import Family from sage.categories.all import GradedAlgebrasWithBasis from sage.combinat.free_module import CombinatorialFreeModule, CombinatorialFreeModuleElement from sage.categories.all import tensor class TestRing(CombinatorialFreeModule): def __init__(self, R, G): super(TestRing, self).__init__(R, G) class TestRingElement(CombinatorialFreeModuleElement): def __init__(self, M, x): super(TestRingElement, self).__init__(M, x) self.data = x I can create a TestRing object and get its basis elements as follows: sage: R = TestRing(QQ, ('a','b')) sage: a,b = R.basis() My problem is that a and b have no data attribute. They are not instances of the TestRingElement class: sage: a.d a.db a.dump a.dumps sage: isinstance( a, TestRingElement ) False I want to be able to add more attributes to the elements of my module. Can someone tell me the correct way to do this? Incidentally, this code breaks when I call TestRing with a list as its second argument, instead of a tuple. Though, if I create a list inside the constructor (based on input to the constructor) and use that when I call the parent constructor, everything runs fine. Can anyone tell me why the code breaks in the first instance? Or, why does it work in the second instance? Thanks!
https://ask.sagemath.org/question/9281/inheriting-from-combinatorialfreemodule/?sort=votes
CC-MAIN-2020-45
refinedweb
234
51.34
4. Modules¶ Modules provide a way of organizing QL code by grouping together related modules, types and predicates. You can import modules into other files, which avoids duplication, and helps structure your code into more manageable pieces. 4.1. Defining a module¶ There are various ways to define modules—here is an example of the simplest way, declaring an explicit module named Example containing a class OneTwoThree: module Example { class OneTwoThree extends int { OneTwoThree() { this = 1 or this = 2 or this = 3 } } } The name of a module can be any identifier that starts with an uppercase or lowercase letter. .ql or .qll files also implicitly define modules. Read more about the different kinds of modules below. You can also annotate a module. See the list of annotations available for modules. Note that you can only annotate explicit modules. File modules cannot be annotated. 4.2. Kinds of modules¶ 4.2.1. File modules¶ Each query file (extension .ql) and library file (extension .qll) implicitly defines a module. The module has the same name as the file, but any spaces in the file name are replaced by underscores ( _). The contents of the file form the body of the module. Library modules¶ A library module is defined by a .qll file. It can contain any of the elements listed in Module bodies below, apart from select clauses. For example, consider the following QL library: OneTwoThreeLib.qll class OneTwoThree extends int { OneTwoThree() { this = 1 or this = 2 or this = 3 } } This file defines a library module named OneTwoThreeLib. The body of this module defines the class OneTwoThree. Query modules¶ A query module is defined by a .ql file. It can contain any of the elements listed in Module bodies below. The difference is that a query module must have at least one query in its namespace. This is usually a select clause, but can also be a query predicate. For example: OneTwoQuery.ql import OneTwoThreeLib from OneTwoThree ott where ott = 1 or ott = 2 select ott This file defines a query module named OneTwoQuery. The body of this module consists of an import statement and a select clause. 4.2.2. Explicit modules¶ You can also define a module within another module. This is an explicit module definition. An explicit module is defined with the keyword module followed by the module name, and then the module body enclosed in braces. It can contain any of the elements listed in Module bodies below, apart from select clauses. For example, you could add the following QL snippet to the library file OneTwoThreeLib.qll defined above: ... module M { class OneTwo extends OneTwoThree { OneTwo() { this = 1 or this = 2 } } } This defines an explicit module named M. The body of this module defines the class OneTwo. 4.3. Module bodies¶ The body of a module is the code inside the module definition, for example the class OneTwo in the explicit module M. In general, the body of a module can contain the following constructs: - Import statements - Predicates - Types (including user-defined classes) - Aliases - Explicit modules - Select clauses (only available in a query module) 4.4. Importing modules¶ The main benefit of storing code in a module is that you can reuse it in other modules. To access the contents of an external module, you can import the module using an import statement. When you import a module this brings all the names in its namespace, apart from private names, into the namespace of the current module. 4.4.1. Import statements¶ Import statements are used for importing modules and are of the form: import <module_expression1> as <name> import <module_expression2> Import statements are usually listed at the beginning of the module. Each import statement imports one module. You can import multiple modules by including multiple import statements (one for each module you want to import). An import statement can also be annotated with private. You can import a module under a different name using the as keyword, for example import javascript as js. The <module_expression> itself can be a module name, a selection, or a qualified reference. See Name resolution for more details.
https://help.semmle.com/QL/ql-handbook/modules.html
CC-MAIN-2018-51
refinedweb
685
56.96
Reading imperative programs is hard. I don't know if this has always been true or if it's only become true since I started using functional programming more. But I've increasingly found that it takes me a long time to understand what a piece of Python code does, and oftentimes get it wrong. For example, what does this function do? def foo(xs): total = 0 count = 0 for x in xs: total += x count += 1 return total / count That's not so hard -- it compute the average of the collection xs. But this function has a problem, which is that for many practical problems you can't actually use this function as written. For example, if you're averaging over some large number of rows returned by a SQL query, you can't afford to spend the memory to store all of those numbers at once, but you can afford the CPU time to iterate over all of them. So in practice this code actually looks more like this # Stuff is happening up here total = 0 count = 0 for row in complicated_query.execute(): data_point = some_function(row) total += data_point count += 1 # Do stuff with total / count As more and more things get inlined into this procedure, the harder and harder it gets to understand what things are being averaged and possibly even that the average is what's getting returned. It's tempting to say that Haskell solves this problem. average :: Fractional a => [a] -> a average = sum xs / fromIntegral (length xs) Since Haskell lists are lazy, iterating over them can be done without storing the entire list in memory, as the tail of the list hasn't been evaluated yet and the head gets garbage collected once we use it. But, as I learned somewhat recently, this implementation of average leads to space leaks. Thatt's because while the computations of sum xs and length xs can each individually be done in constant memory, they aren't going to be evaluated interleaved, and so the entire list sticks around while the first one is being evaluated, and it can't be garbage collected because the thunk for the second one still references the head of the whole list. Thankfully, there are libraries that solve this problem, and it is even given as an example at the top of the documentation for the Foldl package. import qualified Control.Foldl as L average = (/) <$> L.sum <*> L.genericLength Actually, I was unfair to the Python code above. The exact same code unchanged will work with generators as well, which will allow it to work in constant memory. However, it still has a problem when we want to compute the average as well as something else, similar to the problem with the naive Haskell code. In Python, generator objects can only really be iterated over once. If you need to do multiple passes you either need to create the whole generator again or store the results. Imagine your generator is a recursive search for board layouts that match some particular constraints. Running the generator again would be very costly, but storing the list in memory could also be infeasible. The standard solution seems to be to inline all of your accumulation functions into a single loop, but once you do that your code quickly becomes unreadable. I wrote a quick version of Foldl in Python. It's not as syntactically pretty as the Haskell version, but it gets the job done quite readably. import operator class Fold(object): def __init__(self, step, start, done): self.step = step self.start = start self.done = done def run(self, iterable): return self.done(reduce(self.step, iterable, self.start)) @classmethod def liftA(cls, func, *folds): steps = [f.step for f in folds] dones = [f.done for f in folds] new_start = tuple(f.start for f in folds) def new_step(acc, x): return tuple(substep(subacc, x) for subacc, substep in zip(acc, steps)) def new_done(acc): results = (subdone(subacc) for subacc, subdone in zip(acc, dones)) return func(*results) return cls(new_step, new_start, new_done) def premap(self, func): return self.__class__(lambda acc, x: self.step(acc, func(x)), self.start, self.done) def postmap(self, func): return self.__class__(self.step, self.start, lambda acc: func(self.done(acc))) identity = lambda x: x maketuple = lambda *args: args sum = Fold(operator.add, 0, identity) length = Fold(lambda acc, x: acc + 1, 0, identity) minimum = Fold(lambda x, y: y if x is None else min(x, y), None, identity) maximum = Fold(lambda x, y: y if x is None else max(x, y), None, identity) head = Fold(lambda x, y: y if x is None else x, None, identity) last = Fold(lambda x, y: y, None, identity) all = Fold(lambda x, y: x and y, True, identity) any = Fold(lambda x, y: x or y, False, identity) average = Fold.liftA(operator.truediv, sum, length) elem = lambda e: any.premap(lambda x: x == e) notElem = lambda e: all.premap(lambda x: x != e)
http://extratricky.com/blog/reading-imperative-programs
CC-MAIN-2017-22
refinedweb
836
62.48
BLE RSSI level Hello everybody, I am trying to use the RSSI of the BLE scanning on Wipy to send some message when some threshold is reached. But unfortunately, the reported values during the scan seems to be randomly generated. It goes from -15 to -60 without any update of the emitter location. And there is no significant change in values when the emitter us far away and still detectable. I thought it was related to the onboard antenna, but with the external antenna plugged, behaviour is still unchanged. Did you already noticed that ? Is there a way to activate the use of external antenna? Did i make something wrong or is there a problem with my WiPy chipset? Thanks @jmarcelino will you need to activate the external antenna even if you don't use an antenna for bluetooth ? just wondering, because i get horribly unstable rssi values... You are certainly right. That is the same problem. Actually the returned values are strange, with the same variation pattern. It is like the decoding was wrong, maybe some inversion in some bits or a Little or big endian inversion. Thanks for your support. I hope it will be corrected soon. - jmarcelino last edited by jmarcelino @the_ned I found a post on the ESP32 forum about the same problem so it seems it's happening at a lower level. Maybe some calibration isn't correct or maybe something due to the recent WiFi coexistence. When it's fixed by Espressif in the ESP-IDF it should reflect very quickly on MicroPython, the values come directly from there. OK, I tried using the Lopy with or without external antenna and the RSSI level provided are too inconsistent and not reliable. It is a showstopper for what I have planned to use the chipset. I hope it could be solved quickly. Usually BLE chipset are quite good at Signal Strength measurement. It could anyway be interesting to see if someone have the same poor results when executing the code . Here after is my short test code. from network import Bluetooth from machine import Timer from network import WLAN chrono = Timer.Chrono() chrono.start(); bluetooth = Bluetooth() print("start") wlan = WLAN(mode=WLAN.STA, antenna=WLAN.EXT_ANT) while True: bluetooth.start_scan(-1) # start scanning with no timeout while bluetooth.isscanning(): adv = bluetooth.get_adv() if adv: print(adv) Hi, I have made the test. Actually it did not changed anything in the RSSI level accuracy. I will try using a LoPy instead WiPy and give you some feedback. =-53,00\x00\x01\xcb\x00') =-41,01\x00\x01\xcb\x00') (mac=b'\xc3\xf3\x12\x00\x02\xd1', addr_type=1, adv_type=1, rssi=-59,01\x00\x01\xcb\x00') (mac=b'\xc3\xf3\x12\x00\x02\xd1', addr_type=1, adv_type=1, rssi=-25, - jmarcelino last edited by jmarcelino @the_ned Yes, you need to activate the external antenna even for Bluetooth. It's not very intuitive - or documented! - as you have to do it through the WiFi module (Bluetooth shares the same radio hardware) Something like this should work from network import WLAN wlan = WLAN(mode=WLAN.STA, antenna=WLAN.EXT_ANT) replace WLAN.STA with WLAN.AP if you're not connecting to your own WiFi and want the WiPy to create it's own WiFi network (the default). You can also use the wlan.antenna(WLAN.EXT_ANT)function. then use your Bluetooth code as usual. I've not checked the accuracy of the RSSI values yet though.
https://forum.pycom.io/topic/554/ble-rssi-level
CC-MAIN-2022-21
refinedweb
580
67.55
$ ./configure --prefix=$HOME/.local $ make $ make install This guide is aimed at developers who are familiar with using Linux but are less acquainted with typical Linux development tools, and who do not have root access to the box they are working on. It is written with PBC in mind, but should work for most libraries. This Program Library HOWTO contains a thorough explanation of why libraries are setup the way they are in Linux. For information on how to use the PBC library, please consult the manual. One of the chapters is a tutorial. You can skim most of the text and just type in what you see in the examples. For most libraries, once you have decompressed the source package, type the following to install it to the .local subdirectory of your home directory. $ ./configure --prefix=$HOME/.local $ make $ make install Occasionally a library does not conform to this standard, in which case you may have to edit a Makefile or similar to tell it where to install. In this case, there ought to be documentation specifying how to do this. We call the destination directory .local because it functions as the system-wide /usr/local directory (except that it’s for your user account only), and the preceding period prevents it from cluttering directory listings. (Of course, if you prefer to see everything in your directory listings you don’t need the period, and in this case you may even wish to use --prefix=$HOME.) If everything worked, you should see new files in assorted subdirectories of $HOME/.local with names such as include, lib and bin. A PBC program foo.c might look like the following. #include "pbc.h" int main(void) { /* call PBC functions */ return 0; } Simply typing gcc -o foo foo.c will fail for two reasons. Firstly, gcc does not know where to find the include file pbc.h. You must explicitly tell gcc where to do this, using the -I option, because gcc normally only searches the standard system-wide include directories. However, even if this is done correctly, the compilation still fails, this time because the library file (which contains the compiled library routines) has not been mentioned in any way. Not only do you have to mention which library you want to link with using the -l option, you must also tell gcc where to find it because the library is somewhere in your home directory and not in a standard location. This can be done with the -L option. But even if you did all this, although your program would compile, it would not run. This is because it is dynamically linked (that is, the library routines are not placed in the binary so when run, the program needs to know where to find the library). There are two ways around this. One is to use the -static option which will put all the required library routines in your binary. Your binary will be a lot bigger, and every time you upgrade your library you have to recompile the binary. On the other hand, it may be faster. The other way is to embed the location of the library in the binary. This can only be done by the linker, not the compiler, so we use the -Wl option to pass another option on to the linker. The linker option we want is the -rpath option (which is sometimes called the -R option). Thus to compile foo.c type: $ gcc -o foo foo.c -I ~/.local/include/pbc -L ~/.local/lib -Wl,-rpath ~/.local/lib -l pbc Actually, there is another way, but it is considered harmful. If you add $HOME/.local/lib to the environment variable named LD_LIBRARY_PATH all binaries will now look in that directory for any libraries they need. I recommend only doing this in special situations. For example, if you moved the library to a different location and want to test a binary without recompiling, or if you forgot to use the rpath option and you want to test the binary without recompiling. Typing in all these options is an annoyance. You can eliminate the need for the -L and -rpath options with environment variables LDFLAGS or LD_RUN_PATH, but you still have to type the other ones. One solution to this is to use the make program. You should eventually follow a proper make tutorial, but for now, create a file named Makefile with the following contents. target: gcc -o foo foo.c -I ~/.local/include/pbc -L ~/.local/lib -Wl,-rpath ~/.local/lib -l pbc The second line must begin with a tab and not spaces, otherwise it will not work. Now running make will compile your program. You may be wondering why there’s a pbc on the end of the -I option but not the -L option. This is PBC’s fault: instead of having a single header file named "pbc.h", there are many other header files that the developer never needs to know about, and to stop them messing up the include directory, all the PBC header files are placed in a separate subdirectory of their own. Other libraries also follow this convention. It might seem pointless to have an rpath option. Why not have the binary automatically search for the library in the directory specified by the -L option? While this may suit you now, situations where this behaviour is undesirable can easily occur. For example, say you don’t have root access on the system you develop on and the "Foo" library is not installed (so you need the L option), but on the target systems that your binaries end up on, the "Foo" library is always found in a standard location (so you don’t want the rpath option). Or maybe "Foo" is located somewhere special on the target machine, so you want rpath to point to a different directory altogether.
https://crypto.stanford.edu/pbc/howto.html
CC-MAIN-2019-43
refinedweb
983
62.78
Contents - The Domain Name System - DNS Background and Concepts - The DNS Files - Using DNS - Setting up a caching only name server The Domain Name System Use of the Domain Name System has been discussed in previous chapters, without going into detail on the setup of the server providing the service. This chapter describes setting up a simple, small domain with one Domain Name System (DNS) nameserver on a NetBSD system. It includes a brief explanation and overview of the DNS; further information can be obtained from the DNS Resources Directory (DNSRD) at. DNS Background and Concepts The DNS is a widely used naming service on the Internet and other TCP/IP networks. The network protocols, data and file formats, and other aspects of the DNS are Internet Standards, specified in a number of RFC documents, and described by a number of other reference and tutorial works. The DNS has a distributed, client-server architecture. There are reference implementations for the server and client, but these are not part of the standard. There are a number of additional implementations available for many platforms. Naming Services Naming services are used to provide a mapping between textual names and configuration data of some form. A nameserver maintains this mapping, and clients request the nameserver to resolve a name into its attached data. The reader should have a good understanding of basic hosts to IP address mapping and IP address class specifications, see Name Service Concepts. In the case of the DNS, the configuration data bound to a name is in the form of standard Resource Records (RRs). These textual names conform to certain structural conventions. The DNS namespace The DNS presents a hierarchical name space, much like a UNIX filesystem, pictured as an inverted tree with the root at the top. TOP-LEVEL .org | MID-LEVEL .diverge.org ______________________|________________________ | | | BOTTOM-LEVEL strider.diverge.org samwise.diverge.org wormtongue.diverge.org The system can also be logically divided even further if one wishes at different points. The example shown above shows three nodes on the diverge.org domain, but we could even divide diverge.org into subdomains such as "strider.net1.diverge.org", "samwise.net2.diverge.org" and "wormtongue.net2.diverge.org"; in this case, 2 nodes reside in "net2.diverge.org" and one in "net1.diverge.org". There are directories of names, some of which may be sub-directories of further names. These directories are sometimes called zones. There is provision for symbolic links, redirecting requests for information on one name to the records bound to another name. Each name recognised by the DNS is called a Domain Name, whether it represents information about a specific host, or a directory of subordinate Domain Names (or both, or something else). Unlike most filesystem naming schemes, however, Domain Names are written with the innermost name on the left, and progressively higher-level domains to the right, all the way up to the root directory if necessary. The separator used when writing Domain Names is a period, ".". Like filesystem pathnames, Domain Names can be written in an absolute or relative manner, though there are some differences in detail. For instance, there is no way to indirectly refer to the parent domain like with the UNIX .. directory. Many (but not all) resolvers offer a search path facility, so that partially-specified names can be resolved relative to additional listed sub-domains other than the client's own domain. Names that are completely specified all the way to the root are called Fully Qualified Domain Names or FQDNs. A defining characteristic of an FQDN is that it is written with a terminating period. The same name, without the terminating period, may be considered relative to some other sub-domain. It is rare for this to occur without malicious intent, but in part because of this possibility, FQDNs are required as configuration parameters in some circumstances. On the Internet, there are some established conventions for the names of the first few levels of the tree, at which point the hierarchy reaches the level of an individual organisation. This organisation is responsible for establishing and maintaining conventions further down the tree, within its own domain. Resource Records Resource Records for a domain are stored in a standardised format in an ASCII text file, often called a zone file. The following Resource Records are commonly used (a number of others are defined but not often used, or no longer used). In some cases, there may be multiple RR types associated with a name, and even multiple records of the same type. Common DNS Resource Records A: Address -- This record contains the numerical IP address associated with the name. CNAME: Canonical Name -- This record contains the Canonical Name (an FQDN with an associated A record) of the host name to which this record is bound. This record type is used to provide name aliasing, by providing a link to another name with which other appropriate RR's are associated. If a name has a CNAME record bound to it, it is an alias, and no other RR's are permitted to be bound to the same name. It is common for these records to be used to point to hosts providing a particular service, such as an FTP or HTTP server. If the service must be moved to another host, the alias can be changed, and the same name will reach the new host. PTR: Pointer -- This record contains a textual name. These records are bound to names built in a special way from numerical IP addresses, and are used to provide a reverse mapping from an IP address to a textual name. This is described in more detail in Reverse Resolution. NS: Name Server -- This record type is used to delegate a sub-tree of the Domain Name space to another nameserver. The record contains the FQDN of a DNS nameserver with information on the sub-domain, and is bound to the name of the sub-domain. In this manner, the hierarchical structure of the DNS is established. Delegation is described in more detail in Delegation. MX: Mail eXchange -- This record contains the FQDN for a host that will accept SMTP electronic mail for the named domain, together with a priority value used to select an MX host when relaying mail. It is used to indicate other servers that are willing to receive and spool mail for the domain if the primary MX is unreachable for a time. It is also used to direct email to a central server, if desired, rather than to each and every individual workstation. HINFO: Host Information -- Contains two strings, intended for use to describe the host hardware and operating system platform. There are defined strings to use for some systems, but their use is not enforced. Some sites, because of security considerations, do not publicise this information. TXT: Text -- A free-form text field, sometimes used as a comment field, sometimes overlaid with site-specific additional meaning to be interpreted by local conventions. SOA: Start of Authority -- This record is required to appear for each zone file. It lists the primary nameserver and the email address of the person responsible for the domain, together with default values for a number of fields associated with maintaining consistency across multiple servers and caching of the results of DNS queries. Delegation Using NS records, authority for portions of the DNS namespace below a certain point in the tree can be delegated, and further sub-parts below that delegated again. It is at this point that the distinction between a domain and a zone becomes important. Any name in the DNS is called a domain, and the term applies to that name and to any subordinate names below that one in the tree. The boundaries of a zone are narrower, and are defined by delegations. A zone starts with a delegation (or at the root), and encompasses all names in the domain below that point, excluding names below any subsequent delegations. This distinction is important for implementation - a zone is a single administrative entity (with a single SOA record), and all data for the zone is referred to by a single file, called a zone file. A zone file may contain more than one period-separated level of the namespace tree, if desired, by including periods in the names in that zone file. In order to simplify administration and prevent overly-large zone files, it is quite legal for a DNS server to delegate to itself, splitting the domain into several zones kept on the same server. Delegation to multiple servers For redundancy, it is common (and often administratively required) that there be more than one nameserver providing information on a zone. It is also common that at least one of these servers be located at some distance (in terms of network topology) from the others, so that knowledge of that zone does not become unavailable in case of connectivity failure. Each nameserver will be listed in an NS record bound to the name of the zone, stored in the parent zone on the server responsible for the parent domain. In this way, those searching the name hierarchy from the top down can contact any one of the servers to continue narrowing their search. This is occasionally called walking the tree. There are a number of nameservers on the Internet which are called root nameservers. These servers provide information on the very top levels of the domain namespace tree. These servers are special in that their addresses must be pre-configured into nameservers as a place to start finding other servers. Isolated networks that cannot access these servers may need to provide their own root nameservers. Secondaries, Caching, and the SOA record In order to maintain consistency between these servers, one is usually configured as the primary server, and all administrative changes are made on this server. The other servers are configured as secondaries, and transfer the contents of the zone from the primary. This operational model is not required, and if external considerations require it, multiple primaries can be used instead, but consistency must then be maintained by other means. DNS servers that store Resource Records for a zone, whether they be primary or secondary servers, are said to be authoritative for the zone. A DNS server can be authoritative for several zones. When nameservers receive responses to queries, they can cache the results. This has a significant beneficial impact on the speed of queries, the query load on high-level nameservers, and network utilisation. It is also a major contributor to the memory usage of the nameserver process. There are a number of parameters that are important to maintaining consistency amongst the secondaries and caches. The values for these parameters for a particular domain zone file are stored in the SOA record. These fields are: Fields of the SOA Record Serial -- A serial number for the zone file. This should be incremented any time the data in the domain is changed. When a secondary wants to check if its data is up-to-date, it checks the serial number on the primary's SOA record. Refresh -- A time, in seconds, specifying how often the secondary should check the serial number on the primary, and start a new transfer if the primary has newer data. Retry -- If a secondary fails to connect to the primary when the refresh time has elapsed (for example, if the host is down), this value specifies, in seconds, how often the connection should be retried. Expire -- If the retries fail to reach the primary within this number of seconds, the secondary destroys its copies of the zone data file(s), and stops answering requests for the domain. This stops very old and potentially inaccurate data from remaining in circulation. TTL -- This field specifies a time, in seconds, that the resource records in this zone should remain valid in the caches of other nameservers. If the data is volatile, this value should be short. TTL is a commonly-used acronym, that stands for "Time To Live". Name Resolution DNS clients are configured with the addresses of DNS servers. Usually, these are servers which are authoritative for the domain of which they are a member. All requests for name resolution start with a request to one of these local servers. DNS queries can be of two forms: A recursive query asks the nameserver to resolve a name completely, and return the result. If the request cannot be satisfied directly, the nameserver looks in its configuration and caches for a server higher up the domain tree which may have more information. In the worst case, this will be a list of pre-configured servers for the root domain. These addresses are returned in a response called a referral. The local nameserver must then send its request to one of these servers. Normally, this will be an iterative query, which asks the second nameserver to either respond with an authoritative reply, or with the addresses of nameservers (NS records) listed in its tables or caches as authoritative for the relevant zone. The local nameserver then makes iterative queries, walking the tree downwards until an authoritative answer is found (either positive or negative) and returned to the client. In some configurations, such as when firewalls prevent direct IP communications between DNS clients and external nameservers, or when a site is connected to the rest of the world via a slow link, a nameserver can be configured with information about a forwarder. This is an external nameserver to which the local nameserver should make requests as a client would, asking the external nameserver to perform the full recursive name lookup, and return the result in a single query (which can then be cached), rather than reply with referrals. Reverse Resolution The DNS provides resolution from a textual name to a resource record, such as an A record with an IP address. It does not provide a means, other than exhaustive search, to match in the opposite direction; there is no mechanism to ask which name is bound to a particular RR. For many RR types, this is of no real consequence, however it is often useful to identify by name the host which owns a particular IP address. Rather than complicate the design and implementation of the DNS database engine by providing matching functions in both directions, the DNS utilises the existing mechanisms and creates a special namespace, populated with PTR records, for IP address to name resolution. Resolving in this manner is often called reverse resolution, despite the inaccurate implications of the term. The manner in which this is achieved is as follows: A normal domain name is reserved and defined to be for the purpose of mapping IP addresses. The domain name used is in-addr.arpa.which shows the historical origins of the Internet in the US Government's Defence Advanced Research Projects Agency's funding program. This domain is then subdivided and delegated according to the structure of IP addresses. IP addresses are often written in decimal dotted quad notation, where each octet of the 4-octet long address is written in decimal, separated by dots. IP address ranges are usually delegated with more and more of the left-most parts of the address in common as the delegation gets smaller. Thus, to allow delegation of the reverse lookup domain to be done easily, this is turned around when used with the hierarchical DNS namespace, which places higher level domains on the right of the name. Each byte of the IP address is written, as an ASCII text representation of the number expressed in decimal, with the octets in reverse order, separated by dots and appended with the in-addr.arpa. domain name. For example, to determine the hostname of a network device with IP address 11.22.33.44, this algorithm would produce the string 44.33.22.11.in-addr.arpa.which is a legal, structured Domain Name. A normal nameservice query would then be sent to the nameserver asking for a PTR record bound to the generated name. The PTR record, if found, will contain the FQDN of a host. One consequence of this is that it is possible for mismatch to occur. Resolving a name into an A record, and then resolving the name built from the address in that A record to a PTR record, may not result in a PTR record which contains the original name. There is no restriction within the DNS that the "reverse" mapping must coincide with the "forward" mapping. This is a useful feature in some circumstances, particularly when it is required that more than one name has an A record bound to it which contains the same IP address. While there is no such restriction within the DNS, some application server programs or network libraries will reject connections from hosts that do not satisfy the following test: the state information included with an incoming connection includes the IP address of the source of the request. a PTR lookup is done to obtain an FQDN of the host making the connection an A lookup is then done on the returned name, and the connection rejected if the source IP address is not listed amongst the A records that get returned. This is done as a security precaution, to help detect and prevent malicious sites impersonating other sites by configuring their own PTR records to return the names of hosts belonging to another organisation. The DNS Files Now let's look at actually setting up a small DNS enabled network. We will continue to use the examples mentioned in Chapter 24, Setting up TCP/IP on NetBSD in practice, i.e. we assume that: - Our IP networking is working correctly - We have IPNAT working correctly - Currently all hosts use the ISP for DNS Our Name Server will be the strider host which also runs IPNAT, and our two clients use "strider" as a gateway. It is not really relevant as to what type of interface is on "strider", but for argument's sake we will say a 56k dial up connection. So, before going any further, let's look at our /etc/hosts file on "strider" before we have made the alterations to use DNS. Example strider's /etc/hosts file 127.0.0.1 localhost 192.168.1.1 strider 192.168.1.2 samwise sam 192.168.1.3 wormtongue worm This is not exactly a huge network, but it is worth noting that the same rules apply for larger networks as we discuss in the context of this section. The other assumption we want to make is that the domain we want to set up is diverge.org, and that the domain is only known on our internal network, and not worldwide. Proper registration of the nameserver's IP address as primary would be needed in addition to a static IP. These are mostly administrative issues which are left out here. The NetBSD operating system provides a set of config files for you to use for setting up DNS. Along with a default /etc/named.conf, the following files are stored in the /etc/namedb directory: localhost 127 loopback.v6 root.cache You will see modified versions of these files in this section, and I strongly suggest making a backup copy of the original files for reference purposes. Note: The examples in this chapter refer to BIND major version 8, however, it should be noted that format of the name database and other config files are almost 100% compatible between version. The only difference I noticed was that the $TTL information was not required. /etc/named.conf The first file we want to look at is /etc/named.conf. This file is the config file for bind (hence the catchy name). Setting up system like the one we are doing is relatively simple. First, here is what mine looks like: options { directory "/etc/namedb"; allow-transfer { 192.168.1.0/24; }; allow-query { 192.168.1.0/24; }; listen-on port 53 { 192.168.1.1; }; }; zone "localhost" { type master; notify no; file "localhost"; }; zone "127.IN-ADDR.ARPA" { type master; notify no; file "127"; }; zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.int" { type master; file "loopback.v6"; }; zone "diverge.org" { type master; notify no; file "diverge.org"; }; zone "1.168.192.in-addr.arpa" { type master; notify no; file "1.168.192"; }; zone "." in { type hint; file "root.cache"; }; Note that in my named.conf the root (".") section is last, that is because there is another domain called diverge.org on the internet (I happen to own it) so I want the resolver to look out on the internet last. This is not normally the case on most systems. Another very important thing to remember here is that if you have an internal setup, in other words no live internet connection and/or no need to do root server lookups, comment out the root (".") zone. It may cause lookup problems if a particular client decides it wants to reference a domain on the internet, which our server couldn't resolve itself. Looks like a pretty big mess, upon closer examination it is revealed that many of the lines in each section are somewhat redundant. So we should only have to explain them a few times. Lets go through the sections of named.conf: options This section defines some global parameters, most noticeable is the location of the DNS tables, on this particular system, they will be put in /etc/namedb as indicated by the "directory" option. Following are the rest of the params: allow-transfer-- This option lists which remote DNS servers acting as secondaries are allowed to do zone transfers, i.e. are allowed to read all DNS data at once. For privacy reasons, this should be restricted to secondary DNS servers only. allow-query-- This option defines hosts from what network may query this name server at all. Restricting queries only to the local network (192.168.1.0/24) prevents queries arriving on the DNS server's external interface, and prevent possible privacy issues. listen-on port-- This option defined the port and associated IP addresses this server will run named(8) on. Again, the "external" interface is not listened here, to prevent queries getting received from "outside". The rest of the named.conf file consists of zones. A zone is an area that can have items to resolve attached, e.g. a domain can have hostnames attached to resolve into IP addresses, and a reverse-zone can have IP addresses attached that get resolved back into hostnames. Each zone has a file associated with it, and a table within that file for resolving that particular zone. As is readily apparent, their format in named.conf is strikingly similar, so I will highlight just one of their records: zone diverge.org type-- The type of a zone is usually of type "master" in all cases except for the root zone .and for zones that a secondary (backup) service is provided - the type obviously is "secondary" in the latter case. notify-- Do you want to send out notifications to secondaries when your zone changes? Obviously not in this setup, so this is set to "no". file-- This option sets the filename in our /etc/namedbdirectory where records about this particular zone may be found. For the "diverge.org" zone, the file /etc/namedb/diverge.orgis used. /etc/namedb/localhost For the most part, the zone files look quite similar, however, each one does have some unique properties. Here is what the localhost file looks like: 1|$TTL 3600 2|@ IN SOA strider.diverge.org. root.diverge.org. ( 3| 1 ; Serial 4| 8H ; Refresh 5| 2H ; Retry 6| 1W ; Expire 7| 1D) ; Minimum TTL 8| IN NS localhost. 9|localhost. IN A 127.0.0.1 10| IN AAAA ::1 Line by line: Line 1: This is the Time To Live for lookups, which defines how long other DNS servers will cache that value before discarding it. This value is generally the same in all the files. Line 2: This line is generally the same in all zone files except root.cache. It defines a so-called "Start Of Authority" (SOA) header, which contains some basic information about a zone. Of specific interest on this line are "strider.diverge.org." and "root.diverge.org." (note the trailing dots!). Obviously one is the name of this server and the other is the contact for this DNS server, in most cases root seems a little ambiguous, it is preferred that a regular email account be used for the contact information, with the "@" replaced by a "." (for example, mine would be "jrf.diverge.org."). Line 3: This line is the serial number identifying the "version" of the zone's data set (file). The serial number should be incremented each time there is a change to the file, the usual format is to either start with a value of "1" and increase it for every change, or use a value of "YYYYMMDDNN" to encode year (YYYY), month (MM), day (DD) and change within one day (NN) in the serial number. Line 4: This is the refresh rate of the server, in this file it is set to once every 8 hours. Line 5: The retry rate. Line 6: Lookup expiry. Line 7: The minimum Time To Live. Line 8: This is the Nameserver line, which uses a "NS" resource record to show that "localhost" is the only DNS server handing out data for this zone (which is "@", which indicates the zone name used in the named.conffile, i.e. "diverge.org") is, well, "localhost". Line 9: This is the localhost entry, which uses an "A" resource record to indicate that the name "localhost" should be resolved into the IP-address 127.0.0.1 for IPv4 queries (which specifically ask for the "A" record). Line 10: This line is the IPv6 entry, which returns ::1 when someone asks for an IPv6-address (by specifically asking for the AAAA record) of "localhost.". /etc/namedb/zone.127.0.0 This is the reverse lookup file (or zone) to resolve the special IP address 127.0.0.1 back to "localhost": 1| $TTL 3600 2| @ IN SOA strider.diverge.org. root.diverge.org. ( 3| 1 ; Serial 4| 8H ; Refresh 5| 2H ; Retry 6| 1W ; Expire 7| 1D) ; Minimum TTL 8| IN NS localhost. 9| 1.0.0 IN PTR localhost. In this file, all of the lines are the same as the localhost zonefile with exception of line 9, this is the reverse lookup (PTR) record. The zone used here is "@" again, which got set to the value given in named.conf, i.e. "127.in-addr.arpa". This is a special "domain" which is used to do reverse-lookup of IP addresses back into hostnames. For it to work, the four bytes of the IPv4 address are reserved, and the domain "in-addr.arpa" attached, so to resolve the IP address "127.0.0.1", the PTR record of "1.0.0.127.in-addr.arpa" is queried, which is what is defined in that line. /etc/namedb/diverge.org This zone file is populated by records for all of our hosts. Here is what it looks like: 1| $TTL 3600 2| @ IN SOA strider.diverge.org. root.diverge.org. ( 3| 1 ; serial 4| 8H ; refresh 5| 2H ; retry 6| 1W ; expire 7| 1D ) ; minimum seconds 8| IN NS strider.diverge.org. 9| IN MX 10 strider.diverge.org. ; primary mail server 10| IN MX 20 samwise.diverge.org. ; secondary mail server 11| strider IN A 192.168.1.1 12| samwise IN A 192.168.1.2 13| www IN CNAME samwise.diverge.org. 14| worm IN A 192.168.1.3 There is a lot of new stuff here, so lets just look over each line that is new here: Line 9: This line shows our mail exchanger (MX), in this case it is "strider". The number that precedes "strider.diverge.org." is the priority number, the lower the number their higher the priority. The way we are setup here is if "strider" cannot handle the mail, then "samwise" will. Line 11: CNAME stands for canonical name, or an alias for an existing hostname, which must have an A record. So we have aliased samwise.diverge.org. The rest of the records are simply mappings of IP address to a full name (A records). /etc/namedb/1.168.192 This zone file is the reverse file for all of the host records, to map their IP numbers we use on our private network back into hostnames. The format is similar to that of the "localhost" version with the obvious exception being the addresses are different via the different zone given in the named.conf file, i.e. "0.168.192.in-addr.arpa" here: 1|$TTL 3600 2|@ IN SOA strider.diverge.org. root.diverge.org. ( 3| 1 ; serial 4| 8H ; refresh 5| 2H ; retry 6| 1W ; expire 7| 1D ) ; minimum seconds 8| IN NS strider.diverge.org. 9|1 IN PTR strider.diverge.org. 10|2 IN PTR samwise.diverge.org. 11|3 IN PTR worm.diverge.org. /etc/namedb/root.cache This file contains a list of root name servers for your server to query when it gets requests outside of its own domain that it cannot answer itself. Here are first few lines of a root zone file: ; ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . <file>" ; configuration file of BIND domain name servers). ; ; This file is made available by InterNIC ; under anonymous FTP as ; file /domain/db ; ... This file can be obtained from ISC at and usually comes with a distribution of BIND. A root.cache file is included in the NetBSD operating system's "etc" set. This section has described the most important files and settings for a DNS server. Please see the BIND documentation in /usr/src/dist/bind/doc/bog and named.conf(5) for more information. Using DNS In this section we will look at how to get DNS going and setup "strider" to use its own DNS services. Setting up named to start automatically is quite simple. In /etc/rc.conf simply set named=yes. Additional options can be specified in named_flags, for example, I like to use -g nogroup -u nobody, so a non-root account runs the "named" process. In addition to being able to startup "named" at boot time, it can also be controlled with the ndc command. In a nutshell the ndc command can stop, start or restart the named server process. It can also do a great many other things. Before use, it has to be setup to communicate with the "named" process, see the ndc(8) and named.conf(5) man pages for more details on setting up communication channels between "ndc" and the "named" process. Next we want to point "strider" to itself for lookups. We have two simple steps, first, decide on our resolution order. On a network this small, it is likely that each host has a copy of the hosts table, so we can get away with using /etc/hosts first, and then DNS. However, on larger networks it is much easier to use DNS. Either way, the file where order of name services used for resolution is determined is /etc/nsswitch.conf (see nsswitch.conf. Here is part of a typical nsswitch.conf: ... group_compat: nis hosts: files dns netgroup: files [notfound=return] nis ... The line we are interested in is the "hosts" line. "files" means the system uses the /etc/hosts file first to determine ip to name translation, and if it can't find an entry, it will try DNS. The next file to look at is /etc/resolv.conf, which is used to configure DNS lookups ("resolution") on the client side. The format is pretty self explanatory but we will go over it anyway: domain diverge.org search diverge.org nameserver 192.168.1.1 In a nutshell this file is telling the resolver that this machine belongs to the "diverge.org" domain, which means that lookups that contain only a hostname without a "." gets this domain appended to build a FQDN. If that lookup doesn't succeed, the domains in the "search" line are tried next. Finally, the "nameserver" line gives the IP addresses of one or more DNS servers that should be used to resolve DNS queries. To test our nameserver we can use several commands, for example: # host sam sam.diverge.org has address 192.168.1.2 As can be seen, the domain was appended automatically here, using the value from /etc/resolv.conf. Here is another example, the output of running host: $ host is an alias for. has address 68.142.226.38 has address 68.142.226.39 has address 68.142.226.46 has address 68.142.226.50 has address 68.142.226.51 has address 68.142.226.54 has address 68.142.226.55 has address 68.142.226.32 Other commands for debugging DNS besides host(1) are nslookup(8) and dig(1). Note that ping(8) is not useful for debugging DNS, as it will use whatever is configured in /etc/nsswitch.conf to do the name-lookup. At this point the server is configured properly. The procedure for setting up the client hosts are easier, you only need to setup /etc/nsswitch.conf and /etc/resolv.conf to the same values as on the server. Setting up a caching only name server A caching only name server has no local zones; all the queries it receives are forwarded to the root servers and the replies are accumulated in the local cache. The next time the query is performed the answer will be faster because the data is already in the server's cache. Since this type of server doesn't handle local zones, to resolve the names of the local hosts it will still be necessary to use the already known /etc/hosts file. Since NetBSD supplies defaults for all the files needed by a caching only server, it only needs to be enabled and started and is immediately ready for use! To enable named, put named=yes into /etc/rc.conf, and tell the system to use it adding the following line to the /etc/resolv.conf file: # cat /etc/resolv.conf nameserver 127.0.0.1 Now we can start named: # sh /etc/rc.d/named restart Testing the server Now that the server is running we can test it using the nslookup(8) program: $ nslookup Default server: localhost Address: 127.0.0.1 > Let's try to resolve a host name, for example "": > Server: localhost Address: 127.0.0.1 Name: Address: 204.152.190.12 If you repeat the query a second time, the result is slightly different: > Server: localhost Address: 127.0.0.1 Non-authoritative answer: Name: Address: 204.152.190.12 As you've probably noticed, the address is the same, but the message Non-authoritative answer has appeared. This message indicates that the answer is not coming from an authoritative server for the domain NetBSD.org but from the cache of our own server. The results of this first test confirm that the server is working correctly. We can also try the host(1) and dig(1) commands, which give the following result. $ host has address 204.152.190.12 $ $ dig ; <<>> DiG 8.3 <<>> ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19409 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 0 ;; QUERY SECTION: ;;, type = A, class = IN ;; ANSWER SECTION:. 23h32m54s IN A 204.152.190.12 ;; AUTHORITY SECTION: NetBSD.org. 23h32m54s IN NS uucp-gw-1.pa.dec.com. NetBSD.org. 23h32m54s IN NS uucp-gw-2.pa.dec.com. NetBSD.org. 23h32m54s IN NS ns.NetBSD.org. NetBSD.org. 23h32m54s IN NS adns1.berkeley.edu. NetBSD.org. 23h32m54s IN NS adns2.berkeley.edu. ;; Total query time: 14 msec ;; FROM: miyu to SERVER: 127.0.0.1 ;; WHEN: Thu Nov 25 22:59:36 2004 ;; MSG SIZE sent: 32 rcvd: 175 As you can see dig(1) gives quite a bit of output, the expected answer can be found in the "ANSWER SECTION". The other data given may be of interest when debugging DNS problems.
https://wiki.netbsd.org/guide/dns/
CC-MAIN-2019-43
refinedweb
6,128
63.49
Computer Science Archive: Questions from October 23, 2009 - Anonymous asked0 answers - Anonymous askedI wanted to know if my following codes for file connections areproper - all using scanner not b... Show moreHey, I wanted to know if my following codes for file connections areproper - all using scanner not buffer reader --------------------- public boolean connectInput(String filename) { try { inputB = new Scanner(newFile(filename)); return true; } catch(FileNotFoundException e) { System.out.println("ERROR - "+e); } } ------------------------------- public static void disconnectOutFile() { output.close(); output = null; } ------------------------------ public static void writeLine(String item) { output.println(item); out.close(); } How can i make sure that there is an output file before writing toit? ------------------------------ public static void connectOutput(String filename) { try { output = newPrintWriter(filename); } catch(IOException e) { System.out.println("ERROR "+e); System.exit(-1); } } -------------------------------------- How can i disconnect input file ? Thanks i really appreciate the help :) • Show less0 answers - Anonymous askedProve that the vector from the viewpoint of a pinhole camera to the vanishing point (in the im... More »0 answers - Anonymous asked5. (a) [4 points] How many bits would it take to store a 3-minute song, using an encoding method tha1 answer - Anonymous askedHere a, b, c are inputs and X is output. Her... Show more Write a truth table for the following boolean function.• Show less Here a, b, c are inputs and X is output. Here a'stands for negation or NOT(a). You may do this column by column. X = a.b + a'.b'.c + b.c'2 answers - Anonymous askeda) Write a boolean expression for the truth table given. a b Output0 0 1a) Write a boolean expression for the truth table given. a b Output0 0 10 1 11 0 11 1 0 b) Also design a logic circuit using the circuit constructionalgorithm.• Show less3 answers - Anonymous askedBy using.......void get_date(int *p_day, int *p_month,... Show moreWrite a function to fetch a date from a user. By using.......void get_date(int *p_day, int *p_month, int*p_year); • Show less2 answers - Anonymous askedRank the following by order of growth. In other words, youwill need to find an arrangement g1,g2, g3... Show moreRank the following by order of growth. In other words, youwill need to find an arrangement g1,g2, g3, ......g25 of the functionssuch that g1 = Ω (g2), g2 = Ω (g3)........., g24 =Ω (g25). Partition your list into equivalenceclasses such that f(n) and g(n) are in the same class if and onlyif f(n) = θ(g(n)).(3\2)n (√2)lg n lg*n n2 (lg n)!n3 lg2n lg(n!) 22^n n1\lg nlg lgn n2n nlglg n lnn 2n• Show less2lgn (lgn)lg n 4lgn (n+1)! √lg nn! 2√2 lgn n n lg n 10 answers - Anonymous askedThe purpose of this exercise is to write the file processing andinitial st... Show moreMUST WORK IN C ENVIRONMENT The purpose of this exercise is to write the file processing andinitial stage of a hangman game. You will read words in from auser-specified file (hangman.dat) until EOF is reached, store themin a 2-dimensional array called "WordArray" and call a randomnumber generator to randomly choose one word from the WordArray touse for the next game. Fianlly, you will save the "Secret Word"into a filename provided by the user. Specifications: Ask the user for the name of the input file, save that name as astring, and "echo" the file name to the screen with an appropriatemessage. Write a function called read_words that is passed the name ofthe input file. Read_words then reads in the words in the namedfile (up to a maximum of 50) and stores them in a 2-dimensionalarray called WordArray. This array will be passed back to main() asa parameter, along with the total number of words contained in thearray. Write a function called get_word that takes three parameters: the2-dimensional WordArray (which has been filled with the words fromthe input file); a char array that will hold the word specificallychosen for this game, and the number of words in WordArray. Thisfunction will call a random number generator (see code below) thatwill provide a random number to select a word from WordArray forthe game. The chosen word is passed back to main() to be used toplay the game. Write a function call get_random that calls the predefine functionrand() to generate a random number within the proper range and usesa return statement to return the random number. This functionshould be passed the number of words in WordArray. You may use thefollowing code to generate random number. srand(23); //"seeds" the random number generator return(rand() % num_words); Requirements for main() The main() function should print an introduction (perhaps the rulesfor the game of hangman), request the name of the data file, andcall read_words and get_word. It should then print out the totalnumber of words that were in the input file, and the word that wasselected. Finally, it should prompt the user for a filename andsave the chosen word to that file. Use the preprocessor command #define to define the followingsymbolic global constants MAX_GUESSES: This will store the maximum number of possible guessesfor someone playing the hangman game. (This will not exceed 26) MAX_INCORRECT_GUESSES: This will store the maximum number ofpossible guesses for someone playing the hangman game. (This shouldbe 9) MAX_WORD_LENGTH: This will store the maximum word length for anyhangman game word. (Make sure it is large enough to cover all words provided in thedata file "Hangman.dat" MAX_WORDS: This will store the maximum number of words to be readinto WordArray. (This should not be greater than 50) Hangman.dat contains following; (be sure that words on each lineremains as below) vitreous omnivore tabernacle battalion chronological ignoramus slantwise wergeld importunate onomastic pasquinade tripalmitin covariance emollient rogue syzygy incarnadine kibosh batik frieze primogenitor zucchini leprechaun splenomegaly ultrasonic meringue cerulean lottery nucleotide paroxysm doubloon chartreuse hookah eelworm crenulate jurisdiction hymnal mediocre pollinate troubadour solstice tumultuous ziggarut charisma truncate chicanery • Show less1 answer - Anonymous askedDesign a Turing Machine for each of the following languages,give formal description of the TM and dr... Show moreDesign a Turing Machine for each of the following languages,give formal description of the TM and draw state diagram: a)0 |3nn≥0 , the language consisting of all stringsof 0s whose length is a power of 3. Some example words of the language are as follows: a. 0 b. 000000000000000000000000000 c. 000000000 b) {#| ∈{ }*,where w is thereverse of w, suchthat # forms a palindrome}. Some example words of thelanguage are as follows: a. 010111#111010 b. 110#011 c. 10010110#01101001 c) {ai bj ck |i + k = j, and j ≥ 1, i,k ≥ 0}. Some example words of the language are asfollows: a. aabbbc b. abbbbbcccc c. bc d. ab d) {ai bj ck |i x j = k, and i, j,k ≥ 1}. Some example words of the language are asfollows: a. aaabbcccccc b. abbbccc c. aaabbbccccccccc No. 2 Give Implementation-leveldescriptions of Turing machines that decide the followinglanguages: a) {w | w ∈ {0, 1}*, where both the number of 0s and thenumber of 1s are either odd or even}. Some example words of the language are as follows: a. 01100100 b. 101101 c. 11101000 d. 010101110000 b) {w | w ∈ {0, 1}* and w contains twice asmany 0s as 1s}. Following are some words of the language: a. 010 b. 100001 c. 010101000• Show less0 answers - Anonymous askedthis should be easy, but i'm having trouble writing a program that accepts a users first initial, sc... More »0 answers - Anonymous asked0 answers - Anonymous askedfactorial(x) =... Show moreWrite a program to calculate the factorial of a number wherefactorial is defined as: factorial(x) = x*(x-1)*(x-2)*...*1 factorial(0) = 1 • Show less1 answer - Anonymous askedbinary search. If the element is f... Show moreWrite a program to search a particular element from an arrayusing binary search. If the element is found set AX to one and otherwiseto zero. • Show less0 answers - Anonymous askedfollowing jumps will be taken? Each... Show moreIf AX=8FFF and BX=0FFF and “cmp ax, bx” is executed,which of the following jumps will be taken? Each part is independent of others.Also give the value of Z, S, and C flags. a. jg greater b. jl smaller c. ja above d. jb below • Show less0 answers - Anonymous asked0 answers - Anonymous asked1 answer - Anonymous asked0 answers - Anonymous askedWrite a Terminate and Stay Resident program that will display your name and ID (ABC, xC0xxxx... More »0 answers - Anonymous askedMBBS required preferably having 2-3years experience in cardiology. Attractive salary package wit... Show more Q1: MBBS required preferably having 2-3years experience in cardiology. Attractive salary package withother benefits commensurate with qualification and experience willbe offered. Candidates meeting the above criteria may send theirCV's at the following address: Chief Executive: Jinnah Hospital Pol House Morgan,Rawalpindi. 10 Q2: Choose the correctanswer. 5 1. There are several ways of looking at thisand.......... (a) you'll have to opt (b) you'll have to take (c) you'll have to choose (d) you'll have to accept 2. Nobody's going to call me namesand.......... (a) get on with it (b) get up with it (c) get away from it (d) get away with it 3. You can't agree with both ofthem.......... (a) make your opinion up (b) make your mind up (c) make your brain up (d) make your thoughts up 4. Don't worry about not getting enoughsupport..........(a) I'm with you all the way (b) I'm with you the whole route (c) I'm with you all the path (d) I'm with you the whole road 5. You're not telling me you didn't laughonce.......... (a) I bet you will (b) I bet you did (c) I bet you have (d) I bet you do• Show less1 answer - Anonymous asked0 answers - Anonymous askedC++ Programming: From Problem Analysis to Progra... Show moreThis solution is on the website under Textbook HelpC++ Programming: From Problem Analysis to Program Design (4th)Ed.Chapter 11: Problem: 1PEI have tried this solution and I keep gettingerrors.0 answers - Anonymous askedYou have to design a Java Based application for Hotel ManagementSystem. Design a Main Screen with th... Show moreYou have to design a Java Based application for Hotel ManagementSystem. Design a Main Screen with the following options ? List Box/Drop Down Box : Listing all the types of rooms available ( typesavailable are : single room, double room, deluxe room andsuite) So that the visitor can see and select the one to book in. ListBox/Drop Down Box: Listing the Room Numbers available correspondingto Room Type selected from the above list. (at most 3 rooms of eachtype is be shown). This List should only be active after the visitor selected a”Room Type” from the above List. Button : Labelled as“Book “ When clicked then the Booking Form should be activated. Design aBooking Form: For Booking in the Visitor has to fill the Bookingform .This form will have their following details and should bestored in a text file (Use Text Boxes for inputting the data andLabels for labelling the text boxes.) Add buttons as follows: o “ CANCEL “: to Cancel the enrolment o “Submit “: to save it in a text file. Design a Search Form: Design a form that displays allVisitor’s details: name, address, phone number, DOB whensearched on Room Tag or Name field. Stage 2: Availability Button: Create a button on the Main Screen“Check Availability”. Which checks the availability ofroom selected by the Visitor and shows a message box stating theavailability of room. Amount Handling: Design an Amount form whichshould display the following fields Name of Visitor. Room selectedRoom Tag In Addition to above it should include the following Label: Amount& Textbox to input the Amount to be deposited (against the RoomTag) Check Boxes to pick mode of payment (CASH or CARD) If CARDoption is picked then all the necessary Card details should betaken and saved. • Show less1 answer - foreverdeployed askedIn a function that receives a value from the main function viaa parameter and then displays the para... Show moreIn a function that receives a value from the main function viaa parameter and then displays the parameter value on the screen,that parameter is considered __________.A)• Show less B) C) D) E)The expression: x *= i + j / y; is equivalent to ______.A) B) C) D) E)1 answer - foreverdeployed askedThe facts that a function assumes to be true of the argumentsthat it receives are called __________... Show moreThe facts that a function assumes to be true of the argumentsthat it receives are called __________.A) B) C) D) E)1 answer - Anonymous asked If the input to the program segment below is 85, what is itsoutput? scanf("%d", &s); if (s >= 90) If the input to the program segment below is 85, what is itsoutput? scanf("%d", &s); if (s >= 90) printf ("A\n"); else if (s >= 70) printf ("C\n"); else if (s >= 80) printf ("B\n"); else printf ("D\n");2 answers - Anonymous askedi5please help me figure out how to write a method that displays three numbers in increasing order... Show morex.øi5please help me figure out how to write a method that displays three numbers in increasing order: public static void sort(double num1, double num2, double num3) So far I've got this...import javax.swing.JOptionPane; public class SortThree5_5 {public static void main(String[] args) { String num1Str, num2Str, num3Str, message;int num1, num2, num3; num1Str = JOptionPane.showInputDialog("Enter first integer:");num1 = Integer.parseInt(num1Str);num2Str = JOptionPane.showInputDialog("Enter second integer:");num2 = Integer.parseInt(num2Str);num3Str = JOptionPane.showInputDialog("Enter third integer:");num3 = Integer.parseInt(num3Str); public static void sort(double num1, double num2, double num3) {int localSum; I'm not sure how to write the method part. Thanks! I will rate kindly and post if you can help!1 answer - PurpleBoss2388 asked - Anonymous askedWrite a short program tocalculate circumference of a circle using either the radius or thediameter. ... More »1 answer - Anonymous askedSAMMI Corporation was established as forest products... Show morex.øi5 Assignment: SAMMI Daewoo Corporation Ltd. SAMMI Corporation was established as forest products importer in 1954 but has expanded its business to become a dynamic trading company in Korea. Our Cargo Setups adjacent to all terminals are functioning 24/7 providing safe and speedy dispatch and delivery of cargo consignments to our clients. Their Cargo Volume is increasing more rapidly than the expansions of their bus operations, and they are opening more and more pick up points in main cities to facilitate their clients more effectively. SAMMI secure and speedy Cargo Service is available in all of their setups where buses are being operated. Cargo service detail is given below: 1. The Consignor is required to clearly declare the goods being handed over to the company for cargo and get it indicated in the cargo booking slip. 2. The Consignor is liable to provide complete information about the consignee’s name (cargo should be booked in the name of an adult person holding ID Card / Driving License / Passport or Company) and contact number. Company shall not be responsible for mishandling of the cargo due to wrong or inadequate information provided by the Consignor. 3. The consignor is requested to read the booking slip after booking of his consignments carefully for details. 4. The Consignor should also provide the packing list of the cargo at the time of booking the consignment. 5. The goods should be packed properly. Company shall not be responsible for any damage caused due to inadequate packing. 6. The articles / goods / envelope, parcels may be opened in the presence of the Consignor as a precautionary measure. 7. Any tax, if payable will be paid by the consignor separately as per rate fixed by the Government. 8. Cargo Service is not available for cash, jewelry, Chemicals, liquor, liquid, paste, inflammables, explosives, gas cylinders (even empty). 9. Company shall not be responsible for any damage / loss to any of the goods (as mentioned at Sr. # 8 above) if somebody booked those goods without declaring it. 10. Cartons / Boxes in big volume and size (that can’t be put in the luggage carrier of the bus) are not entitled for cargo booking. Cargo tariff will be settled on the spot regarding bulky consignments having lesser weight. 11. The company shall not be responsible for the goods not received by the consignee within three full days. 12. The company shall not be liable for the goods not delivered in time due to any problem during journey. 13. The goods shall be transported from company’s setup to setup only. 14. The company does not take any responsibility for leakage, shortage, breakage and spoilage by sun, rain water and weather. 15. The company will send the goods at the earliest possible opportunity in the one lot or in part according to its convenience. 16. The company does not take any responsibility for loss or damage in transit due to accident en route or floods etc. and any other consequences there from. 17. The company shall not be responsible for any damage to any perishable item due to inevitable delay. 18. The Consignor must furnish such information and documents to the company as are necessary to meet the requirement of custom, Police before the cargo can be delivered to the consignee. The Consignor is liable to the company for any damage occasioned by the absence, insufficiency or irregularity of any such information or documents. 19. The Consignor is responsible for the correctness of the particulars and statements relating to the Cargo, which he / she insert in the consignment note. 20. Passports, I.D. Cards, Air-Tickets etc. are booked at the Consignor’s risk and company will not be responsible for any loss in this regard. 21. The company is not liable for any damage directly or indirectly arising out of compliance with laws, government regulations / order or requirements or for any reason beyond company’s control. 22. Extra tariff will be charged for consignments booked for / from shuttle service point / cargo collection points. 23. The consignee is required to produce valid identification, e.g. National Identity Cards, Driving License or Passport for receiving the goods. Authority letter shall be produced by the recipient if the consignment is booked in the name of a company etc. Visiting card is not acceptable in lieu of authority letter / personal identification. No consignment shall be handed over without sufficient identification. 24. In case the consignee receives the consignment after 3-days on its arrival, demurrage @ 10% of cargo charges of that consignment per day of delay shall be charged by the Terminal Manager / Cargo Incharge. 25. If the cargo consignment (or a part thereof) is lost due to negligence / mistake of the company, Consignor shall be compensated in terms of weight (Rs. 250/- per Kg for electronics, Rs. 20 per Kg for eatables (Fruit / Vegetables etc) while Rs. 100/- per Kg for all other types of cargo) and not in terms of value of the lost portion of the consignment. There will be no compensation about the value of mail or documents etc. and these will be treated as goods as per their weight. () Now SAMMI Daewoo executives want to automate the cargo shipment with in close deadline. They hired software house for the development of SAMMI Cargo Service software. You have selected as a project manager and answer the following questions: a) Which software process model you should select for the given scenario in the development SAMMI Cargo Shipment software. b) Give strong argument in the favor of your selected software process model to prove it a right decision.E¿ . .õð.ð.¶Nx.øi5 • Show less0 answers - Anonymous askedYour next checkpoint is to examine how baby-naming practiceshave changed in America using data from... Show more Your next checkpoint is to examine how baby-naming practiceshave changed in America using data from the Social SecurityAdministration. Given a file containing the top 10 baby names for each year from 1880to 2008, create an array holding the rates for each year for a nameof your choosing. The file is formatted like so: 1880 boyname1 rate girlname1 rate boyname2 rate girlname2 rate boyname3 rate girlname3 rate ... boyname10 rate girlname10 rate 1881 boyname1 rate girlname1 rate ... Write your code in the mainmethod of a class named NameTrend. Pseudocode is a good place to start: open scanner for file for each year for each name in the current year's top 10 if this is the name we're looking for, get its rate close scanner There's a few ways the logic can be managed here, so find theway that makes sense to you. After you're done processing the file,print out the array in a table like so: 1880 rate• Show less 1881 rate 1882 rate ... 4 answers - Anonymous askedWrite a program in C language that prints a table of thebinary, octal and hexadecimal equivalents of... Show moreWrite a program in C language that prints a table of thebinary, octal and hexadecimal equivalents of the decimal numbers inthe range 1through 256.• Show less1 answer - Anonymous askedConsider that several physical links connect two stations. We wouldlike to use a multilink HDLC that... Show moreConsider that several physical links connect two stations. We wouldlike to use a multilink HDLC that makes efficient use of theselinks by sending frames on a FIFO basis on the next available link.What enhancements to HDLC are needed? • Show less0 answers - nkc5017 askedThe function should continue to rea... Show more Write a function to read in numbers and put them into thearray. - The function should continue to read in numbers untileither: the user types a negative number, or 100 numbers(hint: MAXSIZE) have been read. - The function should also return the number of elements in thearray. - Then write a second function that will accept an array andprint out the contents of the array. - This function should accept an array and the number of elementsthat are to be printed. #include <iostream> using namespace std; int Function1(double []); void PrintArray(const double [], int); const int MAXSIZE =100; int main() { doublearray1[100]; int count; count =Function1(array1); cout<<"Therewere "<<count<<" numbers entered into thearray."<<endl; //function call tofunction that will print the array return 0; } //Write the function here to read in numbers into thearray. The array is called myarray. //add comments describing what this function does, what ispassed to it, what it sends back, etc. int Function1(double myarray[]) { } //Write the new function here along with comments //add comments describing what this function does, what ispassed to it, what it sends back, etc. void PrintArray(const double a1[], int size) { }• Show less2 answers - PreciseTea4172 askedCopy the template file ( shown Below ) and analyze thecode. Write initial comments at the top of t... Show more - Copy the template file ( shown Below ) and analyze thecode. Write initial comments at the top of the file. Yourcomments must tell what the program does, what the inputs are, whatthe outputs are and how does the data processed. - Write a function to read in numbers and put them into thearray. The function should continue to read in numbers untileither: the user types a negative number, or 100 numbers(hint: MAXSIZE) have been read. The function should alsoreturn the number of elements in the array. Write commentsbefore the function that describe what the function does, what itneeds passed to it, what it sends back to the function call, andhow it accomplishes its task. - Then write a second function that will accept an array andprint out the contents of the array. This function shouldaccept an array and the number of elements that are to beprinted. Before writing the code for this function, write thecomments. - DoNOT change anything in main() except for adding the one functioncall -hint: Use do-while and for loops. ------------------------------------------------------------------------------ The tamplet: //add generalprogram comments here• Show less #include <iostream> using namespace std; int Function1(double []); void PrintArray(const double [], int); const int MAXSIZE =100; int main() { double array1[100]; int count; count = Function1(array1); cout<<"There were "<<count<<"numbers entered into the array."<<endl; //function call to function that will print thearray return 0; } //Write the function here to read in numbers into the array. The array is called myarray. //add comments describing what this function does, what is passedto it, what it sends back, etc. int Function1(double myarray[]) { } //Write the new function here along with comments //add comments describing what this function does, what is passedto it, what it sends back, etc. void PrintArray(const double a1[], int size) { }1 answer - Anonymous askedYou are required to write a program for Movie Rental Store. Thebasic idea is that user/rea... Show moreQuestion? You are required to write a program for Movie Rental Store. Thebasic idea is that user/reader will provide customer information,movie name, and number of days. Upon this information your programwill calculate the charged amount for that movie. DetailedDescription: 1. Theprogram should display Please provide customer Name: Please provide MovieDescription. Enter ‘R’ forRegular Movie. Enter ‘C’ for children Movie. Enter ‘N’for New Released Movie. Enter ‘E’for English Movie. Then your program should take theseinputs, 2. Depending upon the choices that user has entered, your program willfurther display the prompt 3. Ifuser has entered Movie description, then your program should promptthe user to enter the Movie Name and Number of days. ----------------------------------------------------------------- MovieName: Number ofday’s: ----------------------------------------------------------------- 4. After getting all this information, now write a function which willcalculate rental/charged amount on the basis of thisinformation. To calculaterental/charged amount we will use this formula: Rental amount = charged amount * number of days Charged amount will be different fordifferent movies according to following description: Regular Movie: 40 RS Children Movie: 30 RS EnglishMovie: 50 RS New release: 100 RS After calculating charged amount for this movie and display iton the screen. SampleOutput Please provide customerName: Aftab Please provide MovieDescription: Enter ‘R’for Regular Movie: Enter ‘C’for children Movie: Enter ‘N’for New Released Movie: Enter ‘E’ for English Movie: R Please provide following information: Movie Name : Jinnah Number of day’s: 3 Final output: ----------------------------------------------------------------- CustomerName: Aftab MovieType : Regular MovieName : Jinah Number ofday’s: 3 YourRental Amount is: 120 Rs -----------------------------------------------------------------• Show less1 answer - Anonymous askedGive a recursivedefinition for the language L, of strings containing the substring00... Show more Question: Give a recursivedefinition for the language L, of strings containing the substring00 defined over ?= {0,1}.0 answers - Anonymous askedGive a recursive definition for the language L, of positive integers divisible by 2 or... Show moreQuestion?Give a recursive definition for the language L, of positive integers divisible by 2 or 7• Show less1 answer - Anonymous asked... Show more Construct a regular expression defining of the followinglanguage defined over Σ = {a,b}: i.e• Show less Construct a regular expression defining of the followinglanguage defined over Σ = {a,b}: i.e all strings that contain atleast two b’s and at most one ‘a’0 answers - accountingman asked1 answer - Anonymous askedCompare the following Linear Congruential code to the SystemRND(1) function by writing a function t... Show more Compare the following Linear Congruential code to the SystemRND(1) function by writing a function that compares the mean andvariances of each for any arbitrary (user-specified) number (N) ofuniform deviates. 5 REM Knuth's Linear Congruential Random NumberGenerator 10 INPUT "N = "; N 20 jran = 1200 30 For I=1 to N 40 div = (jran*84589+45989)/217728 50 jran = int ( (div - int(div))*217728 ) 60 ran = jran/217728 70 Print I, ran 80 Next I 90 Goto 10• Show less 0 answers - Anonymous asked0 answers - alex55 asked1 answer - Anonymous askedhello everyone thanks in advance for your help. this is a loop imade to solve an equation. the probl... Show morehello everyone thanks in advance for your help. this is a loop imade to solve an equation. the problem that i am having is with theoutput. The way i want it to look is so negative result/possitiveresult/zero result only display once and the corresponding y valuesshow up under their respective headlines. The problem is that sincethe negative/possitive/zero staements are inside the loop, they getdisplayed with every y value, is there anyway to take thestatements out of the loop but still show the corresponding yvalues? for(x=-4;x<=3.5;x+=.5) { y= (-4* pow(x,3) +(12*(pow(x,2)))- (3*x)-5)/ ( sqrt((3*pow(x,2)+1)) + (10* abs(x-1.5))); if (y<0) {cout<< "NEGATIVE RESULTS\n---------------- \n" ; cout<<"If x="<<setprecision(1)<<fixed<<x<<" Y="<<setprecision (5)<<y<<endl<<endl;} else if (y>0) {cout<< "POSSITIVE RESULTS\n----------------- \n" ; cout<<"If x= "<<setprecision(1)<<fixed<<x<< " Y="<<setprecision (5)<<y<<endl<<endl;} else {cout<< "ZERO RESULTS \n------------\n" ; cout<<"If x="<<setprecision(1)<<fixed<<x<<" Y="<<setprecision (1)<<y<<endl<<endl;} } • Show less1 answer - alex55 asked1 answer - Anonymous asked... Show morethese characters go into notepad:b• Show less c a a $ k d d f a a # q a s * c d a a b c b a ) c a d a + b a d f a a Perform the following Keep track of passing grades (a,b,c) Keep track of failing grades (d,f) Keep track of all valid grades in the file (a-d and f) Print any erroneous data (characters besides a-d and f) Keep track of the number of characters in the file Sample Output: g $ 5 - # k z q There were 30 passing grades There were 12 failing grades There were 42 valid grades There were total of 50 characters in the file1 answer - illusion askedOur statistics tea... Show moreThe program R is used mostly in statistics, currently its used inStatistic Canada. Our statistics teacher is like obsessed with that program so allhomeworks are based on it... and I'm very bad at programming. If you know R programming very well and some basics of statisticspls help me I will rate lifesaver. rm(list=ls()) X0 <- c(3,19 , 5, 15, 8, 14, 9,11) X0 <- matrix(X0,nr=4,nc=2,byrow=T) X0 n <- dim(X0)[1] X <- cbind(rep(1,n),X0) X p <- dim(X)[2] Y <- c(39,19,18,12) Y <- matrix(Y,nr=n) B <- solve(t(X) %*% X) %*% t(X) %*% Y B YHat <- X %*% B YHat E <- Y - YHat E plot(YHat,E) H <- X %*% solve(t(X) %*% X) %*% t(X) H SSTO <- t(Y) %*% (diag(n)-matrix(1/n,n,n)) %*% Y SSTO Question We want to predict the expected value of Y for a new observation Complete the script R for estimating the mean of Y for and the variance of the estimator. Note on syntax of the script: t(X) = transposed matrix of X %*% = multiplication YHat <- X %*% B means X multiplied by B is insertedinto YHat. nr = number of rows , nc = number of columns cbind = column bind solve(t(X) %*% X) = (X ' multiplied by X)-1 X0 <- c(3,19 , 5, 15, 8, 14, 9,11) The "c" is the name of the vector. • Show less0 answers - Anonymous askedi5em is this and i am sending u my code .plz any one solve it rightly.and point out my mistakes.i... Show morex.øi5em is this and i am sending u my code .plz any one solve it rightly.and point out my mistakes.it is not compiling by me. Write a C++ program to implement employee directory, whichwill let the organization to perform the following functions: 1) Insert the record of new employee 2) Delete the record of an existing employee 3) Find the record of an existing employee 4) Display Report Following information of each employee will be stored Employee ID: an integer value to store the unique id for eachemployee Employee Name: the name of each employee. Employee Address: Address of each employee Employee Salary: afloat value to store salary of each employee. Hint: Following information of each employee will be stored Employee ID: an integer value to store the unique id foreach employee Employee Name: the name of each employee. Employee Address: Address of each employee Employee Salary: afloat value to store salary of each employee. You can use the following structure to store the informationof a single employee: Struct Employee { Int empID; Char *empName; Char *empAddress; Float empSalary; Employee * pNext; }Following is the sample interaction: Welcome to <company name> employee directory: 1) Insert New employee 2) Find employee 3) Delete a record 4) Display Report 5) Exit Enter your choice: 1 Enter EmpID: 1 Enter EmpName: Ali Enter EmpAddress: VU, Lahore Enter Emp Salary: 20000 Record successfully inserted(Press any Key to continue….) After the user presses any key thescreen will be cleared and the menu will be displayed again. Welcome to <company name> employee directory: 1) Insert New employee 2) Find employee 3) Delete a record 4) Display Report 5) Exit Enter your choice: 3 (Now userenters 3) Enter EmpID: 1 Record successfully deleted (Pressany key to continue…) After user presses any key thescreen will be cleared and menu will be displayed again. Welcome to <company name> employee directory: 1) Insert New employee 2) Find employee 3) Delete a record 4) Display Report 5) Exit Enter your choice: 2 (Now userenters 3) Enter EmployeID: 1 Employee successfully deleted(Press any key to continue…) After user presses any key thescreen will be cleared and menu will be displayed again Welcome to <company name> employee directory: 1) Insert New employee 2) Find employee 3) Delete a record 4) Display Report 5) Exit Enter your choice: 4 (Now userenters 4) EmpID EmpName EmpAddress EmpSalary 2 Raza VU, Lahore 20000 3 Waseem VU, Lahore 25000 5 Aslam VU, Lahore 20000 Press any key to continue… After user presses any key the screen will be cleared againand menu will be displayed Welcome to <company name> employee directory: 6) Insert New employee 7) Find employee 1) Delete a record 2) Display Report 3) Exit Enter your choice: 5 (Now userenters 5) Are you sure, you want toexit(y/n) y Program exited if user presses “y”and menu will be displayed again if user presses “n” and my code is like this, #include <iostream> using namespace std; struct node { int empID; char *empName; char *empAddress; float empSalary; node * pNext; node *nxt;// Pointer to next node }; node *start_ptr = NULL; node *current; // Used to move along the list int option = 0; void add_node_at_end() { node *temp, *temp2; // Temporary pointers // Reserve space for new node and fill it with data temp = new node; cout << "Please Enter EmpID "; cin >> temp->empID; cout << "Please Enter EmpName: "; cin >> temp->empName; cout << "Please Enter EmpAddress: "; cin >> temp->empAddress; cout << "Please Enter Emp Salary: "; cin >> temp->empSalary; << "Enter EmpName : " << temp->empName << " "; cout << "Enter EmpID : " << temp->empID << " "; cout << "Enter EmpAddress: " << temp->empAddress; cout << "Enter Emp Salary: " << temp->empSalary; if (temp == current) cout << " <-- Current node"; cout << endl; temp = temp->nxt; } cout << "End of list!" << endl; } } void delete_Record() { node *temp; temp = start_ptr; start_ptr = start_ptr->nxt; delete temp; } void main() { start_ptr = NULL; do { display_list(); cout << endl; cout << "Please select an option : " << endl; cout << "0. Exit the program." << endl; cout << "1. Insert New employee," << endl; cout << "2. Delete a record from the list." << endl; cout << endl << " >> "; cin >> option; switch (option); { case 1 : Insert New employee(); break; case 2 : delete_Record(); break; case 3 : Display Report(); break; èb x.øi5; } while (option != 0); } ûx. • Show less0 answers - Anonymous asked+void setLight... Show moreProblem:Class: Taffic Light+TrafficLight()+void changeLight()+int getLightColor()+void setLightColor (int color)+boolean isFlashing()+void startFlashing()+void stopFlashing()+boolean isEmergencyMode()The class diagram does not show what attributes you willneed(you must choose appropriate variables) but the methods listedmust be provided. Also you may need addtional methods. Include aclass specification. Here is adescription of the methods: The TrafficLightconstructor creates a traffic light such that the ‘red’light is on. The ‘changeLight’ method changes thelight in the normal fashion cycling from red to yellowto green and then back tored. For this exercise, the colors are denoted by integers suchthat red=0, yellow=1, and green=2.The getLightColor returns the current traffic light color.The setLightColor methodmakes the current light color be whatever is given. TrafficLight’salso may be in a ‘flashing’state. The start and stopflashing methods put the traffic light inflashing mode (start flashing) and take it out of flashing mode(stop flashing). Atraffic light is inemergency mode if it is flashing when red.Here is the code that I have puttogether....it's not exactly what is being asked so that is whay Iam asking someone from here to help! Does it flow well?Where do Iput the start/stop method for isFlashing?Solution: public class TrafficLight { public static final int RED = 0; public static final int YELLOW = 1; public static final int GREEN = 2; private int currentLightColor = RED; public int change(){ switch (currentLightColor) { case RED: currentColor = GREEN; break; case YELLOW: currentColor = RED; break; case GREEN: currentColor = YELLOW; break; } returncurrentLightColor; } public int getLightColor() { return currentColor; } public void start()[ isFlashing=true }0 answers - failingphysicsz asked1 answer - Anonymous askedx.øi5o write a program for this problemObjective1. To give students practice in using functionsx.øi5o write a program for this problemObjective1. To give students practice in using functionsProblem: Educational SoftwareYour little brother is having trouble with arithmetic. Your parents realize that after taking a few weeks of your C programming course, that you could potentially2) Play Factoring Game3) Print Score4) QuitIf he chooses option 1, then you should prompt him with the following menu choices:1) Addition2) MultiplicationYour aren’t the ones chosen by the computer. In this case, you tell the user that their product is correct, but that they haven’t guessed the correct factors yet. If their product is just plain incorrect, this should be stated as well.) Each incorrect guess without a matching product is assessed 5 penalty points. Each incorrect guess with a matching product is assess 2 penalty points.For option 3, simply report your brother's total score, which is the sum of his scores from each round he plays.Scoring DetailsFor both of the games, the score your brother earns is equal to the total amount of time (in seconds) it took him to finish the problems (including penalty seconds) divided by the number of problems he solved.The score in seconds then must be converted to an integer number of points in between 0 and 10. In particular, the conversion works as shown in the chart below:Time, t, (in seconds) Corresponding Scoret < 1 101 ≤ t < 2 92 ≤ t < 3 83 ≤ t < 4 74 ≤ t < 5 65 ≤ t < 6 56 ≤ t < 7 47 ≤ t < 8 38 ≤ t < 9 29 ≤ t < 10 1t ≥ 10 0Implementation DetailsYou will be required to write three functions with the prototypes given below. (Note: you may write other functions as well, but these three are required.) Your functions should do what the comments for them below specify:// This function gives the user quantity arithmetic// questions, where each operand ranges from 1 to max,// inclusive. The value of operator dictates whether// the problems are addition or multiplication problems.// Namely, if op is 1, they are addition problems,// otherwise, they are multiplication problems.// The function returns the number of seconds the user took// to play the entire game, divided by the number of// problems they solved.double arithGame(int max, int quantity, int op);// This function allows the user to play the factoring game// where 2 randomly generated number lie in between 2// and max, inclusive. The product is displayed to the// user. The user must guess the original two numbers// multiplied to obtain the product. This process continues// until the user gets both numbers. An error message// should be given indicating if the product is correct or// not and if only the values are incorrect.// The value returned is the number of seconds the user// took to finish the game including penalty points divided// by the number of problems.double factorGame(int max, int quantity);// Returns the number of points the user has earned based// on time. In particular, if time is less than 1, 10 is// returned. Otherwise, if it is less than 2, 9 is// returned, etc. If time is greater than or equal to 10,// then 0 is returned.int numPoints(double timesec);Other Useful InformationSeed the random number generator at the beginning of your program. Do this exactly once. Here is the line of code:srand(time(0));In order to use this you need to include stdlib.h and time.h at the top of the program.Please use the following constants for ADD and MULT#define ADD 1#define MULT 2In order to calculate how much time something takes, you can use the time function. In particular, the function call time(0) returns a double that represents the number of seconds after some time. In order to effectively use this, you must call the function twice: once right before you start what you want to time, and once right afterwards. Subtract these two values to obtain the amount of time a segment of code took. Here is a short example:int start = time(0);// Insert code you want to time here.int end = time(0);int timespent = end - start;printf("Your code took %d seconds.\n", timespent);In order to carry out the scoring function, it may be helpful to look at the following functions in the math library:double ceil(double x);double floor(double x);Remember, if you want to convert a double to a corresponding integer, you can use a cast as in the example below, where we assume that value is an integer and seconds is a double:value = (int)seconds;ReferencesTextbook: Chapters 9, 10 Notes: Lectures on loops, functions, randomnumber generator functionsRestrictionsName the file you create anõr x.øi5. Although you may use other compilers, your program must compile and run using Dev C++. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. You should also include comments throughout your code, when appropriate. If you have any questions about this, please see a TA.DeliverablesA single source file named game.c turned in through WebCT.Sample OutputPlease make a selection from the following:1. Play Arithmetic Game.2. Play Factoring Game.3. Print Score.4. Quit.1Would you like, 1)Addition or 2)Multiplication?1What is the maximum number you would like?100How many problems do you want?4What is 21+86?107Correct, great job!What is 87+96?173Sorry, that's incorrect, the answer is 183.What is 86+70?156Correct, great job!What is 55+4?59Correct, great job!You took an average of 6.0 seconds per question.Your score for the round is 4.Please make a selection from the following:1. Play Arithmetic Game.2. Play Factoring Game.3. Print Score.4. Quit.2Enter the maximum value of a factor.80How many factoring problems do you want?2Please factor 124.12 4Sorry, 12 x 4 does NOT equal 124.Please try again.4 31Sorry, that is not the factorization we are looking for. Please try again.2 62Correct, great job!You got the factorization in 3 guesses.Please factor 24.12 2Correct, great job!You got the factorization in 1 guess.Great, you took an average of 5.5 seconds per question.Your score for the round is 5.Please make a selection from the following:1. Play Arithmetic Game.2. Play Factoring Game.3. Print Score.4. Quit.3Your score is 9.Please make a selection from the following:1. Play Arithmetic Game.2. Play Factoring Game.3. Print Score.4. Quit.4Thank you for playing!0 answers - Anonymous askedWrite a program that calculates and displays the totaltravel expences of a businessperson on a trip.... Show moreWrite a program that calculates and displays the totaltravel expences of a businessperson on a trip. The program shouldhave at least 11 functions that ask for and return thefollowing:- The total number of days spent on the trip- The time of departure on the first day of the trip, and thetime of arrival back home on the last day of the trip- The amount of any round-trip airfare- The amount of any car rentals- Miles driven, if a private vehicle was used. Calculate thevehicle expences as $0.27 per mile driven- Parking fees (the company allows up to $6 per day. Anythingin excess of this must be paid by the employee.)- Taxi fees, if a taxi was used anytime during the trip (thecompany allows up to $10 per day, for each day a taxi was used.Anything in excess of this must be paid by the employee.)- Conference or seminar registration fees- Hotel expenses (the company allows $90 per night forlodging. Anything in excess of this must be paid by theemployee.)- The amount of each meal eaten. On the first day of the trip,breakfast is allowed as an expense if the time of departure isbefore 7 a.m. Lunch is allowed if the time of departure is before12 noon. Dinner is allowed on the first day it the time ofdeparture is before 6 p.m. On the last day of the trip, breakfastis allowed if the time of arrival is after 8 a.m. Lunch isallowed if the time of arrival is after 1 p.m. Dinner is allowed onthe last day if the time of arrival is after 7 p.m. The programshould only ask for the amounts of allowable meals. (the companyallows only $9 for breakfast, $12 for lunch, and $16 for dinner.Anything in excess of this must be paid by the employee.)The program should calculate and display the total expensesincurred by the businessperson, the total allowable expenses forthe trip, the excess that must be reimbursed by the buisnessperson,if any, and the amount saved by the businessperson if the expenseswere under the total allowed.Input Validation: Do not accept negative number for anydollar amount or for miles driven in a private vehilce. Do notaccept numbers less than 1 for the number of days. Only acceptvalid times for the time of departure and the time ofarrival.• Show less3 answers
http://www.chegg.com/homework-help/questions-and-answers/computer-science-archive-2009-october-23
CC-MAIN-2014-23
refinedweb
7,672
62.78
On Mon, Sep 6, 2010 at 5:29 AM, Ivan Lazar Miljenovic <ivan.miljenovic at gmail.com> wrote: >. I'm relatively new to the Haskell community, and one thing that's bugged me a bit is that there doesn't seem to be a convention (aside from common sense) for segmenting the module namespace as there is with Java (my other primary language). If you're not familiar with Java's conventions: Each package producer is encouraged to prefix all their released packages with a reversed dns name (more or less, I don't recall the exact term). For example, if Galois were to release a Java OpenGL package, it would be named something like com.galois.graphics.opengl. This makes it fairly easy to differentiate between different implementations of similar things -- or just to reduce namespace collisions. This comes at the expense of typing a bit more, but no one particularly cares in the java community because the IDEs take care of that. Anyway, I'm curious how module namespace collisions/pollution will be handled in Haskell over the next 5-10 years. Package hiding works in some cases, but it seems like that will fail if you ever need to use capabilities from packages that conflict within the same project. Is this actually a problem, or am I worried about nothing? --Rogan
http://www.haskell.org/pipermail/haskell-cafe/2010-September/083263.html
CC-MAIN-2014-10
refinedweb
224
58.72
hello guys, i was just working some problem on function overloading topic, i wrote a simple program to test the topic, but i got some errors which i couldn't able to recover it, can u please tell me what the error is... here is the program and the error message and the error is as followand the error is as followCode: #include<iostream> void printdat(int, int, int, char = '\'); using namespace::std; int main() { int mm,dd,yy; std::cout<<"Enter the date"<<endl; std::cin>>dd>>mm>>yy; printdat(dd,mm,yy,'.'); printdat(dd,mm,yy); return 0; } void printdat(int dd, int mm, int yy, char a) { std::cout<<dd<<a<<mm<<a<<yy<<std::endl; } any help will be appreciatedany help will be appreciatedCode: 1.cpp:4:37: missing terminating ' character 1.cpp:4:37: warning: multi-character character constant 1.cpp:5: parse error before `using' 1.cpp:15: `dd' was not declared in this scope 1.cpp:15: `mm' was not declared in this scope 1.cpp:15: `yy' was not declared in this scope 1.cpp:15: ISO C++ forbids declaration of `printdat' with no type 1.cpp:15: `int printdat' redeclared as different kind of symbol 1.cpp:14: previous declaration of `void printdat(...)' 1.cpp:15: initializer list being treated as compound expression 1.cpp:16: ISO C++ forbids declaration of `getchar' with no type 1.cpp:17: parse error before `return' 1.cpp: In function `void printdat(int, int, int, char)': 1.cpp:21: `void printdat(int, int, int, char)' redeclared as different kind of symbol 1.cpp:15: previous declaration of `int printdat' 1.cpp:15: previous non-function declaration `int printdat' 1.cpp:21: conflicts with function declaration `void printdat(int, int, int, char)'
http://cboard.cprogramming.com/cplusplus-programming/61548-need-help-please-printable-thread.html
CC-MAIN-2015-35
refinedweb
296
51.44
Forums Dev Hi. I want an external to display a text editor, and – when the editor gets closed – behave more or less like coll. I had a look at the coll source file, in the 4.5.5 SDK, and found there is an “okclose”. I’d love to have more info about it: - how does the “result” argument behave? - In the example, the otherwise undocumented advise() function is called (prototyped in ext_proto.h). A quick search in the Max 5.1.7 framework shows two other seemingly related functions: advise_explain() (also in ext_proto.h) and wind_advise() (in ext_wind.h). Which one should I use in a “new style” object? Would advise_explain() (my favorite one, with custom text for the buttons) be ok? Thank you very much! aa Here’s the code which calls it, which should be self explanatory. Have fun! -Joshua sprintf(msg, "Save changes to "%s" before closing?", filename->s_name); // give our owner a chance to take control okclose = zgetfn(p->v_owner, gensym("okclose")); if (okclose) { short result = 0; // changed from long to short to fix ppc bug object_method(p->v_owner, gensym("okclose"), msg, &result); switch (result) { case 0: /* normal thing */ case 1: /* they changed the string */ break; case 2: /* don't put up a dialog, clear dirty bit */ object_attr_setchar(p->v_owner, ps_dirty, 0); case 3: /* don't put up a dialog */ goto skipalert; case 4: /* act as though user "cancelled" */ return (void*) -1; default: break; } } res = wind_advise((t_object*) p, msg); switch (res) { case ADVISE_SAVE: if (jwind_save(p)) return (void*) -1; // error saving, treat as cancel break; case ADVISE_CANCEL: return (void*) -1; case ADVISE_DISCARD: object_attr_setchar(p->v_owner, ps_dirty, 0); break; } thank you Joshua! aa You must be logged in to reply to this topic. C74 RSS Feed | © Copyright Cycling '74
http://cycling74.com/forums/topic/okclose/
CC-MAIN-2013-48
refinedweb
293
72.36
FrameWarp - jQuery plugin for displaying pages in a neat overlay Martin Angelov While working on an exciting new web app, I found that I needed a way to show certain pages in an overlay window. This comes handy if you want to reuse something like a sharing or a settings page in different screens of your app. Instead of hacking together something that barely got the job done, I decided to take the time, do it properly and share you with you. Of course, there is the option of using one of the numerous lightbox plugins to do this, but the plugin we will be creating in this tutorial has a lot of advantages over a generic lightbox script: - Lightweight – it is created specifically for showing pages, not images; - No UI, so the page feels like a dialog window; - The page can close itself, and can also send messages to the parent window; - Can optionally use a cache for faster subsequent page loads; - Uses a neat CSS animation with a JavaScript fallback. Great! Now let’s get started. The Idea When a link or button is clicked, our plugin, dubbed FrameWarp, will detect the coordinates of that element, and trigger a CSS animation of an expanding polygon moving to the center of the window. The plugin will then load an Iframe pointing to the URL we want to show. If the page is from the same origin as the current site, FrameWarp will also add two useful methods to the iframe – one for hiding it, and another one for sending a message to the parent. We will be using the jQuery++ collection of tools for jQuery, which converts the library’s animate() method to use CSS3 transitions on browsers that support them. This makes constructing complex CSS animations quite easy. The Animation As they say, a fiddle is worth 1000 words. So here is the animation in action (hit the Result tab): The trick here is that we are animating the border properties of the element and the width, while the height remains 0. The left and right borders are set to transparent in the CSS of the plugin. Alternatively, you could do it with 3D CSS transforms, but it wouldn’t work in older browsers. The Plugin Now to write the plugin. We are going to wrap our code in an anonymous function so that it is isolated from the rest of the page. In effect all the variables and helper functions you can see below are private and accessible only to our plugin. assets/framewarp/framewarp.js (function($){ // Private varialble deffinitions var body = $('body'), win = $(window), popup, popupBG; var frameCache = {}; var frameCacheDiv = $('<div class="frameCacheDiv">').appendTo('body'); var currentIframe; $.fn.frameWarp = function(settings){ // The main code of the plugin will go here }; // Helper Functions function hide(){ // Here we will remove the popup and dark background from the page } function setUpAPI(iframe, settings){ // In this function, we will make two API methods available to the frame, // if it the page is from the same domain. } function sameOrigin(url){ // Here we will determine whether the page is from the same domain } function getOrigin(url){ // A helper function for generating an origin string // of the type: // This includes the protocol and host. } })(jQuery); The plugin creates a div with a frameCacheDiv class name. It is going to hold the iframes we are adding to the page. Two more divs are added to the page by the plugin – .popup and .popupBG, which we will discuss in a moment. Now let’s inspect the helper functions. function hide(){ if(currentIframe){ currentIframe.hide(); currentIframe = null; } popupBG.remove(); popup.remove(); } function setUpAPI(iframe, settings){ if(sameOrigin(settings.url)){ // Exposing a minimal API to the iframe iframe[0].contentWindow.frameWarp = { hide: hide, sendMessage:function(param){ return settings.onMessage(param); } }; } } function sameOrigin(url){ // Compare whether the url belongs to the // local site or is remote return (getOrigin(url) == getOrigin(location.href)); } function getOrigin(url){ // Using an anchor element to // parse the URL var a = document.createElement('a'); a.href = url; return a.protocol+'//'+a.hostname; } Browsers implement a security feature called “same origin policy” that limits a web site from accessing the DOM of another. For this reason, we have a helper function that compares the URL of the iframe with the address of the current page. Only when both the domain and the protocol match, will the plugin attempt to access the DOM of the iframe and add the API methods for sending messages and hiding. Now we are ready to write the actual frameWarp plugin! $.fn.frameWarp = function(settings){ // Supplying default settings settings = $.extend({ cache: true, url: '', width:600, height:500, closeOnBackgroundClick: true, onMessage:function(){}, onShow:function(){} }, settings); this.on('click',function(e){ e.preventDefault(); var elem = $(this), offset = elem.offset(); // The center of the button var buttonCenter = { x: offset.left - win.scrollLeft() + elem.outerWidth()/2, y: offset.top - win.scrollTop() + elem.outerHeight()/2 }; // The center of the window var windowCenter = { x: win.width()/2, y: win.height()/2 }; // If no URL is specified, use the href attribute. // This is useful for progressively enhancing links. if(!settings.url && elem.attr('href')){ settings.url = elem.attr('href'); } // The dark background popupBG = $('<div>',{'class':'popupBG'}).appendTo(body); popupBG.click(function(){ if(settings.closeOnBackgroundClick){ hide(); } }).animate({ // jQuery++ CSS3 animation 'opacity':1 },400); // The popup popup = $('<div>').addClass('popup').css({ width : 0, height : 0, top : buttonCenter.y, left : buttonCenter.x - 35 }); // Append it to the page, and trigger a CSS3 animation popup.appendTo(body).animate({ 'width' : settings.width, 'top' : windowCenter.y - settings.height/2, 'left' : windowCenter.x - settings.width/2, 'border-top-width' : settings.height, 'border-right-width' : 0, 'border-left-width' : 0 },200,function(){ popup.addClass('loading').css({ 'width': settings.width, 'height': settings.height }); var iframe; // If this iframe already exists in the cache if(settings.cache && settings.url in frameCache){ iframe = frameCache[settings.url].show(); } else{ iframe = $('<iframe>',{ 'src' : settings.url, 'css' : { 'width' : settings.width, 'height' : settings.height, } }); // If the cache is enabled, add the frame to it if(settings.cache){ frameCache[settings.url] = iframe; iframe.data('cached',true); settings.onShow(); } else{ // remove non-cached iframes frameCacheDiv.find('iframe').each(function(){ var f = $(this); if(!f.data('cached')){ f.remove(); } }); } iframe.ready(function(){ frameCacheDiv.append(iframe); setUpAPI(iframe, settings); settings.onShow(); }); } currentIframe = iframe; }); }); return this; }; As I mentioned in the opening section, we are using jQuery++ to enhance jQuery’s animate() function to support CSS3 animations. This way we don’t have to write tons of CSS, and we also achieve full backwards compatibility, as the new animate() method will fall back to the old if the browser has not support for CSS animations. Once the first animation is complete, we add the loading class to the .popup div. The new class adds an animated preloader gif to the popup and a soft box-shadow, as you can see by inspecting assets/framewarp/framewarp.css. Using the plugin To use the plugin, include assets/framewarp/framewarp.css to the head of your page, and assets/framewarp/framewarp.js after your copy of the jQuery library. After this, all that is left is to initialize the plugin. As an example, here is the code that drives our demo page: assets/js/script.s $(function(){ // If no url property is passed, the // href attribute will be used $('#b1').frameWarp(); $('#b2').frameWarp({ onMessage: function(msg){ $('#messages').append('Message Received: '+ msg+' '); } }); // Cache is enabled by default $('#b3').frameWarp({ url : '' }); // Disable caching $('#b4').frameWarp({ url : '', cache:false }); }); Done! With this the plugin is complete! You can use it to enhance your web app and reuse certain parts of it without writing extra code. I would love to hear your suggestions or thoughts in the comment section below. Presenting Bootstrap Studio a revolutionary tool that developers and designers use to create beautiful interfaces using the Bootstrap Framework. 41 Comments Exactly what i was looking for! Thank you! Happy to help! I am having problems getting the popup box to close when I click the 'Close window' button - even in the files you provided. Any idea how I can ensure it closes? It closes if I click outside of the pop up but not the button. Does it throw any errors in the console? I have the same problem. Chrome js console throws "Uncaught ReferenceError: framewarp is not defined" error. OMG i have the same problem! the demo on this website is working fine with the close button, but after I download it, the close button stopped working... I know this sounds tacky, but I need this exactly but on page load and on click to go away. Where could I add this code? At the top of the plug in or inside the hide function? You can do it like this: After you initialize the plugin, say on the #b1 element, trigger a click on it with $('#b1').click(). This will show up the window immediately on page load. In the page itself, say frame.html, add this code: $('body').click(function(){ framewarp.hide() });which will hide the popup when you click anywhere on the page. Wait as I am not so agile with jQuery (yet :D). You are saying I should initialize the actual element to load as in $('#b1').click... how can it show immediately on page load? Can't it be $('#b1').frameWarp (on load)?. The snippet you give me is waiting for a click (#b1) for it to load. Well, the trigger makes the click for you, just need to make this code run when the page is load (ej. put it just before the closing 'body' tag and after the jquery): // This trigger a click, the same as $("#h1").trigger("click") $("#h1").click(); // Now listen when you make click in anywhere within the 'body' // and hides the frameWarp that is show in the lines above. $("body").click(function(){ framewarp.hide(); }); Simple as pie! =) Good luck... $('#b1').click() Will simulate the click. It's not waiting for it. Thanks mate. I didn't see that the options are set in the plug in regarding width/height and I needed the damn thing responsive :( Now This is what i was looking for a long time. I think showing a demo to a user is going to be awesome. Once again Thanks Martin!!! Thank you so much! This tutorial is awesome! And does it have cross domain when i close an iframe? Srr bout my english. Cool effects,Martin! My idea is to not close the popup automatically when the mouse button is clicked outside of the popup, but rather have an image at the top right hand corner of the popup and include the exit function on it's click event handler. I guess this could make a good topic of experimentation on a nice warm Sunday. One thing that was making me crazy was that I cannot close the iFrame on example1 from the blue button on IE. After some tries, I could only solve it by using this code: « <a href="#" class="button2" id="close" onclick="$('.popupBG',parent.document).trigger('click');">Close Window</a> » and putting jQuery on page. Now it worked for IE and the other browsers. Great work man!! But i have a a question.. is it possible to implement your code on "jQuery 1.4.2" ? i'm getting - " Uncaught TypeError: Object #<Object> has no method 'on' " in your framewarp.js file when switching to an older version then jQuery 1.7.1. I know it's something to do with the - onclick function but i'm lost here :( is there a solution for that? any help will be more then appreciated... The "on" and "off" methods were introduced in jQuery 1.7. You can replace them with bind/unbind for it to work with jQuery 1.4. Thanks for this useful plugin. Lightweight and tiny. Best regards. I love this plugin but I'm having one issue. I have multiple links on the same page that open the frame with the same link but different parameters. After the first link is clicked and then closed, any links opened after that open the first link clicked instead. Is there any way to clear frame after it is closed? You can pass the cache:false parameter when initializing the plugin. This will reload the iframe every time. I'm using b4 which uses cache:false however I still get the same results. Also set settings = $.extend({ cache: false, in framewarp.js. Still no luck. I found the problem but still not sure how to fix it. In script.js I changed: $('#b4').frameWarp({ to $('.b4').frameWarp({ so that I could use multiple links in class="" because IDs need to be unique. This seems to be causing all links to show up as the first one clicked. Is there a way I can manipulate this to get it to work on multiple links? Found it!! When you delete the if-condition in the framewarp.js: if(!settings.url && elem.attr('href')){ settings.url = elem.attr('href'); } it will not save the last url. And i changed in the hide-function down at the document: currentIframe.hide(); to: currentIframe.remove(); So the frame is really closed. Had the Problem, that after hide you still could here the videostuff i had in the link. Sorry for my bad english... Thanks for your tutorial, it's useful. This isn't working in IE9. The window won't close using the close button, and messages are never sent. It works fine in FF. This plugin works great! However, is there a way to make it close the popup window by clicking on the window itself instead of the background? Hi Martin, this plugin works great, but long page with scrollbar (e.g. CNN page) within the frame cannot be scrolled down on iOS device such as iPad. Is there any solution? Wow now that is nice. Thanks Martin, it will come in very handy :) Awesum Man ... Love it ... Will be using with wp-subscribe plugin of wordpress. Thanks for the script man, its awesome!! But I'm get stucked with a thing... Always work's fine... until I reload the frame. After frame reload (like a form action="#" on it) the buttons doesnt work anymore for hide the frame or sendmessage to caller. how can it still works after a frame reload? another thing: after frame hide, the back page scrool down a bit.... why?? thanks a lot!! (sorry about my poor english) Best regards, Júnior (from Brazil) in fact, after frame reload, it works exactly like I was comment the line setUpAPI(iframe, settings); on framewarp.js: iframe.ready(function(){ frameCacheDiv.append(iframe); //setUpAPI(iframe, settings); settings.onShow(); }); How can I solve this "problem" ??? What's the jquerypp for in the assets/js folder? Is there a way to stop the background from scrolling when the popup is active? Hi Martin Angelov, I use FrameWarp to popup a overly page, there is a button in the page which makes ajax get call, like below /$.get("ModalAddEmail.aspx?email=" + email, AddEmailCallback); However, when the js code hit this ajax get, the popup window just expand to take the whole screen, any idea? Hi, The plugin is great for all browsers but IE. Well, actually the close button problem I solved with help from Rui Figueiredo comment. But in IE I can't make the border dissapear, this annoyis me mostly. Also I have another problem, if I load a second page in the same popup, I can't close it. I tryed onclick="$('.popupBG',parent.parent.document).trigger('click')" but this doesn't seem to cut it. However I am not good at programming as I am a designer, so I am using common sense, not knowlegde when I change the code. :) Soooo yeah, any help would be greately appreciated! Great plugin that I am using extensively. There is one problem however - whenever I load another page in the frame, frameWarp.sendMessage() calls are no more available. Any chance to maintain this function? Hi, I had the problem, that in IE9 the the sendMessage method did not work. To solve the issue I found a small workaround: I added a method "takeOver(msg)" in the calling website (the website where the iframe is attached). If the frameWarp.sendMessage fails with an exception, I call this method via window.parent.takeOver(...) Afterwards I hide the iFrame with the hack Rui Figueiredo already posted... This is fantastic, Martin! Just what I was looking for. - Is it possible to get rid of the scroll bars in the iframe? Unfortunately, I couldn't firgure out how to get this into the script... Thank you. Appreciate your work, but unfortunately can't use it. >> Close button doesn't work. >> On smartphone the overlay is just nuts. Great would have been if it just opens in a new window on mobile. But the way it's now, can't be used. Sad and unfortunately my Java Script skills are not good enough to implement it myself.
http://tutorialzine.com/2012/07/framewarp-jquery-plugin/
CC-MAIN-2016-30
refinedweb
2,839
67.86
Odoo Help Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps: CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc. how to resend the cron job if job is failed? in create method i call function . if in case job is failed then how to resend it. def create(self, cr, uid, ids, context=None): res = super(project, self).create(cr, uid, ids, context=context) time_now = datetime.now().strftime("%Y-%m-%d %H:%M:%S") nextcall = parser.parse(time_now) + timedelta(seconds=10) self.pool.get('ir.cron').create(cr, uid, { 'name': 'This is Cron job', 'user_id': uid, 'model': 'project.project', 'function': '_compute_project', 'nextcall': nextcall, 'args': repr([res]) }) return res About This Community Odoo Training Center Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
https://www.odoo.com/forum/help-1/question/how-to-resend-the-cron-job-if-job-is-failed-103554
CC-MAIN-2017-34
refinedweb
144
61.93
- how to make GridView column read only - How to enable/disable controls against a user's permission via Type Casting - How to get content of current aspx page in asp.net - Issue in deleting session ID from Dictionary object - Is there a way to force web service request to use HTTPS. - How to get the number of characters occupied in particular column - How to set word wrap in asp:table - edit gridview without using SqlDataSource - deleting a row of a gridview - How to Create a Link Button by code behind? - How to display image from the database? - Error when trying to view website on GoDaddy.com servers - How to send a XmlSerializer Class to a WebService and then Deserialize it? - how to check login values against the name and pswd stored db table? - How to view an image in crystal report by using asp.net - How to use port number on url. SSL port 443. - How to acess microsoft access remotely using asp.net - Dynamic AJAX based data table. - How to hide the autogenerateselectbutton from gridview C# - message show, asp.net - Gridview with two dropdownlists causing error. - How to Insert a row at any position in grid view? - How database & tables are created using createuser control in asp.net - Fetch Data from datagrid and store them in form - Where data is stored when createuserwizard is clicked in asp.net - Scroll bar problem - ListView Edit Button Visibility - Gridview highlight row and mouseover & mouseout attributes - I have a aspnetdb.mdf file. what is it used for? - How to select a gridviewrow based on textbox value - Print Preview Error - How to retain userstatus after unexpected closing of browser - How to add to asp.net code - How to display an icon in the gridview cell column dependent on another column - Data being submitted twice - To access data based on browser IP address - Problem uploading file on server - web service consumer compiler error "type or namespace...could not be found" - automatically moderating feeds from blogs - GridView edit problem - Clone of Quibids.com - Not recived data from paypal when online site test with Sandbox - How to apply javascripts in asp.net and where? - Session Variables Get Lost On Browser Close - Requirement of Session object? - How to update database without using SqlDataSource - Ajax Tab Container issue - Thickbox in Masterpages - Concept of datakeyname in grid view? - hundreds of machine.config warnings - Configuring Columns of a GridView - No http handler was found for request type 'GET' ERROR - How I can change background row in grid view when it updated? - Assigning Roles on login/registration - Create login for web site - Why is my app losing page variable values? - How to ask "good" questions -- READ BEFORE POSTING - about Grid Control - Using Asp.net control in View MVC - Localisation in Asp.net - How to define URL for an ASP.NET MVC sitedeployment in VS 2008 - Line 1: Incorrect syntax near ','. Unclosed quotation mark before the character ... - How to Compare Strings - Web Setup problem with updates - XML and ASP.Net - What is a Generic Class Declaration? - Forms Authentication, 2 Applications sharing 1 Login ? - How to update an oracle database by adding the value entered in an asp.net textbox?? - How to add C++ project with two 3rd party unmanaged DLLs - Validation summary message box does not pop-up for a required field validator - Procedure or function 'InsertExam' expects parameter '@CertExamID.. - ASP Calendar problems - can we provide drag and drop facility in asp.net webpages - How to get return value of javascript function from aspx.vb - How to save an image given a URL - Creating button event from panel - Can we change the orientation of a grid view? - File save in folder Error Occured at live page - How to Update Stock available in asp.net from an Oracle Database? - How to load a grid in asp.net based on the dropdown value selected using ajax - How to display the data of gridview in another page if i click edit? - AJAX CascadingDropdown not calling webservice - Hidden Select Row Problems - Application run in background - Implementing Client Callbacks Programmatically Without Postbacks in ASP.NET Web Pages - customized CreateUserWizard control is firing dropdown's OnSelectIndexChanged event - Cascading Dropdown in asp.net using ajax - Generate Contact us page in asp.net - gridview row selection - File not uploading but not getting errors. - Adding Checkbox list to innerHTML - flash not reflect changes on postback - Need to show a popup window on checkboxlist item selection - Move GridColumn - how to get selected row in gridview - Databinding to text boxes - Custom Error Pages in Web.Config - Change imageButton image in a master page - problem with uploading large xml file on ftp in ASP.NET - Upadating web.config at runtime. - AJAX News ticker - membership reset password in asp.net - External API call in ASP.NET - How to make DropDownList display "No Result"? - hyphen in url on aspx page - dot net nuke - Redirect Page using HttpContext - Object reference not set to an instance of an object. - Rating an image in grid view - javascript image control does not work in ASP.NET - byte array 'null' problem - Openning .doc's and .ppt's in browser - problem in binding values with dropdownlist - I want to open OUTLOOK using asp.net C# - how to use iecapt.exe file in my project - Unable to locate error - Unable to locate the error - how to prepare my asp.net website for deploying it - Validation Message display/non-display - asp.net sql join - date in web service - help with custom validators - Load ASP.net webpage inside another web page - ASP.Net/C# How to Import Contacts From Mailservers ( AOL,HotMail,Gmail,Yahoo,Rediffm) - open pdf within iframe in contentplaceholder - Custom sized paper code for Printer - Error when application deployed: Operation must use an updateable query - How do I add code to redirect my user on successful submit to my database? - Tab Index in a Page with User Control. - Embed audioplayer in a webpage - How to enchance the control from scripts to get from the formview control - Operation must use an updateable query - Invalid attempt to read when no data is present. - retrive values related to hierachy of city,country and state from dropdownlist - Retrive value of dynamic control - how to save image url path - Unable to find checkbox control in Gridview - adding data dynamically in dropdownlist? - BackgroundWorker.RunWorkerAsync is not returning immediately. - hide image if imageurl is blank - CustomValidator not working - How to nevigate to tagert page - Dynamic Javascript not working in Update Panel - How to Display data in textbox - Class Library can't be found! - Modifying the soap body for web services. - changing it from http to https - DataList / PagedDataSource / DataTable - How to allow for filter Control Parameter? - Generating usercontroll programatically - Crystal Reports AND ASP - Remove Rows - Excel file created and then stored to local c drive - display SqlDataReader values bound to labels MSSQL C# - CheckBoxList Population and ToolTip - How can I find the physical path of a web application from a web service? - Adding Multiple Rows, Displaying Session Rows and then doing one insert - "Failed to access IIS metabase" error - connection string - Server Error in '/_layouts/incident' - App_localresources not working with directories - Automation of accessing a site and retreiving details - Executing a Stored Procedure using Silverlight - Failed to convert parameter value from a SqlParameter to a String - What makes a website Ajax Enabled? - asp.net httpModule - How to color in gridview - Ajax control not working at server end - Remove list of items in listbox - security issue while sending sms - IE8 table problem - PNG images in Webpage - how to use Paypal (shopping cart for book publisher) with asp.net - Regular expression for characters with the space - MD5 Checksum comparison of a file, asp.net using vb - how to preserve the value of the previous page after clicking on back button - ASP.Net HELP NEEDED ASAP - AJAX Rating Control - object reference not set to an instance of an object - how to scroll in to view the table row which has focus? - updating database by another - How do I Access a Datalist Item Variable via ASPX? - passing parameters using stored procedure with where clause?? - Returning Data back from Dynamically created fields(javascript) - updating database from textbox - cannot render TreeView Web Control in IE 6.0 - Silverlight Image Gallery - determining height of a dynamic table after it has been loaded & populated with data - retrieving data ffrom database - how to calulate only system date in asp.net(visual studio 2008) - Asp controls Id generation inside repeater - small business needs to run aspx app & sql server - resource question - cannot implicitly convert type 'int' to 'string' - display data to textbox using sql server and C# - passing parameters with help of stored procedure?? - Complex Regex Help - Disabling validations - DirectoryInfo and file attributes - ASP.NET: Print All Web Documents at a time - setting a offset value for a particular id?? - Lose checkbox onclick event after updateitem(true) in a formview - Autocomplete extender not working..i dont know the solution,here is code - How to Print a WebPage ? - Gridview - Saving Images - Remotly connecting to an web forms application that uses asp.net routing? - Stored procedure: must declare the scalar variable - Image1.ImageUrl not rendering image when retrieving from different Directory - How to assign a textbox value in dropdownlistbox - convert string to datetime - pass value from one usercontrol to another - Block Ip in asp.net - Deploy web application on windows 98 - FilterExpression and the SQLDataSource Control- returns ALL values - asp.net DropDownList XML multiple datatextfield - dropdown selected index page event fires on page load - UpdatePanel sessionstate - UpdatePanel Animation - Cannot view XML input using style sheet - Spell checker control is not working with rich text box contrl in asp.net - Is there any way to get click event of refresh button of browser? - Master pages - SqlDataReader/Webservices - what query to fire in Row updating event? - delegates - Update Panel - Controls loosing events - Highlighting part of table when a hotspot is clicked - Editing in gridview - How to configure mail for local network and send mail through asp.net - Uploading & Downloading files in asp.net using C# - Create Window form in Visual Web Developer 2008 - GridView Editing - Gridview: Maintain selected checkbox state while Paging - Datareader - Help For Sms Gateway Code & implimentation. - how to disable functionality of refresh (logo or button) in browser - Use of Javascript in Asp.net Ajax enabled content pages - Replace all special characters except asterisk - Problem with 'must declare the scalar variable' - Problem: RowCommand Event - GridView.FindControls - Base64 binary in soap - How to get the cell index of gridview in the event selectindexchanged? - DateTime Problem in GridView/DataList - Problem: Dynamic TemplateFields in GridView - DataBinding: 'System.Data.DataRowView' does not contain a property with the name - Textbox Loop with C# - Asp.net custom errors not working - Creating Excel file in asp.net using vb without installing office - Sending SMS Using GSM Modem - Validation in Ajax updatepanel - not working - What Licensing do i need for developing on SQL Server and .NET? - Impersonation in WCF - Dynamic controls management in Skin files - Transposing an XML file using ASP.NET - Read column data from MSSQL and output on page - Nested GridView cell value - problem in binding child datagrid - Screen Scraping in ASP.NET which need Username and password - How to send SMS over GPRS - Forbidden error in VS2005 under Vista for ASP - Updating placeholder during runtime - Passing variables through non HTML object - HttpContext.Current causing an error - Cannot retrieve Context.Items posted to a web page. - Display new image on web page - ASP.Net page with code behind in C# - How to host ASP.net website within intranet - How much data can be stored in Application Variable - How to call a function on run time button click - Submit repeating/multiple items to stored procedure via webservice - problem with showing pdf - TreeViews events not occur - Connecting to sql server 2008 - linking asp and asp.net applicaiton with one sign in - .NET and php integration - How to generate solution and project file from asp.net project - checked radio buttons, display three image buttons - Cannot modify user account in Active Directory via ASP.net - How do I change the background color of a dynamic linkbutton inside of a repeater? - Regarding postback.. - How can I make a text field = a field on a previous part of a multi part form - Access a file from the network - Convert string to date - Dynamic Checkboxes? Or a different way all together - how to learn asp.net for a fresher without basic knowldge - check Empty DataList - srolable control - How can I add images on my page and how to put text on the center vertically? - What is the problem with my pages?? - [VS2k8] Web Services keep using old code - 2 rows for each database record in a gridview - View raw soap XML in Web Method - checboxlist can not be validated - web service creation - Create Table in MSSQL using Visual Studio - Why the dll is not updated in vs-2008? - Reading a result from a database to a string - Auto fill and submit another site - set pager setting mode as alphabets instead of numeric - What is The Difference Between asp.net sever controls and html servser controls - dynamically updating user controls - How to add multiple check box values to single column in database - GridView.DataKey - dropdown, textbox search mysql database, result in gridview - GridView does not show updated data - Regular Expression for multiline textbox - search mysql database with textbox in asp.net - Gridview Rowupdating - tree view control - How to create dynamically li under ui - Hyperlink text issue-----need help - Writing to a relationship based table - datalist inside a tabcontainer does't shows links - Filling Web forms - nothing happens in update table when it executes... - Image Map - Panel Class question - Format the column of a datatable - problem to place the existing frame into the jtabbedpane - Store value in asp.net Application Variable - System.NullReferenceException: Object reference not set to an instance of an object. - IE would not display any images... - I have an ASP.NET and AJAX question. - SOAP XML Call Results in 400 Response -WHY? - update master page variable value from the content page by javascript. - Memory Leak Issue :( - Save File From Client Machine to Web Server - Calling a WebService method from JQuery within a .NET UserControl - delete option in aspx for mysql database with confirmation prompt - How can I add different columns with same name to gridview??? - login in intranet - Does ASP.net works on Linux platform - Type Safe SQL Parameters and Update/Insert of database question - Set Scroll bar to Selected Item in a multiple Select Listbox - delete command usage from aspx page to mysql database - How do I open a pdf inside a panel in a ASP.Net 3.5 webpage - can anybody tell me the provider name - Updating Browser with Status on Long Running Process - Problem IN Getting Data in Aspx Page - Question about the log out - How to save an image to the database - About Authentication Mode - Mysterious behaviour on running exe and on using breakpoints in code. - how to write from excel to data table when ms office is not installed on the server - how to make exe file of window application in Visual web developer 2008 - Change checkbox to word in gridview - handle a long running process nicely - Dropwdown list in IE when using tab - how to browse my web (aspx) pages in intranet - Membership with many Web App - Removing all items from a list view - how can i use scaaner in asp.net pls help me,its so argent - How to make Textbox,Buttons, dropdownlistbox controls attractive. - Code help please survey/form. Doesnt matter format - Dropdownlist's enableviewstate not workin - javascript function in Linkbutton not firing in FireFox browser - eventhandler to a dynamically created button control - Refresh expicitly my page - GridView RowStyle dependent on a property of the item the row is bound to - Time converstion - request password be sent through e-mail - Image Streaming - i get false value of checkbox - Object reference not set to an instance of an object.-i got null value of checkbox ar - Passport Authentication .NET 3.5? - What is cross page post back? - cross page postback - Validation Controls and Javascript Validation - Is there any asp.net ebook online . - Activex install problem - Photo Uploading Error - restricting files with global.asax - How to set Focus() - Programmtically Changing Recycling Time in ASP.NET - How do "update" a field in the <EditItemTemplate> that has a null value in t - hosting asp.net web application in IIS 6.0 gives error - how to update automaticaly a javascript variable that is parse from the codebehind - After learning asp can we work in asp.net ? - problem with regular compare validator in visual web developer - Binding Expressions - Conversion of html to pdf - master page - Button inside repeater wont open modalpopup - FormView: how to bind events to controls inside a loaded template? - How to open crystal report in a new window - sending null parameter from combox to sp via linq - Issues getting an object from a listbox - Index was out of range. Must be non-negative and less than the size of the collection - ListViews in asp.net - ASP.NET Datareader - Problem with ModalPopupExtender(AJAX) + C# - Build Deployment Package with Pre-Compiled (not the raw files) - Starting a Schedule task in ASP.NET - asp.net and telephony - Error: A Generic Error occurred in GDI+ - Drag items in a Dropdown list - tick event not work in asp ajax 2.0 - only refresh image button without page reloading - how to jump to a spot on web page - how to set my path to connect ms access on web server - GridView dynamic footer row creation problem. - Custom Server Control not working after uploaded - Ajax Async Process Flow - Can we use Ajax RoundedCornersExtender control with AJax,tabContainer? - Breakpoint not works - dont open pop up on session expire - How to work with templatefield checkboxes in GridView? - linking to mdf database - help validating .net site. - Web.config problem while running multiple websites using host headers - I have Assignment about ASP - Naming a file in the server in multiuser evironment - Issue with reading data from remote excel sheet - How to read outside the dataReader - GridView column value in Label.Text - Do we really need ASP.NET's xyzDataSource controls? - how to upload my database on web server - c:\....v3.5\Microsoft.Common.targets(3397,13): exited with code 9009 - Access to variables in an asp.net user control vs an include file - Alt+Tab,windows Start Up buttons - refreshing parent window on closing of child window - change password AD using asp.net - how to pass a variable to a button click event? - Version issues when upgrading webparts - Range Validator Visual Studio Express 2008 - Null values and web service - Modalpopup Extender issue - specifying page setup for printing - Blink a text - .net and SEO keyword problem - about html in asp.net - set session variable value in JavaScript in ASP.NET page load - disallow special chracter and list of words - Security Exception while accessing XML file data - ASP.NET Application State - How to know the language of text written in Textbox ? - How to grab unknown SOAP header, convert to string, and pass to class library parser? - Items.SelectMany for ListBox in Silverlight - pass all inquiries from host to asp.net? - storing in Viewstate Vs rereading XmlDocument - How to handle hidden datagrid column validations - Get data from the popup window and refresh the already opened window - Client browser freezes when clicking more than textbox - foxpro linked server problem - how to Video Chatting in asp.net & how to insert/save video(wmv/avi/flv) file in sq - Refreshing part of a page in asp.net - how to launch an application in the client system ? - postback problem in creation of dynamic dropdownlist. - TextStream - How to handel session for multiple client in a WCF application - how to write javascript validations for database updation - Dynamically populating a DropDownList, AutoPostback and JavaScript error - dreamweaver aspx file - How to get data feeds on website from BSE and Nse and stock exchanges of the world? - not opening include files in aspx - Msgbox - Trouble when loading a webpage in my site at server level. - hiding columns in Gridview with paging enabled - Authentication and Session - Photo Cropping Tool Question - MS SQL simple table query - Assign sql query result to variable - how to send email from a contact us page (asp.net in VB environment) - A multiple records to GridView - SQL Search - get id of dynamically created button - Is Html.Encode() method needed? - Master file doesn't cascade to subfolders? - How to return JSON data from ASPX page? - To export xml to a new browser window - Datagridview with the reverse order of items - Attaching a sql database on a web application project - ASP.NET processing abruptly stopped on IIS 6.0 - filter by username - User stopped working after first session expires - Display a datagridview with a certain columns when web application runs - ASP.NET MVC: Multiple Models in a View - ImageMap Selection - User Control - Response.Redirct not working - How to receive data from RS232 on server with ASP.NET - Problem in Hosting a website on SQL Express Database - Edit DropDownList - How to get same Port no/Session ID for two web sites in same solution - Form Authentication - CheckBoxList with style color - Format some lines in listbox - timediff mysql function not working in gridview - CTRL + F5 images not showing - Automatic WebService Start - Genealogy (Family tree) Source code or a library needed - PageDirty - Iam not getting values I entered in the gridview for updation - DetailsView - How to add crystal report in Visual studio 2005 with inbuilt SQL express edition DB? - Blank page views on IE8; full page views on Firefox - Internet Explorer cannot display the web page - An unhandled exception has occurred. / Exception message: Object reference not set - Event code: 3005 / Event message: An unhandled exception has occurred. - Default Login - How to use SandCastle for ASP.NET website? - How to suppress CrystalReport group section base on summary value - getting logged in user name - getting data from multiple tables - data between two dates in asp.net2008 - How to Restrict the users based on the user types using .NET 3.5 & VB as code - export data into excel - Dropdown lists in gridviews on selected index changed. - iam displaying records in gridview,now my requirement is based on the transaction i w - Identify the source of the request - How to check entered data in SQL using ASP.NET 3.5 & VB - How to select and write records from a GridView - What is the difference between server.transfer and response.redirect - How to store only imagefile name in database table - Using an alertbox when the length is wrong - Parser Error Message: Could not load type - How to prevent spamming without using a recaptcha? - Notify by sending an email automatically - Editable column in gridview - code for upload file with progress bar in asp.net - Cutomize the logic for Paging - Project using ASP.Net and C# - Crystal Report Not Direct Printing .... - fill a datagrid - Get the rowindex of gridview outside the gridview - Tooltipextender problem in aspnet ajax with other ajaxcontroltoolkit controls - Object doesn't support this property or method - How to update the datagrid through javascript validations IN WEB FORM - Video Conference - It Gives Error While I am Inserting a Data in A table.??? - what is .net framework ? - Data Grid, SQL database - Creating Web Application for Web Farm - Postback not working - DataGrid Sizing - ASP.NET 2.0 Problem with column name changing in a Gridview control - How to bind items in asp:Menu control using SiteMapDataSource - Open a Web Site on Localhost - Modal Popup Extender Not Working in Internet Explorer - How to retain ViewState while Page Refresh when using UpdatePanel? - What is the difference between PostBack & Callback? Please give sample code? - need help - Code to upload,save,retrive and display video file in asp.net - Socket Exception is : The operation is not allowed on non-connected sockets. - Excel reading Problem - how to create reports with Sub Reports - How to view values selected from a dropdownlist - OnTextChanged and AutoPostBack work fine from Debug Menu but not directly - Program related to treeview showing parent table contents and child table contents - re-throw exception in worker thread - checkbox in a gridview
https://bytes.com/sitemap/f-329-p-4.html
CC-MAIN-2019-43
refinedweb
3,996
53.41
, my Dynamics CRM environment has an entity called Contact which represents a person that the CRM system has interacted with. The Contact entity has fields to hold basic demographics and the like. For this demonstration, the Address Type is set to an option set (e.g. Home, Work, Hospital, Temporary). Notice that an option set entry has both a name and value. FYI, custom option set entries apparently use a large prefix number which is why my value for “Home” is 929,280,003. The State is a lookup to another entity which holds details about a particular US state. This could have been an option set as well, but in this case, it’s an entity. With that information out of the way, we can now jump into our integration solution. Within a BizTalk Server 2010 project, I’ve added a Generated Item which consumed the Organization SOAP service exposed by Dynamics CRM 2011. This brought in a host of things of which I deleted virtually all of them. The CRM 2011 SDK has an "Integration” folder which has valid schemas that BizTalk can use. The schemas generated by the service reference are useless. So why add the service reference at all? I like getting the binding file that we can later use to generate the BizTalk send port that communicates with Dynamics CRM 2011. Next up, I created a new XSD schema which represented the customer record coming into BizTalk Server. This is a simple message that has some basic demographic details. One key thing to notice is that both the AddressType and State elements are XSD records (of simple type, so they can hold text) with attributes. The attribute values will hold the identifiers that Dynamics CRM needs to create the record for the contact. Now comes the meat of the solution: the map. I am NOT using an orchestration in this example. You certainly could, and in real life, you might want to. In this case, I have a messaging only solution. The first thing that my map does is connect each of the source nodes to a Looping functoid which in turn connects to the repeating node (KeyValuePairOfstringanyType) in the destination Create schema. This ensures that we create one of these destination nodes for each source node. On the next map page, I’m using Scripting functoids to properly define the key/value pairs underneath the KeyValuePairOfstringanyType node. For instance, the source node named First under the Name record maps to a Scripting functoid that has the following Inline XSLT Call Template set: <xsl:template <xsl:param <key xmlns=""> firstname</key> <value xmlns="" xmlns: <xsl:attribute <xsl:value-of </xsl:attribute> <xsl:value-of </value> </xsl:template> Notice there that I am “typing” the value node to be a xs:string. This is the same script used for the Middle, Last, Street1, City, and Zip nodes. They are all simple string values. As you may recall, the AddressType is an option set. If I simply pass its value as a xs:string, nothing actually gets added on the record. If I try and send in a node on the FormattedValues node (which when querying, pulls back friendly names of option set values), nothing happens. From what I can tell, the only way to set the value of an option set field is to send in the value associated with the option set entry. In this case, I connect the TypeId node to the Scripting functoid and have the following Inline XSLT Call Template set: <xsl:template <xsl:param <key xmlns=""> address2_addresstypecode</key> <value xmlns="" xmlns: <xsl:attribute <xsl:value-of </xsl:attribute> <Value xmlns=""> <xsl:value-of </Value> </value> </xsl:template> A few things to point out. First, notice that the “type” of my value node is an OptionSetValue. Also see that this value node contains ANOTHER Value node (notice capitalization difference) which holds the numerical value associated with the option set entry. The last node to map is the StateId from the source schema through a Scripting functoid with the following Inline XSLT Call Template: <xsl:template <xsl:param <key xmlns=""> address2stateorprovinceid</key> <value xmlns="" xmlns: <xsl:attribute <xsl:value-of </xsl:attribute> <Id xmlns="" xmlns: <xsl:attribute <xsl:value-of <xsl:value-of </xsl:attribute> </Id> <LogicalName xmlns=""> custom_stateorprovince</LogicalName> <Name xmlns="" /> </value> </xsl:template> So what did we just do? We once again have a value node with a lot of stuff jammed in there. Our “type” is EntityReference and has three elements underneath it: Id, LogicalName, Name. It seems that only the first two are required. The Id (which is of type guid) accepts the record identifier for the referenced entity, and the LogicalName is the friendly name of the entity. Note that in real life, you would probably want to use an orchestration to first query Dynamics CRM to get the record identifier for the referenced entity, and THEN call the “create” service. Here, I’ve assumed that I know the record identifier ahead of time. This second page of my map now looks like this: We’re now ready to deploy. After deploying the solution, I imported the generated binding file that in turn, created my send port. Because I am doing a messaging only solution and I don’t want to build a pipeline component which sets the SOAP operation to apply, I stripped out all the “actions” in the SOAP action section of the WCF-Custom adapter. After creating a receive location that is bound to this send port (and another send port which listens to responses from the WCF-Custom send port and sends the CRM acknowledgements to the file system), I created an valid XML instance file. Notice that I have both the option set ID and referenced entity ID in this message. After sending this message in, I’m able to see the new record in Dynamics CRM 2011. Neato! Notice that the Address Type and State or Province values have data in them. Overall, I wish this were a bit simpler. Even if you use the CRM SDK and build a proxy web service, you still have to pass in the entity reference GUID values and option set numerical values. So, consider strategies for either caching slow-changing values, or doing lookups against the CRM services to get the underlying GUIDs/numbers. Special thanks to blog reader David Sporer for some info that helped me complete this post. Categories: BizTalk, Dynamics CRM address2stateorprovinceid <——— es incorrecto custom_stateorprovince ——————————————————————————————————— address2stateorprovinceid <——— es correcto custom_stateorprovince address2stateorprovinceid Id xmlns=”” xmlns:ser=”” xsl:attribute name=”xsi:type” xsl:value-of select=”‘ser:guid'” / xsl:value-of select=”$param1″ / /xsl:attribute <——— es incorrecto /Id custom_stateorprovince ——————————————————————————————————— address2stateorprovinceid Id xmlns=”” xmlns:ser=”” xsl:attribute name=”xsi:type” xsl:value-of select=”‘ser:guid'” / /xsl:attribute <——— es correcto xsl:value-of select="$param1" / /Id custom_stateorprovince I used the example adapted to my map and it worked correctly, but for a really particular map i’m using namespaces, so the key tag must to be in the form: when i added the ns1:, have a problem building the project, the system throws the next error: Exception Caught: ‘ns1’ is an undeclared prefix. Line 124, position 4. how can i fix this error? Hi, The lookcode in this Post doesnot work. I have added a new one on my blog. Hope it helps you. There could be a typo error for the look up example here. the param1 node should be outside of “attribute name=xsi:type” node, to be exact immediately after. so you will have attribute attribute -> ser:guid ->/attribute -> param1. that is what Ing Omar Salas tried to say in the first comment there. can we perform composite operations on crm entities when using typed proxy? kinna like we do it with SQL adapter… If ues, then Ricky, this blog posts shows off some SQL query elements that aren’t exposed (). I don’t think you can do composite operations, but I honestly haven’t tried it. Please refer to following link in which I am trying to retrive contact information by using a Retrive schema. But I am not able to do that. What an invaluable resource. Thanks! My question is what other native types can i pass, apart from string. And what is where do i find the XML syntax expected – I need to pass DB types int, datetime and money
https://seroter.wordpress.com/2011/05/20/creating-complex-records-in-dynamics-crm-2011-from-biztalk-server-2010/
CC-MAIN-2015-48
refinedweb
1,400
61.36
Suppose that every time you copied a bitmap file, its image was made available on the clipboard. Currently, Windows does not support this functionality. But with a data handler (see Chapter 8) you could easily add this feature yourself. Maybe you would like to navigate into an Access database as if it were just another directory in the filesystem. You could do it with the proper namespace extension (see Chapter 12). Or you might like to automatically process information on a web page (say, your online brokerage account) every time you navigated to the URL. A browser helper object is the answer (see Chapter 13). These are just a few examples of the many things you can accomplish by programming the shell. But all of these examples, and all shell components in general, share one common attribute: they integrate fully with Explorer. This gives the impression that they are actually a part of the shell itself, and technically, they are. Why is this important? Chances are, the application that is used the most by Windows users world-wide is Explorer.exe . It is probably familiar to more people than any other application. This means that, by integrating your application with the shell, you automatically make at least a portion of your application's functionality conveniently and easily available to anyone who is accustomed to working with the shell. An excellent example is the popular WinZip program developed by Niko Mak Computing, Inc: the two most common processes of archive managementadding and extracting files from a .zip filecan be accomplished from the shell without directly opening the WinZip program itself. This shell integration in turn offers a number of advantages: Because users of your application can work with an interface that's consistent with that of Windows as a whole, they will find your application easier to learn and use. As a result, users will be happy with, rather than frustrated by, your application. How many times have you used a "Windows" application that just didn't seem to be written for Windows? Perhaps it had its own printer drivers. Maybe it deleted files outright rather than moving them to the Recycle Bin. Or possibly its windows just looked funny . In any case, applications that fall into this category for whatever reason are typically perceived as inelegant and amateurish. By integrating your application with the shell, there are fewer surprises for the user , and your application succeeds in conveying your professionalism as a programmer. As we'll see shortly, the Windows shell is one central area of Windows programming that is very poorly documented. Shell programming also relies heavily on COM, which is cloaked in obscurity for many VB (and even C++) programmers. Hence, when you're programming the Windows shell, you're working on the cutting edge in two areas. For those to whom programming is a passion as well as a profession, shell programmingand the knowledge gained from itis extremely rewarding . Clearly there are advantages to developing shell extensions and integrating your applications with Windows Explorer. There are also challenges. Traditionally, developing shell extensions has been seen as a topic for experienced C and C++ programmers only; very few programmers are aware that you can create shell extensions using Visual Basic. In addition to the fact that few programmers know that VB can be used to create shell extensions, the state of the documentation on programming the Windows shell is perhaps worse than in any other area. Possibly Microsoft felt that, despite the centrality of the Windows shell in the Windows operating system, programming the shell was too complex and too specialized for most programmers. Hence, even for C/C++ programmers, figuring out how to create a particular kind of shell extension and getting it to work is no easy matter. But we'll surmount the first of these obstaclesthe mistaken belief that VB cannot be used for shell programmingby showing you how to develop shell extensions. We'll also help you to surmount the second obstacle by providing the basic documentation on the shell and its COM interfaces that you can use when building your own shell extensions.
https://flylib.com/books/en/1.107.1.18/1/
CC-MAIN-2022-40
refinedweb
690
52.29
Microsoft Enterprise Forum January 30th, 2009What is "the gatherer is shutting down"? megatransect (0 comments) SSRS 2008 FIPS error (0) Question about x86 and x64 boot images (1) Problem uploading multiple documents to Document Library AyaBabe (0) January 29th, 2009Why can't I merge cells vertically? Jamie Thomson (3) SharePoint 2003 and SQL Server 2008 (1) Meeting Workspace Multipage: Add Pages Not Visible By Users - how... WSJG (1) Utilizing Script to capture IP information and store in Sysprep.inf Paul Goodson (2) January 28th, 2009SMS_SiteSystemToSQLConnection failing to access database on primary... (1) Central Admin link in Administrative Tools launches Firefox Eric Vandekerckhove (0) Upgrade SCE to SCCM ? FMG (0) What is "list" is SSRS Toolbox? (6) "The URL '#doc lib#/#filename#' is invalid. It may refer to a... sanjeev mahajan (3) January 27th, 2009Alternate Access Mappings - Internet users not able to access... (8) Data extension does not support model generation MindReign (2) January 26th, 2009Query , can you build query that recognize Laptops or dekstops Ben Peeri (5) Could Multiple Instances of ILM "2" be Beneficial? (answered) razer9echo (4) Delete Site in Collection ReneeDD (3) Tuts and references for installing ILM2. Mika Urgenstolern (5) Eudora 7.1.0.9 (0) January 24th, 2009SCCM Workgroup Client in DMZ SkellyLee (3) January 23rd, 2009Remotely remove SCCM client Gaguilar (2) SCCm Client Not Running Properly - No Logon/Logoff Information scjoy (3) Can't open SSP - The DataSourceID of 'QuickLaunchMenu' must be the... Christoffer1 (2) Non Empty Crossjoin cannot be unchecked? (3) Unable to Activate "Publishing Infrastructure" on a Migrated Site... (5) Windows 0.0 Micheli (1) ILM 2 Architecture for best performance? (unanswered) razer9echo (6) January 22nd, 2009SCCM Capture media doesn't run mxmissle (3) .NET Runtime 2.0 Error 1000 Faulting owstimer.exe (3) Client install on servers Keithgeo (8) Client install on servers (8) Report Designer in Visual Studio 2008 - Grid Lines? GeordieBoy (1) ILM2 oracle management agent , creating stored procedures in... Domagoj Pernar (3) Task Sequence cannot continue TS Manager or GINA not installed (0) Task Sequence cannot continue TS Manager or GINA not installed (0) January 21st, 2009Querying SCCM for Collection rules by Powershell (0) SSRS 2008 web portal issue, urgent!! sqldev1 (3) Two Matrix Questions ?? Abo Omar (4) Clients SMS Agent service keeps restarting? s10xtremenlow (9) SCCM Agent error - Downloading Program issue (2) 'Group cannot be found' error during running content deployment... Heena123 (1) Fail to copy drivers to driver package Darklord12 (3) removing tabs etc from the Derived Col Transform db042188 (7) January 20th, 2009Stop BI Studio 2008 overwriting parameter MDX data set? Smozzer (1) Unable to save Excel files opened from SharePoint tbs0 (4) Filtering in SPGridView (1) Report Builder 2.0 Permissions Kevin_B (5) January 19th, 2009Minimum specification hardware and software for client pc (5) Meeting Workspace Not Showing in Link to Existing Workspace... (7) Meeting Workspace Not Showing in Link to Existing Workspace... (7) January 18th, 2009Is Steadystate supposed to work with Windows 7? trickyt (4) Is Steadystate supposed to work with Windows 7? (4) January 17th, 2009Files and Settings Transfer Wizard (1) Files and Settings Transfer Wizard (1) January 16th, 2009Remote Tools and OpenGL willbar (3) mssdmn.exe stuck at 100% CPU usage tbs0 (4) SCCM Inter-site Replication (3) Problem with non-Microsoft DNS preventing SCCM client site... Mlaxy (0) January 15th, 2009WSS 3.0 - problem with moving the database kombatt (4) Solution Deployment (3) What other tools can use Report Models? Rose Say (1) Which Applications using Page File and how much? (1) Renaming computers - proper procedure Robert Tuck (0) January 14th, 2009Understanding the how to do a "Sccm OSD ZTI computer replace"... Naimc (2) Install Reporting Services Point Not installed or configured fjdima1 (7) Install Reporting Services Point Not installed or configured (7) Renaming computers - proper procedure (2) Renaming computers - proper procedure (2) Conditional Sum of a field in SSRS VS2005 Rastogi (4) Conditional Sum of a field in SSRS VS2005 Rastogi (4) Corporate -> VPN Remote Tools Sessions not working (2) Corporate -> VPN Remote Tools Sessions not working (2) SSRS 2005 - subreports have implicit "keep together" (2) storage space allocation space used incorrect- how to recalculate? Sara Porter (3) January 13th, 2009Free Disk Space and Alerting Amathus (3) Free Disk Space and Alerting (3) Matrix question ms_crm (2) Unable To Access Default URL for SCCM Reporting Kumar Rakesh (6) Unable To Access Default URL for SCCM Reporting (6) How can i retrieve all the column names of a list etc using... Patrick.I (3) OWSTIMER 100% CPU Marshaln (8) Could not able to add webpart Pradeep Nulu (0) January 12th, 2009b2b upgrade timer job failed Michael Markel (3) OPSMgr SDK Service - Event ID 26321 lawred (1) AD group not showing up in site collection LeeFAR (4) Disable Sharepoint List in Outlook a7jasonlam (1) Event ID 5783: SSP synch fails; account name is invalid Kaerwek (1) Could not able to add webpart Gautham Shantharam Pai (0) Could not able to add webpart Pradeep Nulu (3) January 10th, 2009Windows (7) could not update the computer's boot configuration.... (27) January 9th, 2009SSRS Hide one data value label in chart legend CCusson15 (3) SCE restore Davide Gatta ? (0) Using a SharePoint Data Connection from SSIS p-manse (4) SAP Connector 1.0 for SAP BI David Purdy (3) January 8th, 2009DTS in SQL Server Management Studio 2008 emad.net (0) mssearch floods the log file (3) Unable to open in Explorer View Srujan (4) web application`s not showing up during configuration of shared... felipe matheus (3) RFC: I want your FB on "RS Parameters Enhancements" for the next... Mike Schetterer -- MSFT (10) Error: Setup cannot locate Install.map. Gaguilar (3) January 7th, 2009Can anyone align a table in the middle of a report? Tyler Mitton (12) stsadm -o import failed with AllowAutomaticASPXPageIndexing error Hervé Monfouga (3) Text Rotation in SSRS (3) Deleting Old SSRS Subscriptions svashchenko (6) Omada and ILM 2 charliechan1981 (2) Local Report Server - 'rsaccessdenied' Colderone (12) Web Parts Maintenance Page: An unexpected error has occurred. malikfarhan (7) January 6th, 2009Multiple File Upload Error srpatel (0) Can I turn a query into a Report? DMobley1022 (19) Exiting word doesnt prompt sharepoint check-in dialog, like when... Steven Richardson (4) Backup error "The backup/restore job failed because there is... fmorales2 (6) SharePoint - 80 "The Process cannot access the file because it is... Adeoye (3) January 5th, 2009Some SharePoint timer jobs not running GreenWaterBoy (4) Error when using STSADM to Restore a site Chroma914 (3) Windows Disk Protection installation was not successful DeisEsMachine (3) January 3rd, 2009Failed to run the last action: Join Domain or Workgroup. Execution... The Sting Pilot (4) Failed to run the last action: Join Domain or Workgroup. Execution... (4) January 2nd, 2009WDP hangs up and locks computers DonD95 (2) January 1st, 2009SSIS and zip files decompress DeepInIT (4) 3d Charts in Sharepoint AGupta24 (9) Reporting Services 2005 Image Control and Image data type (2) December 31st, 2008WSS 3 & Mail Enabled Calendar joe7670 (0) December 30th, 2008Content migration from Documentum to MOSS2007 Arulprakasam S (2) page breaks in reporting services 2008 ramaprabha (1) December 29th, 2008ConfigMgr Advanced Client received policy that could not be... Mike Dzikowski (0) ILM "2" Number of Objects Increasing Virginia_ITCST (2) ILM v 2 - Self Service unlock howardmp (0) December 26th, 2008Cannot solve WebDAV PreReq (Win2008, SCCM 2007 SP1) DavidRa (0) December 23rd, 2008Wake On Lan not working Triage191 (1) December 18th, 2008Duplicate records in Datasheet, Excel views robinthakur (3) Duplicate records in Datasheet, Excel views (3) not being able to the check in a document in a library (local... crisispermanente (1) December 11th, 2008Why does SteadyState ADM break GPO viewability? (0) Why does SteadyState ADM break GPO viewability? (0) December 10th, 2008Unable to import a spreadsheet to create a list DBesaw (4) SCCM OS Deployment: Windows PE reboots without error Maarten Brand (2) SCCM OS Deployment: Windows PE reboots without error (3) December 9th, 2008SSIS Web Service Task Error with WCF Service rangermac (1) December 5th, 2008Why SSIS rixol (1) December 4th, 2008Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Vaishu (0) December 3rd, 2008Page Breaks Issue with PDF Rendering using SSRS 2008 justinsmithjs (0) December 2nd, 2008Software Update Error: 0x80004005 (1) December 1st, 2008SCCM Remote Tool - All my Helpdesk Team to Access Gopinath.D (0) November 27th, 2008SSRS 2008 Express Export to Excel Results in #VALUE! items.... pittpanther (1) November 21st, 2008Column-level Permissions Nate A Miller (0) November 18th, 2008PeopleEditor border kiran1234 (0) November 15th, 2008SCCM 2007,WDS with DHCP on a different server. WardH (1) November 13th, 2008Alerts are not working malikfarhan (2) November 6th, 2008Installing SCCM 2007 SP1 - Installation Prerequisite Check... clachapelle (0) November 5th, 2008rsAccessDenied Error on Report Server Web Reference SQL Server... erkan.akoglu (3) November 1st, 2008Getting error while updating farm credential yama_rajesh (0) October 27th, 2008Installing reporting services point on Windows Server 2008 FamGuy (3) October 24th, 2008Subreport table alignment danbridgland (0) ERROR: Cannot show Visual Studio 2008 Tools for Applications editor... SAinCA (3) ERROR: Cannot show Visual Studio 2008 Tools for Applications editor... (3) October 23rd, 2008MOSS 2007 Alerts - Multiple Emails Issue Schraml (7) October 20th, 2008Report Builder 2.0 release Robert Bruckner (6) October 19th, 2008Report Builder 2.0 release (6) Report Builder 2.0 release (5) October 17th, 2008Reporting Services 2005 now rendering PDFs differently! Barry Seymour (1) October 16th, 2008Reporting Services 2005 now rendering PDFs differently! (1) October 14th, 2008Reporting Services 2008 - Anonymous Access Timothy1170 (1) Reporting Services 2008 - Anonymous Access (1) October 13th, 2008SharePoint 3 Central Administration missing (0) Microsoft Lifechat Lx-3000 Microphone (1) October 10th, 2008SCCM 2007 R2 Hash problem with OSD + Multicast cmoore49 (0) October 8th, 2008Install 64bit SSRS on 64bit server 2008 Meg_work (2) September 30th, 2008changing default width of a multivalue parameter in SSRS 2008 Bryan_London_UK (0) September 24th, 2008SharePoint CALs ambiguity g_hickley (1) September 18th, 2008Use my local drafts folder - Some Yes, Some No Dan Brady (0) September 17th, 2008How to convert lotus notes .nsf to outlook .pst? (0) September 15th, 2008People Picker (WSS 3.0) finding only a partial list of AD users Jackson5403 (0) September 11th, 2008ForEach Variable mapping number 1 to variable "" cannot be applied... mr4100 (0) September 10th, 2008smspxe.log - Device has been accepted - but does not boot cko42 (0) smspxe.log - Device has been accepted - but does not boot cko42 (0) August 29th, 2008<META NAME="ROBOTS" CONTENT="NOHTMLINDEX"> What does this do? Raymond Chin (1) August 25th, 2008SSIS as SSRS Data Source (2) SSIS as SSRS Data Source (2) August 13th, 2008SQL 2008 RTM Configuration Manager "invalid namespace" (0) SQL 2008 RTM Configuration Manager "invalid namespace" (0) August 11th, 2008Prevent Internet Access not functioning Antonius138 (2) Prevent Internet Access not functioning (2) Prevent Internet Access not functioning (2) August 7th, 2008Issues with Excel/Sharepoint Integration (unable to insert new data... DMamaril (0) August 2nd, 2008Microsoft Windows SharePoint Services 3.0 1033 Lang Pack -- Error... Jake Wardley (0) July 30th, 20082008 servers are not listed on Daily Health Report... Tejas177 (0) July 28th, 2008OleDb Module encountered a failure aek033 (1) July 25th, 2008Cannot complete action when trying to Activate Bug Tracking Modules Ragnar Engnes (1) July 24th, 2008Status Message Alerts (SCCM & SCOM Management Pack) Steve Beaumont (0) July 14th, 2008Column widths in email sent as MTHML (web archive) format JofPowell (1) July 11th, 2008Reporting Server Error 1053: The service did not respond to the... (0) July 8th, 2008SQL2005 64bit install warning about ASP.Net Version Registration... (2) Access to DocLib via UNC or Explorer View Freezes PC Chanda Cole (1) July 7th, 2008Intermittent Access Denied Error (0) July 3rd, 2008Stsadm Restore issue Madhu918 (1) June 27th, 2008How to upload Excel document to Sharepoint from SSIS? ddesi16127 (2) June 23rd, 2008Many Errors in Event Log Ashish Kanoongo (0) June 21st, 2008Editing a PDF file and saving it back to Sharepoint library HalosPrice (1) How do you logout of Report Manager? (0) June 19th, 2008Profile Import Problem Chad Clarke 323 (0) June 17th, 2008Starting Word from SharePoint fails LenReinhart (1) June 16th, 2008Scheduling Reports in SSRS Sahul (0) June 2nd, 2008Upgrade to SCCm SP1 stops at Initialize Configuration Manager site sfor (2) May 21st, 2008Permission bug while importing computer to a specified Collection (2) May 13th, 2008An unexpected error occured - Sharepoint Central Administration... (0) May 2nd, 2008Unable to move file - MOSS Dean Gross (3) April 30th, 2008How to stop copying to Distribution Points (0) April 11th, 2008Sharepoint add-in installation failed. Uzzie (1) April 3rd, 2008filter value is not in a supported date format Mattaniah (0) DCOM was unable to communicate with the computer xxxxx kom.int (0) March 19th, 2008forms auth with AD wms103006 (0) March 17th, 2008Web Remote with SCCM eddierio (0) March 15th, 2008WmiPrvSE.exe CPU consumption (0) March 14th, 2008Event id 7888 every 1 minute in log Birger H (0) March 11th, 2008The AcquireConnection method call to the connection manager "Excel... Amzu (0) The AcquireConnection method call to the connection manager "Excel... (0) March 9th, 2008Error: "Windows cannot copy file. The filename or extension is too... BeGr (0) February 28th, 2008Assigning SharePoint tasks to groups Davy Maes (0) Errors when editing list folders after applying SP1 and Hotfix Adnan Al-Ghourabi (1) February 12th, 2008Unable to cast COM object of type... Dudley (0) Unable to cast COM object of type... Dudley (0) Unable to cast COM object of type... Dudley (0) February 7th, 2008"Document not Saved" in Excel 2007 - using Windows XP Pro and... Akiana (0) February 2nd, 2008Not always prompted for read-only or EDIT mode, when opening files... chrisgru (0) February 1st, 2008Not always prompted for read-only or EDIT mode, when opening files... (0) January 30th, 2008How do I get the TS gateway webpart in to MOSS 2007? Kenneth Marsner (0) January 23rd, 2008The dreaded Execution cannot be found Jim Ji (0) Putting Database Images in Report Header and Footer in BIDS MarkJDixon (0) January 22nd, 2008Getting 'The page took too long to save' message. Jason Evans (0) January 21st, 2008Method Not Supported Error When Trying To Create New Report Model Maurice Reeves (1) January 13th, 2008Modification of data in Excel file (SP3) in Share point (WSS) Venkataramanan (0) January 12th, 2008MOSS 2007 - Suddenly Cannot Edit Files In Place/My Network Places... (0) MOSS 2007 - Suddenly Cannot Edit Files In Place/My Network Places... (0) January 3rd, 2008Certificate Issues with Boot Media (0) December 6th, 2007Problem with Report viewer , no data is displayed and report comes... NarendraEDS (2) SCCM Client Push Installation Wizard does not install the client.... (0) December 5th, 2007SCCM Client Push Installation Wizard does not install the client.... (0) December 2nd, 2007Windows Steady State 2.5 uninstall (New) Matti Kalliokoski (0) Windows Steady State 2.5 uninstall (New) (0) Windows Steady State 2.5 uninstall (New) (0) November 30th, 2007User Profile Import Warning mcwoods (1) November 24th, 2007Failed to create the configuration database (0) Failed to create the configuration database (0) November 21st, 2007Page Header in Reporting Services kJai (1) Page Header in Reporting Services (1) November 14th, 2007Sharepoint content deployment: The remote upload Web request... JohnMcProp (0) November 9th, 2007Help - SCCM OSD XP Capture - task sequence: image capture wizard... (7) November 2nd, 2007SCCM, WDS and DHCP NosIreland (0) October 29th, 2007System.Security.Permissions.Securi tyPermission, mscorlib,... shankah (0) October 24th, 2007Will SSRS 2008 eliminate white space due to hidden columns? Waco_Huber (2) Will SSRS 2008 eliminate white space due to hidden columns? (2) Will SSRS 2008 eliminate white space due to hidden columns? (0) October 15th, 2007Cannot connect to the configuration database. PAdkinson (0) October 4th, 2007Reading Multiple Worksheets from a spreadsheet with a single OLEDB... (0) September 27th, 2007What to do with machine account? circulent (0) September 20th, 2007SCCM OSD -Step-by-step Rajaguru (0) SCCM OSD -Step-by-step (0) September 11th, 2007Task 'SharePoint' reported error (0x80070005) : 'You do not have... Marcelw (0) An error has occurred during report processing.... (0) September 6th, 2007Web Service Dataset with null or empty spaces. (0) August 22nd, 2007MS SQL 2005 SP2 x64 & SSIS Packages RHudec (1) August 20th, 2007Overwriting an excel file using SSIS swan_sgp (0) Overwriting an excel file using SSIS (0) August 14th, 2007"Document not saved" & other file system related errors Geoff Hill (0) August 6th, 2007MOSS 2007, error 6482 repeating every 30 seconds Greggory (0) August 3rd, 2007How to disable the "Set as Desktop background"? aredubbya (0) July 26th, 2007Error 6875 in the event log? Anders Sjöholm (0) July 11th, 2007Data base size is increasing quickly. Aji Jose (0) July 9th, 2007Using SSIS to export into SAS JMP File Format mr.letni (2) July 6th, 2007Custom screen saver not saving Sean H_ (0) June 2nd, 2007Conditional page breaks in SSRS Rayz (0) May 31st, 2007Reporting Services Login box appears when trying to deploy in SSRS... GBaksh (0) Reporting Services Login box appears when trying to deploy in SSRS... (0) May 28th, 2007List Schema Issue Rahmah (0) List Schema Issue Rahmah (0) May 24th, 2007Microsoft.SharePoint.SPList.Update DirectoryManagementService error... (0) May 21st, 2007Multiple Script or Executable failed to Run Emerical (2) May 8th, 2007RDLC vs RDL Revisited MSDN Student (0) May 1st, 2007The connection "" is not found. This error is thrown by Connections... SSG3141592 (0) The connection "" is not found. This error is thrown by Connections... (0) March 29th, 2007Parser Error compat.browser Jbenisek (0) March 26th, 2007TextDecoration Does Not Show in PDF export (0) March 22nd, 2007"Internet Explorer cannot display the webpage" error in web... (0) February 27th, 2007Convert seconds (INT) to mm:ss in Reporting Services Claudio V MOSS 2007 Single Sign on Error thusinh (0) "How would you like to open this file?" dialog when opening a... sdolier (2) February 12th, 2007WebException: The remote server returned an error: (401)... Vipul123 (0) February 6th, 2007sharepoint 2007 showing System Account instead of Username / full... thekaran (0) November 30th, 2006Report Builder and optional parameters Wapper (1) November 18th, 2006microsoft visual studio cannot shut down because a modal dialog is... BI Baracus (0) microsoft visual studio cannot shut down because a modal dialog is... (0) October 17th, 2006Parameter validation mpetanovitch (0) August 29th, 2006how to deploy reporting services into different folders HY-Updated (0) July 12th, 2006There's just no escaping it... data containing quotes ruining CSV... J. Nail (1) June 29th, 2006Can't create a SQL Server package configuration (0) March 30th, 2006CPackage::LoadFromXML Failure LKHall (1) January 4th, 2006cannot convert between unicode and non-unicode Jordan Carroll (2) December 8th, 2005The underlying connection was closed: An unexpected error occurred... (0) December 1st, 2005rsInvalidDataSourceReference Error Rajeeb Sharma (0) rsInvalidDataSourceReference Error Rajeeb Sharma (0) November 8th, 2005Change Column Order John Jeffers (0) August 10th, 2005ODBC Destination in SSIS Dima S (0)
http://www.networksteve.com/enterprise/?Date=012009
CC-MAIN-2019-39
refinedweb
3,095
51.07
Created on 2013-05-14 15:31 by barry, last changed 2013-05-14 23:43 by orsenthil. This issue is now closed. The docs[1] say: .. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=True) The code[2] says: def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, *, cafile=None, capath=None, cadefault=False): Obviously, the code cannot be changed in a stable release, and whether the default should be changed for 3.4 is a separate discussion. For now, the docs should be fixed to reflect the code. [1] Doc/library/urllib.request.rst [2] Lib/urllib/request.py New changeset e2288953e9f1 by Barry Warsaw in branch '3.3': - Issue #17977: The documentation for the cadefault argument's default value New changeset 85ecc4761a6c by Barry Warsaw in branch 'default': - Issue #17977: The documentation for the cadefault argument's default value OMG. That's a glaring mistake. Thanks for fixing it.
https://bugs.python.org/issue17977
CC-MAIN-2017-51
refinedweb
154
52.66
Hi? One thing to consider is that Community Edition has a restriction on how many additional namespaces and databases you can have (and that's exactly zero). So while it may be nice to be able to have 3rd party tool in it's own database, it would also be nice to be able to use it from within USER and %SYS.? - Adding a namespace for each tool package will lengthen namespace lists in Studio, Portal etc. Maybe tools don't always need a namespace in front of their database. Ones that present a web app / REST interface probably do (at the moment) because of how the app config has to point to a namespace. - Tools should be able to register stuff that needs to be run during environment startup and shutdown. The current need to create/edit %ZSTART / %ZSTOP routines is clunky. Hi Sergey! Do not take Community Edition limits into consideration. If you don't have limits what is the best strategy with packages/tools development in your opinion? Hi John! Thanks for the input. Why do you think we need a prefix for globals? The matter to have a dedicated namespace/database for the tool frees us from this requirement, right? Agree, this is valuable. If we'll see thousands of modules. If we have a public package manager this will solve it I guess. But maybe "package name=repo name" rule could be a solver. I guess we have it in docs, but this number is large. Thousands I hope. One of the options when tools could safely share one namespace when it has the same publisher. We often can imagine one company/developer who produces several tools which probably can be installed into one namespace/database. If tool XYZ is installed in namespace+database XYZ and consists of classes in the XYZ package that's %ALL-mapped from XYZ, default storage for persistent classes in that package will use globals ^XYZ.* which will get stored in the default data database of whichever namespace the tool is used in (e.g. USER). These globals mustn't clash with globals created in the same place by a tool from a different supplier, or by the end-user's own apps. If tool XYZ opts to consolidate user's data into the XYZ database, the natural way of doing this is with package mapping, in which case it's still necessary to avoid name collisions. There are ways the XYZ tool could use extended global references to route data into its private database, but this adds complexity. In that case I think it would be nice to have several ways to distribute a project: Right. And this is the reason why the tool with XYZ.Classes should be installed in XYZ namespace - in this way even if I map XYZ to %All all the data persistent data for XYZ.Classes will be stored in XYZ namespace, even if I use it from USER namespace, right? This is only true if you explicitly add a global mapping of ^XYZ.* to the XYZ database (NB, mappings point to databases, not to namespaces). If you only mapped the XYZ package to XYZ, when an instance of persistent class of that package is saved from within the USER namespaces its data will get stored in the USER database. Yes, you are right. I guess it is fair for the cases when the tool spawns jobs and does some work as daemons - like services, monitoring, alerting, etc. In this case data stays with XYZ database. But I agree that we need a public registry of "safe" Class/Global prefixes and names. We can take some easy and obvious approaches: Github or DNS. E.g. with the Gihub approach the package name can start with a company.reponame. Thoughts? This limit on Comunity Edition will be expanded with the next update. To leave a comment or answer to post please log in Please log in
https://community.intersystems.com/post/tools-and-framework-development-and-deployment-guidelines-what-best-approach
CC-MAIN-2020-40
refinedweb
661
72.26
On date Saturday 2011-01-08 22:43:04 +0300, Alexander Sorockin encoded: > The other day I was making videos from a bunch of pictures and I needed > ffmpeg to be able to start from a particular file without having to rename > the whole sequence. (I know I could use symbolic links instead as suggested > in FAQ, but it's still inconvenient when you have to do it multiple times.) > Below is a simple patch that adds option first_index specifying the number > ffmpeg starts counting picture files from. Cheers. > > Index: libavformat/avformat.h > =================================================================== > --- libavformat/avformat.h (revision 26251) > +++ libavformat/avformat.h (working copy) > @@ -915,6 +915,9 @@ > * - decoding: Unused. > */ > int64_t start_time_realtime; > + > + int first_index; > + > } AVFormatContext; Do we support per-demuxer options? If that's the case then maybe it would be better to use that rather than pollute the global option namespace. -- FFmpeg = Faithless Fabulous Merciful Picky Exploitable Gorilla
http://ffmpeg.org/pipermail/ffmpeg-devel/2011-January/105766.html
CC-MAIN-2014-23
refinedweb
148
54.63
Home > Industries > Finance Tags: splay font tostring OSI span GPO MDA double Original When a double is used for business operations, the double calculation loses precision. You can use BigDecimal for calculations.[Java]View PlainCopyPrint? Import Java.math.bigdecimal;import Org.junit.test;public class testbigdecimal{ @Test public void Test () { double a=0.1; Double b=0.2; System.out.println (a+b); BigDecimal a1=new BigDecimal ("0.1"); BigDecimal b1=new BigDecimal ("0.2"); System.out.println (A1+B1);//Do not write System.out.println (A1.add (B1));//correct BigDecimal c1=new BigDecimal (" 0.23574 "); A1=a1.add (C1); A1=a1.setscale (1,bigdecimal.round_down); SYSTEM.OUT.PRINTLN (A1); }} 0.30000000000000004 0.3 0.3 The addition and subtraction of double cannot accurately calculate 0.3, while using BigDecimal can. Of course, if you directly pass double to BigDecimal, you will find that not only can not solve the accuracy problem, but the accuracy of the completion. So, to ensure accuracy, we pass the string to it. The Bigdecimal.setscale () method is used to format the decimal point . scale () precision value, that is, the number of digits after the decimal point (note: BigDecimal can improve accuracy by setscale, as long as the new value is larger than the original!) BigDecimal can also be setscale to reduce accuracy. Because the new value is smaller than the original, so you must ensure that the original value of the bit after the decimal point is 0, only in this way can be set than the original small precision. Example: The original value is: 4.1235648, want to set the scale to less than 7 will be wrong, if the original value is: 4.1235000, the scale is set to less than 4 bits will be wrong, and set to 4, 5, 6, 7 are no problem, set a larger, certainly will not be wrong) Add (BigDecimal) BigDecimal the value in the object, and then returns the object. Subtract (BigDecimal) subtracts the value from the BigDecimal object and returns the object. Multiply (BigDecimal) multiplies the values in the BigDecimal object and returns the object. Divide (BigDecimal) divides the values in the BigDecimal object, and then returns the object. BigDecimal Divide (BigDecimal divisor, int scale, int roundingmode) Example:BigDecimal mdata = new BigDecimal ("9.655"). Setscale (2, bigdecimal.round_half_up); ----Results:-----mdata=9.66 ToString () Converts the numeric value of the BigDecimal object to a string. Doublevalue () returns the value in the BigDecimal object as a double-precision number. Floatvalue () returns the value in the BigDecimal object as a single-precision number. Longvalue () returns the value in the BigDecimal object as a long integer. Intvalue () returns the value in the BigDecimal object as an integer. Finance Project Java Development _bigdecimal (solving computational accuracy issues)
http://topic.alibabacloud.com/a/finance-project-java-development-_bigdecimal-solving-computational-accuracy-issues_2_62_30279866.html
CC-MAIN-2018-43
refinedweb
458
50.12
Opened 10 years ago Closed 10 years ago Last modified 10 years ago #10550 closed defect (duplicate) integration not working Description sage: g = abs(x^2-1)^(-2/3) sage: for i in range(3,15): ....: RR(g.integrate(x, -10^i, 10^i)) ....: 12.0193735393553 12.3400570107857 12.4880961536322 12.5548875258538 12.6007931754768 12.5769884999380 12.6035401600491 12.4014006867096 11.1318879504315 7.82165950876205 6.48361691536824 6.32209292067043 sage: Values should increase as g is a positive function! Change History (19) comment:1 Changed 10 years ago by comment:2 Changed 10 years ago by It might also be worth noting that integrating over the entire real line is special-cased by integrate_numerical, so we get: RR(g.integrate(x, -Infinity, Infinity)) 12.6178509639583 This is a little low, Mathematica gives 12.6195 but its hard to improve the precision. This is an intrinsically hard sort of problem to automate (but we can clearly improve the current behavior). comment:3 Changed 10 years ago by The reason this is *broken* is because the implementation of the method _evalf_ in sage/symbolic/integration/integral.py in DefiniteIntegral? completely ignores the parent and the precision of a and b. This function has to be rewritten to take into account the precision of the inputs: def _evalf_(self, f, x, a, b, parent=None): from sage.gsl.integration import numerical_integral return numerical_integral(f, a, b)[0] comment:4 Changed 10 years ago by My personal opinion is that it should work like this: sage: RR(g.integrate(x, -10^15, 10^15)) error message: you have to specify some params to numerical_integral when constructing the definite integral sage: RR(g.integrate(x, -10^15, 10^15, max_points=10^5)) correct answer Or maybe not. I hate this. comment:5 Changed 10 years ago by Mike Hansen: One option -- just rewrite _evalf_ to call mpmath, which is not perfect, but way better than GSL. comment:6 Changed 10 years ago by Be sure to use fast_callable: sage: f(x) = cos(x)^10 - exp(x*sin(cos(x))) sage: g = fast_callable(f, RealField(200), [x]) sage: timeit('f(10.0)') ^C625 loops, best of 3: 1.25 ms per loop sage: a = RealField(200)(10) sage: f(a) 0.17239044387825963285967105367392659309547067375921972300438 sage: g(a) 0.17239044387825963285967105367392659309547067375921972300438 sage: timeit('f(a)') 625 loops, best of 3: 1.38 ms per loop sage: timeit('g(a)') 625 loops, best of 3: 40.7 µs per loop sage: 1380/40.7 33.9066339066339 comment:7 Changed 10 years ago by some more information about integration in mpmath and other programs comment:8 Changed 10 years ago by Your timings with fast_callable seem misleading to me since you are not including the overhead of constructing the fast callable. I got: sage: f(x) = cos(x)^10 - exp(x*sin(cos(x))) sage: g = fast_callable(f, RealField(200), [x]) sage: def gmaker(afunc): return fast_callable(afunc, RealField(200), [x]) sage: timeit('f(a)') 125 loops, best of 3: 1.46 ms per loop sage: timeit('g(a)') 625 loops, best of 3: 65.2 µs per loop sage: timeit('gmaker(f)(a)') 125 loops, best of 3: 1.55 ms per loop comment:9 Changed 10 years ago by Not entirely misleading though, if you call the fast_callable many many times, as would seem to be the case here. comment:10 Changed 10 years ago by Getting this right will be tricky. While simply changing from a blind application of gsl's numerical_integral() to mpmath's quad() may be often be an improvement, in this situation it makes things worse: sage: f = abs(x^2-1)^(-2/3) sage: g = fast_callable(f, RealField(100), [x]) sage: import mpmath as mp sage: mp.mp.prec = 100 sage: for i in [mp.quad(g, [-10^i, 10^1]) for i in range(15)]: ....: print i ....: +inf 8.8396932208278888892057527426 8.3969760821447628003659891605 9.7953936385023669571121865442 9.2339519516756815076612878988 8.2441701346282922281629165563 8.044969834509411578891250552 11.635099287297832304011545535 11.084646393563409097851890886 7.5468622876138167706495612921 7.0790386862087011969090472793 8.4443867135724817987750671703 10.690050592136777734927819129 32.336415464969432639295368434 10.533897172238729354640752465 sage: mp.quad(g, [mp.mpf('-inf'),mp.mpf('+inf')]) mpf('+inf') Switching from tanh-sinh quadrature to Gauss-Legendre gives sage: for i in [mp.quadgl(g, [-10^i, 10^1]) for i in range(15)]: ....: print i ....: 6.3780650727028379121031555789 7.9564100202151404330674115745 8.3052587750738550159021915092 11.156320092824073496435254839 9.5630214580799381652111853848 2.8857506804320681789970931663 1.7298436143374586397937735747 0.63762636717628812549878116562 0.29045600775700733200460854022 0.13456948161705169202354793393 0.062450129901992433601218328054 0.02898624937362903007167714756 0.013454200394425034174020875196 0.0062448854829133373771884652354 0.002898619019151035832588794256 sage: mp.quadgl(g, [mp.mpf('-inf'),mp.mpf('+inf')]) mpf('11.350773575585495163385287559838') Hand-tuning with Gauss-Legendre: sage: mp.quadgl(g, [mp.mpf('-inf'),-1,1,mp.mpf('+inf')]) mpf('12.350413467045610425723223632513') sage: mp.quadgl(g, [mp.mpf('-inf'),-1,1,mp.mpf('+inf')], maxdegree=12) mpf('12.592883474959440301710672862944') And with tanh-sinh: sage: mp.quad(g, [mp.mpf('-inf'),-1,1,mp.mpf('+inf')]) mpf('+inf') sage: mp.quad(g, [mp.mpf('-inf'),-1,1,mp.mpf('+inf')], maxdegree=12) mpf('+inf') It seems this integral requires at least some hand tuning to be reasonable. comment:11 Changed 10 years ago by There's probably a whole class of functions -- positive functions with a singularities at a finite number of points that go to zero sufficiently fast at plus/minus infinity maybe -- which exhibit this sort of breakage. comment:12 Changed 10 years ago by I tried gp %gp for(n=1,10, print(intnum(x=-10^n,10^n,(abs(x^2-1))^(-2/3)))) and got 7.9618235972792581897233298717819451083 6.7165473168753097702622726677655297805 25.355067401739496118829772887176008798 235.26460811139471211432045489286370351 2344.1629174317876121014814723385308094 23437.691659284423942658077351512842284 234375.08896035939931707271806395149682 2343750.0412917410819973945084611231908 23437500.019165928432661951605079616090 234375000.00889603593988653387093897736 comment:13 Changed 10 years ago by Just for the record, if given enough precision and the singularity locations, mpmath does okay in tanh-sinh on the infinite range: sage: import mpmath sage: dpss = [int(10*1.25**i) for i in [0..15]] sage: qq = [] sage: for dps in dpss: ....: mpmath.mp.dps = dps ....: q = mpmath.quad(lambda x: abs(x^2 - 1)^(-2/3), (-infinity, -1, 1, infinity)) ....: delta = float(abs((q-qq[-1])/qq[-1])) if qq else 0.0 ....: print dps, RealField(250)(q), delta ....: qq.append(q) ....: 10 12.619415730000000000000000000000000000000000000000000000000000000000000000 0.000000000000000 12 12.619588240700000000000000000000000000000000000000000000000000000000000000 1.36705461222e-05 15 12.619632936725900000000000000000000000000000000000000000000000000000000000 3.54179740682e-06 19 12.619638678800019440000000000000000000000000000000000000000000000000000000 4.55011184915e-07 24 12.619638942183136436066100000000000000000000000000000000000000000000000000 2.08708920835e-08 30 12.619638947875526360028104307100000000000000000000000000000000000000000000 4.51073913449e-10 38 12.619638947928984872554788554326908474000000000000000000000000000000000000 4.2361364495e-12 47 12.619638947929088225923816071123105700944331096000000000000000000000000000 8.18988320141e-15 59 12.619638947929088350562971317084699893895128992807003256090000000000000000 9.87660231487e-18 74 12.619638947929088350575171596623717955924858573775002931329627429009895074 9.66769302146e-22 93 12.619638947929088350575171711452592280507575074285006026048789429945225951 9.0992202549e-27 116 12.619638947929088350575171711452647219166086056903447254987222698078233522 4.35342554075e-33 145 12.619638947929088350575171711452647219167199848815619049997783218559507282 8.82586195031e-41 181 12.619638947929088350575171711452647219167199848815874865637945653424795957 2.02712328949e-50 227 12.619638947929088350575171711452647219167199848815874865637945883686562894 1.82463038671e-62 284 12.619638947929088350575171711452647219167199848815874865637945883686562894 9.97427124086e-78 and plotting it shows a very plausible logarithmic decrease in the size of the change (can't really call it an error..) You have to give it way more digits of precision than it actually gets right, but it's possible that it converged in the end. comment:14 Changed 10 years ago by - Cc kcrisman added comment:15 Changed 10 years ago by - Cc burcin added comment:16 Changed 10 years ago by - Cc jdemeyer added - Reviewers set to Burcin Erocal - Status changed from new to needs_review comment:17 Changed 10 years ago by - Status changed from needs_review to positive_review comment:18 Changed 10 years ago by - Milestone changed from sage-4.7.1 to sage-duplicate/invalid/wontfix - Resolution set to duplicate - Status changed from positive_review to closed comment:19 Changed 10 years ago by - Cc jdemeyer removed - Reviewers changed from Burcin Erocal to Karl-Dieter Crisman, Burcin Erocal Seems like there might be two issues here. One is that the default for integrate_numerical (which is what I think gets called here after symbolic integration fails) only uses a maximum of 87 sample points. This parameter can be set by using integrate_numerical directly but I don't think it can be through integrate. The second possible issue is that it seems that integrate_numerical tries to create a fast version of the function, but this is not done in an accurate way. I believe this code was written prior to fast_callable, which seems to help:
https://trac.sagemath.org/ticket/10550
CC-MAIN-2021-17
refinedweb
1,363
66.03
Stop using AutoMapper in your Data Access Code A few months ago, Jimmy Bogard, author of the excellent AutoMapper wrote a great article about Autoprojecting LINQ queries. Now that Jimmy has done all the hard expression tree work, this article extends his example to include caching and simple flattening capabilities and goes on to show it in use in a simple EF 4.1 Code First application. *** UPDATE: AutoMapper has now been updated to include Queryable Extensions. You can read this article to find out why you should not be using Mapper.Map in your data access code. Then head over to the docs for information on using ProjectTo<> *** Background So what is this article all about? It is all about writing less boilerplate code in your data access layer and also reducing the amount of data being transferred from your database. Let's take an example so we can get some context about what this article covers: Imagine that you have a Student table in your database with a million rows and 100 columns storing every piece of information you could imagine about each student. If you want to find out about one student, Joe Smith, how many rows do you return? One I hope. Similarly, if you want to produce a report listing the name of every student enrolled in a particular course, how many columns do you return from the student table? All 100? Let's hope not. As developers, we should always be striving to make our applications as efficient as possible, particularly when it comes to external resources such as databases. If you only need firstname and lastname, then that is all you should return. If you follow this principle then the vast majority of your code will never work with the whole entity, but instead use just a few fields. The problem is that these subset of fields will be different for each discrete piece of functionality in the application and you will have a separate class for each scenario. Populating these classes is rather tiresome. If you are doing it efficiently, the following style of code will be familiar: var studentAddressDetails = from s in context.Students select new StudentAddressDetails { FirstName = s.FirstName, LastName = s.LastName, Address1 = s.Address1, Address2 = s.Address2, Address3 = s.Address3, City = s.City, County = s.County, PostCode = s.PostCode, }; There is nothing wrong with the code above. It works and is performant. It is just rather tedious to write these kind of projections throughout your DAL. This article explains how to replace this code, with the code displayed below: var studentAddressDetails = context.Students.Project().To<StudentAddressDetails>(); The above code results in exactly the same SQL statement being generated and the performance should be very similar in both cases, but I know which one I would rather write as a developer. Why can't we just use AutoMapper? Whilst I am a big fan of AutoMapper and use it in most projects I work on, especially for Domain to ViewModel mapping, when in comes to data access code, AutoMapper is not so useful. To put it simply, AutoMapper only works with in-memory data, not the IQueryable interface which is more typically used in DAL scenarios. In the data access layer, whether we are using Entity Framework, LINQ to SQL or NHibernate, we often use the IQueryable interface, specifiying what we want to query before the ORM engine translates this into SQL and returns our data. If you use AutoMapper in your DAL however, you are almost certainly returning more data than you need from the database, as the mapping will not occur until AFTER the original query has executed and the data has been returned. If we take the example used in the previous section, using AutoMapper we would probably write something similar to this: // probably set at app startup in reality Mapper.CreateMap<Student, StudentAddressDetails>(); var details = Mapper.Map<IEnumerable<Student>, IEnumerable<StudentAddressDetails>>(context.Students).ToList(); Unfortunately, if you fire up Query Analyser and see what is being executed, you will find that every column is being returned from the database before AutoMapper gets to work and performs the mapping. So whilst being convenient, in the DAL, AutoMapper can be rather inefficient. Haven't I seen a solution to this before? Jimmy is well-aware of this fact and his blog post describes an alternative to AutoMapper for DAL scenarios. The solution is basically just an extension method for IQueryable that allows you to specify exactly what to return when the query is executed. Whilst this sounds very simple, in reality, the code necessary for this extension method is not straightforward, making extensive use of expression trees which whilst very powerful, are notoriously difficult to work with. I would strongly advise you to take a look at his post before continuing with this article. Jimmy's example code works well but, as he mentioned in his article, the code is more a proof of concept than a finished product. There are a few limitations that make it unusable in production code as it stands. Fortunately, all the difficult parts have already been done and it is very simple to modify the code so that it can be used in a commercial application, without worrying about performance. Extending Jimmy's example We will focus on improving three distinct areas of the code. Firstly, as Jimmy mentioned in his blog, his code is not very performant, generating the expression tree every time the extension method is used. We will add some caching to fix this issue. Secondly, the code is not tolerant of any missing properties, or even read-only properties. We will modify the code to only try and map writable properties and should a mapping not be found, we will simply move on to the next property and not throw an exception. Finally, we will allow some simple flattening of data using a convention over configuration approach. It's tempting to try and combine the Project and To classes into one but as Jimmy pointed out, doing so makes calling it slightly more verbose because you have to specify both source and destination generic types when you use the method. This is because when it comes to generic type inference, .NET can either infer all the generic parameters or none. The standard approach in this situation is to split the functionality over two classes, which is exactly what Jimmy has done. So with a single class, you would call you extension method as follows: context.Students.ProjectTo<Student, StudentAddressDetails>(); But, by adding a second class, we can simplify the call to: context.Students.Project().To<StudentAddressDetails>(); Most people would agree that the second option is a slightly nicer syntax, hence the reason for separate Project and To classes. Fixing the caching issue is very straightforward. Before building the expression, we check a static ExpressionCache dictionary object using a key generated from the source and destination types. If present, we use the cached version. Otherwise, we generate the expression and store it in the cache for future use. You can see the full code in the download below. public IQueryable<TDest> To<TDest>() { var queryExpression = GetCachedExpression<TDest>() ?? BuildExpression<TDest>(); return _source.Select(queryExpression); } private static Expression<Func<TSource, TDest>> GetCachedExpression<TDest>() { var key = GetCacheKey<TDest>(); return ExpressionCache.ContainsKey(key) ? ExpressionCache[key] as Expression<Func<TSource, TDest>> : null; } To fix the fault tolerance and flattening issues, we need to split up the Expression.Lambda statement so we can check a couple of different options for source parameters and prevent failure even if no source can be found. Note that I have shortened variable names in the code below to improve display on the website. private static Expression<Func<TSource, TDest>> BuildExpression<TDest>() { var srcProps = typeof(TSource).GetProperties(); var destProps = typeof(TDest).GetProperties().Where(dest => dest.CanWrite); var paramExpr = Expression.Parameter(typeof(TSource), "src"); var bindings = destProps .Select(destProp => BuildBinding(paramExpr, destProp, srcProps)) .Where(binding => binding != null); var expression = Expression.Lambda<Func<TSource, TDest>>( Expression.MemberInit( Expression.New(typeof(TDest)), bindings), paramExpr); var key = GetCacheKey<TDest>(); ExpressionCache.Add(key, expression); return expression; } private static MemberAssignment BuildBinding(Expression paramExpr, MemberInfo destProp, IEnumerable<PropertyInfo> srcProps) { var srcProp = srcProps.FirstOrDefault(src => src.Name == destProp.Name); if (srcProp != null) { return Expression.Bind(destProp, Expression.Property(paramExpr, srcProp)); } var propNames = SplitCamelCase(destProp.Name); if (propNames.Length == 2) { srcProp = srcProps.FirstOrDefault(src => src.Name == propNames[0]); if (srcProp != null) { var srcChildProps = srcProp.PropertyType.GetProperties(); var srcChildProp = srcChildProps.FirstOrDefault(src => src.Name == propNames[1]); if (srcChildProp != null) { return Expression.Bind(destProp, Expression.Property( Expression.Property(paramExpr, srcProp), srcChildProp)); } } } return null; } For each writable destination property we call BuildBinding which initially just looks at the source type for a similarly named property. If we do not find such as property, then we assume that we are trying to do flattening, so try to split the property name by CamelCase. If this results in two words, we try to find a property with the same name as the first word and if present, try to find a property on the nested type with the same name as the second word. This is better visualised with an example. Take a destination property named CoursesCount. First we look for a property on the source named CoursesCount. If not present, splitting using CamelCase results in two words: Courses and Count. As the split results in two words, we continue and try to find a property on the source named Courses. If present, we will then try and find a property on the Courses type called Count. If present, then this is our mapping. Otherwise, we return null and the CoursesCount property will not be populated. The code provided allows one level of flattening, but it is pretty straightforward to adapt this to your needs. Example usage in a simple EF 4.1 application Now that we have our extension method, let's see how it can be used. Our example uses the latest Entity Framework 4.1 Code First, which is a fantastic addition to EF4 that has been extremely popular with developers since its release a few months ago. It is beyond the scope of this article to explain how EF 4.1 Code First works, so if you are not familiar with it, I suggest reading some of the excellent article available on the web, such as those by Scott Guthrie or the EF Design Blog. Our simple example uses the following database schema: We have a student database where each student can take multiple courses, but only has a single teacher. Our code first entities are displayed below: public class Teacher { public int Id { get; set; } public string Name { get; set; } public ICollection<Student> Students { get; set; } } public class Course { public Course() { Students = new List<Student>(); } public int Id{ get; set; } public string Description { get; set; } public ICollection<Student> Students { get; set; } } public class Student { public Student() { Courses = new List<Course>(); } public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public DateTime DateOfBirth { get; set; } public ICollection<Course> Courses { get; set; } public Teacher Tutor { get; set; } } public class StudentSummary { public string FirstName { get; set; } public string LastName { get; set; } public string NotADatabaseColumn { get; set; } public string TutorName { get; set; } public int CoursesCount { get; set; } public string FullName { get { return string.Format("{0} {1}", FirstName, LastName); } } } public class AnotherStudentSummary { public AnotherStudentSummary() { Courses = new List<Course>(); } public string LastName { get; set; } public ICollection<Course> Courses { get; set; } } Teacher, Course and Student classes correspond to database tables of the same name. StudentSummary and AnotherStudentSummary are examples of non-database classes used as projection targets. You can imagine that in a real-life scenario, all the tables would have many more columns, so efficient querying would be much more important. The standard approach for returning all students as StudentSummary entities, would be to do a manual projection: var students = from s in context.Students select new StudentSummary { FirstName = s.FirstName, LastName = s.LastName, TutorName = s.Tutor.Name, CoursesCount = s.Courses.Count }; This query seen on its own doesn't look particularly cumbersome, but imagine the dozens or even hundreds of projections that you will require on a large project, typically mapping many more properties than shown in this examples and you will understand how useful this kind of extension method can be. The previous projection can be replaced with just one line: var students = context.Students.Project().To<StudentSummary>(); If we look at the SQL generated from this query, we can see that we are returning the minimum necessary to hydrate the StudentSummary object. In fact, the SQL output is exactly the same in both cases: SELECT [Extent1].[Id] AS [Id], [Extent1].[FirstName] AS [FirstName], [Extent1].[LastName] AS [LastName], [Extent2].[Name] AS [Name], (SELECT COUNT(1) AS [A1] FROM [dbo].[StudentCourses] AS [Extent3] WHERE [Extent1].[Id] = [Extent3].[StudentId]) AS [C1] FROM [dbo].[Students] AS [Extent1] LEFT OUTER JOIN [dbo].[Teachers] AS [Extent2] ON [Extent1].[TeacherId] = [Extent2].[Id] Taking each property of the StudentSummary object in turn, let's examine how they are being mapped. FirstName and LastName are just standard, same-name mappings from the database, NotADatabaseColumn is a read/write property that is not present in the database. There are many reasons why you may have properties that do not map to database columns and you do not want the projection failing in these cases. TutorName is an example of a flattening. The Student class has a Tutor property of type Teacher and the Teacher class has a Name property, so you can see from the SQL that we join onto the Teacher table and retrieve the Name property. CoursesCount is another flattening. In this case, Courses is an ICollection which of course has a Count property. Again, you can examine the SQL and see that this is being done in a very efficient manner. Finally, FullName is a read-only property, so is ignored by the extension method. The second example which maps to the AnotherStudentSummary entity shows how simple collection mapping is also supported. Note that if you want to do anything more than map the whole collection without manipulation, then you will need to adapt the code yourself as this is not currently supported. Code Download You can download all the code from this article here. Alternatively, just get the QueryableExtensions class without the example code. Conclusion When hitting a database, as a developer, it is important to only return the data that you need and no more. When using modern ORM's, this is typically achieved by using projections when writing IQueryable queries. Typing this type of projection code can be tiresome and some people use AutoMapper instead, believing that it achieves the same thing. Unfortunately, AutoMapper knows nothing about IQueryable and only works with in-memory data, making it less than ideal in DAL scenarios. In order for AutoMapper to do its mapping, it needs to retrieve all source data from the database, resulting in much more data being returned than is necessary, reducing performance and increasing database load and network traffic. The solution mentioned in this article, which was originally conceived by Jimmy Bogard, addresses these issues (boilerplate code vs unnecessarily large database queries), and allows you to automatically map types in your DAL in a simple, efficient manner. The code required to perform a mapping is measured in characters rather than lines and the performance is right up there with the long-winded, manual projection method. The approach is entirely convention-based with no mechanism to override the conventions, so it is certainly not going to be useful in all situations, but I have found it invaluable in the few weeks that I have been using it. Useful or Interesting? If you liked the article, I would really appreciate it if you could share it with your Twitter followers.Share on Twitter This was an awesome read and is going to save me a lot of time. One of the main reasons I don't like using DTO's was having to write these exceptionally long LINQ queries, almost took the joy out of LINQ. Thanks again. This is good approach to make more copact Linq & IQueryable. I'll try your code. Thanks good post. This is an amazing piece of work Paul. I have a question. Do you know if it's possible to re utilize all those cached expressions to do reverse mappings? In other words, using your code I now can auto map POCOs to ViewModels, but it would be great if I could map a ViewModel instance from a POST back to a POCO instance I can feed into EF. Regarding my previous question, I came up with the following workaround: var studentEntity = new[] { studentModel }.AsQueryable().Project().To<Student>().Single(); This works, but it's such a blatant hack I'm almost embarrassed to post it :) Regarding cached expressions, we cannot reuse them for reverse mappings because the direction of the mapping results in a different expression tree, so unfortunately they must be cached separately. As you have discovered, whilst you can use this code outside of an IQueryable scenario by casting, it is quite awkward, but as you say, it does work. I typically use the Project().To() code to map to domain entities and then use AutoMapper to map to and from ViewModels. I made some modifications to allow property names to have arbitrarily long CamelCasing. I added a function that does a recursive search for the first property matching the destination name. It has a limitation that it will match along a path with the shortest property name first, so if you have two possible paths to a destination name, it could give unexpected results. Thanks for the excellent piece of work. I added a feature to define the mapping in a attribute with the property. The attribute looks like public class MappingPathAttribute : Attribute { public string Path = string.Empty; } [MappingPath(Path="Tutor.Name")] public string TutorName { get; set; } I made a change to the BuildBinding function in the github version. My BuildBinding function looks like private static MemberAssignment BuildBinding(Expression parameterExpression, MemberInfo destinationProperty, IEnumerable<PropertyInfo> sourceProperties) { object obj = destinationProperty.GetCustomAttributes(true).FirstOrDefault(p => p.GetType().Name == "MappingPathAttribute"); string[] sections; if (obj!=null) { string path = ((MappingPathAttribute)obj).Path; sections = path.Split('.'); } else { sections = SplitCamelCase(destinationProperty.Name); } return ResolveProperty( parameterExpression, destinationProperty, sections[0], 1, sourceProperties, sections.ToArray()); } Hope this helps. Tej I'm impressed, this is going to save me acres of code. I think Entity Framework is excellent but it is missing stuff like this at version 4.2 (not that I blame them, it's going to get there). Very usuful code. I have only a problem when i try it with nullable property in the source object. Are there some workaround for this scenario ? Thanks. I'm trying to use this in .net 3.5 On Line 53 I get following error: Error 2 Argument '2': cannot convert from 'System.Collections.Generic.IEnumerable<System.Linq.Expressions.MemberAssignment>' to 'System.Collections.Generic.IEnumerable<System.Linq.Expressions.MemberBinding>' D:\xxx\Extensions\QueryableExtensions.cs 53 123 D:\xxx\ @NJ - Yes the code relies on generic variance in .NET 4. To get it working for .NET 3.5, I think you can just add the following on to the end of the var bindings = ... statement: .Cast<MemberBinding>(); It should be noted that the Dictionary used for the cache is not threadsafe; so you could run into issues (as I did) using this from ASP.NET. This could probably be replaced with either a Hashtable.Synchronized instance, or a ConcurrentDictionary (.NET 4.0 only, I believe) This is great, thanks for sharing! Do you have any ideas for "configured projections"? That is, when the entity property names don't match the projected type's property names: .ForMember(p => p.Property, options => options.MapFrom(e => e.OtherProperty)) How could we bind sub-collections? I'm also interested in how you'd bind sub-collections This is great but as it seems only for simple bindings. So how could we bind sub-collections? Maybe you already know, but this functionality is already in the main repository of AutoMapper. Take a look here: And here (on "CreateMapExpression" method on line 202) : Hi, good article but please find another motivation to do stuff like that instead of: "Imagine that you have a Student table in your database with a million rows and 100 columns storing every piece of information you could imagine about each student." This sentence just tell me that you have no idea how to normalize your database. To SeriousM: Normalization of the database is greate in some scenarios and not so greate in other scenarios. I have an object that I want to store to my databas and if I normalizes it as I should (or as Entity Framework wants to) then I will get around 20 tables. That's not a problem if I wasn't added around 3 millions of records each month to the database. So If I don't want to kill my database and doing 20 Inner joins when I want to get that object. I need to denormalize my data and tables. Some data will simple be serialized down as a blob to a column and other tables will be merged togheter to decreese the numbers of tables and joins I need to do to get the full object back later on. So normalization is good in some scenarios, but denormalized is better if you have performance issues... CQRS actually have a nice touch of denormalized data where each read question is it's own table. Performance is great with this approach, but it has it's cost!! Absolutely great and simple to use!!! Saved me enormous amount of work! Thanks for sharing this. This is great, but I wonder: Is it possible to make this work with nested types too? I have the database objects House, and Garage. House has a relation to Garage. A house has one garage, and for both I have DTO objects. But running the projection then returns me: System.NotSupportedException The LINQ expression node type 'Invoke' is not supported in LINQ to Entities. Has anybody managed to make an update to allow usage with Nested Objects so that they may be projected to as well? I'm getting the following error: "The method 'Where' cannot follow the method 'Select' or is not supported.". see question on Stackoverflow: Am I the only one who sees the creation of independent classes for each column combination as a huge code smell? If your Student record has 100 columns, there are 2^100 possible partial classes. Every time you change your db structure (for example modifiy a field type) or want to add a behaviour you'll have to change all the classes that include that field or that behaviour. Every time you want a new field in your web report, you'll need to modify the models of your app. I recognize straight away an application that will become a maintenance nightmare in a few years. Hi, THIS IS AN EXCELLENT ARTICLE! really out of box.. but I have a question with "CoursesCount is another flattening. In this case, Courses is an ICollection which of course has a Count property" still I cannot see Hhow or when you call or somethong the .Count() method .... =S You said that as Course is an ICollection has a Count() Method ,that's ok but where or how is call ..... bottomline ..WE SHOULD NOT USE AutoMapper? Thanks for the help!
https://www.devtrends.co.uk/blog/stop-using-automapper-in-your-data-access-code
CC-MAIN-2017-34
refinedweb
3,927
55.84
Clojure Scripting Clojure is a dialect of the Lisp programming language. Clojure is a general-purpose programming language with an emphasis on functional programming. Contents - 1 Clojure tutorial for ImageJ - 1.1 Using Clojure inside Fiji - 1.2 Language basics - 1.3 Calling methods and variables on a java object - 1.4 Calling static fields and methods: namespace syntax - 1.5 Defining variables: obtaining the current image - 1.6 Creating objects: invoking constructors - 1.7 Defining a closure - 1.8 Manipulating images - 1.8.1 ImageJ Image internals: ImagePlus, ImageProcessor, ImageStack - 1.8.2 Conventions in naming image variables - 1.8.3 Creating a new image - 1.8.4 Creating an image of the same type of an existing one - 1.8.5 Resizing an image - 1.8.6 Resizing an ImageStack - 1.8.7 Resizing an image or ImageStack using ROIs - 1.9 Manipulate images using ImgLib - 1.10 Looping an array of pixels - 1.11 Executing commands from the menus - 1.12 Creating and using Clojure scripts as ImageJ plugins - 1.13 Using java beans for quick and convenient access to an object's fields - 2 Examples - 3 Appendix - 3.1 Defining the output stream - 3.2 Destructuring - 3.3 Namespaces - 3.4 Forget/Remove all variables from a namespace - 3.5 JVM arguments - 3.6 Reflection - 3.7 Lambda functions - 3.8 Built-in documentation - 3.9 A fibonacci sequence: lazy and infinite sequences - 3.10 Creating shallow and deep sequences from java arrays - 3.11 Generating java classes in .class files from clojure code - 3.12 References, concurrency, transactions and synchronization - 3.13 Using try/catch/finally and throwing Exceptions - 3.14 Executing a command in a shell and capturing its output - 3.15 Creating a derivative of a function - 3.16 Pretty printing a primitive array - 3.17 Loading an image file into a byte array. See also: - Clojure Cookbook. - The Clojure API (listing of all available functions, with explanations). - Clojure cheat sheet: a summary of all the essentials. Using Clojure inside Fiji Go to Plugins ▶ Scripting ▶ Clojure Interpreter. The prompt accepts any clojure code. See also Fiji's Script Editor. See Scripting Help for details on keybindings and how to use the interpreter. ^ Ctrl+) will add all necessary ending parenthesis. A minimal, complete clojure example: (import '(ij IJ)) (def gold (IJ/openImage "")) (.show gold) To create scripts, just save them as .clj text files (with an underscore in the name) in any folder or subfolder of Fiji's plugins folder, and run Plugins ▶ Scripting ▶ Refresh Clojure Scripts to update the menus (it's done automatically at start up as well). To edit a script, just edit and save it with your favorite text editor. To execute a script, do any of: - Select it from the plugins menus. - Type 'l' (L), start typing its name, push the down arrow and then return to execute it. - If it was the last executed command, just type ⇧ Shift+R (shortcut to "Process - Repeat Command"). The script is always read directly from the source file, so no updating of menus is needed (unless its file name changes). Convenient Clojure in Fiji with Funimage - Funimage provides a library for convenient Clojure coding within Fiji. Alleviating much of the need for type-hinting, and some of the burdens involved in handling more complicated data structures, such as those from ImgLib2. See the List of update sites for information on setting up the Funimage update site. Running Clojure files from the command line Fiji can execute any clojure file directly: ./fiji plugins/Examples/blend_two_images.clj The file will run with the full classpath as set by fiji, which includes all jars in fiji/jars and fiji/plugins/ folders, among others. Getting a REPL without the usual ImageJ GUI The simplest is: ./fiji --clojure ... which you may enrich with memory settings, incremental garbage collection (works great for multicore CPUs), the enhanced JIT (server flag), and a debugger agent (and any other JVM flag): ./fiji -Xmx2000m -Xincgc -server -agentlib:jdwp=transport=dt_socket,address=8010,server=y,suspend=n --clojure -- Above, notice the ending double dash -- which separates Fiji/JVM options from ImageJ options (in this case, none). For a nicer Repl, you may want to run the clojure.lang.Repl via the jline.ConsoleRunner, which gives you up and down arrow navigation, etc: ./fiji -Xmx2000m -Xincgc -server -agentlib:jdwp=transport=dt_socket,address=8010,server=y,suspend=n \ --main-class jline.ConsoleRunner -- clojure.lang.Repl Note that we put the double-dash between jline.ConsoleRunner (the main class to launch) and clojure.lang.Repl (its arguments). If no JVM arguments were specified, there's no need for the double dash: ./fiji --main-class jline.ConsoleRunner clojure.lang.Repl Just make sure to have the jline.jar in your classpath (or drop it into fiji/jars folder). Debugging with the Java Debugger If you have launched fiji with an agentlib, you may then connect to it via the jdb: First launch fiji with the agentlib: ./fiji -agentlib:jdwp=transport=dt_socket,address=8010,server=y,suspend=n -- Then connect, at the same port address: cd fiji/java/linux/jdk1.6.0_12/bin/ ./jdb -attach 8010 Which gives you a jdb prompt after printing: Set uncaught java.lang.Throwable Set deferred uncaught java.lang.Throwable Initializing jdb ... > Now you may query about threads: > threads Group system: (java.lang.ref.Reference$ReferenceHandler)0x72b Reference Handler cond. waiting (java.lang.ref.Finalizer$FinalizerThread)0x72c Finalizer cond. waiting (java.lang.Thread)0x72d Signal Dispatcher running And suspend all to see the stack trace of each thread: > suspend > where 0x72d [1] java.io.FileInputStream.read (native method) [2] jline.Terminal.readCharacter (Terminal.java:99) [3] jline.UnixTerminal.readVirtualKey (UnixTerminal.java:128) [4] jline.ConsoleReader.readVirtualKey (ConsoleReader.java:1,450) [5] jline.ConsoleReader.readBinding (ConsoleReader.java:651) [6] jline.ConsoleReader.readLine (ConsoleReader.java:492) [7] jline.ConsoleReader.readLine (ConsoleReader.java:446) [8] jline.ConsoleReader.readLine (ConsoleReader.java:298) [9] jline.ConsoleReaderInputStream$ConsoleLineInputStream.read (ConsoleReaderInputStream.java:92) ... There are perhaps more convenient setups built into Eclipse, IntelliJ, NetBeans and other IDEs that support Clojure via plugins, but the jdb gives you what you want very quickly. Within the jdb prompt, type "help". Language basics - A ';' defines the start of a comment, just like '//' does in Java. - A function definition declares parameters within []. - Local variables are declared with let, and global variables with def. - Functions are defined with defn, and are visible globally. Hence a function declared within a let statement has access to variables declared in it. This method enables closures. Importing classes To reference Java classes from Clojure you will need to import them. You can specify imports in Clojure in a few ways: ; A single import. (import java.util.Date) ; Use it! (def *now* (Date.)) (str *now*) ; Multiple imports at once. (import '(java.util Date Calendar) '(java.net URI ServerSocket) java.sql.DriverManager) ; Import multiple classes in a namespace. (ns foo.bar (:import (java.util Date Calendar) (java.util.logging Logger Level))) Calling methods and variables on a java object There are two ways, the second syntactic sugar of the first. Below, imp is a pointer to an ImagePlus: ; java-ish way: (. imp (getProcessor)) ; shorter java-ish way: (. imp getProcessor) ; lisp-ish way: (.getProcessor imp) To call a method on an object returned by a method call, there is a simplified way: ; double way: (. (. imp (getProcessor)) (getPixels)) ; simplified double way: (.. imp (getProcessor) (getPixels)) ; super simplified (less parenthesis than java!) (.. imp getProcessor getPixels) ; or lisp-ish way: (.getPixels (.getProcessor imp)) Any number of concatenated method calls, both for static methods or for instances: ; Concatenated call to static and instance methods (.. WindowManager getCurrentImage getProcessor getPixels) To call a variable or 'field', just do it like a method call but without the parentheses: (. imp changes))) Defining a closure In the following a function is declared within the scope of the local variable rand, which contains an instance of java.util.Random. All calls to the function rand-double will use the same random number generator instance with seed 69997. The dotimes loop will then print 10 different pseudo-random numbers. If the rand was a new Random with seed 69997 every time, all 10 numbers would be exactly the same. You can think of a function inside a closure as a static function using a static variable (in Java), but it's more than that, since the function will be able to access parameters on the global namespace and also in any other local namespace in which the let is declared. For example, another let, or even another defn! (let [rand . Manipulating images ImageJ Image internals: ImagePlus, ImageProcessor, ImageStack ImageJ has three basic objects: - The ImagePlus, which wraps the ImageProcessor and contains properties and pointers to the ROI (region of interest) and the ImageWindow that may be displaying the image. - The ImageProcessor, which is an abstract class enabling the high-level manipulation of and access to pixels. Its subclasses each wraps a different kind of data type: - ByteProcessor - byte[] - ShortProcessor - short[] - FloatProcessor - float[] - ColorProcessor - int[] (byte-packed ARGB, but Alpha channel is ignored) - The ImageStack which contains unfortunately not an array of ImageProcessor, but an Object[] containing an homogeneous list of equal length byte[], or float[], etc. For extensive documentation, see the Anatomy of an ImageJ image ImageJ programming basics tutorial. Conventions in naming image variables By convention, variables are named: - imp to mean ImagePlus - ip to mean ImageProcessor - stack to mean ImageStack Creating a new image From scratch: (import '(ij ImagePlus) '(ij.process ByteProcessor)) (let [imp (ImagePlus. "A new image" (ByteProcessor. 400 400))] (.show imp)) From a file: (let [imp (IJ/openImage "/path/to/an/image.tif")] (.show imp)) Creating an image of the same type of an existing one ; The original (def imp-1 (ImagePlus. "The source image" (FloatProcessor. 512 512))) ; The new empty image, of the same type as the old but larger (def imp-2 (ImagePlus. "The larger image of the same type" (.. imp-1 getProcessor (createProcessor 768 768)))) Above, notice the parenthesis (createProcessor 768 768), which specify for which method those numbers are arguments for. Resizing an image The idea is to grab the ImageProcessor, duplicate it and resize it. The resizing returns a new ImageProcessor of the same type: (def imp-1 (IJ/openImage "/path/to/image1.tif")) (def imp-2 (ImagePlus. "A new larger one" (.. imp-1 getProcessor (createProcessor 1024 1024)))) ; Copy one into the other at top-left (hence 0,0 insert point): (doto (.getProcessor imp-2) (.insert (.getProcessor imp-1) 0 0)) An alternative way would be to simply duplicate the processor of imp-1, and then enlarge it: (def imp-3 (ImagePlus. "A copy with extra empty space" (.. imp-1 getProcessor duplicate (resize 768 768))) Resizing an ImageStack This one is harder, because an ImageStack is just a wrapper for Object[] list of pixel arrays. ImageJ though provides a mid-level resizing method, via the CanvasResizer class: (import '(ij.plugin CanvasResizer) '(ij IJ ImagePlus)) ; Grab the image in the currently active ImageWindow: (def imp-1 (IJ/getImage)) ; function to resize images: (defn resize-image "Takes an ImagePlus as argument and returns a new ImagePlus but resized to width,height, and with the contents copied starting from xoff,yoff" [imp w h xoff yoff] (let [resizer (CanvasResizer.) stack (.getStack imp) imp-2 (ImagePlus. (.getTitle imp) (if stack (.expandStack resizer stack w h xoff yoff) (.expandProcessor resizer w h xoff yoff)))] imp-2)) (def imp-2 (resize-image imp-1 1024 1024 0 0)) (.show imp-2) Note that the above function resize-image will work for both stacks and non-stack images. Of course nothing stops you from looping through the stack length, calling a new ImageProcessor for each slice, resizing it, composing a new ImageStack and with it a new ImagePlus. ; Grab the image in the currently active ImageWindow: (def imp-1 (IJ/getImage)) (defn resize-stack "Resize an ImageStack to new widht,height and copy its contents starting at xoff,yoff coordinate." [stack w h xoff yoff] (let [new-stack (ImageStack. w h nil)] (doseq [i (range 0 (.getSize stack))] (let [ip (.getProcessor stack (+ i 1)) #^ImageProcessor ip2 (.createProcessor ip w h)] (.insert ip2 ip xoff yoff) (.addSlice new-stack (str i) ip2))) new-stack)) Above, note that stacks are 1-based,not 0-based! Also, we must declare the type of the ip2 because clojure cannot decide between the ImageProcessor.addSlice(String,ImageProcessor) and ImageProcessor.addSlice(String,Object). You must make that choice for clojure. Notice that each time you call getProcessor on an ImageStack, it returns a new ImageProcessor instance in a very costly way, by calling a series of instanceof on the pixels arrays to figure out which kind of ImageProcessor subclass it should create. Resizing an image or ImageStack using ROIs ROIs (aka Region of Interest or selection) have bounds, defined by the minimal enclosing rectangle. The core idea is to set a ROI to an ImageProcessor and call crop to obtain a new, subcopy of it. (def imp (IJ/getImage)) (def imp-cropped (ImagePlus. "Cropped" (let [ip (.getProcessor imp)] (.setRoi ip (Roi. 10 10 200 200)) (.crop ip)))) (.show imp-cropped) To handle any ImagePlus (with single slice or containing an ImageStack, i.e. many slices), see this function: (which assumes the ROI is contained fully within the image; otherwise for stacks it will throw an Exception stating that, rightly, dimensions do not match.) (import '(ij.gui Roi) '(ij ImagePlus) '(ij.process ImageProcessor)) (def imp (IJ/getImage)) (defn crop-image "Crop an image by the bounds of a ROI, returning a new ImagePlus with the result." [imp roi] (let [crop-processor (fn [ip roi] (.setRoi ip roi) (.crop ip)) stack (.getStack imp)] ; Return a new ImagePlus with a new cropped ImageProcessor ; or a new cropped ImageStack: (ImagePlus. (.getTitle imp) (if stack (let [box (.getBounds roi) new-stack (ImageStack. (.width box) (.height box) nil)] (doseq [i (range (.getSize stack))] (.addSlice new-stack (.getSliceLabel stack (+ i 1)) #^ImageProcessor (crop-processor (.getProcessor stack (+ i 1)) roi))) new-stack) ; Else single slice image: (crop-processor (.getProcessor imp) roi))))) (def imp-cropped (crop-image imp (Roi. 100 100 300 300)) (.show imp-cropped) The above works with both single images and stacks. Manipulate images using ImgLib With Imglib, pixels are stored in native arrays of primitives such as int, float, double, etc. (or other more interesting forms, such as Shape. Such pixels are accessed with intermediate proxy objects that the JIT is able to completely remove out of the way. From Clojure, there are many ways in which to access the pixels. Here we list some examples of the pixels accessed as a Collection of accessor Type objects. Multiply each pixel by 0.5 Multiply in place each value by 0.5. The ImgLib/wrap is a thin wrapper that accesses directly the pixel array. Hence the original image will be changed. ; ASSUMES the current image is 32-bit (ns test.imglib (:import [mpicbg.imglib.image Image] [script.imglib ImgLib] [mpicbg.imglib.type.numeric.real FloatType] [ij IJ])) (set! *warn-on-reflection* true) (let [^Image img (ImgLib/wrap (IJ/getImage)) a (float 0.5)] (doseq [^FloatType t img] (.mul t a))) In a more functional style, below we create an image with the same dimensions as the wrapped image, and set its pixel values to those of the original image times 0.5: (ns test.imglib (:import [mpicbg.imglib.image Image] [mpicbg.imglib.cursor Cursor] [script.imglib ImgLib] [mpicbg.imglib.type.numeric NumericType] [ij IJ])) (set! *warn-on-reflection* true) (let [^Image img (ImgLib/wrap (IJ/getImage)) a (float 0.5) ^Image copy (.createNewImage img "copy")] (with-open [^Cursor c1 (.createCursor img) ^Cursor c2 (.createCursor copy)] (loop [] (if (.hasNext c1) (do (.fwd c1) (.fwd c2) (let [^NumericType t1 (.getType c1) ^NumericType t2 (.getType c2)] (.set t2 t1) (.mul t2 a)) (recur))))) (.. copy getDisplay setMinMax) (.show (ImgLib/wrap copy))) The above, though, is unbearably verbose. A high-level access to the images enables mathematical operations without trading off any performance: (ns test.imglib (:import [mpicbg.imglib.image Image] [mpicbg.imglib.cursor Cursor] [script.imglib ImgLib] [script.imglib.math Compute Multiply] [ij IJ])) (set! *warn-on-reflection* true) (let [^Image img (ImgLib/wrap (IJ/getImage)) ^Image copy (Compute/inFloats (Multiply. img 0.5))] (.. copy getDisplay setMinMax) (.show (ImgLib/wrap copy))) What's more, the Compute/inFloats method runs in parallel, with as many processors as your machine has cores. If you'd rather not execute the operation in parallel, add the desired number of threads as an argument to inFloats. All mathematical operations listed in java.lang.Math have a corresponding constructor for execution in Compute/inFloats. See the documentation for the script.imglib.math package. Normalize an image Assumes that (IJ/getImage) returns a 32-bit, float image. If that is not the case, convert the image to a float image first. The example below creates a new result image. The original image is untouched. This is accomplished with minimal friction but best performance (like hand-coded with cursors or better) by using the high-level scripting library of imglib, and the Compute/inFloats method. (ns test.imglib (:import [mpicbg.imglib.image Image] [script.imglib ImgLib] [script.imglib.math Compute Subtract Divide] [ij IJ])) (let [^Image img (ImgLib/wrap (IJ/getImage)) size (.size img) mean (reduce #(+ %1 (/ (.getRealFloat %2) size)) (float 0) img) variance (/ (reduce #(+ %1 (Math/pow (- (.getRealFloat %2) mean) (float 2))) (float 0) img) size) std-dev (Math/sqrt variance) ^Image normalized (Compute/inFloats (Divide. (Subtract. img mean) std-dev))] (.. normalized getDisplay setMinMax) (.show (ImgLib/wrap normalized))) There is a better way to compute the mean and variance of a collection of numbers, that involves traversing the collection only once. Clojure naturally helps with its very concise destructuring and its automatic promotion of numeric types to avoid overflow. (ns test.imglib (:import [mpicbg.imglib.image Image] [mpicbg.imglib.type.numeric RealType] [script.imglib ImgLib] [script.imglib.math Compute Subtract Divide] [ij IJ])) (set! *warn-on-reflection* true) (let [^Image img (ImgLib/wrap (IJ/getImage)) size (.size img) [xs x2s] (reduce (fn [accum ^RealType t] (let [xi (.getRealFloat t)] [(+ (accum 0) xi) (+ (accum 1) (* xi xi))])) [0 0] img) mean (/ xs size) variance (- (/ x2s size) (* mean mean)) std-dev (Math/sqrt variance) ^Image normalized (Compute/inFloats (Divide. (Subtract. img mean) std-dev))] (.. normalized getDisplay setMinMax) (.show (ImgLib/wrap normalized))) (Code adapted from a Common Lisp version by Patrick Stein.) Looping an array of pixels For example, to find the min and max values: ; Obtain the pixels array from the current image (let [imp (ij.WindowManager/getCurrentImage) pixels (.. imp getProcessor getPixels) min (apply min pixels) max (apply max pixels)] (println (str "min: " min ", max: " max))) The above code does not explicitly loop the pixels: it simply applies a function to an array. To loop pixels one by one, use any of the following: (let ))) (recur (inc i) len))))) Above, notice that the loop -- recur construct is essentially a let declaration, with a second call (recur) to reset the variables to something else. In this case, the next index in the array. Note how the len is simply given the same value over and over, just to avoid calling (count pixels) at each iteration.. Creating and using Clojure scripts as ImageJ plugins Simply create a text file with the script inside, and place it in the plugins menu or any subfolder. Then call Plugins - Scripting - Refresh Clojure Scripts to make it appear on the menus. If the macros/StartupMacros.txt includes a call to the Refresh Clojure Scripts inside the AutoRun macro, then all your Clojure scripts will appear automatically on startup. To modify an script which exists already as a menu item, simply edit its file and run it by selecting it from the menus. No compiling necessary, and no need to call Refresh Clojure Scripts either (ther latter only for new scripts or at start up.) Very important: all scripts and commands from the interpreter will run within the same thread, and within the same clojure context. Using java beans for quick and convenient access to an object's fields Essentially it's all about using get methods in a trivial way. For example: (let [imp (ij.WindowManager/getCurrentImage) b (bean imp)] (println (:title b) (:width b) (:height b))) Eventually Clojure may add support for set methods as well. ▶ Scripting ▶*, which you may redefine to any kind of PrintWriter: (let [all-out (new java.io.StringWriter)] (binding [*out* all-out] ; any typed input here ; All calls to pr, prn, println will print into all-out (println "this and that") ) ; Now show any printed out text in ImageJ's log window: (ij.IJ/log (str all-out))) Destructuring Destructuring is a shortcut to capture the contents of a variable into many variables. An example: when looping a map, we get the entry, not the key and value of each entry: (doseq [e {:a 1 :b 2 :c 3}] (println e)) Prints: [:a 1] [:b 2] [:c 3] nil Each "entry" is represented by a vector with two values. Now to loop more conveniently, we can assign the key and value to variables, by what is called destructuring (note the [k v] where the e was before) (doseq [[k v] {:a 1 :b 2 :c 3}] (println k v)) Prints: :a 1 :b 2 :c 3 nil Even better, we can preserve the whole entry as well, by using the keyword ":as": (doseq [[k v :as e] {:a 1 :b 2 :c 3}] (println k v e)) Prints: :a 1 [:a 1] :b 2 [:b 2] :c 3 [:c 3] nil Namespaces - To list all existing namespaces: >>> (all-ns) (#<Namespace: xml> #<Namespace: zip> #<Namespace: clojure> #<Namespace: set> #<Namespace: user>) - To list all functions and variables of a specific namespace, first get the namespace object by name: (ns-map (find-ns 'xml)) Note above the quoted string "xml" to avoid evaluating it to a (non-existing) value. - To list all functions and variables of all namespaces: (map ns-map (all-ns)) or variable. Defining documentation for a variable (def #^{:doc "The maximum number of connections"} max-con 10) ... which the doc function prints as: user=> (doc max-con) ------------------------- user/max-con nil The maximum number of connections nil Function documentation is internally set like the above: defn is a macro that defines a function and puts the second argument as the doc string of the variable that points to the function body (among many other things). Adding a test function to a variable We first declare the variable, and then define it with a metadata map that includes a test function: (declare a) (def #^{:test #(if (< a 10) (throw (Exception. "Value under 10!")))} a 6) ... which we then test, by invoking the function test not on the value of the variable a (which could have its own metadata map), but on the variable a itself, referred to with the #'a: (test #'a) The test results, in this case, in an exception being thrown: java.lang.Exception: Value under 10! Otherwise, it would just return the :ok keyword.) Printing lazy sequences to the REPL The REPL, when given a lazy sequence, will traverse it in its entirety to print it. Printing a potentially infinite lazy sequence to the REPL is something you don't want to do: besides triggering computation of each element, it would fill all memory and throw an OutOfMemoryException. And you'd get bored seeing elements pass by. A good option is to print only part of it: - take: the first N elements. - drop: all elements beyond N. - nth: the nth element only. For infinite lazy sequences, drop wouldn't save your REPL, and take could be perhaps too many still. To avoid accidental printing of complete lazy-sequences, you may set *print-length* to a reasonable number: (set! *print-length* 5) So now one can safely print the entire fibonnaci sequence, which will print only the first 5 elements, followeed by dots: user=> (set! *print-length* 5) 5 user=> fibs (0 1 1 2 3 ...) The *print-length* applies to all sequences to be printed in the REPL, but is specially useful for very large lazy sequences.))) Some explanations on the above macro syntax (see also clojure's macro syntax page): - The backquote ` quotes the next expression, as defined by: `( <any code here> ). Which means the code block is not evaluated. But, unlike simple quote ', the backquote enables evaluation of expressions within the block when tagged with a ~ (a tilde). - The ~ (tilde) evaluates the immediate expression. Can only be used in the context of a backquoted code block. - The ~@ means evaluate and expand, which has the efect of placing the elements of a list as if they where declared in the code, without the list enclosure. So: `(~@(str "this" "that")) results in: "thisthat". In the example above, we expand the & args, which is a list containing all arguments given to the exec macro beyond the first and second (which are bound to cmd and pred, respectively). In this way, we lay down the proper function call of the pred, which is expected to be a function name (a predicate); the reason we use ~ on it is to evaluate pred so that it renders the pointer to the function itself. That pred function, by design, must accept a lazy sequence of text lines and any number of arguments afterwards. - The # tagged at the end of a name expands to (gensym name), which results in creating a uniquely named symbol, to avoid name collisions. - Any code present outside the backquote (none, in the case above) will be executed at macro read time, not at code execution time (aka run time)! So any precomputations are possible before laying down the code that will be executed at run time.: ; Print the size of each file))) The above is an extract from a clojure GUI for XMMS2, available at github xmms2-gui. Creating a derivative of a function The derivative of a function: We can approximate the derivative by choosing an arbitrarily precise value of the increment dx. So first we define a function that takes any function as argument and returns a new function that implements its derivative. For convenience, we define it within a closure that specifies the arbitrarily precise increment dx (but we could just pass it as argument): (let [dx (double 0.0001)] (defn derivative [f] "Return a function that is the derivative of the given function f, using dx increments." (fn [x] (/ (- (f (+ (double x) dx)) (f x)) dx)))) Then, for any example function like the cube of x: (defn cubic [x] (let [a (double x)] (* a a a))) ... we create its derivative function, which we place into a variable (note we use def and not defn): (def cubic-prime (derivative cubic)) We can now call the cubic-prime function simply like any other function: (cubic-prime 2) -> 12.000600010022566 (cubic-prime 3) -> 27.00090001006572 (cubic-prime 4) -> 48.00120000993502 The derivative of x^3 is 3 * x^2, which for an x of 4 equals 48. Our derivative is as precise as low is the value of the increment dx. The above code translated from lisp code at funcall blog. Thanks Joe Marshall for sharing this perl. Pretty printing a primitive array Suppose we create a primitive array of length 10: user=> (def pa (make-array Integer/TYPE 10)) If we print it, we get: user=> (println pa) #<int[] [I@169bc15> ... which is not very useful. Instead, let's pretty print it. First, import the function pprint (and many other functions) from clojure-contrib pprint namespace: user=> (use 'clojure.contrib.pprint) Then, use it: user=> (pprint pa) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] A similar result can be obtained by wrapping primitive arrays with seq, which generates a Collection view on the primitive array: user=> (println (seq pa)) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] That seq creates only a view (and not a copy), you can convince yourself: changing the array changes the view, too: user=> (def sa (seq pa)) user=> sa [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] user=> (aset pa 3 7) user=> (pprint pa) [0, 0, 0, 7, 0, 0, 0, 0, 0, 0] user=> sa [0, 0, 0, 7, 0, 0, 0, 0, 0, 0] (import [java.io File FileInputStream] (defn ^bytes load-file "Load a file into a byte array." [filepath] (let [^File f (File. filepath) len (int (.length f)) ^bytes b (byte-array len)] (with-open [^FileInputStream fis (FileInputStream. f)] (loop [offset (int 0)] (if (< offset len) (recur (unchecked-add offset (.read fis b offset (unchecked-subtract len offset))))))) b)) ... which then may be parsed as a java.awt.Image: (def img (javax.imageioImageIO/read (java.io.ByteArrayInputStream. (load-file "/home/acardona/Desktop/t2/NileBend.jpg")))) ... which then may be shown as an ImagePlus: (.show (ij.ImagePlus. "nile bend" img))
http://imagej.net/Clojure_Scripting
CC-MAIN-2017-26
refinedweb
4,804
58.58