Please add your favorite articles, videos, and other resources — just follow the Contributing guidelines and go! :)
Collaborate and Conquer: Make Magic Happen with Globally Distributed, Cross Functional Teams - by Ruchika Bhargava. Takeaway: Video of Bhargava’s Agile Alliance talk focusing on how agility and collaboration have enabled her global organization to deliver for decades.
COVID-19 Has My Teams Working Remotely: A Guide for Leaders - by Gallup. Takeaway: “Individualization, expectations, communication are key for remote workers; managers need their leaders’ support more than ever during this time; going fully remote may be your organization’s new way to work.”
Documenting Decisions in a Remote Team - by Katie Womersley. Takeaway: Clarify decisions and what they were, identify the decision makers, and document what was decided (Slack is not enough).
Don’t Let Remote Leadership Bring out the Worst in You - by Claire Lew. Takeaway: Don’t apply pressure, adopt Big Brother tactics, or blur expectations.
11 Pitfalls of Remote Work and How to Avoid Them - by IdeoU. Takeaway: a post and podcast featuring Virtual Work Insider CEO Sascha Connor, outlining pitfalls such as “thinking digital tools are all you need,” mistrust and miscommunication.
Five Tips for Managers of Newly Dispersed Teams - by Johanna Rothman. Takeaway: support team-based work, not individual work; make all progress visible; reduce the team’s WIP; substitute video for MBWAL (Management by Walking Around and Listening); resist the urge to micromanage.
The Future of Work Is Written - BY Juan Pablo Buriticá. Takeaway: “Rather than reacting to accidental separation, teams and companies can and should proactively learn to work together from a distance. Organizations that do this well become more resilient and adaptable, which may advantage them to survive rapidly changing market circumstances.”
A Guide to Managing Remote Teams - by Know Your Company/Claire Lew. Takeaway: A downloadable, 60-page, 11-chapter guide on remote working and leading best practices, based on research.
A Guide to Managing Your (Newly) Remote Workers - by Barbara Z. Larson , Susan R. Vroman and Erin E. Makarius. Takeaway: This Harvard Business Review article delves into some of the challenges of remote work, including loneliness, home distractions, and erosion of trust. It then advises bridging the gaps through such steps as providing several different communication technology options, establishing “rules of engagement,” and providing opportunities for remote social interaction.
How to Manage Remote Workers - by ZipRecruiter. Takeaway: Provides a roundup of tips from co-founders and CEOs.
Leading Remote Teams: 6 Survival Tips to Improve Communication and Prevent Burnout - by Jason Hibbets. Takeaway: A Red Hatter makes suggestions such as adding a health check to meetings, creating a psychologically safe environment by making sure your people “know how to get help if and when they need it,” creating a virtual water cooler, and redefining communication.
Managing Remotely, While Remotely Managing - by Lindsay Holmwood. Takeaway: a slidedeck of tips for working remotely.
A Practical Guide to Remote Work - by Avishai Ish-Shalom. Takeaway: A comprehensive doc, presented in outline format, covering both individual and team needs when transitioning to remote. Even covers remote whiteboarding sessions and Slack etiquette and discipline.
Remote Leadership: 6 Ways How to Lead When You Have to Lead From Home - by Aimee Hansen. Takeaway: Focuses on six ways to lead remotely, including being flexible and compassionate, establishing work availability and boundaries, and encouraging a routine and dedicated work space.
Remote Work: A Series of Best Practices for a Remote Workplace - by Laura Heisman. Takeaway: a chat with Kem Boggs, Head of Global Talent Acquisition at GitHub, about how the company has set up a remote workforce and related aspects of its interviewing and hiring process.
Resilience - The Art of Coping with Disasters - by IsraelX. Takeaway: An edx.org course that “touches upon the internal and external resources and tools necessary for handling stressful situations and for emerging with increased strength from such experiences.” Learn how to improve resilience and coping mechanisms.
7 Tips for Successfully Managing Remote Teams - by Jason Aten. Takeaway: Have a daily check-in, communicate a lot, take advantage of technology, manage expectations, focus on outcomes (not activity), make sure your team has the resources to work effectively, and be flexible.
7 Tips to Ensure Success in 1:1 Meetings (for remote managers) - by Soapbox. Takeaway: Tips emphasize maintaining flexibility, establishing expectations, coming prepared, getting the virtual space right, and showing up.
6 Excellent Resources for Managers of Remote Teams - by Catalyst. Takeaway: a landing page for other resources, many of which emphasize inclusion (“Managing Your Remote Teams Inclusively,” “Getting Real About Inclusive Leadership,” etc.)
Struggling to Thrive as a Large Team Working Remotely? This Exec Has the Field Guide You Need - by FirstRound. Takeaway: “Create space for conversations — and try to cultivate that ‘we’re all in this together’ feeling…Invest in relationships and set a cultural North Star…Fight fires with candor…Shine a spotlight on what good looks like…Connect the dots, relentlessly…Don’t unintentionally undermine your team”…and troubleshoot collaboration misalignments, teams that weren’t performing well before going remote, and middle managers who aren’t delivering.
S’Up for Slack Teams - by Daniel Takeaway: An open-source Slack bot by Daniel Doubrovkine that generates fresh triads of team members to meet every week in an informal standup, or S’Up. Consider trying a 2:1 with your reports.
Tips for Working Remotely - by Heidi Green. Takeaway: Advises overcommunicating, doing video calls, connecting with your team members daily, setting expectations and being available. “Over-communicate. It’s important to communicate with your team members. Even if you feel like you’re over-communicating, that is much more appreciated than under communicating.”
29 Tips for Very Effective Remote Managers and Workers - by Sarah Milstein. Takeaway: This article by a manager with two decades of experience working remotely digs deeper than the generic advice, addressing specific types of remote situations. Some tips: “Practice ‘one on video, all on video,’”; “Make some meetings video only”; and “designate somebody in the room to make sure all the folks on video can see, hear and raise their hands.”
We’ll Be Working Remote for Another 6+ Months. Time for a 1:1 Tune-up. - by Chris Hicken. Takeaway: “Taking the steps to plan the process and strategize for one-on-one meetings has proven to benefit every aspect of our workplace. When the company, manager, and team member are aligned, morale is higher and turnover dissolves.” Includes a structure to follow to make the most out of your remote 1:1’s.


Applicants answer basic questions about their lifestyle, personality traits, and behavioral habits.
RoomChoice compares their answers to other applicants' to find compatible roommate options.
Managers have the option to either approve or deny the match.


Part of elita
| Class | SupportedFileType | Undocumented |
| Class | UnsupportedFileType | Undocumented |
| Class | PackagingError | Undocumented |
| Function | store_indirect_build | Undocumented |
| Function | store_uploaded_build | Undocumented |
| Class | BuildError | Undocumented |
| Class | BuildStorage | Undocumented |
| Class | BuildFile | Undocumented |
| Class | PackageMapper | Applies supplied package map to the build. Assumes pre-validated package map and a build_dir that exists |
| Function | _threadsafe_apply_package | Executed concurrently in a separate process. Applies a set of patterns to an already-decompressed master package, creates package and pushes to output directory |


