|
|
|
|
John
Pritchett Epic
Interactive Strategy
TW Game Server
Revision history for v3
Fixed planet landing bug: when destroyed by a quasar cannon (atmos), a player still had to face fighters in the escape pod. This has been fixed so that the player is repelled as soon as the quasar destroys the main ship. Fixed problems with "abort" operation. When aborting paged displays, the abort now exits the procedure instead of simply discontinuing the display of the output. Fixed bug with Gold Merchant Cruiser and Marauders that have been modified from the standard settings. Players would be started in these ships with holds and fighters greater than the max allowed if these maximums were set to below the normal starting values. Fixed 0 turn load colonists bug Fixed Ferrengi attack 0 fig bug Optimized planet and port updates. These are not committed to disk for Grimy Trader scans or CIM (port) or computer and corporate displays (planet). Wrote new, more efficient timing routine. Created a new mode for multitasking called Adaptive. If an OS is a preemptive multitasking system (Win95/98/NT/OS2) then the default mode will be adaptive. If the OS is cooperative, then the default mode will be cooperative. With adaptive multitasking mode, the program determines if the idle call is returning in a reasonable length of time and doesn't always go idle if it is not. This is intended to solve problems with Win95 because it tends to take as much as a second to return the CPU to an application that is running in the background. Fixed a bug that allowed invincible sector figs (sorry, no details on this one). Split the configuration record into a global file that pertains to all games and local files that are specific to each game. The files are TWGLOB.DAT and TWCFIG.DAT. In TEDIT, General Editors One and Two, each field indicates whether it is a local or global setting. When running multiple games, the global changes will effect ALL games, but the local settings will only effect individual games. This is ONLY in the case when multiple game data sets are running from a single Trade Wars installation (as with TWGS). In the process of splitting these records, I reorganized and expanded them. Both are 4096 bytes with 3923 left in TWGLOB.DAT and 3910 left in TWCFIG.DAT for future configuration fields. Plus, each record has a 32 bit flag field for true/false settings with 5 used in TWGLOB.DAT and 10 used in TWCFIG.DAT. This should leave plenty of room for future expansion ;) Bigbang now remembers your last settings. You can choose to reset to defaults or revert to the last settings after you have made changes. Bigbang now uses a random seed for the universe generation. If the settings are the same and this seed is the same, the universe will be the same. This makes universes repeatable. EXTERN and NONPSERV are now aware of data versions and will automatically update to the lastest data when older data is detected. Ferrengal can be made invincible. This will allow it to be used as in capture-the-flag type games. Added several items to the "S" screen at startup menu. Added Explored Sectors, Unexplored Sectors, Set Avoid and Clear Avoid to CIM menu. Fixed maintenance delete problems that were turning player assets to rogue. Added Observer mode for gameops to observe their games without being able to effect the game or be effected by the players. Added * global (replaces the Boss Key) to list all global keys. Added MBBS compatibility mode. This mode puts several settings into effect (they cannot be altered) that represent deviations of the HVS version from the Martech version. Port robbing formula Port stealing formula MegaRob bug emulation 100% Planetary Trading 32000 max port production Daily bust clearing V screen stats are only updated once per hour. Fixed timing bug that allowed players online at midnight to get a free days worth of production (sorry!) Fixed "no turns left" bug when removing colonists from planet with unlimited turns. Added several items to a new General Editor page (I). Hardware costs and a few other prices can be set from this page. Rob and steal factor values can be set here also. Added Radiation Halflife Lifetime setting to General Editor Three. This allows the gameop to specify the cycle for Radiation clearing. When the radiation is cleared, ports can be rebuilt. StarDock and the class 0 ports will be rebuilt automatically by the Feds when the radiation has cleared. For Gold games, SD and class 0 ports increase in strength when they are rebuilt. Added hidden start menu function for displaying a raw game stats file. This function is triggered by the * command. Fixed cheat that allowed players to determine the type of a planet being
GTorped before committing to the action. This allowed players to GTorp
only the planet types they wanted.
TWGS Release - v3.10 Fixed a bug that allowed two players to log in to the game as the same player. GOLD: Fixed a bug that allowed some Gold ships to sell back for more than they were purchased for. This change results in ships being sold back for somewhat more than in previous versions if they have the same number of holds as they started with. The resale value is decreased if you have less holds than the ship had when it was sold and increased based on the hold value for any holds over the initial number. The base holds of a ship are considered to be part of the package and are not priced according to the usual rules for hold value. Fixed a bug that caused your own Planetary Interdictor to hold you from retreating from hostile figs in sector. Sol, Alpha Centauri, Rylos, and Stargate Alpha I are now reconstructed by the Feds when the radiation runs out. This is currently set to 14 days but I intend to make this configurable in the future. Destroying these ports will become increasing difficult as they are destroyed and rebuilt. GOLD: Added "Reset" option to ship, planet and alien editors. This allows
the gameop to always return the standard ships, planets and aliens to their
standard settings.
11/13/98 - v3.09 Added Ether Probe move delay option, configurable from TEDIT. This will allow sysops to slow down the use of Ether Probes. This will alter the play of the game, especially early on, but might be useful for some games that are overloaded by too much E-Probe activity. Fixed problem with move delay that was using too much CPU. Changes to Corporate ships. A Corp ship (Requires Corp status to fly) can't be set to personal. To keep someone in your corporation out of your ship, set the password. If a corporation goes extinct, the ship you are flying will remain in your possession, but once you leave the ship you won't have access to it again. Corporate ships abandoned when the corporation goes extinct will be owned by "defunct Corp". To capture a "defunct Corp" ship, you must be a member of a corporation. In standard Trade Wars, CEO ships can never be exchanged in a Citadel. With Gold, Corporate ships (not CEO) can be exchanged, but only between members of the same corporation. GOLD: Corporate ships can't be purchased by non-corp players. GOLD: Menus for ships and planets will only offer the next page option if more ships or planets than can be displayed exist. GOLD: Only active ships and planets are shown in the game. GOLD BIGBANG: was clearing the active flag for all ships, planets and aliens, requiring you to go back and reset them all to on. This is no longer being done. GOLD BIGBANG: Added option to clear all ships, planets, and aliens to inactive. GOLD: Deleted records are not removed automatically when BIGBANG is run. They must be removed manually. You can copy a ship to a deleted spot, then remove the original ship to fill in gaps. GOLD: Added AI setting of Protective. When a player attacks an alien with this setting, that alien and all others of the same race in the same sector will attack back. GOLD: Added AI setting of Banding. Can now specify how many are typically in a group, and the aliens will tend to move around in these clusters. GOLD: Modified the spawning profile tab in the Alien Editor. The new features give much more insight into how the aliens will appear in the game depending on the parameters you select. GOLD: Added a new option to the Alien Resource menu to sample the available ships for the alien race. This takes the guesswork out of determining what ships will be available at what time in the game. GOLD: 0 days until a ship rating is available now means that the rating will always be available instead of meaning that the maximum experience for day 0 is the threshold for gaining access to a ship of this rating. From day 1 on, the threshold is defined as the maximum possible experience for that day. GOLD: Fixed several general problems with Gold and the Nonplayer server. GOLD: Added "anomalous alien" setting. If enabled, there's a one percent chance per event that an alien will be spawned as if it was from 100 to 200 days more advanced. GOLD: Unique aliens are now displayed with a gold name instead of red or cyan for good or evil. GOLD: GRUDGES!!!!! All Gold alien races now have the option of carrying a grudge against players who destroys one of their own. Here's how it works. Grudges are only maintained while the server is active, so shutting it down and restarting it will clear the grudges. If there are enough complaints about this, I'll see about saving the grudges to a the alien record. The severity of the grudge is determined by your place on the grudge list. Newer grudges are put at the top of the list and are more severe. Only ten grudges are maintained, so when a grudge reaches the bottom of the list it drops off (is forgotten). Whenever an alien attacks a begrudged player, the force of the attack is increased by the grudge level. Lastly, grudges are only created when a player destroys an alien IN VIEW OF one of the same race. If a player destroys a lone alien, no grudge will result. If one alien views the massacre, he will broadcast it to all other aliens in that race and they will ALL hold a grudge. GOLD: Aliens can regenerate. Regeneration occurs each time an alien attempts to move, and the fighters and shields of the alien will regenerate toward the average value for the current day. EXTERN: Planet collisions are now generating NavHaz. EXTERN: Planet collisions now works correctly, even with online players involved. EtherProbe now uses avoids again. Game now differentiates between "on planet" and "in citadel". When a player enters or exits the citadel, other players in the citadel will receive a message. Fighters in sector without a planet is limited to 50K. Fighters in sector with a planet is limited to 2,000,000,000. This was reversed and the upper limit for planets was set to 2,000,000. All fixed now! Added "<;> Scan Current Ship" option to computer menu. This command will display information about any ship you are flying, even if it's of an alien origin (Ferrengi, for example). If a player drops carrier during the initialization routine, the records won't be committed. When towing a player into a hostile sector, if the tower is destroyed on entering the sector, the towee is returned to the previous sector. Two game sessions with the same player cannot be active at the same time. When a new game attempts to start it will kick off the old game. Modified the message system to fix a bug that caused messages to be missed. EXTERN now runs in "multitask" mode if a player is in the game, and will run faster if no player is in the game. EXTERN: In an attempt to avoid the ship pointer bug, EXTERN now checks to see if the ship occupied by a player who's about to be terminated from inactivity is not being used by any other players. If it's being used, the ship is not deactivated. Fixed index bug: When swapping ships in Citadel, the offline player was being put into the other ship but the ship was being set to "unoccupied" status. Fixed index bug: When TEDIT and EXTERN would access certain ships, they would turn on the occupied and active flags. This is no longer the case. Fixed Shipyard bug: Two corp players could sell the same ship. Fixed Tricron: Now works with multiple players. Tricron stats are updated after each game to reflect games played by other players. GOLD: When you're flying a FedShip without enough experience, you can be stopped by the Feds. Your ship will be forfeit and you will be demoted to start of the previous rank. EXTERN: When evil port busts are not cleared because EXTERN doesn't run, they will clear the next time EXTERN is run. Before, if you had the bust clears set for every 7 days, and on the 7th day EXTERN didn't run for some reason, the busts wouldn't clear for 14 days. Now it will clear on the 8th day, and the next clear will be right on schedule. That means that if EXTERN didn't run for 3 days, then the busts get cleared, they'll be scheduled to clear again in 4 days instead of 7 to get back on track. EXTERN: Port's weren't upgrading properly because I wasn't updating the planets in the sector before checking for product. It's fixed now. Fixed "Visible while at SD" bug. This actually worked for any port. A player who was on a port could be forced to take-off and become visible to others while the online player believed he/she was still on port. This has resulted in many player deaths. TEDIT Corp editor, was only accepting first character of inputs. TEDIT Added Sysop setting for users. This will allow a player to have sysop capabilities regardless of the sysop level supplied by the drop file. For local and Internet connections, this is the only way to have sysop access. CIM will abort as soon as an abortive key is pressed. Previously, there was no way to abort these reports. NONPSERV: Aliens are effected by planetary interdictor generators. Ships can't interdict while cloaked or on a planet or port.
04/05/98 - v3.08 released Added "password entry" option. Intended for local games, this feature requires a player to maintain a password and will maintain the integrity of each players account. Added "closed game" option. Intended for tightly moderated games for both BBS and non-BBS based games. Using the new "Closed Game List" facility in TEDIT, sysop's can maintain a list of players allowed to play a given game. This should limit many forms of cheating, particularly dupe accounts. Fixed some problems for WinNT users running the DPMI version. Fixed a problem with the user data file being created from BigBang.
03/26/98 - v3.07 released Forget the minor revisions. Gary doesn't like it. All releases will be v3.07, v3.08, etc. They'll just come more frequently. Fixed problem created by v3.06b that caused players to go into sector 10000 after being destroyed and reentering. Removed SHARED.DLL. Was more trouble than it was worth. This increases the size of each DPMI session by about 40K, which shouldn't cause any problem. Fixed problem with Alien spawing (standard, not Gold) that allowed Aliens
in very old games to have HUGE fighters, shields, corbo, etc.
03/21/98 - v3.06b released Fixed bug that was corrupting data when capturing an alien Fixed bug that was corrupting data when podding a player Fixed bug that was allowing an online player to continue playing after being killed. Fixed bug that caused CIM to lock up if online player in CIM was killed, podded, or towed. Added "^" global for entering Computer Interrogation Mode.
03/18/98 - v3.06 Added Gold expansion functionality. Added math-coprocessor emulation to DPMI release. Fixed "runtime 200" error for fast computers. Fixed a bug that caused ships and/or players to be flagged as "on a planet" when they aren't, or flagged as not "on a planet" when they are. The result was that they were invisible in the sector, but visible to scanners, or vice versa. Rewrote the underlying output functions in an effort to consolidate
all output routines. Results are
Fixed TWTRADER.TXT and TWTRADER.ANS reports for Trader ranking. I don't know how long these haven't worked, but they work fine now. Fixed problem with BUFFER= command line option. Fixed the bound check on "Enter Corp" entry. It was allowing corp numbers greater than 50. Fixed problem with capturing Alien and Ferrengi ships. Fixed problem with DPMI version FOSSIL support. Fixed bug that was causing only positive alignment aliens to be spawned. Fixed similar bug that was causing Alien corbomite values to be either 65535 or 0. Rewrote the mail system. The previous system has been causing slowdowns and lockups, particularly when the mail file has grown beyond 500K. The new system is much more efficient and compact. Removed experimental "Persistent Info Display" option. The "quick-stats" line will now only appear when the "/" key is pressed. When transporting a planet, all online players on the planet will stay on the planet. This bug was causing players to be invisible in a sector (they were flagged as on a planet). When a corp is dispanded, planets and ships in the CEOs sector will become the property of the CEO, as with Figs, Armid and Limpet mines. Outside the sector, planets will become Rogue and ships will become Abandoned. EXTERN now processes deleted players as if the player was quitting his/her corp. This should solve the problem of "orphaned" corps with no CEO. Fixed Ether Probe bug. The probe would self-distruct if it couldn't find a path to the destination. The probe was usually unable to find a path because of avoids set by the user. The probe now ignores avoids. Can't retreat from fighters if an Interdictor Generator is present on a planet in the sector. You can if an IC is in the sector, though. Fixed bug that caused fighter report to show sectors with 0 fighters.
11/09/97 - v3.05 released Fixed bug that allowed transfer of fighters and shields as a player was selling ships at stardock. Fixed problem with lag time tracking on Win95 systems. Fighter, shield, mine corp transfers now allow 12 digits. When attacking an unoccupied ship, attack routine now detects when a player transports into the ship and handles the attack accordingly. Corp transfers no longer display cloaked players. Q-Cannon atmosphere attack was malfunctioning in two ways. First, it was firing at sector levels, and second, it wasn't destroying fighters. Messages were being displayed while a player was at a port. These messages could cause malfunctions with scripts and helpers. They have been turned off. Communications will still be displayed. They should be turned off by the player. Photon Missile update: Photon Missiles are now functioning for multiple players. Due to an oversight, the Photon Missile effect was only active for the player that launched the missile (a carry-over from the single-player v2). Now the effect exists for all players, regardless of the launcher. The player launching a Photon missile will receive notification of the duration at 10 second intervals, and at 5 seconds left, no matter what sector he/she is in. All players in the sector of the launching player receive a notification that the missile was launched. All players in the sector of the Photon blast will receive the same updates as the launcher (10 second intervals, 5 seconds left). Displaying the sector will show that a Photon blast has recently occurred, and the duration of the effect. A player may launch more than one Photon Missile, but can only track the last Missile launched. That means that the only way to gauge the duration of a Photon after launching another one is to enter the sector and check the Display. Photon Missiles can't be purchased from StarDock if they're disabled in the game. Fixed problem with attacking a ship with a Planetary Interdictor active. When the ship attempted to flee, the game would become unstable. Fixed bug that allowed pick-up/drop-off of colonists > 255 on your planet. Added TEDIT option to alter the Port regeneration rate. Values range from 1% to 200% per day. Standard is 5%, which is the rate that ports regenerate in all previous versions. Added global key >to display quick reference of player info. Also, under computer, personal settings, setting option 7, "Persistent info display" to on will cause the >key to toggle this display on or off. When on, it will be displayed at the top of the screen. Limit of 2 pods per user per day is now enforced as in MBBS. This means a player can only be "podded" twice per day. The third time results in death, even if the ship has a pod. Added a new user configuration option (C/N/8) to turn all event messages off. Added option to TEDIT to enable or disable multiple Photon missiles for a single player. By default, a player may only have one missile active at a time. Computer/Known Universe, List Avoids now formats properly to screen width, and includes CR at end of line. Course list now has a CR at end of each line. Fixed problem with day of week reporting in time functions. Embezzle busts are cleared nightly now, except for the very last bust. A setting in TEDIT now determines the frequency of bust clearing. It defaults to nightly, but can be set as high as every 28th day. T'Khasi Orion can now carry a Holo Scanner. Ferrengi Assault Trader can now carry a Density or Holo Scanner. Transport menu now offers the ability to get more detailed information about any of the ships listed. "Backtrack Key" is now only "<" instead of "<" or ",". Fixed "dupe" names. Before, someone could be in the game with BBS name "A" and alias "B", while another player was in the game under BBS name "B". This is no longer possible. When a player reenters the game in a Scout Marauder, he/she gets the minimum of 250 figs, or the Initial Fighters value, instead of up to 2500 figs. Made logic change to time routine that MIGHT have been causing some problems. When reading the time, the routine reads date, then time, and then determines the total seconds since the game started. If the date gets read, then the clock rolls over to midnight in the instant before the time gets read, the time would be interpreted as 24 hours earlier. In this event, the timing would be thrown of for that Tick. In rare cases, this could cause the "inactivity timeout" to trigger. The new approach doesn't have this problem, and is more efficient. EXTERN now cleans up the message file of any mail left in the mail file for various reasons. Mail is deleted if the destination player is inactive, or if the time of the message is over the "days til deletion" value set to delete old players. Ship's can't interdict from ANY FedSpace sector. Fixed problem with "Last Ported" reporting. Any update of the port was setting the last ported time, when it should only be set when a ship physically ports there. Attack is aborted if enemy docks or lands while you are attacking. Added hidden global, <|>, to toggle silence mode. This will simplify the task of turning off messages while scripts and helpers are running. Last bust clear operation is reported in Game Settings screen on startup menu 07/17/97 - v3.04 released Reworked bug fix from v3.03 release. See * item in that section. Several new problems appeared after making this change, so I have made another attempt at solving the problem. Added file error reporting to help clarify startup problems.
07/01/97 - v3.03 released Port reports 0 buy/sell, 0% of max until open. Port opens with 0% buy/sell. Regeneration begins at the moment of port opening. If EXTERN detects port DaysTillComplete less than 0, it sets to 0. Before, if was incrementing if less than 0. I could not see any use of negative values here. Sector entries of 599 or less require 4th digit. 600 and above are auto-CR. This is identical behavior to pre-v3 door releases. When Corporate Planet Scan was called from within a Citadel, the current planet pointer was not being reset on exit from Corp menu. This caused planet records to become confused in some cases. This has been fixed. Transfering to another ship without password doesn't ask. Transfering to another ship sets your ship to allow ship transfers. Can now blind-transwarp with ship in tow. Robbing text is now "...siphon the funds out and..." as in MBBS. Transport list handles abort properly. Added SHARE command line parameter. Calling with the SHARE override causes TW2002 to skip the share detection routine and assume SHARE is loaded. Added message for EtherProbe entering sector. Need more detail on how to handle this event. * Made file-access change with potential to effect multiple areas of the game. Certain combinations of accesses were causing information to be lost. This change will fix that problem, but could conceivably introduce some other problem(s). Fixed combat bug, not losing any fighters, caused by the previous error. Can now recover credits for destroying ships other than escape pod and marauder. Fixed bug in buy-ship routine that wasn't committing the credits to the user record properly. This is the source of the profitable ship trade bug. Changed file access mode of overlay to DENYNONE. This was causing the error 150 when the overlay wasn't loaded into EMS. Fixed bug that caused the corp attack failsafe to trigger for non-corp unnocupied ships. Fixed bug that was reporting personal ship as corp ship destroyed in log file. Fixed bug that was allowing unmanned ships to flee a sector after an attack even if an interdictor generator is present. Fixed bug that was reading the sysop level incorrectly from the drop file. Fixed various bugs that allowed planets to appear as both corporate and personal. Fixed a bug with the "landing planet list" that was corrupting planet records. Input is echoed in CIM.
06/01/97 - v3.02 released Attacking with 0 ships is no longer allowed! Removed SHARE detection for OS2 machines. EXTERN: Fixed GP resulting from delete player routine. EXTERN: Won't evict players who are online at the time. EXTERN: Only counts offline players when counting the number of ships left in a Fed sector overnight. Conversion of message file with 0 records doesn't generate division by 0. Scan defaults to Density when 0 turns left. Long course plots are not longer truncated at 160 characters. Reporting correct ship type when destroying Aliens. Atmosphere Quasar attack is now reported. Destroying a corp owned ship, whether occupied or not, will go into the logs as Corp# instead of by the pilot's name. You can now change ownership and posture of fighters without adding or removing them from a sector. Fixed an Error 204 in the program exit procedure. This was causing many other errors to be reported as Error 204. They will now be reported properly. Added LastSectRobbed to user record so this value will persist between game sessions. This will fix the ability to exit the game and reenter to rob the same port twice in a row. Should slow down the Steal-Sell cycle. Removed 15 unnused characters from the ship record shipname field. Removed unnused fields from Sector record. Fixed a bug that was preventing Planet Upgrades from being committed to the data file under certain circumstances. This could be responsible for the occasional planet that doesn't seem to be upgrading. TEDIT: Zero entry allowed for sector warps. TEDIT: Port production values can be negative. TEDIT: < and > step through the ports displayed under Port Edit. TEDIT: Planet production rates are displayed properly. Data conversion from v2 to v3.01 loses all mine owner information. This has been fixed for conversion from v2 to v3.02, but conversion from v3.01 to v3.02 won't repair the lost owner information. Conversion from v3.00 to v3.02 works fine. Travels and Avoids data was not being written properly to the data file, causing some sector information to be lost after quitting the game. This has been fixed. Converting from v3.00 or v3.01 data will clear all avoids due to the above problem. Revised drop file read procedure to handle unexpected data more gracefully. Added DATA= parameter to assign a default directory for the data files at runtime. This directory will be overridden by a non-default node-specific data directory. Works for TW2002 and TEDIT. Changed the way TW handles the input buffer. Now, long displays that
check for Addressed several problems with DESQview. A maximum 5000 sector game
should now run in a typical DESQview window leaving enough memory for processing.
Sessions with many scarce conventional ram may only be able to run a smaller
universe.
Fixed an error with the Fossil support that caused all ports to appear
as port 1 (oops). This should improve the Fossil support somewhat.
Sector entries from 0-599 accept a four digit entry, but entries from
600 to 999 auto-return. This is identical to previous Trade Wars behavior.
04/16/97 - v3.01 released
Added periodic online verification. Each player online checks the next
player online in order by user record number. This check occurs every five
minutes. If the player being checked does not reply in 10 seconds, then
the player is removed from the online list, and some cleanup takes place
(like removing the player from a planet on which he/she cannot remain).
Added a flag to User record to indicate that the player is online. If
the program finishes properly, this flag will be set to off. If, on startup,
this flag is on, then some cleanup takes place (like removing the player
from a planet on which he/she cannot remain).
Added a low level primary record justification to commit and put procedures.
Added a check of the Online flag in the message file at the beginning
of each processing interval. If the flag is off, then it is turned back
on. This is a self-correction in case, for any reason, you fail to reply
to an Online Verification message.
Fixed pointer error with Fossil communications. Fossil is working again.
Fixed problem with left-padded field display when field contains ansi
sequences.
Revamped TWSMF.DAT message file. This file now cleans itself up as it
is used. Should result in much smaller TWSMF.DAT files in general, and
quicker access to messages.
Fixed yet another invincible planet bug.
Tri-cron won't be interrupted by messages.
Fixed guarded planet bug that caused the next planet you attempted to
land on to show as the planet that was guarded.
Fixed combat routine to handle case of 0 fighters and >0 shields.
Conversion routine detects the extra byte in TWNODE.DAT records in later
v2 betas, processes accordingly.
Fixed scan for mines. Now when emptying sector of mines, the sector
no longer shows up on scan with 0 mines.
Fixed problem with menu help screens (!) running past end of menu text.
Computer and Corp menus from citadel won't switch your planet record.
Fixed problem with Alien ship combat. Damage wasn't being committed
to the alien record when the alien fled.
Radio channels are now available from 0 to 60000.
Major messaging/mail overhaul.
The messaging system is now seperate from the user mail system. TWSMF.DAT
is now devoted to game messaging, while TWMAIL.DAT contains all mail correspondence.
The mail and message files are packed periodically for efficiency.
For mail, all messages that have been read by the user in that session
will be removed from the file as the user exits the game. They are physically
removed, and the file shrinks accordingly.
For messages, each message has a lifetime of 10 seconds. If the message
is older than 10 seconds, then it can be removed from the message file
at the next pack operation. These operations occur when a user exits the
game, or whenever the message file reaches 100 messages. This may be made
configurable in the future if necessary. As it is now, the message file
can never be greater than 101 records in length, or 17271 bytes in length.
Since the message file handles all interactivity, this will guarantee efficient
message handling.
Each user maintains a pointer to the last message processed by its session,
and all processing occurs from this point forward. This greatly limits
the possible number of message reads during an interval cycle, so that
the maximum possible is the number of messages added in 1 second (unless
this interval is increased). When the file is packed, the user receives
notification of this, and resyncronizes this pointer. I haven't seen any
losted messages, duplicate messages, or loss of message syncronization
since I made this change, but we need to watch out for this. I'm concerned
that it may happed in rare circumstances.
If a mail message was added during an active session, but not read,
it won't be removed on exit. All messages are displayed on logon, so these
messages will be removed after the next logon/logoff cycle.
Messages sent to mail via the computer mail system go into mail only,
but all computer generated messages, like fighter reports, etc, go into
the mail and are displayed for a user if that user is online. These messages
are not deleted on exit unless they have been explicitely read from the
computer mail system. This could be confusing, but it will avoid any loss
of important information. We can't guarantee just because it goes into
the real-time messaging file that it has been viewed by the user.
An online user receives notification upon receiving new mail.
Hail is now seperate from mail. You can only send a hail to an online
user. If the user isn't online, the one-line hail will be sent, but will
"fall on deaf ears". A multi-line hail mode can only be entered if the
target user is online. These messages ARE NOT ENTERED INTO USER MAIL, so
you can no longer use this function in place of the computer mail system.
One-line messages sent to a user that is not online will be lost.
FedComm/Sub-space/Hail/Mail prompts are now more explicit as to the
type of messages being entered. This avoids confusion when entering one
message and jumping into another via global commands.
Added global chat to tavern.
Fixed a transfer logic error involving ship to ship transfers like those
at the corp menu. This involved transfers between ships of different types,
where the transfer used the boundaries set by the local ship for both,
allowing the other ship to sometimes exceed it's limits.
Modified real-time message routine so that it only processes messages
that have not expired (10 seconds lifetime). Also, put zero-record hold
in the Add Message routine to syncronize adds and deletes. Now, adds and
deletes can only occur once at a time, but there is no file locking for
reads.
Revised SHARE detection. It is less strict now.
Fixed last ported report. Should now correctly report the time since
a trader ported, instead of that they just left.
Now start in sector 1 if planets not allowed.
Fixed a ship to ship combat bug related to the corp transfer bug. When
two unlike ships are in combat, the attacked ship was inheriting the field
boundaries of the attacker.
The size of the TW overlay buffer is now dynamically set depending on
the amount of free memory available to the session. This will give more
memory to those who have not been able to run the game so far (error 203).
This buffer was 100K, but can go as low as 45K with out a devastating impact
on the games performance. If the game does not use EMS or XMS for the overlay
file, then you should keep this buffer as large as possible.
04/01/97 - v3.00 released
Can remain in citadel overnight.
Fixed multiple boundary bugs effecting the last user, ship, sector,
etc.
Alien trader and Ferrengi ships are now processed on a time-base rather
than a turn base. The one-in-X move percent no longer represents a chance
that the character will move for each player turn, but a chance that the
character will move every 30 seconds. The next reasonable interval is 70
seconds, and this may be made configurable, since it would lighten the
load on slower computers. As it is, there are 10 "banks" of Aliens, Ferrengi,
and Federation Captains. Each bank attempts movement every 3rd second.
When there are 50 Ferrengi + 40 Aliens + 3 Federals, 93 non-player characters,
this averages out to 9.3 ships per bank. This is approximately 3 ships
attempting movement every second, though movement only occurs every third
second.
Planetary Shields can now be destroyed.
Ships can now be salvaged from combat properly again.
Fixed incorrect population line on corporation planet list.
Removed Auto User record now varies in size according to sectors in game, no wasted
space.
Day of week of game now reports correctly.
Command and Computer Command prompts don't display menu at CR, only
at ?.
03/05/97
Planets are once again producing properly.
Added Surrender to sector fighter menu.
NO NavHaz can be created at StarDock for any reason.
Ether-probe and Holoscan won't cause "void" prompt when scanning mined
sectors.
Interdictor generators don't function at StarDock and Terra.
Unoccupied ships can't have Interdictor on.
Fixed problems with Planetary Transport.
 Not just destroy ship.
Made some changes to combat routine regarding ship captures. Can't capture
when the ship is a Scout Marauder or Escape Pod.
Can't overwrite StarDock with a carry-over created port.
Created daily event flag to limit certain activities. These are, at
the moment, curse Grimy Trader, try to break into Corp, and jettison colonists.
There is room for 13 more such event flags.
Limited photon-wave effect on planets to those with less than 200 shields.
Fixed underground name-change routine to handle the 0-4500000 experience
range. I set the maximum amount to be charged to 999,999,999 since this
is the maximum that a trader could possibly have onhand.
For the moment, two different traders can deploy mines of one type each
in a given sector. To clarify, one trader may deploy Armid mines, while
another trader has deployed Limpet mines in the same sector.
Can launch photons in Rylos and Alpha Centauri sectors.
NavPoint menus only show sector scan if the sector is in FedSpace, the
sector is your current sector, or you have at least one fighter deployed
in that sector. Otherwise, it reports "No Scan" for that sector.
Natural disasters have been stabilized with regard to frequency of visits.
Now, the chance for a disaster is minimal if the last visit was recent,
and greater as the length between visits increases. If a planet has a habitability
of 90, there is a 10% chance of a disaster if the period between visits
is 1 day. There is a 100% chance of a disaster if the period has been 10
days. If the period is 11 days, then one disaster will occur, with a 10%
chance for a second disaster.
The ports are again upgrading. This was a bug that effected the ability
to determine a field's maximum value during a locked process, and was probably
effecting many areas of the game.
Only taxed once per day, instead of once every time you enter the game.
If an amount of experience or alignment would put you beyond the limit,
you are given the boundary value. Before, this would not give any amount
because it would go beyond the boundary.
02/28/97
CIM entry now works.
Earth now takes one turn to load colonists.
Added multiplayer code for towing. Now, towing is discontinued when
the tower or towee lands on a planet, port, or dock, or initiates an attack
Included messages for users to see when towing begins and ends.
Created new prompt attribute, Escape, so that prompts can be made to
abort in the case of some event, particularly intended to deal with tow
bugs. Now, certain prompts can be made to abort whenever the trader is
towed to another sector, falling back to the previous non- abortive prompt.
This will solve some nasty problems with prompt "carry-overs", where a
trader can circumvent a locked-out function by initiating it in a sector
where the function is not locked out, then being towed into another sector
to complete the function. An example is the destruction of StarDock, where
combat is initiated in an adjacent sector, but completed upon towing in
the StarDock sector.
NavHaz collisions were overwriting the sector containing the navhaz
with the sector to which an escape pod escaped. This is fixed now.
Fighter Xfer for corps now functional.
When player dies and then reenters, a new ship is created properly now.
Fixed those annoying messages when a new user starts up.
Activated abortive prompts, so that certain functions are aborted when
the trader is towed to another sector
Added fail-safe record sync check to abort operations which may overwrite
another record.
When a trader is online and on a planet, and the planet is blown up
from under them, they will be dropped to the main command prompt.
When a trader is online and evicted from a citadel, he is dropped to
the main command prompt.
Can now receive port report from auto-pilot prompt.
Occupied corp ships aren't displayed on the X-Port list.
Interdicting flag is set to off when purchasing a new ship, and when
escaping in an escape pod. This solves bugs with interdiction carrying
over to new ships.
Density scan showing occupied ships as 40, unoccupied as 38, and cloaked
ships as 0 with Anom Yes
Can't upgrade a port that is under construction.
After blowing up a planet, trader "reenters" sector triggering NavHaz
check.
Ports are again fighting back.
Some locked transactions were not resetting the records after a failed
attempt. I'm not aware of any bugs stemming from this, but there probably
are some. It has been fixed.
02/22/97
Citadel now upgrading correctly for level 2 and beyond!
Many revision to guarantee identical output between previous DOS versions
and 2MP.
Revisions to Interrogation mode: Can now be entered from any prompt,
but not from within Interrogation. No global functions work in Interrogation
mode. Interrogation mode can timeout from inactivity. Interrogation mode
will exit if allotted time expires. For debugging purposes, Interrogation
mode can be entered with the key sequence of "$%^&*(", or SHIFT-4 through
SHIFT-9;
Modified port and planet update functions for 1 second resolution upgrade.
Fixed a data-conversion bug that inverted the BUYing amount for ports
when converting from earlier TW data to 2MP data.
Overhauled "upgrade port" function. Port production is now maxed out
at 65530.
"Upgrade port" is now a locked function to avoid multi-player conflicts.
Finished make-over for TEDIT.
StarDock now starts at 100% BUY when game is reset.
Turns return to a player pro-rated at 1 hour intervals.
Sector Fighter combat is now multiplayer safe.
02/17/97
All text removed from executables and placed into a data file, STRTABLE.D8A,
with an index called STRTABLE.NDX. Encrypted to discourage meddling sysops
from corrupting the string table ;).
Global commands can only be first character entered on any command line.
A global commands cannot be called from within itself. For example,
Who's Playing can be called from within Fed. Comm-Link, but Fed. Comm-Link
cannot be called from within Fed. Comm-Link.
Create planet now outputs like previous versions for helper compatibility.
Long input lines, like non-wrapping chat lines, don't automatically
continue when max characters are entered. A Refined Gary's auto-entry sector input at main command line so that
a player cannot enter an invalid sector. For example, if the maximum number
of sectors in the game is 1000, and a player enters 101, the value is automatically
accepted since any fourth digit would put the sector over the limit. Also,
if the user has entered 100, then the only further input accepted would
be a Major revision of input routines to guarantee handling of global commands,
time-on timeout, inactivity timeout, dropped carrier, etc, at all prompts.
Watch for and report minor changes in prompt functionality for compatibility
with helpers.
02/12/97
Fixed Corp fighters display, now shows corp number and corp name.
Planet "Take All" command now takes Equipment, Organics, and then Fuel.
The order was reversed.
Citadel sector display now shows correct warps when user enters game
on planet.
Upgrading citadel now takes correct product amounts, and correct number
of days.
Can press space-bar to interrupt autopilot and bring up autopilot menu.
Grimy Trader now only reports 1 port on a trace, pending Gary's approval.
Planet scan now shows all totals for Personal and Corp.
Planet prompt is back to normal.
Robbing port now functional.
02/06/97
Added shield totals to Compute/Personal Planet scan and Corp/Corp Planet
scan.
Fixed multiple bugs where alignment and/or experience change was not
being committed to user record.
Planetary Negotiation now allows maximum credit transfer amount to be
entered, rather than the traders on-hand credit amount.
Fixed rare general file bug that kept record changes from committing.
When buying a ship without trade-in, trader stays in original ship,
and new ship appears in orbit at stardock.
When selling an extra ship, asks for verification before completing
the deal.
Fixed "retreat from fighters" routine. Can't retreat if previous sector
was a one-way warp, or if the trader transwarp in from a non-adjacent sector.
Attacking port won't cause negative stock percentages.
Warps out of sector show up at Citadel prompt.
Game pauses after new planet ansi screen.
02/05/97
Removed sexist reference to trader, using "his" in various locations.
Traders now recieve full messaging throughout the game, except:
Messages are purged when user exits to Start Menu, instead of when user
exits the door.
No more autopilot prompt in destination sector.
Program should now exit from within any prompt at end of game time.
02/04/97
Long range scan now reports other users in scanned sectors.
Corp ships don't revert to personal when player transports in.
Leave colonists no longer displays "123" prompt.
Removed confusing message "Leaving Personal Fighters on Corporate Planet"
from Take/Leave Fighters function. Fighters are always considered to be
corp or personal depending on Planet or Ship affiliation.
"Take/Leave Fighters" prompt now only one keypress (no enter required).
Fixed bug that resulted in multiple instances like the previous error.
Fixed problem with defensive rating of ports.
File lock attempts now time-out. Default is a 10 second time-out, but
this can be altered. Players getting stuck online during a locked-file
routine won't cause others to get stuck online. After the time-out, they
will be booted from the game.
All halts are now accompanied by a write to the TWERR.LOG describing
the condition of the halt.
Comm-links and "Who's playing" are now global commands. These can be
invoked from anywhere in the game except from within a global command,
"Announcement", "Send Mail", or while viewing docs.
Changed main menu to seperate global commands.
Changed comm-link prompts to make it more obvious when they are invoked.
Fixed "Etherprobe" routine to display something other than your current
sector.
Added hidden "Back-track" key from the main command prompt, '<' (or
just ',' to avoid excessive pressing of the shift key). The routine moves
your ship to the last sector you visited. This works well for adjacent
port pairs.
Fixed "Buy Ship" routine to eliminate record corruption due to dropped
carrier or system crash.
New ship created during "Buy Ship" won't be orphaned by a dropped carrier
or program crash prior to the completion of the routine.
Player on planet, stardock, or port when program crashes or carrier
is dropped won't remain hidden. Only players remaining in a citadel will
stay planet-/ port-side.
Fixed EXTERN so that it won't end in error if the message or global
message file is in use when it runs. It reports that the file was locked,
then continues without purging it.
EXTERN can now run while users are in the game.
02/02/97
Long range scan now reports other users in scanned sectors.
Corp ships don't revert to personal when player transports in.
Leave colonists no longer displays "123" prompt.
Removed confusing message "Leaving Personal Fighters on Corporate Planet"
from Take/Leave Fighters function. Fighters are always considered to be
corp or personal depending on Planet or Ship affiliation.
"Take/Leave Fighters" prompt now only one keypress (no enter required).
Fixed problem with defensive rating of ports.
01/29/97
Fixed a nasty file access error which could potentially destroy any
type of game record (ship, user, planet, etc). This should be responsible
for most of the apparent bad pointer errors that have been cropping up.
Fixed various problems with destroyed ship routine. Destroyed ships
weren't being made available as usable ship numbers, user records weren't
being updated properly, and some other probs I can't remember off hand.
This should be working much better now, but I can't guarantee it's perfect.
Keep an eye on it.
01/27/97
Citadel now reports other traders in the citadell.
|
|
|
|