TWAIN Driver Frequently Asked Questions (FAQ)
03-July-2012
Contents
1.2 Installing Previous Versions
2.1 Application Cannot Find Source
2.3 Application Hangs When Trying To Scan
2.5 System cannot find KDS.DLL
2.9 ICAP_UNITS Causing Problem
2.10 CAP_PRINTERINDEX Persistence
3.8 Force Version (3590 only, 1.x firmware)
3.9 Force Resolution (3590 only, 1.x firmware)
3.11 Width and Length Alignment
3.13 Feeder Keep Alive (3000/4000 Series)
3.14 Length Detection and Frames (3000/4000 Series)
3.17 Multiple Modes (5xxx/7xxx/9xxx series)
3.20 Color Dropout: Enhanced Processing
3.22 Displaying Scanner Operator/Info Log
4.3 Fix for Overscan (3xxx Series)
4.4 DEFAULTS button does not affect the following...
4.6 Scanner Does Not Always Report Jams (5xxx/7xxx/9xxx)
5.2 Picture Elements(tm) ChromaTHR(tm), 3590/4500, 4.x only
The TWAIN drivers are intended for production use with the following Kodak Digital Document Scanner model numbers:
Model Supported Driver Versions
i30, i40 6.x
i250, i260 4.x
i620, i640, i660 5.x 6.x
i700 9.x
i810, i820, i830, i840 4.x 6.x
i1100 9.x
i1200, i1300 7.x
i1400 9.x
i1800 8.x
i2900, i3000 12.x
i4000 10.x
i5000, i2000, i900 11.x
PS50, PS80 12.x
If you are developing an Application and do not have access to a scanner refer to section 3.1 to learn how to use the Scanner Simulator. Please note that not all drivers support all scanners. Check the ramscan.txt file for the list of supported scanners for your driver.
The installation places its main files into a directory of the form "kds_model", for example: kds_i600.
Because of this mechanism multiple KDS TWAIN drivers can co-exist on a system. The installation will always make itself the new default (per the TWAIN spec), but it is up to the user to change the selection to the most appropriate driver for whatever scanner is in use.
For ease of reading the rest of this document will refer to the 'kds' directory in commentary and examples, even for installs that may be of the form "kds_i600".
A 4.x installation includes the following files, which are placed in the %win%\twain_32\kodak\kds directory:
a shortcut to const.ini ; shortcut to driver configuration settings
a shortcut to kds.log ; shortcut to driver log
a shortcut to ramscan.txt ; shortcut to simulator settings
a shortcut to setup001.ini ; shortcut to GUI snapshot of last session
const.ini ; link to real const.ini
hippo.dll ; image processing library
kds.ds ; the driver
kdscust.h ; custom TWAIN capabilities
kdstst.exe ; KODAK diagnostic tool
l_ch_chn.ini ; Simplified Chinese
l_ch_twn.ini ; Traditional Chinese
l_de_deu.ini ; German
l_en_usa.cnt ; English table of contents
l_en_usa.hlp ; English help file
l_en_usa.ini ; English
l_es_esp.ini ; Spanish
l_fr_fra.ini ; French
l_it_ita.ini ; Italian
l_nl_nld.ini ; Dutch
l_pt_bra.ini ; Portuguese-Brazilian
memgrp.dll ; Group-4 support
readme.txt ; the old readme file
A 5.x installation consists of the following files, which are placed in the %win%\twain_32\kodak\kds directory:
a shortcut to const.ini ; shortcut to driver configuration settings
a shortcut to kds.log ; shortcut to driver log
a shortcut to ramscan.txt ; shortcut to simulator settings
a shortcut to setup001.ini ; shortcut to GUI snapshot of last session
hippo.dll ; image processing library
kds.ds ; the driver
kdscust.h ; custom TWAIN capabilities
kdstst.exe ; KODAK diagnostic tool
l_en_usa.hlp ; English help file
memgrp.dll ; Group-4 support
readme.txt ; the old readme file
A 6.x installation consists of the following files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:
a shortcut to const.ini ; shortcut to driver configuration settings
a shortcut to kds.log ; shortcut to driver log
a shortcut to ramscan.txt ; shortcut to simulator settings
a shortcut to setup001.ini ; shortcut to GUI snapshot of last session
hippo.dll ; image processing library
kds.ds ; the driver
kdscust.h ; custom TWAIN capabilities
kdstst.exe ; KODAK diagnostic tool
l_en_usa.hlp ; English help file
readme.txt ; the old readme file
A 7.x installation consists of the following files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:
help ; help directory
ch_chn.chm ; Simplified Chinese help file
ch_twn.chm ; Traditional Chinese help file
de_deu.chm ; German help file
en_usa.chm ; English help file
en_usa.chm ; English help file
es_esp.chm ; Spanish help file
fr_fra.chm ; French help file
it_ita.chm ; Italian help file
nl_nld.chm ; Dutch help file
pt_bra.chm ; Portuguese-Brazilian help file
lib ; lib directory
i1200_i1300.ekpgct ; colortable package
hippo.dll ; image processing library
firmware.dll ; firmware library
ecdo ; ecdo directory
GreenDefault.ekpgcd ; default green color dropout
BlueDefault.ekpgcd ; default blue color dropout
RedDefault.ekpgcd ; default red color dropout
a shortcut to kds_ixxx ; shortcut to driver log directory
const.ini ; driver configuration settings
kds.ds ; the driver
kdscust.h ; custom TWAIN capabilities
kdstst.exe ; KODAK diagnostic tool
twaingui.exe ; the driver gui
A 8/9.x installation consists of the following files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:
help ; help directory
ch_chn.chm ; Simplified Chinese help file
ch_twn.chm ; Traditional Chinese help file
cs_cze.chm ; Czech help file
de_deu.chm ; German help file
en_usa.chm ; English help file
es_esp.chm ; Spanish help file
fr_fra.chm ; French help file
it_ita.chm ; Italian help file
jp_jpn.chm ; Japanese help file
ko_kor.chm ; Korean help file
nl_nld.chm ; Dutch help file
pt_bra.chm ; Portuguese-Brazilian help file
ru_rus.chm ; Russian help file
tr_tur.chm ; Turkish help file
install ; installation directory
install.log ; Installations log file
UNWISE.EXE ; Uninstall executable
profiles ; Predefined profiles directory
<model> ; model directory
a shortcut to kds_ixxx ; shortcut to driver log directory
kds.ds ; the driver
kdstst.exe ; KODAK diagnostic tool
twaingui.exe ; the driver gui
and all the lib files is installed in the %win%\system32\kodak\kds_ixxxx directory
wiamini.dll ; WIA mini-driver (interface layer)
wiascnrwia.dll ; WIA mini-driver (scanner layer)
lib ; lib directory
i1400.ekpgct ; colortable package
hippo.dll ; image processing library
firmware.dll ; firmware library
ecdo ; ecdo directory
GreenDefault.ekpgcd ; default green color dropout
BlueDefault.ekpgcd ; default blue color dropout
RedDefault.ekpgcd ; default red color dropout
A 10.x installation consists of the following files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:
install
install.log ; Installations log file
installopenmp.log ; Openmp log file
a shortcut to kds_ixxx ; shortcut to driver log directory
kds.ds ; the driver
kdstst.exe ; KODAK diagnostic tool
and all the lib files is installed in the %win%\system32\kodak\kds_ixxxx directory
wiamini.dll ; WIA mini-driver
lib ; lib directory
device.dll ; device library
devicemanager.dll ; device manager library
driver.dll ; driver library
hippo.dll ; image processing library
ixxx.ekpgct ; colortable package
osjit.dll ; Os just in time
twaingui.exe ; driver gui
ecdo ; ecdo directory
BlueDefault.ekpgcd ; default blue color dropout
GreenDefault.ekpgcd ; default green color dropout
RedDefault.ekpgcd ; default red color dropout
help ; help directory
ch_chn.chm ; Simplified Chinese help file
ch_twn.chm ; Traditional Chinese help file
cs_cze.chm ; Czech help file
de_deu.chm ; German help file
en_usa.chm ; English help file
es_esp.chm ; Spanish help file
fr_fra.chm ; French help file
it_ita.chm ; Italian help file
jp_jpn.chm ; Japanese help file
ko_kor.chm ; Korean help file
nl_nld.chm ; Dutch help file
pt_bra.chm ; Portuguese-Brazilian help file
ru_rus.chm ; Russian help file
tr_tur.chm ; Turkish help file
profiles ; Predefined profiles directory
20060526175022901.profile ; Black and White Document
20060526175022902.profile ; Black and White Document (OCR Quality)
20060526175022903.profile ; Color Document
20060526175022904.profile ; Color Document (OCR Quality)
20060526175022905.profile ; Color Photograph
bitonaldocument.png ; Black and white document graphic file
bitonaldocumentocr.png ; Black and white document OCR graphic file
colordocument.png ; Color document graphic file
colordocumentocr.png ; Color document OCR graphic file
colorphoto.png ; Color photograph graphic file
default.png ; Default graphic file
sounds ; Multifeed sounds
ding.wav ; Ding sound
A 12.x installation consists of the following files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:
install
install.log ; Installations log file
installopenmp.log ; Openmp log file
a shortcut to kds_ixxx ; shortcut to driver log directory
kds.ds ; the driver
and all the lib files is installed in the %win%\system32\kodak\kds_ixxxx directory
wia.dll ; WIA driver file
wiaentry.dll ; WIA driver file
lib ; lib directory
device.dll ; device library
devicemanager.dll ; device manager library
driver.dll ; driver library
hippo.dll ; image processing library
ixxx.ekpgct ; colortable package
lexexe.exe ; image processing library file
osjit.dll ; Os just in time
setup.txt ; versions file
twaingui.exe ; driver gui
twaingui.exe.config ; driver gui file
vcomp100.dll ; image processing library file
ecdo ; ecdo directory
BlueDefault.ekpgcd ; default blue color dropout
GreenDefault.ekpgcd ; default green color dropout
RedDefault.ekpgcd ; default red color dropout
McdoKodakMultiColor.ekpgcd ; multi-color dropout
McdoKodakSingleColor.ekpgcd; single-color dropout
help ; help directory
ch_chn.chm ; Simplified Chinese help file
ch_twn.chm ; Traditional Chinese help file
cs_cze.chm ; Czech help file
de_deu.chm ; German help file
en_usa.chm ; English help file
es_esp.chm ; Spanish help file
fr_fra.chm ; French help file
it_ita.chm ; Italian help file
jp_jpn.chm ; Japanese help file
ko_kor.chm ; Korean help file
nl_nld.chm ; Dutch help file
pt_bra.chm ; Portuguese-Brazilian help file
ru_rus.chm ; Russian help file
tr_tur.chm ; Turkish help file
profiles ; Predefined profiles directory
20060526175022901.profile ; Black and White Perfect Page Document
20060526175022903.profile ; Color Perfect Page Document
20060526175022905.profile ; Color Photograph
bitonaldocument.png ; Black and White Perfect Page Document graphic file
colordocument.png ; Color Perfect Page Document graphic file
colorphoto.png ; Color photograph graphic file
default.png ; Default graphic file
sounds ; Multifeed sounds
ding.wav ; Ding sound
The KDS memory manager is installed in the %win%\system32 directory.
kdsmm.sys ; memory management
The following freely distributable file from Intel is placed in the %win%\system32 directory for Microsoft NT type OS's and the %win%\system directory for Microsoft Windows 9x OS's. This library is built static into version 6.x and greater.
ijl15.dll ; JPEG support
1.2 Installing Previous Versions
If for some reason it is necessary to install a previous version of the Source, the user must remove the current installation first. Refer to the section on "Uninstalling the Driver."
The preferred method is to go into Add/Remove Programs under the Control Panel, and remove either Host Diagnostics or SVT. Note that if both are installed on a system then uninstalling either one will result in the removal of the TWAIN driver, making the remaining application unusable. For 5.x drivers Add/Remove Programs will list the individual drivers installed (e.g. “Kodak i620/i640/i660 Scanner”). Removing this from the list will only uninstall the driver and the writeable data that goes with it. All other installed Kodak scanner drivers will remain. With 5.x, SVT will only be uninstalled when the last Kodak Scanner driver is uninstalled.
If Add/Remove Programs does not exist, or there is a need to just get rid of TWAIN (perhaps as part of a version rollback) the quickest way to do this is to go to %win%\twain_32\kodak and delete the appropriate kds directory(s). Do not forget about the writeable data directory. Check the shortcuts to see where it is located.
KDSMM is used by the system to allocate the large blocks of memory needed by the scanners to perform at their maximum speeds. If it is absolutely necessary to stop using this driver it can be turned off by deleting or renaming the KDSMM.SYS in the %win%\system32\drivers directory.
NOTE: turning this driver off will prevent the TWAIN driver from running at its maximum speed.
This section addresses problems that may come up when using the driver, and offers some possible actions that users must attempt before calling for support.
2.1 Application Cannot Find Source
There are four reasons that an Application may be unable to locate the Source.
1) The Source must be located in the proper directory, which is: %win%\twain_32\kodak\kds
2) A needed DLL may be missing. The Source relies on the presence of the following DLL's: kernel.dll, user32.dll, gdi32.dll, comctl32.dll, comdlg32.dll, advapi32.dll, shlwapi.dll, shell32.dll, winspool.drv, twain_32.dll, wnaspi32.dll.
3) Some or all of %win%\twain_32\kodak\kds is write protected. See section 3.2 for a possible way around this.
4) The Application may not be setting the appIdentity.SupportedGroups to DG_CONTROL | DG_IMAGE when looking for the available Sources. Or the Application may not have set #pragma pack(2) in the correct places. Consider these possibilities last, and only if you are writing your own Application.
If your application does a real-time display of images on the fly, it's possible that you may see pauses in the display, even though the scanner and software are running at rated speed.
The Source polls for images on the scanner, and if none are found it sleeps for a specified period of time, and then tries again. This behavior is PC friendly in that it consumes fewer clock cycles on the PC and issues fewer commands to the scanner. However, if the application is displaying each image in real-time, it can result in a display that appears to start and stop for no apparent reason.
One possible solution is to adjust the PollSleep value. Edit the CONST.INI field, and under the [dsIdentity] section add the line:
PollSleep=100
This specifies a sleep value of 1/10th of a second. Adjusting this value can result in a smoother real-time display. Be careful of using low values, since they can impact the performance of the system.
2.3 Application Hangs When Trying To Scan
The TWAIN Working Group specifies that the Source Manager Files (see Section 1.2) are supposed to reside in the main Windows directory. Some Sources and Applications, though, make the mistake of installing these files in the Windows System directory (System on Windows 9x/ME, System32 on Windows NT/2K/XP).
This can lead to a situation where the Source and the Application end up accessing different copies of the Source Manager, which leads to hangs or crashes. If this situation is suspected, examine the System and System32 directories for occurrances of the files listed in Section 1.2, and remove them.
The installation of the Source does this automatically.
We have seen instances with Windows 2000 running virus scanning software where TWAIN seems to open very slowly. At this point we suspect some interaction between the virus checking software, Windows and the TWAIN DSM (twain_32.dll). There is no known fix at this time, other than to turn off the virus scanning software.
2.5 System cannot find KDS.DLL
KDS.DLL was used in the 1.x version of the Source, and is no longer needed. If you see it or any file in the KDS directory ending in a .DS extension other than KDS.DS, then a re-install is recommended. Manually delete the %win%\twain_32\kodak\kds directory first, and after the install is complete the problem will be fixed.
During the course of development of the i200 it was discovered that many OHCI compliant 1394 adapter cards carry a critical bug that can result in a fatal communication error.
This bug appears during scanning, terminating a session with paper left in the transport and the red light lit. Examination of the scanner log will reveal that a "Chipset Error" has occurred.
As of this writing (September 2006) the only recommended 1394 card for use is the one provided in the box with the i200/i600/i1800 scanner. If this error occurs please confirm that the correct card is installed and in use in the PC before contacting your Kodak Representative for assistance.
If the PC is a Pentium-III with a VIA chipset, then the use of the 1394 card supplied with the scanner is not enough to solve the problem. Please contact your Kodak Service Representative for more information.
Also note that any other information on this issue that may be provided in the box with your scanner or on the Kodak website should be considered more current than this section.
Performing autocrop and deskew functionality is somewhat different for the platen than it is for the transport. Most notably, the platen is far more likely to gather dust and dirt that can impact the ability of the system to locate the real image. Regular cleaning of the platen is important if using autocrop and deskew.
Also be sure to check the black background on the platen cover. This material can be wiped off with glass cleaner.
It is also important to perform regular calibrations of the feeder and platen systems. Image calibration can be accessed through the Calibrate... button on the TWAIN driver's Imaging Tab. If your application does not give you access to this function, run the Scan Validation Tool that was installed from the CD that came with your scanner.
If you are having problems getting autocrop and deskew to work properly, or if the feeder (ADF) to flatbed mode is not performing as well as it should off the platen, then try editing the CONST.INI file and adjusting the following value:
ForceBaffleBlackPlatenAdjustment=60
Larger values will remove traces of dust and light scatter that show up as false image data. Smaller values will do better at handling images with dark backgrounds. Valid values are 0 - 255 (though 128 is really the practical limit). When experimenting, make sure that the lamps have warmed up for at least a minute.
The TWAIN Specification requires that applications save their GUI settings, so the user gets a better experience from session to session. Unfortunately, little guidance is given in how to integrate this feature into the rest of the driver behavior. At the time of its creation, the following scheme was selected for this driver.
SETUP001.INI only records a session if the driver’s GUI is raised by the application, and then only if the user selects the OK or SCAN button (depending on the kinds of GUI brought up). The values saved reflect some, but not all, of the values shown on the GUI. The format of the data looks very similar to the output of the DG_CONTROL / DAT_CUSTOMDSDATA / MSG_SET call, but fewer items are saved.
When a new session is started the SETUP001.INI file is loaded, overriding the power-on defaults for the driver. No attempt is made to test which application generated the SETUP001.INI file, so it is possible to use one application to create the file that is read by another. This is deliberate. When the driver was first created there was a 50/50 split for application writers to use the GUI versus programmatic control, and the programmatic applications generally used the standard TWAIN capabilities, never any custom capabilities. The intention of the SETUP001.INI file was to allow an end-user to set custom capabilities from the GUI and have those values remain intact when working with their preferred application.
This scheme may cause problems with some programmatic applications, especially if they make assumptions about the default values. If you suspect this is happening we recommend editing the SETUP001.INI file, deleting everything after the first set of comments. Save the results, then make the file read-only (this can be done from Windows Explorer, just right-click the mouse on the name of the file and select Properties from the menu; the read-only flag will appear on the Properties dialog); doing this will guarantee that every invocation of the driver will come up with the power-on defaults.
One final note: the SETUP001.INI is not a replacement for the DG_CONTROL / DAT_CUSTOMDSDATA / MSG_SET operation. If you wish to write an application that sets the driver using profiles, then you must use DG_CONTROL / DAT_CUSTOMDSDATA / MSG_SET to do it.
2.9 ICAP_UNITS Causing Problem
Version 9.54 and newer (as well as version 4.x and earlier) drivers will default ICAP_UNITS to TWUN_INCHES. The ForceUnits* overrides mentioned below, will no longer be supported as they are no longer needed (i.e. skip the rest of this section).
Version 5.x through 9.53 drivers will set the ICAP_UNITS default based on the PC’s locale, which means that languages like French will default to TWUN_CENTIMETERS. If this causes problems, the default units can be overridden using the ForceUnitsInches=1 in the const.ini file. This will overwrite the current ICAP_UNITS to inches.
Certain applications do not check the units when acquiring TW_IMAGEINFO->XResolution, and therefore save the wrong resolution in the image header. If this causes problems the units in which TWAIN reports this value can be overridden using the ForceUnitsBehavior in the const.ini file. This field has the following values:
ForceUnitsBehavior=0 ; negotiate TW_IMAGEINFO->XResolution in the current driver units (old/default behavior)
ForceUnitsBehavior=1 ; negotiate TW_IMAGEINFO->XResolution in ICAP_UNITS last set by the application (default TWUN_INCHES)
ForceUnitsBehavior=2 ; negotiate TW_IMAGEINFO->XResolution in ICAP_UNITS last set or read by the application (default TWUN_INCHES)
The application “Imaging for Windows” never sets ICAP_UNITS and always expects TW_IMAGEINFO->XResolution in TWUN_INCHES. Therefore ForceUnitsBehavior will default to 1 for this application to force the desired result.
2.10 CAP_PRINTERINDEX Persistence
Printer index persists differently depending on the driver version and scanner. Versions 5.x and 6.x of the driver will always remember printer index across scan sessions. Version 4.x of the driver should work this way for all scanners but may not in a few instances.
The TWAIN driver will not remember the printer index across driver sessions. This value is lost each time the driver is unloaded. An exception to this rule is the i800 scanners which store the printer index internally, so when the driver is reloaded it is able to acquire the last value from the scanner.
This section contains details on features that developers can use to help write applications using this Source.
The Scanner Simulator is a tool that allows developers to use the TWAIN Source when no physical scanner is available.
The previous mechanism for running the RAM Scanner has been removed from the Source. If you were using the RAM Scanner prior to version 1.2.15, please delete any files of the form kds_*ram.ds from your %win%\twain_32\kodak\kds directory (the installation should do this for you).
The new Scanner Simulator mechanism is driven from the ramscan.txt found in %win%\twain_32\kodak\kds_*.
For 4.x drivers the scanner selection is done at the top of the ramscan.txt. For 5.x drivers the scanner selection is done in the const.ini file. To enter into simulation mode edit the appropriate file and change the 'Simulate' line to the desired model number (ex: i640).
To turn off simulation mode, set the 'Simulate' value back to zero.
Images generated by the Scanner Simulator reflect the current settings for ICAP_COMPRESSION (Uncompressed, Group-4 and JPEG only); ICAP_PIXELFLAVOR and ICAP_FRAMES.
It is also possible to display images from files on disk. The method for doing this is documented in ramscan.txt.
The sequence of events in a simulated session are controlled using the @-commands at the bottom of the file. These commands are fully documented in ramscan.txt.
This section should no longer be needed, since the TWAIN writeable data files are now installed outside of the Windows directory. However, KDS_HOMEDIR is still recognized by the system, so this section is left intact for those users who may have an existing dependency on it.
Environments where the user is prevented from writing into the %win% directory (such as secure configurations of NT/2K/XP), require that the following files be moved from the %win%\twain_32\kodak\kds directory, to some other writeable directory:
const.ini
l_ch_chn.ini
l_ch_twn.ini
l_de_deu.ini
l_en_usa.cnt
l_en_usa.hlp
l_en_usa.ini
l_es_esp.ini
l_fr_fra.ini
l_it_ita.ini
l_nl_nld.ini
l_pt_bra.ini
ramscan.txt
setup001.ini
It is then necessary to create an environment variable KDS_HOMEDIR, which contains the full path to the new location of these files.
The logfile (kds.log), if created, will appear in this alternate directory.
Users must not modify any of the Source's data files without consulting with Eastman Kodak Company. However, there may be times during development when it is advantageous to get a snapshot of the operation of the Source. To do this, edit the const.ini file and look for the Debug variable and set the value to two (2) or one (1) depending on whether you are trying to catch an intermittent log message, or generate an exhaustive dump of the operation of the Source.
Filtering the log file (kds.log) for occurrances of the string 'kdsdat' will help to isolate those messages that relate to TWAIN communication between the Application and the Source.
If sending a log to Eastman Kodak Company the most useful selection is typically the following for a 4.x or earlier version of the driver:
Debug=1
DebugFilter=kdsdat kdshal kdsprot
For 5.x and later, please use the following:
Debug=1
DebugFilter=TWAIN WIRE
Please note, the Source is designed to run in production mode with the Debug variable set to zero (0), two (2), four (4) or six (6); any other value will adversely affect the performance of the Source and most likely use a great deal of disk space.
The Source works best with an ICAP_XFERMECH of TWSX_MEMORY. TWSX_NATIVE transfers and TWSX_FILE transfers with an image file format of TWFF_BMP require the Source to flip the image around the x-axis. In all cases the Source is able to keep up with the rated speed of the scanner. Efficiency is measured in terms of the number of amount of time left to do work on each image before the application must proceed to the next image. See ICAP_COMPRESSION for other restrictions.
This program is not meant for general use, it is a test tool that Eastman Kodak Company may use in the course of debugging user problems. Users should not run this program unless directed to do so by Eastman Kodak Company.
The scanner supported by this Source provides some features and capabilities that go beyond what is described in the TWAIN Specification.
The header file describing these features is kdscust.h, which is installed in the %win%\twain_32\kodak\kds directory. Developers should copy this file to their application build location, and use it to access the Source's custom features.
Note: the #include for this file is best placed immediately after the #include for twain.h
Most older TWAIN applications are only capable of processing uncompressed data. The scanner is capable of delivering uncompressed images at its rated speed, however moving uncompressed data takes longer than moving compressed data, and there may be times when an application needs to get all the processing time that it can for its own operations.
Force Compression is a custom capability. It is available both programmatically and in the GUI, however access to the GUI is turned off by default. To activate it the user must edit the const.ini file and set the value of ForceCompression to 1. This will result in the appearance of the ForceCompression option on the driver's Compression tab.
If ICAP_COMPRESSION is set to TWCP_NONE for a given camera, then Force Compression may be set to either TWCP_GROUP4 (for bitonal cameras) or TWCP_JPEG (for color cameras). When this is done the Source will force the scanner to use the specified compression, but will internally decompress the image and pass along the uncompressed data to the application. If the value of ICAP_COMPRESSION is set to anything other than TWCP_NONE, then the value of ICAP_FORCECOMPRESSION is ignored, no matter what its current setting.
Users should only activate this option if they are working with uncompressed data and are seeing the scanner transport pausing because of buffer full conditions. Force Compression allows smaller images to be passed across SCSI, but at the cost of more processing per image as it decompresses each one before passing it to the application. For this reason Force Compression is only recommended for fast machines with a generous amount of RAM.
From the application's point of view the Source has been set to obtain uncompressed data, and that is what it delivers. At no time does an application have to be aware that force compression is in effect (unless it is driving the use of this feature programmatically).
Also, please note: Group4 compression is lossless, the decompressed images are exactly the same as if they had been scanned uncompressed. JPEG compression is lossy; the decompressed images are NOT exactly the same as if they had been scanned uncompressed.
i800 series: These scanner models are only capable of outputting JPEG compressed images, so ForceCompression is the only way to get uncompressed images from the Source. Therefore ForceCompression is activated at all times for these scanners. Support for uncompressed images is provided to maximize the base of supported TWAIN applications, but it is not a recommended mode for use with the i800 scanners, which are capable of producing huge amounts of large color images very quickly.
3.8 Force Version (3590 only, 1.x firmware)
The JFIF files created by the scanner currently have an embedded revision of 1.2. If an application is using an ICAP_XFERMECH value of TWSX_FILE to transfer the images with a file format of TWFF_JFIF, then the JFIF files created by the scanner are dumped straight to disk. In some rare cases there may be applications that have problems with the embedded revision value. If this situation is encountered it is possible to change the value of the revision to 1.1 through use of ForceVersion. The value should be added to the const.ini file after the occurrence of ForceCompression and should have the value of: ForceVersion=257
3.9 Force Resolution (3590 only, 1.x firmware)
The JFIF files created by the scanner currently have an embedded unit of 0, with the density fields used to indicate a square aspect ratio. If an application is using an ICAP_XFERMECH value of TWSX_FILE to transfer the images with a file format of TWFF_JFIF, then the JFIF files created by the scanner are dumped straight to disk. In some cases there may be applications that want to know what the scanned resolution of the image was. If this situation is encountered it is possible to have the Source tweak the header so that the units field is set to 1 (dots per inch) and the density fields are set to the value of ICAP_XRESOLUTION/ICAP_YRESOLUTION for the image. This alternate behavior may be activated through use of ForceResolution. The value should be added to the const.ini file after the occurrence of ForceCompression and should have the value of: ForceResolution=1
3.10 ICAP_PIXELTYPE (3590/4500/i200/i600/i700/i820/i840/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)
The 3590C uses ICAP_PIXELTYPE to switch between the /Camera_Bitonal_Both and the /Camera_Color_Top cameras (it's still possible to do this with the DAT_FILESYSTEM command, if necessary). ICAP_PIXELTYPE also switches the "Start in color mode" flag on the GUI back and forth (for the 3590 only, TWPT_BW turns it off, TWPT_RGB turns it on).
Please note that prior to 4.x ICAP_PIXELTYPE was not setting the CAP_CAMERAENABLE flag for the affected cameras. The result is that the 3590 was the only scanner that performed correctly when setting ICAP_PIXELTYPE.
Beginning with 4.x CAP_CAMERAENABLE is set for the affected cameras, and the GUI will reflect the current setting of ICAP_PIXELTYPE by placing the selection on the appropriate camera.
Setting ICAP_PIXELTYPE has the following affect in 4.x and higher:
|
ICAP_PIXELTYPE |
Cameras Enabled* |
Cameras Disabled* |
New FileSystem |
ICAP_GRAYSCALE |
ICAP_BITDEPTH |
|
TWPT_RGB |
Color Front/Rear |
Bitonal Front/Rear |
/Camera_Color_Both |
FALSE |
24 |
|
TWPT_GRAY |
Color Front/Rear |
Bitonal Front/Rear |
/Camera_Color_Both |
TRUE |
8 |
|
TWPT_BW |
Bitonal Front/Rear |
Color Front/Rear |
/Camera_Bitonal_Both |
FALSE |
1 |
*Cameras Enabled -> CAP_CAMERAENABLE = TRUE
Do not to mix ICAP_PIXELTYPE with DAT_FILESYSTEM, CAP_CAMERAENABLE, ICAP_GRAYSCALE. If the above table represents desired settings, ICAP_PIXELTYPE is the easiest way to get the desired outputs. Otherwise use DAT _FILESYSTEM, CAP_CAMERAENABLE, and ICAP_GRAYSCALE to negotiate which output streams to receive.
Setting ICAP_GRAYSCALE will change the ICAP_PIXELTYPE and ICAP_BITDEPTH settings for that camera, but not change the current file system or enable/disable cameras.
Setting ICAP_BITDEPTH will change the ICAP_PIXELTYPE and ICAP_GRAYSCALE settings for that camera, but not change the current file system or enable/disable cameras.
Please reference TWAIN_ProgrammaticControl.htm for which settings are valid on which file systems.
3.11 Width and Length Alignment
The Kodak Document Scanners require the width of all images to be aligned on 16-bit boundaries. It requires the height of color images to be aligned on 8-bit boundaries. The Source provides this on behalf of the user, but needs to go beyond it to 32-bit width alignment for some image transfer modes.
The table breaks this down, showing the required alignments for the width and the height for bitonal and color images for each transfer mode. Again, the Source will make these corrections for you, after negotiation, when the values are downloaded to the scanner. The width and height dimensions returned by DAT_IMAGEINFO will reflect the final adjustments:
ICAP_XFERMECH & Bitonal Alignment Color Alignment
ICAP_COMPRESSION Width x Height Width x Height
TWSX_MEMORY
TWCP_NONE 16 x 1 16 x 8
TWCP_GROUP31D 16 x 1 n/a
TWCP_GROUP32D 16 x 1 n/a
TWCP_GROUP4 16 x 1 n/a
TWCP_JPEG n/a 16 x 8
TWSX_NATIVE
TWCP_NONE 32 x 1* 32 x 8*
TWSX_FILE
BMP
TWCP_NONE 32 x 1* 32 x 8*
TIFF
TWCP_NONE 32 x 1** 32 x 8**
TWCP_GROUP31D 16 x 1 n/a
TWCP_GROUP32D 16 x 1 n/a
TWCP_GROUP4 16 x 1 n/a
TWCP_JPEG n/a 16 x 8
JFIF
TWCP_JPEG n/a 16 x 8
* - DIBs must be aligned on LONG (32-bit) boundaries.
** - TIFF can handle 16-bit alignment, but because the image format can be selected after the image is scanned the Source has to protect itself and default to 32-bit alignment. This behavior can be overridden by going into CONST.INI and adding the line:
ForceAlignment=1
Under the [dsIdentity] section. This will allow for 16-bit aligned TIFF files to be created. Note, however, that doing this will result in 16-bit aligned images if the format is changed to BMP.
Note: At 150 DPI it is not possible to get exactly 12" of width or 26" of height. And, since it is not possible to exceed these values, in this case the Source automatically truncates down to the nearest alignment boundary (as appropriate) in order to produce correct images.
Note: Auto cropped images may result in output that is 16-bit aligned. The Source will correct these for uncompressed data, but will take no action on compressed images. In this latter case the necessary correction must be taken by the application.
Polarity on the IMAGING tab is a misnomer. The field shows the current setting of ICAP_PIXELFLAVOR, with "Black on White" corresponding to TWPF_CHOCOLATE (the
default), and "White on Black" corresponding to TWPF_VANILLA.
The breakdown of what this means for uncompressed images is as follows:
white pixel black pixel
TWCP_CHOCOLATE 1 0
TWCP_VANILLA 0 1
Unfortunately, in the case of images compressed with TWCP_GROUP31D, TWCP_GROUP32D and TWCP_GROUP4, the sense (as perceived by most viewers) has to be as follows:
white pixel black pixel
TWCP_CHOCOLATE 0 1
TWCP_VANILLA 0 1
This becomes most apparent for images transferred using TWSX_FILE with an image file format of TWFF_TIFF. Many viewers ignore the PhotometricInterpretation tag, so that a correctly constructed TWCP_CHOCOLATE image is shown as white text on a black background.
The problem goes further. Developers who wish to transfer the image in buffered memory mode would like to see the *decompressed* image reflect the setting they made with ICAP_PIXELFLAVOR. The most obvious solution would be to change the behavior of ICAP_PIXELFLAVOR to do one thing with TWSX_MEMORY transfers and the other with TWSX_FILE transfers, but this would penalize those viewers capable of correctly handing the TIFF PhotometricInterpretation tag.
The current solution has been to preserve the legacy behavior, but add a new variable to the CONST.INI file. This variable is called OldPolarity, and if set to 0 (OldPolarity=0) it will cause compressed images to support the use of ICAP_PIXELFLAVOR.
Application developers:
The value to send for ICAP_PIXELFLAVOR is not different based on the compression you desire. If the desire is to have zero represent black pixels then send TWCP_CHOCOLATE. If the desire is to have zero represent white pixels then send TWCP_VANILLA. Of course, that is just how the raw data is returned to the application. When the application saves the data to a TIF file, the application needs to make sure it sets the TIF Photometric tag appropriately. For uncompressed images, the tag always needs to be one; this will give 'normal' images for Chocolate and inverted images for Vanilla. For compressed images, the tag always needs to be zero; this will give 'normal' images for Chocolate and inverted images for Vanilla. This difference has to do with how the Group IV spec says it interprets the data.
3.13 Feeder Keep Alive (3000/4000 Series)
Feeder keep alive addressed the situation of the transport timing out before any paper was scanned. With this value set to TRUE the Source restarts the transport, allowing the session to wait forever for the first sheet. Feeder keep alive was set to TRUE by default. This was done because the Source had no way of telling the application that the transport had halted, which meant that the application would sit forever, waiting for an image that would never come (and thereby forcing it to implement its own timer mechanism to declare a session ended).
Starting with version 1.2.8 there is a mechanism in place that allows the Source to abort the session. It works in the same way as Jam and Multifeed events. This new mechanism is only in effect if CAP_FEEDERKEEPALIVE is set to FALSE. If it is set to TRUE, then the legacy behavior will occur (transport running forever).
When CAP_FEEDERKEEPALIVE is set to FALSE, the Source will monitor the feeder, and if it stops, then it will issue a MSG_XFERREADY to the application, pretending that an image has been captured. If the Source issues a request for DAT_IMAGEINFO, then the Source will make up to info from the negotiated capabilities. When the application goes to transfer the image, then the Source will immediately report TWRC_CANCEL, which aborts the session.
3.14 Length Detection and Frames (3000/4000 Series)
Length detection is used to spot multifeeds. The user selects the size of the document (off of the Multifeed tab), and if the scanner detects an attempt to scan anything larger than this value then it will alert the user.
Since TWAIN does not have the concept of document sizes and frames (it just has frames), there is no standard way for the Source to know what the size of the paper is going to be. So it does the next best thing by preventing the user from selecting a length that cuts through any of the frames. Consider three frames (FB, RB, FC) on the scanning bed (S). The color frame is the bottommost of the set, so it determined the minimum non-zero value for length detection, as shown by the =========.
+-----+----+---------+
|S |FB | |
| | | |
| +----+ |
| |
| +----+ |
| |RB | |
| | | |
| +----+ |
| |
| +----+ |
| |FC | |
| | | |
| +----+ |
======================
| |
| |
(Please note that the frames are not labeled in the real GUI, however it is possible to determine which frame goes with which camera by right clicking on the line of the box and selecting "What's This?")
The Front Color (FC) frame will prevent the length line from being less than itself, even if it is not possible to scan with color (start in color and patch enable are both off).
If the user wants to have a length detection line that reflects the bitonal documents only, and does not plan to scan in color, then the FC box needs to be moved or made smaller...
+-----+----+---------+
|S |FB | |
| | | +----+ |
| +----+ |FC | |
| | | |
| +----+ +----+ |
| |RB | |
| | | |
| +----+ |
| |
======================
| |
| |
TWAIN 1.9 provides a way to abort scanning without losing images when CAP_AUTOSCAN is TRUE.
DG_CONTROL / DAT_PENDINGXFER / MSG_STOPFEEDER may be issued in State 6. When called it will cause the device's feeder to stop running, but it will in no other way affect the session. With the feeder stopped, the Source will eventually transfer all the images from the device's buffers, and then the session will exit normally, dropping back down to State 5.
Note: using DG_CONTROL / DAT_PENDINGXFER / MSG_RESET will not only cause scanning to stop, it will strand any images remaining in the scanner's buffers.
3.16 JPEG Quantization (3590/4500/i820/i840/i200/i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)
WARNING: This section deals with settings that can degrade image quality. Do not use this feature unless you clearly understand all the implications.
There are three ways of selecting the JPEG Quantization.
1) From the Source's GUI
2) Using DAT_JPEGCOMPRESSION
3) Using ICAP_JPEGQUALITY
The Source's GUI uses information defaulted in the driver to select the JPEG Quantization tables downloaded to the scanner. These values can be overridden in the CONST.INI file by adding a line like the following:
JpegQuantization_Y_50=12121212171E2630121212141921283...
JpegQuantization_CbCr_50=1212121214191E2312121417191E...
The Y value selects the Luma value, and the CbCr value selects the Chroma. 40=draft, 50=good, 80=better, 90=best and 100=superior. The names for these are defined in each of the language .ini files. If a new entry is created:
JpegQuantization_Y_10=8888888888888888888888888888888...
JpegQuantization_CbCr_10=8888888888888888888888888888...
Then it will show up as "10%" (without the quotes) in the JPEQ Quality dropdown. The available range of values is from 0 to 100 in steps of 5. Note that 100% does not correspond to a true loss-less JPEG image, though it does select a value that minimizes the amount of loss.
ICAP_JPEGQUALITY uses these same values, so that the same tables can be obtained programmatically, and will be reflected in the GUI settings, if the Source's GUI is raised.
DAT_JPEGCOMPRESSION is the older method of controlling JPEG compression. Instead of selecting an arbitrary 'quality' number, this operation directly downloads a JPEG Quantization table to the scanner. Any time that this happens the Source will set ICAP_JPEGQUALITY to TWJQ_UNKNOWN, which will show up at "(application)" in the Source's GUI. This setting indicates that the Source does not know the current quality setting for the JPEG Quantization.
If the user selects this value from the Source's GUI, then it will select the values last set by DAT_JPEGCOMPRESSION. If there are no values available, then it will leave the current settings unchanged.
3.17 Multiple Modes (5xxx/7xxx/9xxx series)
The following information has not been certified for production use. It is presented for customers who wish to experiment with this feature. It only applies to drivers certified for use with the 5xxx/7xxx/9xxx scanners.
The 'Gemini' scanners 500/500A/900/923/990/5xxx/7xxx/9xxx support 18 modes. TWAIN in general has no elegant way of dealing with this kind of complexity, and experience has shown that the majority of applications do not need it.
Still, there may be some users who absolutely require more than one mode. The Source provides support for this in a few ways.
CAP_MODE selects which mode will be the current mode when scanning begins. In a default configuration the user can select one of the modes (1 - 18); once selected they are locked into that mode for that scanning session. Changing the mode on the scanner console and scanning paper with it results in the Source generating an error.
The ForceAcceptMode in the CONST.INI file under the [dsIdentity] section can be used to force the Source to support more than the ICAP_MODE. The value is a bit mask with bits 1 - 18 corresponding to those modes that the Source will be forced to accept images from. Note, though that forcing this behavior is not enough. If the selected mode has not been setup properly its use can result in unexpected behavior, corrupt images or crashing of the application.
The DG_CONTROL / DAT_USERINTERFACE / MSG_SETUPDS command can be used to set up multiple modes. The command sends the session attributes to the current CAP_MODE, but does not initiate scanning. This allows the application to set as many modes as it needs prior to issuing MSG_ENABLEDS to begin image capture.
The DG_CONTROL / DAT_PASSTHRU / MSG_SET and MSG_GET can be used to control aspects of the scanner that are not explicitly described by the Source. Use of this command is not casually recommended. Users who believe that this is the only solution should contact Eastman Kodak Company before attempting to use it.
Please reference the TWAIN_ExtImageInfo.htm found in the KODAK directory.
There are no requirements in the TWAIN spec around when ICAP_FRAMES should be available. Therefore limiting it at any time could potentially break customers. When a custom capability renders ICAP_FRAMES invalid (e.g. ICAP_CROPPING mode set to TWCR_AUTOMATICBORDERDETECTION or TWCR_AGGRESSIVEAUTOCROP), MSG_SET and MSG_RESET will still be available (i.e. frames will be disabled on the screen, but allowed full access programmatically).
3.20 Color Dropout: Enhanced Processing
Due to hardware constraints it is not possible to have enhanced color dropout on one camera and normal color dropout on another. Any changes to enhanced processing for one camera will automatically be effected on the other.
In order to add an application to send button events to, you must add the application to the registry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\StillImage\Registered Applications
3.22 Displaying Scanner Operator/Info Log
For those scanners that support it, an application can negotiate the custom CAP_LOG capability, setting it to TWLH_OPERATOR.
They can then issue a custom DG_CONTROL / DAT_USERINTERFACE / MSG_ENABLEINFO, which will bring up the UI with just the INFO tab, set to the Operator Log.
#define CAP_LOG 0x8082
#define TWLH_OPERATOR 1
#define TWLH_INFO 5
This section reports known issues with the Source.
The Source does not currently protect itself from certain combinations of programmatic access. For instance, it is possible to set ICAP_CONTRAST and ICAP_THRESHOLD when ICAP_HALFTONES is set to one of the dithering algorithms. This behavior does not affect the ability of the scanner to scan or the quality of its images; however, if an application is relying on the unavailability of capabilities to control its own GUI sensitivity, then this problem may become a factor.
Compression is properly constrained based on the current value of ICAP_XFERMECH:
ICAP_XFERMECH ICAP_COMPRESSION
TWSX_NATIVE TWCP_NONE**
TWSX_FILE TWCP_NONE, TWCP_GROUP31D*,
TWCP_GROUP32D*, TWCP_GROUP4,
TWCP_JPEG
TWSX_MEMORY TWCP_NONE, TWCP_GROUP31D*,
TWCP_GROUP32D*, TWCP_GROUP4,
TWCP_JPEG
* - i800 only
** - accepts other valid values but resets to TWCP_NONE automatically
The Source does not currently protect against compressions other than TWCP_NONE if the TWSX_FILE image format is TWFF_BMP, (this error test will be added to the DG_CONTROL / DAT_SETUPXFERFILE / MSG_SET in a later version).
Because of this dependency, the Source does not remember the last setting of compression, but will always default to TWCP_NONE (because the Source's power on default for ICAP_XFERMECH is TWSX_NATIVE).
This can be annoying for users working with Applications that rely solely on the Source's GUI. If the user wishes to use any compression other than TWCP_NONE then they must reset it each time the Source is restarted.
A workaround is available in this release. Users wishing to override the default behavior may do so by editing the const.ini file, going to the [SkipDependency] section, and changing the value of ICAP_COMPRESSION from 0 to 1.
Please note, making this change may cause unwanted behavior with Applications that do not rely on the Source's GUI. If unexpected side-effects occur then reset the value back to 0.
The Source protects itself when the ICAP_XFERMECH is TWSX_NATIVE by always setting the compression to TWCP_NONE.
Programmers will notice that if there is no paper in the scanner's feeder the TWAIN message DG_CONTROL / DAT_PENDINGXFERS / MSG_ENDXFER will not return until the transport timeout occurs. This is a part of the design of the Source, since the scanner cannot properly determine how to set pTW_PENDINGXFERS.Count until it scans the next piece of paper or the transport times out. Users requiring MSG_ENDXFER to be more responsive must use a smaller transport timeout value.
Beginning with version 3.x there is a programmatic workaround for this problem using the custom CAP_NOWAIT capability. Setting this value to TRUE will result in any blocking call immediately returning TWRC_BUSY until the request is complete. See the KDSCUST.H file for more information.
4.3 Fix for Overscan (3xxx Series)
Firmware 1.0.21 of the 3500 has a bug in overscan. If the top and bottom sides are set to overscan and scanning is done, and then the top and bottom sides are set to no-overscan and scanning is done, then it will be noticed that the bottom image has done top overscan, even though the scanner has been set to no top overscan and reports no top overscan.
The Source gets around this problem by downloading the bottom settings twice. This behavior is controllable from the CONST.INI file in the [ICAP_OVERSCAN] section under the FixOverscan flag. The default value for the flag is 1, which is what causes the rear to be downloaded twice. There is no measurable performance benefit from setting this flag to 0, so it should remain at 1, even if the user does not use overscan.
Update: As of firmware (3500 v1.1.4, 3510 v1.0.10, 3590 v1.0.6) this problem was fixed. So, starting with version v1.2.5 of the Source the FixOverscan flag will default to 0.
4.4 DEFAULTS button does not affect the following...
Pressing the DEFAULTS button on the GUI will reset most of the capabilities to their default settings, with the following exceptions (note that not all of these values are present in the Source's GUI):
CAP_DEVICEEVENT
CAP_DEVICEONLINE
CAP_DEVICETIMEDATE
CAP_DISABLEFIELDINUI
CAP_MAXBATCHBUFFERS
CAP_NOWAIT
CAP_SCSIADAPTERTARGET
CAP_SERIALNUMBER
ICAP_IMAGEFILEFORMAT
ICAP_XFERMECH
4.5 TIFF JPEG (3590/4500/i820/i840/i600/i700/i200/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)
This Source provides support for TIFF/JPEG images (accessed by specifying a value of TWSX_FILE for ICAP_XFERMECH, specifying TWCP_JPEG for the value of ICAP_COMPRESSION, and requesting TWFF_TIFF for the file format when calling DAT_SETUPFILEXFER).
The resultant image is generated following the "TIFF Technical Note #2". The following is a dump of a sample image created using the scanner simulator.
Reading file: i0000002.tif
The file size is 21690 bytes.
Intel (little endian) byte order
IFD OFFSET = 8
The number of tags = 16
Tag Type Length Value
254 New Subfile Type LONG 1 0
255 Subfile Type SHORT 1 1
256 Image Width LONG 1 832
257 Image Length LONG 1 1176
258 Bits Per Sample SHORT 3 <206> 8 8 8
259 Compression SHORT 1 7
262 Photometric SHORT 1 6
273 Strip Offsets LONG 1 252
277 Samples Per Pixel SHORT 1 3
278 Rows Per Strip LONG 1 1176
279 Strip Byte Counts LONG 1 21438
282 X Resolution RATIONAL 1 <212> 100 / 1
283 Y Resolution RATIONAL 1 <220> 100 / 1
296 Resolution Unit SHORT 1 2
530 YCbCr Sub-sampling SHORT 2 2 2
532 Reference Black White LONG 6 <228>
Items of note include the following. Compression is set to '7', per Note 2. JPEG Compression in TIFF v6 was set to a value of '6'. Photometric interpretation is set to 6, which indicates YCbCr for the JPEG encoding. Finally, the YCbCr Sub-sampling is present, and set to 2 2.
Prior to this release the TWAIN Source attempted to follow the TIFF v6 guidelines for TIFF/JPEG generation. Since "Note #2" depreciates that part of the TIFF v6 spec, this "Note #2" method comprises the only 'standard' way of generating TIFF/JPEG images.
It is still possible to get the TWAIN Source to create TIFF/JPEG images in the older style. Please contact your Eastman Kodak Company representative if you absolutely have to have this feature.
4.6 Scanner Does Not Always Report Jams (5xxx/7xxx/9xxx)
The 5xxx/7xxx/9xxx series of scanners with Document Image Management may not always report jam conditions to the TWAIN Source. Scanners without the Document Image Manager always correctly report the occurrence of the jam.
Pressing the End Of Job button on a 9000 series scanner will usually flush the jam error to the TWAIN Source.
TWAIN sessions with 5000/7000 series scanners will appear to end normally, as if the session had been terminated by the operator.
Jams are always reported on the scanner console, so operators are encouraged to go there to learn the reason for unexpected stoppages during a scanning session.
This section acknowledges code used by other vendors in the development of this TWAIN driver.
The Intel(r) JPEG Library (IJL) is a high performance API for compressing/decompressing JPEG images. Information on it can be obtained at Intel's website: http://developer.intel.com
5.2 Picture Elements(tm) ChromaTHR(tm), 3590/4500, 4.x only
Picture Elements(tm) software converts color images to bitonal using their ChromaTHR(tm) technology. Hardware support may be purchased from them by customers requiring higher quality images at production scanner speeds. For more information, please refer to the Picture Elements website: http://www.picturel.com


Climate and Health in
Stapleton - St. George
Extreme heat, coastal storms, flooding and episodes of elevated ozone are climate-related hazards that may increase with climate change and have important public health impacts in New York City. Extreme weather can cause power outages, which also threaten public health. This report provides neighborhood indicators of climate-related hazards, vulnerability and health impacts.
Download Report Data (opens in a new tab)
Neighborhood Information
Stapleton - St. George is comprised of Zip codes 10301,10304,10305


Timestamp Microservice
Example usage:
https://subhojit777-timestampms.herokuapp.com/1467504000
https://subhojit777-timestampms.herokuapp.com/July 3, 2016
Example output:
{"unix":"1467504000","natural":"July 3, 2016"}


Home
In a professional context it often happens that private clients corder a publication to be made.
About me
I’m an Tech Enthusiast & a junior pursuing my Bachelors in Computer Engineering.
I am passionate about software development & innovations,i always ready to help & i enjoy learning new things.
I believe in the power of community & have also given talks at events & various hackthon.
What I'm Doing:
- Mobile Apps (android & ios) - Desktop & Windows Apps
- Web Development
- Seo Optimisation
Files Download
Project Done
Get Award
Happy Client
Resume
I Am Available For Freelance Projects.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque scelerisque diam non nisi semper, et elementum lorem ornare.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque scelerisque diam non nisi semper, et elementum lorem ornare.
As a startup Corporation®, We focus on utilizing business as a power for great. This is a strong achievement and just the start of our excursion to completely convey our vision of a reasonable, computerized world where everybody can understand their maximum capacity.
We put interruption in top stuff by assisting you with making uncommon encounters. We assist you with tackling issues at scale and at speed - through change supported by innovation.
Testimonial
What my clients say about me
" Jenil Bhadja. The one person whom I have met only once.But whenever there is an
opportunity for growth, he is first in the line. He is always there to help the community
and whenever there is opportunity, there is
Jenil Bhadja "
" When you choose Jenil Bhadja you get
a wonderful, professional mentality with innovative ideas,
awesome customer service, and exactly what
you’re looking for. He took the ideas that we had and put them perfectly on the web."
" I Have Seen Some Great Creative Web Designer and Jenil is One of Them. He is Creative Enough to Take Challanges and Prove his Creativity. He Had Done Many Unique Web Design Templates.Working with him is great experiance. "
"Jenil has fully dedicated person who has self motivated and passionate explore his knowledge. I saw his enthusiasm of learning new things from Netxs Solutions. I am very impressed by his communication skill as well as excited to learning technical things . "
Get in Touch
Feel Free To Contact Me Any Time
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.


{% load i18n %}
{% blocktrans trimmed %} A: You want to attend a workshop happening in your city? So cool! You can register on the event's website. If there is no website, it means that registrations are not opened yet. Come back in a few days to check or send an email to the local organizers of the workshop you want to attend. {% endblocktrans %}
{% url 'core:newsletter' as newsletter_url %} {% blocktrans trimmed %} A: Sadly, you won't be able to apply: events receive many applications and already have a waiting list in case an attendee has to cancel. You can subscribe to our newsletter to know where the next events are planed. {% endblocktrans %}
{% trans "A: You rock! Just send an email to the local organizers of the workshop!" %}
{% blocktrans trimmed %} A: Sadly, Django Girls Support Team won't be able to help you: our work is to help other organizers plan their workshop. If you need assistance while doing the tutorial, go to Django Girls Gitter room: a group of volunteers is waiting for you there and will be happy to answer all your questions ;) {% endblocktrans %}


Psalm 122
A song of ascents, of David.
1 I was glad when they said to me,
"Let us go to the house of Yahweh."
2 Our feet are standing
inside your gates, Jerusalem.
3 Jerusalem was built
like a city that is compact together.
4 The tribes go up there, the tribes of Yahweh,
as a law for Israel
to give thanks to the name of Yahweh.
5 The leaders sit on thrones there,
for judgment for the house of David.
6 Pray for the peace of Jerusalem!
They will prosper who love you.
7 May there be peace within your walls
and prosperity within your towers.
8 For my brothers' and companions' sakes
I will now say, "May there be peace in you."
9 For the sake of the house of Yahweh our God,
I will pray for your good.


Strings and Regular Expressions
introml.analyticsdojo.com
String Manipulation and Regular Expressions¶
One place where the Python language really shines is in the manipulation of strings. This section will cover some of Python’s built-in string methods and formatting operations, before moving on to a quick guide to the extremely useful subject of regular expressions. Such string manipulation patterns come up often in the context of data science work, and is one big perk of Python in this context.
Strings in Python can be defined using either single or double quotations (they are functionally equivalent):
x = 'a string'
y = "a string"
if x == y:
print("they are the same")
In addition, it is possible to define multi-line strings using a triple-quote syntax:
multiline = """
one
two
three
"""
With this, let’s take a quick tour of some of Python’s string manipulation tools.
Simple String Manipulation in Python¶
For basic manipulation of strings, Python’s built-in string methods can be extremely convenient. If you have a background working in C or another low-level language, you will likely find the simplicity of Python’s methods extremely refreshing. We introduced Python’s string type and a few of these methods earlier; here we’ll dive a bit deeper
Formatting strings: Adjusting case¶
Python makes it quite easy to adjust the case of a string.
Here we’ll look at the upper()
, lower()
, capitalize()
, title()
, and swapcase()
methods, using the following messy string as an example:
fox = "tHe qUICk bROWn fOx."
To convert the entire string into upper-case or lower-case, you can use the upper()
or lower()
methods respectively:
fox.upper()
fox.lower()
A common formatting need is to capitalize just the first letter of each word, or perhaps the first letter of each sentence.
This can be done with the title()
and capitalize()
methods:
fox.title()
fox.capitalize()
The cases can be swapped using the swapcase()
method:
fox.swapcase()
fox
Formatting strings: Adding and removing spaces¶
Another common need is to remove spaces (or other characters) from the beginning or end of the string.
The basic method of removing characters is the strip()
method, which strips whitespace from the beginning and end of the line:
line = ' this is the content '
line.strip()
To remove just space to the right or left, use rstrip()
or lstrip()
respectively:
line.rstrip()
line.lstrip()
To remove characters other than spaces, you can pass the desired character to the strip()
method:
num = "000000000000435"
num.strip('0')
Because zero-filling is such a common need, Python also provides zfill()
, which is a special method to right-pad a string with zeros:
'435'.zfill(10)
Finding and replacing substrings¶
If you want to find occurrences of a certain character in a string, the find()
/rfind()
, index()
/rindex()
, and replace()
methods are the best built-in methods.
find()
and index()
are very similar, in that they search for the first occurrence of a character or substring within a string, and return the index of the substring:
line = 'the quick brown fox jumped over a lazy dog'
line.find('fox')
line[19:21]
line.index('fox')
The only difference between find()
and index()
is their behavior when the search string is not found; find()
returns -1
, while index()
raises a ValueError
:
line.find('bear')
line.index('bear')
The related rfind()
and rindex()
work similarly, except they search for the first occurrence from the end rather than the beginning of the string:
line.rfind('a')
For the special case of checking for a substring at the beginning or end of a string, Python provides the startswith()
and endswith()
methods:
line.endswith('dog')
line.startswith('fox')
To go one step further and replace a given substring with a new string, you can use the replace()
method.
Here, let’s replace 'brown'
with 'red'
:
line.replace('brown', 'red')
The replace()
function returns a new string, and will replace all occurrences of the input:
line.replace('o', '--')
For a more flexible approach to this replace()
functionality, see the discussion of regular expressions in Flexible Pattern Matching with Regular Expressions.
Splitting and partitioning strings¶
If you would like to find a substring and then split the string based on its location, the partition()
and/or split()
methods are what you’re looking for.
Both will return a sequence of substrings.
The partition()
method returns a tuple with three elements: the substring before the first instance of the split-point, the split-point itself, and the substring after:
line.partition('fox')
The rpartition()
method is similar, but searches from the right of the string.
The split()
method is perhaps more useful; it finds all instances of the split-point and returns the substrings in between.
The default is to split on any whitespace, returning a list of the individual words in a string:
line.split()
A related method is splitlines()
, which splits on newline characters.
Let’s do this with a Haiku, popularly attributed to the 17th-century poet Matsuo Bashō:
haiku = """matsushima-ya
aah matsushima-ya
matsushima-ya"""
haiku.splitlines()
Note that if you would like to undo a split()
, you can use the join()
method, which returns a string built from a splitpoint and an iterable:
'--'.join(['1', '2', '3'])
A common pattern is to use the special character "\n"
(newline) to join together lines that have been previously split, and recover the input:
print("\n".join(['matsushima-ya', 'aah matsushima-ya', 'matsushima-ya']))
Format Strings¶
In the preceding methods, we have learned how to extract values from strings, and to manipulate strings themselves into desired formats.
Another use of string methods is to manipulate string representations of values of other types.
Of course, string representations can always be found using the str()
function; for example:
pi = 3.14159
str(pi)
print ("The value of pi is " + pi)
For more complicated formats, you might be tempted to use string arithmetic as outlined in Basic Python Semantics: Operators:
"The value of pi is " + str(pi)
A more flexible way to do this is to use format strings, which are strings with special markers (noted by curly braces) into which string-formatted values will be inserted. Here is a basic example:
"The value of pi is {}".format(pi)
Inside the {}
marker you can also include information on exactly what you would like to appear there.
If you include a number, it will refer to the index of the argument to insert:
"""First letter: {0}. Last letter: {1}.""".format('A', 'Z')
If you include a string, it will refer to the key of any keyword argument:
"""First letter: {first}. Last letter: {last}.""".format(last='Z', first='A')
Finally, for numerical inputs, you can include format codes which control how the value is converted to a string. For example, to print a number as a floating point with three digits after the decimal point, you can use the following:
"pi = {0:.3f}".format(pi)
As before, here the “0
” refers to the index of the value to be inserted.
The “:
” marks that format codes will follow.
The “.3f
” encodes the desired precision: three digits beyond the decimal point, floating-point format.
This style of format specification is very flexible, and the examples here barely scratch the surface of the formatting options available. For more information on the syntax of these format strings, see the Format Specification section of Python’s online documentation.
Flexible Pattern Matching with Regular Expressions¶
The methods of Python’s str
type give you a powerful set of tools for formatting, splitting, and manipulating string data.
But even more powerful tools are available in Python’s built-in regular expression module.
Regular expressions are a huge topic; there are there are entire books written on the topic (including Jeffrey E.F. Friedl’s Mastering Regular Expressions, 3rd Edition), so it will be hard to do justice within just a single subsection.
My goal here is to give you an idea of the types of problems that might be addressed using regular expressions, as well as a basic idea of how to use them in Python. I’ll suggest some references for learning more in Further Resources on Regular Expressions.

If you frequently use the command-line, you are probably familiar with this type of flexible matching with the “*
” character, which acts as a wildcard.
For example, we can list all the IPython notebooks (i.e., files with extension .ipynb) with “Python” in their filename by using the “*
” wildcard to match any characters in between:
Regular expressions generalize this “wildcard” idea to a wide range of flexible string-matching sytaxes.
The Python interface to regular expressions is contained in the built-in re
module; as a simple example, let’s use it to duplicate the functionality of the string split()
method:
import re
regex = re.compile('\s+')
regex.split(line)
Here we’ve first compiled a regular expression, then used it to split a string.
Just as Python’s split()
method returns a list of all substrings between whitespace, the regular expression split()
method returns a list of all substrings between matches to the input pattern.
In this case, the input is "\s+"
: “\s
” is a special character that matches any whitespace (space, tab, newline, etc.), and the “+
” is a character that indicates one or more of the entity preceding it.
Thus, the regular expression matches any substring consisting of one or more spaces.
The split()
method here is basically a convenience routine built upon this pattern matching behavior; more fundamental is the match()
method, which will tell you whether the beginning of a string matches the pattern:
for s in [" ", "abc ", " abc"]:
if regex.match(s):
print(repr(s), "matches")
else:
print(repr(s), "does not match")
Like split()
, there are similar convenience routines to find the first match (like str.index()
or str.find()
) or to find and replace (like str.replace()
).
We’ll again use the line from before:
line = 'the quick brown fox jumped over a lazy dog'
With this, we can see that the regex.search()
method operates a lot like str.index()
or str.find()
:
line.index('fox')
regex = re.compile('fox')
match = regex.search(line)
match.start()
Similarly, the regex.sub()
method operates much like str.replace()
:
line.replace('fox', 'BEAR')
regex.sub('BEAR', line)
With a bit of thought, other native string operations can also be cast as regular expressions.
A more sophisticated example¶
But, you might ask, why would you want to use the more complicated and verbose syntax of regular expressions rather than the more intuitive and simple string methods? The advantage is that regular expressions offer far more flexibility.
Here we’ll consider a more complicated example: the common task of matching email addresses. I’ll start by simply writing a (somewhat indecipherable) regular expression, and then walk through what is going on. Here it goes:
email =<EMAIL_ADDRESS>Using this, if we’re given a line from a document, we can quickly extract things that look like email addresses
text = "To email Guido, try<EMAIL_ADDRESS>or the older address<EMAIL_ADDRESS>email.findall(text)
(Note that these addresses are entirely made up; there are probably better ways to get in touch with Guido).
We can do further operations, like replacing these email addresses with another string, perhaps to hide addresses in the output:
<EMAIL_ADDRESS>text)
email
Finally, note that if you really want to match any email address, the preceding regular expression is far too simple. For example, it only allows addresses made of alphanumeric characters that end in one of several common domain suffixes. So, for example, the period used here means that we only find part of the address:
<EMAIL_ADDRESS>This goes to show how unforgiving regular expressions can be if you’re not careful! If you search around online, you can find some suggestions for regular expressions that will match all valid emails, but beware: they are much more involved than the simple expression used here!
Basics of regular expression syntax¶
The syntax of regular expressions is much too large a topic for this short section. Still, a bit of familiarity can go a long way: I will walk through some of the basic constructs here, and then list some more complete resources from which you can learn more. My hope is that the following quick primer will enable you to use these resources effectively.
Simple strings are matched directly¶
If you build a regular expression on a simple string of characters or digits, it will match that exact string:
regex = re.compile('ion')
regex.findall('Great Expectations')
Some characters have special meanings¶
While simple letters or numbers are direct matches, there are a handful of characters that have special meanings within regular expressions. They are:
. ^ $ * + ? { } [ ] \ | ( )
We will discuss the meaning of some of these momentarily. In the meantime, you should know that if you’d like to match any of these characters directly, you can escape them with a back-slash:
regex = re.compile(r'\$')
regex.findall("the cost is 20")
The r
preface in r'\$'
indicates a raw string; in standard Python strings, the backslash is used to indicate special characters.
For example, a tab is indicated by "\t"
:
print('a\tb\tc')
Such substitutions are not made in a raw string:
print(r'a\tb\tc')
For this reason, whenever you use backslashes in a regular expression, it is good practice to use a raw string.
Special characters can match character groups¶
Just as the "\"
character within regular expressions can escape special characters, turning them into normal characters, it can also be used to give normal characters special meaning.
These special characters match specified groups of characters, and we’ve seen them before.
In the email address regexp from before, we used the character "\w"
, which is a special marker matching any alphanumeric character. Similarly, in the simple split()
example, we also saw "\s"
, a special marker indicating any whitespace character.
Putting these together, we can create a regular expression that will match any two letters/digits with whitespace between them:
regex = re.compile(r'\w\s\w')
regex.findall('the fox is 9 years old')
This example begins to hint at the power and flexibility of regular expressions.
The following table lists a few of these characters that are commonly useful:
| Character | Description || Character | Description |
|———–|—————————–||———–|———————————|
| "\d"
| Match any digit || "\D"
| Match any non-digit |
| "\s"
| Match any whitespace || "\S"
| Match any non-whitespace |
| "\w"
| Match any alphanumeric char || "\W"
| Match any non-alphanumeric char |
This is not a comprehensive list or description; for more details, see Python’s regular expression syntax documentation.
Square brackets match custom character groups¶
If the built-in character groups aren’t specific enough for you, you can use square brackets to specify any set of characters you’re interested in. For example, the following will match any lower-case vowel:
regex = re.compile('[aeiou]')
regex.split('consequential')
Similarly, you can use a dash to specify a range: for example, "[a-z]"
will match any lower-case letter, and "[1-3]"
will match any of "1"
, "2"
, or "3"
.
For instance, you may need to extract from a document specific numerical codes that consist of a capital letter followed by a digit. You could do this as follows:
regex = re.compile('[A-Z][0-9]')
regex.findall('1043879, G2, H6')
Wildcards match repeated characters¶
If you would like to match a string with, say, three alphanumeric characters in a row, it is possible to write, for example, "\w\w\w"
.
Because this is such a common need, there is a specific syntax to match repetitions – curly braces with a number:
regex = re.compile(r'\w{3}')
regex.findall('The quick brown fox')
There are also markers available to match any number of repetitions – for example, the "+"
character will match one or more repetitions of what precedes it:
regex = re.compile(r'\w+')
regex.findall('The quick brown fox')
The following is a table of the repetition markers available for use in regular expressions:
Character |
Description |
Example |
|---|---|---|
|
Match zero or one repetitions of preceding |
|
|
Match zero or more repetitions of preceding |
|
|
Match one or more repetitions of preceding |
|
|
Match |
|
|
Match between |
|
With these basics in mind, let’s return to our email address matcher:
email =<EMAIL_ADDRESS>We can now understand what this means: we want one or more alphanumeric character ("\w+"
) followed by the at sign ("@"
), followed by one or more alphanumeric character ("\w+"
), followed by a period ("\."
– note the need for a backslash escape), followed by exactly three lower-case letters.
If we want to now modify this so that the Obama email address matches, we can do so using the square-bracket notation:
email2 =<EMAIL_ADDRESS><EMAIL_ADDRESS>We have changed "\w+"
to "[\w.]+"
, so we will match any alphanumeric character or a period.
With this more flexible expression, we can match a wider range of email addresses (though still not all – can you identify other shortcomings of this expression?).
Parentheses indicate groups to extract¶
For compound regular expressions like our email matcher, we often want to extract their components rather than the full match. This can be done using parentheses to group the results:
email3 = re.compile(r'([\w.]+)@(\w+)\.([a-z]{3})')
text = "To email Guido, try<EMAIL_ADDRESS>or the older address<EMAIL_ADDRESS>email3.findall(text)
As we see, this grouping actually extracts a list of the sub-components of the email address.
We can go a bit further and name the extracted components using the "(?P<name> )"
syntax, in which case the groups can be extracted as a Python dictionary:
email4 = re.compile(r'(?P<user>[\w.]+)@(?P<domain>\w+)\.(?P<suffix>[a-z]{3})')
match =<EMAIL_ADDRESS>match.groupdict()
Combining these ideas (as well as some of the powerful regexp syntax that we have not covered here) allows you to flexibly and quickly extract information from strings in Python.
Further Resources on Regular Expressions¶
The above discussion is just a quick (and far from complete) treatment of this large topic. If you’d like to learn more, I recommend the following resources:
Python’s
re
package Documentation: I find that I promptly forget how to use regular expressions just about every time I use them. Now that I have the basics down, I have found this page to be an incredibly valuable resource to recall what each specific character or sequence means within a regular expression.Python’s official regular expression HOWTO: a more narrative approach to regular expressions in Python.
Mastering Regular Expressions (OReilly, 2006) is a 500+ page book on the subject. If you want a really complete treatment of this topic, this is the resource for you.
For some examples of string manipulation and regular expressions in action at a larger scale, see Pandas: Labeled Column-oriented Data, where we look at applying these sorts of expressions across tables of string data within the Pandas package.
This notebook contains an excerpt from the Whirlwind Tour of Python by Jake VanderPlas; the content is available on GitHub.
The text and code are released under the CC0 license; see also the companion project, the Python Data Science Handbook.
< Modules and Packages | Contents | A Preview of Data Science Tools >


We examine bitcoin!
- benchmark magnetic methodologies
- disintermediate world-class interfaces
- drive real-time convergence
- generate rich e-tailers
- empower rich e-services
- expedite e-business functionalities
- aggregate synergistic synergies
- grow intuitive architectures
- harness back-end methodologies
- synthesize back-end solutions
- leverage cross-media vortals
- integrate global technologies
- envisioneer proactive interfaces
- disintermediate plug-and-play convergence


|
Contiki 2.5
|
Sample API funtions for controlling LEDs. More...
Typedefs | |
| typedef int8u | HalBoardLed |
| Ensures that the definitions from the BOARD_HEADER are always used as parameters to the LED functions. | |
Functions | |
| void | halInitLed (void) |
| Configures GPIOs pertaining to the control of LEDs. | |
| void | halToggleLed (HalBoardLed led) |
| Atomically wraps an XOR or similar operation for a single GPIO pin attached to an LED. | |
| void | halSetLed (HalBoardLed led) |
| Turns on (sets) a GPIO pin connected to an LED so that the LED turns on. | |
| void | halClearLed (HalBoardLed led) |
| Turns off (clears) a GPIO pin connected to an LED, which turns off the LED. |
Sample API funtions for controlling LEDs.
When specifying an LED to use, always use the BOARDLEDx definitions that are defined within the BOARD_HEADER.
See led.h for source code.
| void halClearLed | ( | HalBoardLed | led | ) |
Turns off (clears) a GPIO pin connected to an LED, which turns off the LED.
| led | Identifier (from BOARD_HEADER) for the LED to turn off. |
Definition at line 28 of file led.c.
References halGpioSet().
Referenced by halInitLed().
| void halSetLed | ( | HalBoardLed | led | ) |
Turns on (sets) a GPIO pin connected to an LED so that the LED turns on.
| led | Identifier (from BOARD_HEADER) for the LED to turn on. |
Definition at line 23 of file led.c.
References halGpioSet().
| void halToggleLed | ( | HalBoardLed | led | ) |


Click a Box to Begin Entering Letters
Click and Drag to Claim Tiles.
Click and Drag with Alt Pressed to Deselect Tiles.
Click Me!


--- layout: post title: "My Week in Review" date: 2017-10-22 09:20:00 +0000 tags: image: https://s3.amazonaws.com/audreywatters/2017-10-22-nyc.jpg imagecredits: https://www.flickr.com/photos/thomashawk/15737338431 ---
Icon credits: The Noun Project


My first paragraph.
W3Schools is a web developer's site. It provides tutorials and references covering many aspects of web programming, including HTML, CSS, JavaScript, XML, SQL, PHP, ASP, etc.
//thisdown part is for bold::::;////If you move the mouse over the paragraph above, the title will display as a tooltip.
This is a linkThe alt attribute specifies an alternative text to be used,
when an HTML element cannot be displayed. src=="screen readers"(this i dont know)
have question about this?????/


screen: {{ screen.x}}, {{ screen.y }}
client: {{client.x}}, {{client.y}}
page: {{page.x}}, {{page.y}}


Because each organization of GitHub is 32px * 32px, and a row can hold 7 organizations at most, so it must be 7 columns. The width of the appropriate image size should be 224px. As for the height, it should be a multiple of 32px. In order to adapt to this requirement, the project will make some changes to the size of your uploaded image, adjust the width to 224px by stretching / shrinking, while the height will stretch / shrink depending on how many lines you want to generate.


03 May 1996
Disease Outbreak Reported
An increased number of cases of meningococcal meningitis has been registered since the beginning of February 1996, first in the District of Dioila, followed by the District of Bamako. By the end of March, 2 347 cases had been notified of which 319 (13.6%) died. Over one-third of the cases were from the District of Bamako. Neisseria meningitidis group A has been diagnosed in the laboratory. By 13 March the health authorities declared the situation in the District Bamako as epidemic and initiated vaccination of all age groups between 1 and 25 years on 15 March. The vaccination campaign has been extended to other affected regions. So far, 708 183 persons in the District of Bamako, 74 411 in the region of Mopti and 83 309 in the region of Koulikoro have been vaccinated. Analysis of the epidemiological situation indicate that the outbreaks have spread to other regions, in particular Ségou, Mopti and Sikasso.
Mali is situated within the meningitis belt in Africa and has experienced outbreaks with regular intervals in the past, such as in 1969, 1981 and 1989. However, the epidemic intervals appear to have shortened as indicated by the epidemic in 1994 preceding this current epidemic. Following reports on outbreaks in neighbouring countries, the health authorities implemented a preparedness strategy of strengthened surveillance, public health information campaigns and distribution of 20 000 doses vaccines and drugs to each of the 8 regions in December 1995. In the strengthened surveillance system, each local health centre provides weekly reports to peripheral health centres for forwarding on to the regional and central health authorities. Most district health centres have radio communication links with the peripheral health services.
Since 15 March 1996 the national health authorities have allocated 200 million CFA for vaccine and field operations and have ordered 1 million doses of vaccine and other material needed for the campaign. In addition, international agencies such as WHO, UNICEF, MSF, Fondation pour l'Enfance have contributed about 700 000 doses. The health authorities plan to extend vaccination to the population at risk in areas close to outbreaks in neighbouring countries for which an additional 1.6 million doses would be needed.
Source: Based on a report from Ministry of Health and WHO Country Office, Mali


Extensive experience of multinational corporations and operations in emerging markets
both as an academic and as a professional. Worked with large data sets, have
published, and presented research papers. I have been instrumental in developing
strategy for large corporations and managing relationships with key industry agencies. I
have coordinated corporate planning exercises as well as managed key initiatives.
Core competencies include:
● Corporate Strategy ● Business Analysis ● Strategic Planning
GPA: 3.83 / 4.00
GPA: 8.17 / 9.00


WebApp
Home
Add Post
Contractor Management
Logout
Success!
The contractor has beed added.
Create Contractor
Name
Please enter a valid name.
Company
Please enter a valid company.
PIN
Please enter a valid PIN.
Add Contractor


| espn_getendpoint_raw {ffscrapr} | R Documentation |
This function is the lower-level function that powers the API call: it takes a URL and headers and executes the http request with rate-limiting and authentication. It checks for JSON return and any warnings/errors, parses the json, and returns an espn_api object with the parsed content, the raw response, and the actual query.
espn_getendpoint_raw(conn, url_query, ...)
conn |
a connection object created by ff_connect or equivalent - used for authentication |
url_query |
a fully-formed URL to call |
... |
any headers or other httr request objects to pass along |
object of class espn_api with parsed content, request, and response
espn_getendpoint()
- a higher level wrapper that checks JSON and prepares the url query
vignette("espn_getendpoint")


Sample User Interface
Different data types
The interface supports all basic numeric and string types. When a form is
submitted, all fields are sent as
URL encoded
values. the interface decodes them and assigns new values to corresponding
variables. received values for integer type fields can be decimal, hex or octal.
Keep in mind that check-boxes and radio buttons that are not checked are not
submitted. The "standard" trick in this case is to use another hidden
input field with the same name and a value corresponding to the unchecked.
state. Because submitted fields are parsed sequentially, the hidden field
must be placed
BEFORE the check-box or radio button field.
Arrays
Transferring arrays from program to the user interface page is simple. The
interface knows how to format arrays for all basic data types.
When posting data back from HTML page to the program we have to establish
a convention because the browser's posting mechanism has no concept of array.
So, by convention, array elements are named <array>_<index>.
Note that index value is checked against the limit set in the data dictionary
entry for the array.
Integer array iarr:
String array sarr:
The interface can be used not only for variables that need to be entered by
user, but also for stuff that has only to be displayed. Of particular use
in this case are arrays of pointers to strings.
Pointer to string array psarr:
| psarr[0]: |
|
| psarr[1]: |
|
| psarr[2]: |
|
| psarr[3]: |
|