Home
Sales
Pat's Salmon Cookies
Production Data:
(number of cookies sold)
First name:
Last name:
Email Address: (ex<EMAIL_ADDRESS>Phone Number: (ex.<PHONE_NUMBER>)
How many Salmon
Cookies would you like to buy?
Any final comments
before you submit your order?


QCameraFocusControl Class
The QCameraFocusControl class supplies control for focusing related camera parameters. More...
| Header: | #include <QCameraFocusControl> |
| qmake: | QT += multimedia |
| Inherits: | QMediaControl |
Public Functions
| ~QCameraFocusControl() | |
| virtual QPointF | customFocusPoint() const = 0 |
| virtual QCameraFocus::FocusModes | focusMode() const = 0 |
| virtual QCameraFocus::FocusPointMode | focusPointMode() const = 0 |
| virtual QCameraFocusZoneList | focusZones() const = 0 |
| virtual bool | isFocusModeSupported(QCameraFocus::FocusModes mode) const = 0 |
| virtual bool | isFocusPointModeSupported(QCameraFocus::FocusPointMode mode) const = 0 |
| virtual void | setCustomFocusPoint(const QPointF &point) = 0 |
| virtual void | setFocusMode(QCameraFocus::FocusModes mode) = 0 |
| virtual void | setFocusPointMode(QCameraFocus::FocusPointMode mode) = 0 |
- 32 public functions inherited from QObject
Signals
| void | customFocusPointChanged(const QPointF &point) |
| void | focusModeChanged(QCameraFocus::FocusModes mode) |
| void | focusPointModeChanged(QCameraFocus::FocusPointMode mode) |
| void | focusZonesChanged() |
- 2 signals inherited from QObject
Protected Functions
| QCameraFocusControl(QObject *parent = Q_NULLPTR) |
- 9 protected functions inherited from QObject
Macros
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QCameraFocusControl class supplies control for focusing related camera parameters.
The interface name of QCameraFocusControl is org.qt-project.qt.camerafocuscontrol/5.0
as defined in QCameraFocusControl_iid.
See also QMediaService::requestControl() and QCamera.
Member Function Documentation
[protected]
QCameraFocusControl::QCameraFocusControl(QObject *parent = Q_NULLPTR)
Constructs a camera control object with parent.
QCameraFocusControl::~QCameraFocusControl()
Destruct the camera control object.
[pure virtual]
QPointF QCameraFocusControl::customFocusPoint() const
Return the position of custom focus point, in relative frame coordinates: QPointF(0,0) points to the left top frame point, QPointF(0.5,0.5) points to the frame center.
Custom focus point is used only in FocusPointCustom focus mode.
See also setCustomFocusPoint().
[signal]
void QCameraFocusControl::customFocusPointChanged(const QPointF &point)
Signal is emitted when the custom focus point is changed.
See also QCameraFocusControl::customFocusPoint() and QCameraFocusControl::setCustomFocusPoint().
[pure virtual]
QCameraFocus::FocusModes QCameraFocusControl::focusMode() const
Returns the focus mode being used.
See also setFocusMode().
[signal]
void QCameraFocusControl::focusModeChanged(QCameraFocus::FocusModes mode)
Signal is emitted when the focus mode is changed, usually in result of QCameraFocusControl::setFocusMode call or capture mode changes.
See also QCameraFocusControl::focusMode() and QCameraFocusControl::setFocusMode().
[pure virtual]
QCameraFocus::FocusPointMode QCameraFocusControl::focusPointMode() const
Returns the camera focus point selection mode.
See also setFocusPointMode().
[signal]
void QCameraFocusControl::focusPointModeChanged(QCameraFocus::FocusPointMode mode)
Signal is emitted when the focus point mode is changed, usually in result of QCameraFocusControl::setFocusPointMode call or capture mode changes.
See also QCameraFocusControl::focusPointMode() and QCameraFocusControl::setFocusPointMode().
[pure virtual]
QCameraFocusZoneList QCameraFocusControl::focusZones() const
Returns the list of zones, the camera is using for focusing or focused on.
[signal]
void QCameraFocusControl::focusZonesChanged()
Signal is emitted when the set of zones, camera focused on is changed.
Usually the zones list is changed when the camera is focused.
See also QCameraFocusControl::focusZones().
[pure virtual]
bool QCameraFocusControl::isFocusModeSupported(QCameraFocus::FocusModes mode) const
Returns true if focus mode is supported.
[pure virtual]
bool QCameraFocusControl::isFocusPointModeSupported(QCameraFocus::FocusPointMode mode) const
Returns true if the camera focus point mode is supported.
[pure virtual]
void QCameraFocusControl::setCustomFocusPoint(const QPointF &point)
Sets the custom focus point.
If camera supports fixed set of focus points, it should use the nearest supported focus point, and return the actual focus point with QCameraFocusControl::focusZones().
See also QCameraFocusControl::customFocusPoint() and QCameraFocusControl::focusZones().
[pure virtual]
void QCameraFocusControl::setFocusMode(QCameraFocus::FocusModes mode)
Set the focus mode to mode.
See also focusMode().
[pure virtual]
void QCameraFocusControl::setFocusPointMode(QCameraFocus::FocusPointMode mode)
Sets the camera focus point selection mode.
See also focusPointMode().
Macro Documentation
QCameraFocusControl_iid
org.qt-project.qt.camerafocuscontrol/5.0
Defines the interface name of the QCameraFocusControl class.


Hello, Code School!
Learn Clean Code
Learn Programming Frameworks
Structure of Programming
Other tips and tricks
Fullstack Programming


who iam i ?
iam qusai nayef alqais . born in 1993 march 18 . and there are a lot of thing that i love to do and shear with ather am a person who is positive about every aspect of life. There are many things I like to do, to see, and to experience.  I like to be alone, I like to be surrounded by people. and right noe iam studant at ASAC for softwaer devlopment . and in past i use to own a company that i closed it during covid19.
my education
EXPERIENCE
and at the last we all are have a goal to achive and main is not deferent in short tearm may goal is finised this courses and start a new job and in longe tearm recreat my company again.


| Total net profit | -20.41 | Gross profit | 3.56 | Gross loss | -23.97 |
| Profit factor | 0.15 | Expected payoff | -1.7 | ||
| Absolute drawdown | -20.41 | Maximal drawdown (%) | 21.67 (1719.84%) | ||
| Total trades | 12 | Profit trades (% of total) | 4 (33.33%) | Loss trades (% of total) | 8 (66.67%) |
| Long positions (won %) | 4 (0.0%) | Short positions (won %) | 8 (50.0%) | ||
| Largest | profit trade | 1.86 | loss trade | -3.19 | |
| Average | profit trade | 0.89 | loss trade | -3.0 | |
| Minimum | profit trade | 0.02 | loss trade | -2.73 | |
| Maximum | take profit in pips | 39.2 | stop loss in pips | -33.0 | |
| Average | take profit in pips | 16.7 | stop loss in pips | -29.6 | |
| Minimum | take profit in pips | 0.1 | stop loss in pips | -23.8 | |
| Maximum | Reward-Risk | 1.3 | Duration in minutes | 4167 | |
| Average | Reward-Risk | 0.6 | Duration in minutes | 1057.3 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 44 | |
| Maximum | consecutive wins (profit in money) | 1.0 (1.26) | consecutive losses (loss in money) | 3.0 (-8.67) | |
| Average | consecutive wins | 1.0 | consecutive losses | 1.0 |
| Total net profit | -12.13 | Gross profit | 0.0 | Gross loss | -12.13 |
| Profit factor | 0.0 | Expected payoff | -3.03 | ||
| Absolute drawdown | -12.13 | Maximal drawdown (%) | 9.06 (-295.11%) | ||
| Total trades | 4 | Profit trades (% of total) | 0 (0.0%) | Loss trades (% of total) | 4 (100.0%) |
| Largest | profit trade | 0.0 | loss trade | -3.19 | |
| Average | profit trade | 0.0 | loss trade | -3.03 | |
| Minimum | profit trade | 0.0 | loss trade | -2.73 | |
| Maximum | take profit in pips | 23.9 | stop loss in pips | -31.5 | |
| Average | take profit in pips | 14.0 | stop loss in pips | -30.2 | |
| Minimum | take profit in pips | 5.0 | stop loss in pips | -27.3 | |
| Maximum | Reward-Risk | 0.9 | Duration in minutes | 1271.0 | |
| Average | Reward-Risk | 0.5 | Duration in minutes | 540.0 | |
| Minimum | Reward-Risk | 0.2 | Duration in minutes | 116.0 | |
| Maximum | consecutive wins (profit in money) | 0.0 (0.0) | consecutive losses (loss in money) | 4.0 (-12.13) | |
| Average | consecutive wins | 0.0 | consecutive losses | 4.0 |
| Total net profit | -8.28 | Gross profit | 3.56 | Gross loss | -11.84 |
| Profit factor | 0.3 | Expected payoff | -1.04 | ||
| Absolute drawdown | -8.28 | Maximal drawdown (%) | 9.96 (592.86%) | ||
| Total trades | 8 | Profit trades (% of total) | 4 (50.0%) | Loss trades (% of total) | 4 (50.0%) |
| Largest | profit trade | 1.86 | loss trade | -3.02 | |
| Average | profit trade | 0.89 | loss trade | -2.96 | |
| Minimum | profit trade | 0.02 | loss trade | -2.8 | |
| Maximum | take profit in pips | 39.2 | stop loss in pips | -33.0 | |
| Average | take profit in pips | 18.1 | stop loss in pips | -29.3 | |
| Minimum | take profit in pips | 0.1 | stop loss in pips | -23.8 | |
| Maximum | Reward-Risk | 1.3 | Duration in minutes | 4167.0 | |
| Average | Reward-Risk | 0.6 | Duration in minutes | 1316.0 | |
| Minimum | Reward-Risk | Duration in minutes | 44.0 | ||
| Maximum | consecutive wins (profit in money) | 2.0 (1.68) | consecutive losses (loss in money) | 2.0 (-6.02) | |
| Average | consecutive wins | 1.0 | consecutive losses | 1.0 |


--- layout: post title: Why App Management Is Becoming A Differentiator for Services Providers date: '2012-01-05T12:42:56-08:00' tags: tumblr_url: http://alexhwilliams.tumblr.com/post/15358510630/why-app-management-is-becoming-a-differentiator-for ---


Python API Reference¶
nghttp2 offers some high level Python API to C library. The bindings currently provide HPACK compressor and decompressor classes and HTTP/2 server class.
The extension module is called nghttp2
.
make
will build the bindings. The target Python version is
determined by configure script. If the detected Python version is not
what you expect, specify a path to Python executable in PYTHON
variable as an argument to configure script (e.g., ./configure
PYTHON=/usr/bin/python3.5
).
HPACK API¶
-
class
nghttp2.
HDDeflater
(hd_table_bufsize_max=DEFLATE_MAX_HEADER_TABLE_SIZE)¶ This class is used to perform header compression. The hd_table_bufsize_max limits the usage of header table in the given amount of bytes. The default value is
DEFLATE_MAX_HEADER_TABLE_SIZE
. This is necessary because the deflater and inflater share the same amount of header table and the inflater decides that number. The deflater may not want to use all header table size because of limited memory availability. In that case, hd_table_bufsize_max can be used to cap the upper limit of table size whatever the header table size is chosen by the inflater.-
deflate
(headers)¶ Deflates the headers. The headers must be sequence of tuple of name/value pair, which are byte strings (not unicode string).
This method returns the deflated header block in byte string. Raises the exception if any error occurs.
-
set_no_refset
(no_refset)¶ Tells the deflater not to use reference set if no_refset is evaluated to
True
. If that happens, on each subsequent invocation ofdeflate()
, deflater will clear up refersent set.
-
change_table_size
(hd_table_bufsize_max)¶ Changes header table size to hd_table_bufsize_max byte. if hd_table_bufsize_max is strictly larger than
hd_table_bufsize_max
given in constructor,hd_table_bufsize_max
is used as header table size instead.Raises the exception if any error occurs.
-
get_hd_table
()¶ Returns copy of current dynamic header table.
-
The following example shows how to deflate header name/value pairs:
import binascii, nghttp2
deflater = nghttp2.HDDeflater()
res = deflater.deflate([(b'foo', b'bar'),
(b'baz', b'buz')])
print(binascii.b2a_hex(res))
-
class
nghttp2.
HDInflater
¶ This class is used to perform header decompression.
-
inflate
(data)¶ Inflates the deflated header block data. The data must be byte string.
Raises the exception if any error occurs.
-
change_table_size
(hd_table_bufsize_max)¶ Changes header table size to hd_table_bufsize_max byte.
Raises the exception if any error occurs.
-
get_hd_table
()¶ Returns copy of current dynamic header table.
-
The following example shows how to inflate deflated header block:
deflater = nghttp2.HDDeflater()
data = deflater.deflate([(b'foo', b'bar'),
(b'baz', b'buz')])
inflater = nghttp2.HDInflater()
hdrs = inflater.inflate(data)
print(hdrs)
-
nghttp2.
print_hd_table
(hdtable)¶ Convenient function to print hdtable to the standard output. The hdtable is the one retrieved by
HDDeflater.get_hd_table()
orHDInflater.get_hd_table()
. This function does not work if header name/value cannot be decoded using UTF-8 encoding.In output,
s=N
means the entry occupiesN
bytes in header table. Ifr=y
, then the entry is in the reference set.
-
nghttp2.
DEFAULT_HEADER_TABLE_SIZE
¶ The default header table size, which is 4096 as per HTTP/2 specification.
-
nghttp2.
DEFLATE_MAX_HEADER_TABLE_SIZE
¶ The default header table size for deflater. The initial value is 4096.
HTTP/2 servers¶
Note
We use asyncio
for HTTP/2 server classes, and ALPN.
Therefore, Python 3.5 or later is required to use these objects.
To explicitly configure nghttp2 build to use Python 3.5, specify
the PYTHON
variable to the path to Python 3.5 executable when
invoking configure script like this:
$ ./configure PYTHON=/usr/bin/python3.5
-
class
nghttp2.
HTTP2Server
(address, RequestHandlerClass, ssl=None)¶ This class builds on top of the
asyncio
event loop. On construction, RequestHandlerClass must be given, which must be a subclass ofBaseRequestHandler
class.The address must be a tuple of hostname/IP address and port to bind. If hostname/IP address is
None
, all interfaces are assumed.To enable SSL/TLS, specify instance of
ssl.SSLContext
in ssl. Before passing ssl toBaseEventLoop.create_server()
, ALPN protocol identifiers are set usingssl.SSLContext.set_npn_protocols()
.To disable SSL/TLS, omit ssl or specify
None
.-
serve_forever
()¶ Runs server and processes incoming requests forever.
-
-
class
nghttp2.
BaseRequestHandler
(http2, stream_id)¶ The class is used to handle the single HTTP/2 stream. By default, it does not nothing. It must be subclassed to handle each event callback method.
The first callback method invoked is
on_headers()
. It is called when HEADERS frame, which includes request header fields, is arrived.If request has request body,
on_data()
is invoked for each chunk of received data chunk.When whole request is received,
on_request_done()
is invoked.When stream is closed,
on_close()
is called.The application can send response using
send_response()
method. It can be used inon_headers()
,on_data()
oron_request_done()
.The application can push resource using
push()
method. It must be used beforesend_response()
call.A
BaseRequestHandler
has the following instance variables:-
client_address
¶ Contains a tuple of the form
(host, port)
referring to the client's address.
-
stream_id
¶ Stream ID of this stream
-
scheme
¶ Scheme of the request URI. This is a value of
:scheme
header field.
-
method
¶ Method of this stream. This is a value of
:method
header field.
-
host
¶ This is a value of
:authority
orhost
header field.
-
path
¶ This is a value of
:path
header field.
-
headers
¶ Request header fields.
A
BaseRequestHandler
has the following methods:-
on_headers
()¶ Called when request HEADERS is arrived. By default, this method does nothing.
-
on_data
(data)¶ Called when a chunk of request body data is arrived. This method will be called multiple times until all data are received. By default, this method does nothing.
-
on_request_done
()¶ Called when whole request was received. By default, this method does nothing.
-
on_close
(error_code)¶ Called when stream is about to close. The error_code indicates the reason of closure. If it is
0
, the stream is going to close without error.
-
send_response
(status=200, headers=None, body=None)¶ Send response. The status is HTTP status code. The headers is additional response headers. The :status header field will be appended by the library. The body is the response body. It could be
None
if response body is empty. Or it must be instance of eitherstr
,bytes
,io.IOBase
or callable, called body generator, which takes one parameter, size. The body generator generates response body. It can pause generation of response so that it can wait for slow backend data generation. When invoked, it should return tuple, byte string at most size length and flag. The flag is eitherDATA_OK
,DATA_EOF
orDATA_DEFERRED
. For non-empty byte string and it is not the last chunk of response,DATA_OK
must be returned as flag. If this is the last chunk of the response (byte string could beNone
),DATA_EOF
must be returned as flag. If there is no data available right now, but additional data are anticipated, return tuple (None
,DATA_DEFERRED
). When data arrived, callresume()
and restart response body transmission.Only the body generator can pause response body generation; instance of
io.IOBase
must not block.If instance of
str
is specified as body, it will be encoded using UTF-8.The headers is a list of tuple of the form
(name, value)
. Thename
andvalue
can be either byte string or unicode string. In the latter case, they will be encoded using UTF-8.Raises the exception if any error occurs.
-
push
(path, method='GET', request_headers=None, status=200, headers=None, body=None)¶ Push a specified resource. The path is a path portion of request URI for this resource. The method is a method to access this resource. The request_headers is additional request headers to access this resource. The
:scheme
,:method
,:authority
and:path
are appended by the library. The:scheme
and:authority
are inherited from request header fields of the associated stream.The status is HTTP status code. The headers is additional response headers. The
:status
header field is appended by the library. The body is the response body. It has the same semantics of body parameter ofsend_response()
.The headers and request_headers are a list of tuple of the form
(name, value)
. Thename
andvalue
can be either byte string or unicode string. In the latter case, they will be encoded using UTF-8.Returns an instance of
RequestHandlerClass
specified inHTTP2Server
constructor for the pushed resource.Raises the exception if any error occurs.
-
resume
()¶ Signals the restarting of response body transmission paused by
DATA_DEFERRED
from the body generator (seesend_response()
about the body generator). It is not an error calling this method while response body transmission is not paused.
-
-
nghttp2.
DATA_OK
¶ DATA_OK
indicates non empty data is generated from body generator.
-
nghttp2.
DATA_EOF
¶ DATA_EOF
indicates the end of response body.
-
nghttp2.
DATA_DEFERRED
¶ DATA_DEFERRED
indicates that data are not available right now and response should be paused.
The following example illustrates HTTP2Server
and
BaseRequestHandler
usage:
#!/usr/bin/env python
import io, ssl
import nghttp2
class Handler(nghttp2.BaseRequestHandler):
def on_headers(self):
self.push(path='/css/style.css',
request_headers = [('content-type', 'text/css')],
status=200,
body='body{margin:0;}')
self.send_response(status=200,
headers = [('content-type', 'text/plain')],
body=io.BytesIO(b'nghttp2-python FTW'))
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ctx.options = ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3
ctx.load_cert_chain('server.crt', 'server.key')
# give None to ssl to make the server non-SSL/TLS
server = nghttp2.HTTP2Server(('<IP_ADDRESS>', 8443), Handler, ssl=ctx)
server.serve_forever()
The following example illustrates HTTP/2 server using asynchronous response body generation. This is simplified reverse proxy:
#!/usr/bin/env python
import ssl
import os
import urllib
import asyncio
import io
import nghttp2
@asyncio.coroutine
def get_http_header(handler, url):
url = urllib.parse.urlsplit(url)
ssl = url.scheme == 'https'
if url.port == None:
if url.scheme == 'https':
port = 443
else:
port = 80
else:
port = url.port
connect = asyncio.open_connection(url.hostname, port, ssl=ssl)
reader, writer = yield from connect
req = 'GET {path} HTTP/1.0\r\n\r\n'.format(path=url.path or '/')
writer.write(req.encode('utf-8'))
# skip response header fields
while True:
line = yield from reader.readline()
line = line.rstrip()
if not line:
break
# read body
while True:
b = yield from reader.read(4096)
if not b:
break
handler.buf.write(b)
writer.close()
handler.buf.seek(0)
handler.eof = True
handler.resume()
class Body:
def __init__(self, handler):
self.handler = handler
self.handler.eof = False
self.handler.buf = io.BytesIO()
def generate(self, n):
buf = self.handler.buf
data = buf.read1(n)
if not data and not self.handler.eof:
return None, nghttp2.DATA_DEFERRED
return data, nghttp2.DATA_EOF if self.handler.eof else nghttp2.DATA_OK
class Handler(nghttp2.BaseRequestHandler):
def on_headers(self):
body = Body(self)
asyncio.async(get_http_header(
self, 'http://localhost' + self.path.decode('utf-8')))
self.send_response(status=200, body=body.generate)
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ctx.options = ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3
ctx.load_cert_chain('server.crt', 'server.key')
server = nghttp2.HTTP2Server(('<IP_ADDRESS>', 8443), Handler, ssl=ctx)
server.serve_forever()


Drag column names across matching required fields
Column names that matched a required field exactly are moved automatically


NKG Project Gallery 2011
January 2011
Boriana Kantcheva
March 2011
Marja Lianko
May 2011
Group Exhibition
July 2011
Dennis Cordell/Jodi Colella
August 2011
Summer Group Exhibition
September 2011
Katharena Rentumis
October 2011
Tsevetelina Spirinotova
November 2011
Rick Zonghi
December 2011
Samantha Croteau
February 2012
TBA
July 2012
Donna Catanzaro


Let sum
be a function that takes two arguments
a,b
and returns their sum a+b
. There is a
recursive algorithm which only needs the functions successor and
predecessor to perform the computation.
succ = |x| x+1 pred = |x| x-1 sum = |a,b| a if b==0 else sum(succ(a),pred(b))
Inside of the last function there is a call to the global variable
sum
which points to the function itself. Note that
because of this we are not allowed to change the name of the function
and overwrite its old name. Instead of using a global variable we
can use a private variable which will point to the function itself more
directly. Then overwriting the old name becomes possible.
sum = fn f|a,b| a if b==0 else f(succ(a),pred(b)) end # Now valid old_sum = sum sum = some_other_function
Normal control flow has a specific restriction which is dissolved if we regard functions as objects that can be stored in variables and passed to other functions.
In normal control flow a program can call a subprogram which can call another subprogram which can call another subprogram and so on. The program can choose which subprogram is called by using if-statements, but knows already what subprograms are avaiable. What if the program does not know about the subprograms it can call? Not that the number of possible subprograms is too large, but that the program really does not know the subprogram in before.
If the subprogram to call is stored in a global variable, a compound object or passed as an argument, the program only needs to know the subprogram just before the call.
One of the easiest examples is the function map
which applies a given function to each element of a list.
map = fn|a,f| b=[] for x in a b.push(f(x)) end return b end A = [1,2,3,4] F = |x| 2*x print(map(A,F)) # Output: # [2, 4, 6, 8]
Interestingly, passing functions allows the construction of custom control structures. A basic for loop is written without much effort.
For = fn|a,b,f| i=a while i<=b f(i) i++ end end For(1,4,fn|i| print(i, "^ = ", str(2^i).rjust(2,"0")) end) # 2^1 = 02 # 2^2 = 04 # 2^3 = 08 # 2^4 = 16
Let us implement numerical differentiation. The first way one can think to do this, is to use the definition of the derivative directly.
diff = fn|f,x| h=0.001 return (f(x+h)-f(x))/h end
This is a little bit naive. The following algorithm does it better, because it cancels out errors.
diff = fn|f,x| h=0.001 return (f(x+h)-f(x-h)/(2*h) end
The differential operator can also be seen as an operator that takes a function and returns a function (the derivative). If we use currying, we can use both views directly.
D = |f| |x| diff(f,x)
Now D
is the differential operator, D(f)
is the first derivative and D(f)(x)
is the same
as diff(f,x)
. And that is simply currying. The
operator D
is the curried form of diff
.
In Moss we are able to generate functions from data at runtime. To achieve this, it must be possible to bind some data to a function dynamicly. Such a binding is called closure.
A simple example is the conversion of a list a
into a function f
, so
that f(i)==a[i]
for all indices of a
.
> fn = |a| |i| a[i] > f = fn([4,2,3,1])
Furthermore, the bound data can itself be a function, because data, that are all kinds of objects. A basic example is again the differential operator.
Moss has only (only has) "call by value". The following code does
not work, because city
is called by value. We cannot
modify the variable city
from inside of the function
stars
.
function stars(s) s="*"+s+"*" end city = "London" stars(city) print(city) # London
If we want reference parameters we have to use a reference variable. Such a variable can be simulated as a list with only one element.
function stars(a) a[0]="*"+a[0]+"*" end city = ["London"] stars(city) print(city[0]) # *London*
An object can be used instead of a list. If there are many arguments, this has better readability.
function stars(s) s.value = "*"+s.value+"*" end city = object() city.value = "London" stars(city) print(city.value) # *London*
If the formal argument of a function is prefixed by an asterisk, the argument list might have any argument count and will be automatically converted into a list.
> p = |*a| a.join("|") > p(1,2,3,4) "1|2|3|4"
There may be obligatory arguments.
> p = |x,y,*a| x+a.join("|")+y > p("(",")",1,2,3,4) "(1|2|3|4)"
In most situations it is preferable to use explicit lists instead. That is, to simply remove the asterisks. Then the function call is as follows.
> p("(",")",[1,2,3,4]) "(1|2|3|4)"
For the last formal argument, a default value may be specified. If the actual argument is omitted, this default value is taken.
p = |x,y,sep=", "| ["(",x,sep,y,")"].join() > p(1,2) "(1, 2)" > p(1,2,"|") "(1|2)"
Named arguments can be simulated by dictionarys.
> p = |d| ["(",d["x"],d["sep"],d["y"],")"].join() > p({x=1,y=2,sep="|"}) "(1|2)"
For convenience, such an dictionary can be unpacked, allowing named default arguments:
function p(d) {x,y,sep=", "}=d return ["(",x,sep,y,")"].join() end
A default configuration could be given for everything:
function p(d={}) {x="x", y="y", sep=", "}=d return ["(",x,sep,y,")"].join() end
Sometimes we want a variadic function f
to take the
elements of a list as its arguments. To make this task simple,
there is an generalized application operation f.apply(a)
.
# variadic summation function > s = |*a| a.sum() # normal call > s(1,2,3,4) 10 # unpacking call > a = [1,2,3,4] > s.apply(a) 10
Now we can precisely state a feature of print
.
# One can transform print("abcd") == print("a","b","c","d") == print.apply(["a","b","c","d"]) == print.apply(list("abcd")) # So, in general, if s is a string print(s) == print.apply(list(s))
If an unpacking call gets two arguments, the first
argument is the self argument.
So, if x
is an object and m
is a two
argument method of x
, we have
x.m(a,b) == x.m.apply(x,[a,b]).
If a function f
is not variadic, it has a fixed
number of arguments. This number is determined by
f.argc()
.
An application is a general truth table printing program, that determines the table to print based on the number of arguments of a given boolean function.
function truth_table(f) a = [false,true]^f.argc() for x in a print((x+[f.apply(x)]).map(int)) end end
In Moss, every function has a hidden argument, called
self
. In a function call of the form
x.m(a,b)
, the function m
takes
a,b
as normal arguments, and x
as its
self argument. Viewed this way, m
is called
a method of x
.
The self argument can be given explicitly:
f(a,b) == f(null; a,b), x.m(a,b) == x.m(x; a,b).
A simple example shows how self arguments work.
> m = |a,b| [self,a,b] > m(1,2) [null, 1, 2] > m(0;1,2) [0, 1, 2]
If m
is inserted in Str
,
all strings will have m
as a method.
> Str.m=m > "alpha".m(1,2) ["alpha", 1, 2]
Conversely, we can extract some method of
Str
.
> "tree".upper() "TREE" > upper = Str.upper > upper("tree";) "TREE"
But in most cases this is not what we want.
If you want the method upper
to be converted into a
function, simply create such a function.
> upper = |s| s.upper() > upper("tree") "TREE"
There is still a little thing to be noted: One can choose a unique name instead of "self". Let us use "x" instead of "self". Then the example from above reads:
> m = |x;a,b| [x,a,b] > m(0;1,2) [0,1,2]
This is needed in case an inner function literal shadows an outer one. So, for example
Function.ADD = |g| |x| self(x)+g(x)
will no work as intended. Instead one has to state this as
Function.add = |f;g| |x| f(x)+g(x)
wich, in this case, also looks clearly more likeable. One could have written:
Function.add = fn|g| f = self return |x| f(x)+g(x) end
But that is not for the sake of brevity.
As just said, in Moss there is no invisible times. Instead
of ab
or a b
one must write
a*b
. But the function application operator is
invisible. The expression f(x,y)
means
f applied to (x,y).
The parenthesis pair on the right hand side is obligatory.
Now note, that the left hand side of this operator can itself
be an expression. If e
is some expression, then
(e)(x,y)
means
(e) applied to (x,y).
Here are some examples.
f(x)(y) means (f applied to x) applied to y a[k](x) means a[k] applied to x
Let us define addition of functions pointwise. Look what that means.
Function.ADD = |f;g| |x| f(x)+g(x)
Now one can write (f+g)(x)
.
If t
is a pair, one can write
f[t]
instead of f(t[0],t[1])
.
That is a more general way of function application,
because one can always write f.apply([t[0],t[1]])
.
In general one has
f(x,y) == f(null; x,y) == f.apply([x,y]), a.m(x,y) == a.m(a; x,y) == a.m.apply(a,[x,y]).
In Moss one can assign two values to two variables in one statement.
x,y = 360,240 # is the same as x=360; y=240
But there is more going on here. Actually it is a shorthand. Firstly the numbers on the right hand side are bundled, so that a list is constructed. The square brackets are simply omitted. Secondly the list is deconstructed on the right hand side. The long, more powerful, form of this statement is as follows.
[x,y] = [360,240]
We want x,y
to be the coordinates of some
point of a circle line. This can be achieved by the following
function f
.
use math: pi, sin, cos f = |t,r| [r*cos(2*pi*t), r*sin(2*pi*t)] for i in 0..11 x,y = f(i/12,1) print("x = ",x,"; y = ",y) end
Sometimes one wants a local variable to survive between two function calls. We could use a global variable instead of a local one.
counter_c=0 function counter counter_c++ return counter_c end
It is wiser to clarify more clearly that c
belongs
to the function. Here is the way to go.
function counter counter.c++ return counter.c end counter.c=0
Now we are able to construct multiple instances of
counter
.
c1 = copy(counter) c2 = copy(counter) c2.c = 1000 c3 = copy(c2)
There is an alternative construction that is more didactical.
It is secure against any kind of misuse.
At first we want c
to be a private variable
of counter
.
begin global counter c=0 function counter c++ return c end end
The last program can be turned into a function that creates a counter based on a start value.
function new_counter(c) return fn|| c++ return c end end c1 = new_counter(0) c2 = new_counter(1000) c3 = copy(c2)
Lazy evaluation is not standard in Moss, but one can simulate it like in Scheme.
| Moss | Scheme | ||
|---|---|---|---|
t=|| expression
|
Now let us build such an infinite tree:
0 / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ 0 1 / \ / \ / \ / \ / \ / \ / \ / \ 0 1 1 2 / \ / \ / \ / \ 0 1 1 2 1 2 2 3 / \ / \ / \ / \ / \ / \ / \ / \ .. ... .. .. ... .. .. ... .. .. ... ..
 In this case, lazy expressions should have their own data type.
lazy_type = table str = || "lazy expression" end function delay(f) table[lazy_type] call=f end end function force(x) x.call() if type(x) is lazy_type else x end t = delay(|| 1+2) print([force(2), force(t)])
But in most constructions, a value is never a function. In such cases we can simply check for a function.
function force(x) x() if type(x) is Function else x end print([force(2), force(|| 1+2)])
In some assignment y=f(x)
,
that y
is some variable and the value f(x)
is assigned to it. But how do we interpret g(x)=y
?
A value can be assigned to a variable, but not to a value.
Therefore g(x)
on the left side cannot be a value,
but something that can be considered as variable.
In Moss, such an assignment to a function application is simply syntactic sugar.
# Any assignment of the form g(x) = y # is strictly equivalent to set_g(x,y) # Any assignment of the form a.m(x) = y # is strictly equivalent to a.set_m(x,y) # More general g(x1, ..., xn) = y a.m(x1, ..., xn) = y # are strictly equivalent to set_g(x1, ..., xn, y) a.set_m(x1, ..., xn, y) # Note that a.m(x) = y1,y2 # is the same as a.m(x) = [y1,y2] # and therefore a.set_m(x,[y1,y2])
An example. We want the dictionary data type to have a method that assigns a value to a key, but implicitly converts the key into a string in before.
extend(Map,table function get(key) return self[str(key)] end, function set_get(key,value) self[str(key)]=value end end) d = {} d.get("a") = 10 d.get(2) = 11 print(d) # Output: # {"a": 10, "2": 11} # which is not the same as # {"a": 10, 2: 11}


{% extends "base.html" %} {% block content %}
To obtain the credentials below, you must first create a Twitter application. To do so, navigate to the Twitter apps management portal and click "Create a new app." After creating your app navigate to the "Keys and Access Tokens" tab to find the credentials needed. You will need to generate an access token and access token secret upon creating your app and using it for the first time.
To obtain the credentials below, you must first create a Facebook application. To do so, navigate to the Facebook Developers portal and click "Add a New App" under the "My Apps" tab. Make sure you create a web application. After doing so you'll be be presented with your app's credentials.


{% extends 'base.html' %} {% block extrahead %} {% endblock %} {% block content %}
This website is created to display hijri calendar and official, cultural and religeous holidays from various sources, such as pakmoonsighting.pk. The web Site offers data via publicly accessible Restful API for free.
Holiday Calendar: /holiday/
Holiday Calendar displays table of public holidays observed in Americas (US/Canada) and South asian countries such as Pakistan, India and Bangladesh.
Holiday API: /api/v1/holiday/ (opens in new window)
The Holiday API provides access to religeous, Cultural and offician holidays. API is public and require no authenticatation for read-only access.
Calendar API: /api/v1/calendar/ (opens in new window)
The Calendar API provides access to two years (Y2019 and Y2020) worth of hijri calendar. API is public and require no authenticatation for read-only access.


The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
Follow Me
Work Exprience
75
25
55
85
My Working
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.


--- layout: base ---
#chaplinjs
on Freenode.One of the creators of Chaplin, is offering commercial support and training for Chaplin and Backbone-based JavaScript applications. 9elements is a software and design agency located in Berlin and Bochum, Germany. Send us a mail for more information<EMAIL_ADDRESS>Chaplin & Brunch maintainer is offering consulting & training for all Backbone-related stuff. Contact him<EMAIL_ADDRESS>Offering commerical support and training for Chaplin and Backbone-based JavaScript applications. Concordus Applications is an enterprise integration and software development firm. Email us for more information<EMAIL_ADDRESS>Offering commercial support and training for Chaplin and Backbone-based JavaScript applications. La Coopérative des Tilleuls is a software, training and web-design cooperative enterprise located in Lille, France. Send us a mail for more information: contact@les-tilleuls.coop.


--- title: Check Metadata and Upload to Zenodo keywords: fastai sidebar: home_sidebar summary: "This notebook will check the metadata according to certain norms and if they are correct, it will upload the data to Zenodo." description: "This notebook will check the metadata according to certain norms and if they are correct, it will upload the data to Zenodo." nb_path: "index.ipynb" ---
import yaml
from pathlib import Path
import pandas as pd
import sys
import requests
from IPython.display import display, Markdown
def openfile(f):
ending = f.suffix.replace('.', '')
path = str(f)
if ending == 'json':
try:
d = pd.read_json(path, orient = 'table')
except:
d = pd.read_json(path)
if ending == 'csv':
try:
d = pd.read_csv(path, delimiter = ',')
except:
try:
d = pd.read_csv(path, delimiter = '\t')
except:
d = pd.read_csv(path, delimiter = ';')
if ending == 'yaml' or ending == 'cite':
with open(path) as yml:
d = yaml.load(yml, Loader=yaml.FullLoader)
if ending == 'md':
with open(path, encoding="utf8") as file:
d = file.read()
display(Markdown(d))
return d
def findkeys(c):
ck = list(c.keys())
mk = list(c['Metadata'].keys())
prk = [list(i.keys()) for i in c['Resources']]
rk = [list(i.keys()) for i in c['Resources']][0]
ak = [list(i['Attributes'].keys()) for i in c['Resources']]
return ck, mk, prk, rk, ak
def checkVal(c, mk, ak):
mke = []
for i in mk:
if c['Metadata'][i].strip() == '':
print('Key {} may not be empty!'.format(i))
mke.append(i)
ake = []
for i in ak:
a = []
for j in range(len(i)):
if i[j].strip() == '':
print('Key {} may not be empty!'.format(i[j]))
mke.append(i[j])
if not (mke or ake):
message = None
print('All metadata keys and attributes are filled, wonderful!')
else:
message = 'bad'
return mke, ake, message
def checkkeys(pk, k):
ke = []
for i in pk:
if i not in k:
message = 'bad'
print('The key {} does not exist in your metadata, please add it!'.format(i))
ke.append(i)
else:
message = None
return ke, message
def congrat(c1, c2, c3):
if not (c1 or c2 or c3):
message = None
print('Congrats, all keys are set!')
else:
message = 'bad'
return message
def comparekeys(allfn, cf, caks, dataDFkeys):
if allfn != cf:
missf = cf - allfn
addedf = allfn - cf
missk = []
addedk = []
messages = []
print('You did not commented the file {} in your cite! Please to so!'.format(addedf))
print('The file {} is not in the directory, please remove it from the cite!'.format(missf))
messages.append('bad')
else:
missf = None
addedf = None
missk = []
addedk = []
allfn = list(allfn)
messages = []
for i in range(len(allfn)):
print(allfn[i])
print(i)
if caks[i] != dataDFkeys[i]:
misski = dataDFkeys[i] - caks[i]
addedki = caks[i] - dataDFkeys[i]
messages.append('bad')
print('You did not commented the key {} in your cite! Please to so!'.format(misski))
print('The key {} is not your data, please remove it from the cite!'.format(addedki))
missk.append(misski)
addedk.append(addedki)
print(missk)
if len(messages) == 0:
message = None
else:
message = 'bad'
return missf, addedf, missk, addedk, message
def makeEmptyUpload(sandbox, ACCESS_TOKEN):
# Create empty upload first to get the bucket_url
headers = {"Content-Type": "application/json"}
params = {'access_token': ACCESS_TOKEN}
if sandbox:
r = requests.post('https://sandbox.zenodo.org/api/deposit/depositions', params=params, json={}, headers=headers)
else:
r = requests.post('https://zenodo.org/api/deposit/depositions', params=params, json={}, headers=headers)
print(r.status_code)
bucket_url = r.json()["links"]["bucket"]
return bucket_url, params
def uploadOneFile(bucket_url, params, filepath):
# Give file
p = Path(filepath)
file = p.open("rb")
filename = p.name
# Upload file
r = requests.put("%s/%s" % (bucket_url, filename), data=file, params=params)
return r.json()
def uploadDirectory(bucket_url, params, dirpath):
# Find all files in directory
p = Path(dirpath)
allfil = list(p.glob('*'))
allfiles = [i.open("rb") for i in allfil]
allfilenames = [i.name for i in allfil]
# Upload files
rs = []
for i in range(len(allfiles)):
r = requests.put("%s/%s" % (bucket_url, allfilenames[i]), data=allfiles[i], params=params)
rs.append(r.json())
return rs
with open('./data/publprofil.yaml') as yml:
pp = yaml.load(yml, Loader=yaml.FullLoader)
pp = pp['ResearchObject']
pck, pmk, pprk, prk, pak = findkeys(pp)
p = Path('./data/ModernLocationsIberia')
allfile = list(p.glob('*'))
allfn = set([i.name for i in allfile if not i.suffix == '.cite' and not i.suffix == '.md'])
c = list(sorted([i for i in allfile if i.suffix == '.cite']))[0]
cite = openfile(c)['ResearchObject']
cck, cmk, cprk, crk, cak = findkeys(cite)
caks = [set(i) for i in cak]
try:
cf = set([i['File'.lower()] for i in cite['Resources']])
except:
cf = set([i['File'] for i in cite['Resources']])
d = list(sorted([i for i in allfile if not i.suffix == '.cite']))
dataDFkeys = [set(openfile(f).keys()) for f in d if f.suffix == '.json' or f.suffix == '.csv']
cmke, cake, message1 = checkVal(cite, pmk, pak)
c1 = checkkeys(pck, cck)
c2 = checkkeys(pmk, cmk)
c3 = []
for i in cprk:
c3.append(checkkeys(prk, i))
message2 = congrat(c1, c2, c3)
missf, addedf, missk, addedk, message3 = comparekeys(allfn, cf, caks, dataDFkeys)
If there is any error in the cite, the process is terminated; otherwise one proceed with upload.
if (message1 or message2 or message3):
sys.exit()
sandbox (for testing purposes) = sandbox ACCESS_TOKEN from https://sandbox.zenodo.org/account/settings/applications/tokens/new/
real data (for real upload) = ACCESS_TOKEN from https://zenodo.org/account/settings/applications/tokens/new/
'''
Register for a Zenodo sandbox account if you don't already have one.
Go to https://sandbox.zenodo.org/account/settings/applications/tokens/new/.
Select the OAuth scopes you need (for the quick start tutorial you need deposit:write and deposit:actions).
Please insert your just generated token for ... below.
'''
ACCESS_TOKEN = '...'
 If you want to test something always use sandbox!
bucket_url, params = makeEmptyUpload(True, ACCESS_TOKEN)
If you get a number lower than 400 everything is fine!
uploadDirectory(bucket_url, params, str(p.resolve()))


Browser storage is not supported. Options will not work.
Store offline data
Version:
n/a
Your score:
0 | 0
How to write
Please enable scripts
in Romaji?


1
Jack likes to eat sandwiches and chips.
2
Anna does her homework in the afternoon.
3
I met my cousins during my holidays.
4
Jenna chose a pink dress for her birthday.
5
The Statue of Liberty is in New York City.
6
Children love to read books by Enid Blyton.


Horizontally scrolls through the active sheet by percentage or by column number.
Syntax
HSCROLL(position, col_logical)
Position specifies the column you want to scroll to. Position can be an integer representing the column number or a fraction or percentage representing the horizontal position of the column in the sheet. If position is 0, HSCROLL scrolls through your sheet to its leftmost edge. If position is 1, HSCROLL scrolls through your sheet to its rightmost edge. For charts that do not size with the window, use a fraction or percentage.
Col_logical is a logical value specifying how the function scrolls.
If col_logical is TRUE, HSCROLL scrolls through the sheet to column position.
If col_logical is FALSE or omitted, then HSCROLL scrolls through the sheet to the horizontal position represented by the fraction position.
Remarks
To scroll to a specific column n, either use HSCROLL(n, TRUE) or use HSCROLL(n/256). To scroll to column 38, for example, use HSCROLL(38, TRUE) or HSCROLL(38/256).
If you are recording a macro and move the scroll box several times in a row, the recorder only records the final location of the scroll box, omitting any intermediate steps. Remember that scrolling does not change the active cell or the selection.
Related Functions
HLINE Horizontally scrolls through the active window by columns
HPAGE Horizontally scrolls through the active window one window at a time
VLINE Vertically scrolls through the active window by rows
VPAGE Vertically scrolls through the active window one window at a time
VSCROLL Vertically scrolls through a sheet by percentage or row number
Return to index


{% extends base_template %} {% load staticfiles %} {% block title %}Download Kolibri{% endblock title%} {% block headcss %} {% endblock headcss %} {% block bodycontents %}
Released: {{ vars.LATEST_KOLIBRI_RELEASE_DATE|default:"Recent!" }}
Supported languages
Download .exe
Install Kolibri, plus a launcher icon and tray icon.
Compatible with Windows Vista, 7, 8.1, and 10
apt-get install
Install with apt-get to get automatic updates,
for devices sometimes online (recommended)
pip install
You can run the portable offline executable if
you have Python 2.7+ or 3.4+ installed.


Kohl’s Earnings: KSS Stock Craters 19% on Mixed Q3, Lowered Outlook
KSS missed EPS estimates by 12 cents
Kohl’s (NYSE:KSS) earnings for the retail company’s third quarter of 2019 have KSS stock falling hard on Tuesday. This is due to its Non-GAAP EPS of 74 cents, which is well below Wall Street’s estimate of 86 cents. Revenue of $4.63 billion beats out analysts’ estimates of $4.40 billion, but couldn’t save KSS stock.
Here’s a more in-depth look at the Q3 Kohl’s earnings report.
- Adjusted earnings per share for the quarter are down 24.49% YoY from 98 cents.
- Revenue is sitting at roughly the same levels as it was in the third quarter of 2018.
- Operating income of $204 million is 20.93% worse than the $258 million in the same period of the year prior.
- The Kohl’s earnings report also has net income for the quarter coming in at $123 million.
- That’s a 23.60% decline from KSS’ net income of $161 million in the third quarter of the previous year.
Michelle Gass, CEO of Kohl’s, doesn’t offer much in the way of helpful insight to holders of KKS stock.
“We are pleased to report that our business returned to growth during the third quarter, with a comparable sales increase of 0.4%. The quarter started off positive in August with another successful back-to-school season and ended strong in October.”
The Kohl’s earnings report also includes a guidance update for 2019. KSS now expects adjusted per-share earnings to range from $4.75 to $4.95. The previous outlook was between $5.15 and $5.45. This is bad news for KSS stock with its high EPS guidance below Wall Street’s estimate of $5.19 for 2019.
KSS stock was down 19.06% as of Tuesday afternoon.
As of this writing, William White did not hold a position in any of the aforementioned securities.


User connected information displaying on dashboard.
More...
User connected information displaying on dashboard.
Definition at line 561 of file accounts_ui.py.
| def airbus_cobot_gui.account.accounts_ui.UserAccountsWidget.__init__ |
( |
|
self | ) |
|
| def airbus_cobot_gui.account.accounts_ui.UserAccountsWidget.mousePressEvent |
( |
|
self, |
|
|
|
event |
|
) |
| |
Redefine qt methode for resize widget.
- Parameters
-
| event | qt event. event: QEvent. |
Definition at line 625 of file accounts_ui.py.
| def airbus_cobot_gui.account.accounts_ui.UserAccountsWidget.resizeEvent |
( |
|
self, |
|
|
|
event |
|
) |
| |
Redefine qt methode for resize widget.
- Parameters
-
| event | qt event. event: QEvent. |
Definition at line 605 of file accounts_ui.py.
| def airbus_cobot_gui.account.accounts_ui.UserAccountsWidget.translate |
( |
|
self | ) |
|
| def airbus_cobot_gui.account.accounts_ui.UserAccountsWidget.update_user_info |
( |
|
self, |
|
|
|
user |
|
) |
| |
Update user information.
- Parameters
-
| user_info | user connected information. user_info: UserInfo. |
Definition at line 598 of file accounts_ui.py.
| airbus_cobot_gui.account.accounts_ui.UserAccountsWidget._central_layout |
|
private |
| airbus_cobot_gui.account.accounts_ui.UserAccountsWidget._user_icon_label |
|
private |
| airbus_cobot_gui.account.accounts_ui.UserAccountsWidget._user_id_label |
|
private |
The documentation for this class was generated from the following file:


Agenda
- Bring laptop
| 10:00am |
Introduction
A small introduction to what is open source software, and about Hacktoberfest and the Code of Conduct for the event |
|---|---|
| 10:30am |
Workshop: Your first PR
Workshop on how to find a project, communicate with the maintainer and raise your first PR Resources: Your First PR |
| 11:00am |
Hack time / Demo
Hands on coding, formation of groups by interest and hacking together. 3 to 5-minute demos can be given by anyone interested in sharing their open source projects |
| 12:30pm | Lunch / Networking |
| 1:30pm |
Hack time / Talk (Maintaining your project)
Hack time continued, with a small talk on maintaining your OSS projects |
| 04:00pm |
Retro and Snacks
We share our experiences and learnings from the event, followed by snacks |
About
An open event for people to come and contribute to Open Source as part of Hacktoberfest
Hacktoberfest is a month-long celebration of open source software run by DigitalOcean and Dev. It happens in the month of October every year. ThoughtWorks Chennai is hosting the event to promote and support contributing to Open Source! The event is organized by a passionate group of open sorcerers and sponsored by ThoughtWorks.
Have more questions regarding Hacktoberfest? Head to the Hacktoberfest FAQ
Note: Participants are required to follow the Hacktoberfest Code Of Conduct
We love feedback! If you have any suggestions or cribs, feel free to fill out our feedback form. Don't worry, its completely anonymous.
All Editions
| 2020 | Edition 2 |
|---|---|
| 2019 | Edition 1 |