WITNESS LIST Criminal Justice Committee May 8, 2001 - 1:00P HB 84 FOR: Jones, James D. (San Antonio Police Officers Association), San Antonio, TX Parr, Jr., Shufford Day Deputy Fire Marshal (Tarrant County Fire &Arson Investigators Association), Arlington, TX Rendon, Feliciano (San Antonio Police Officers Association), San Antonio, TX ON: Kirk, Sheriff Chris Brazos County Sheriff (Sheriffs Association of Texas), Bryan, TX Registering, but not testifying: For: Hill, Howard Fire Marshal (Hurst Fire Department), Hurst, TX Jones, Chris (CLEAT), Austin, TX Ybarbo, Ray Police Lt. (Chief of Police Al Philippus, San Antonio Police Department), San Antonio, TX HB 171 FOR: Bonner, Jerry Fire Marshal (TX Fire Marshals Association), Flower Mound, TX ON: Logan, Michael Fire Marshal (Tarrant County Fire & Arson Investigators Association), Euless, TX Registering, but not testifying: For: Hill, Howard Fire Marshal (Hurst Fire Department), Hurst, TX Parr, Jr., Shufford Day Deputy Fire Marshal (Tarrant County Fire & Arson Investigators Association), Arlington, TX Teague, Donnie County Fire Marshal (Texas Fire Marshals Association), Victoria, TX HB 223 Registering, but not testifying: For: Carpenter, Bill Asst. Supt. for Governmental Relations (Houston Independent School District), Houston, TX HB 232 FOR: Barber, Thomas Sheriff (Self), Caldwell, TX Cook, Randie (Self), Caldwell, TX Kirk, Sheriff Chris Brazos County Sheriff (Sheriffs Association of Texas), Bryan, TX McDonald, Mary (Self), Somerville, TX Oberts, Neva (Self), Somerville, TX AGAINST: DeLord, Ron President (CLEAT), Austin, TX Noris, Scott (Texas Reserve Law Officers Association), Farmers Branch, TX Roberts, Walter (ASSIST), Dallas, TX Registering, but not testifying: For: Edworthy, Allan (Self), Caldwell, TX Freeman, Gary Constable Harris County (Justice of the Peace & Constables Association of Texas), Pasadena, TX Hilger, Zane Constable Pct. 3, Tarrant County (Justice of Peace and Constables Association), Hurst, TX Against: Clark, Mark Police Officer (Houston Police Officers' Union), Houston, TX Jones, Chris Sgt., Houston Police Department (CLEAT), Austin, TX Jones, James (San Antonio Police Officers' Association), San Antonio, TX Rendon, Feliciano (San Antonio Police Officers Association), San Antonio, TX HB 335 FOR: Lyon, B.C. Executive Director, DPS Museum (DPS Historical Museum & Research Center), Austin, TX HB 598 Registering, but not testifying: For: Hill, Holli (Texas Probation Association), Austin, TX On: White, Bonita Division Director (TDCJ - Community Justice Assistance Division), Austin, TX HB 805 FOR: Arlington, Dick (Crime Stoppers of Houston), Houston, TX Kirk, Sheriff Chris Brazos County Sheriff (Sheriffs Association of Texas), Bryan, TX HB 1126 FOR: Bonner, Jerry Fire Marshal,Flower Mound (Self), Flower Mound, TX Logan, Michael Fire Marshal, Euless (Self), Euless, TX Parr, Jr., Shufford Day Deputy Fire Marshal (Tarrant County Fire & Arson Investigators Association), Arlington, TX Teague, Donnie Fire Marshall Victoria County (Self), Victoria, TX ON: Abbott, W. Clay General Counsel (Texas Municipal Courts Education Center), Austin, TX Reynolds, Carl General Counsel (TDCJ), Austin, TX Registering, but not testifying: For: Hill, Howard Fire Marshal (Hurst Fire Department), Hurst, TX HB 1323 AGAINST: Toney, Doug (TX Daily Newspaper Association/Texas Press Association), New Braunfels, TX ON: Hamlin, Jim Dallas County District Clerk (County & District Clerk's Association of Texas), Dallas, TX Kirk, Sheriff Chris Brazos County Sheriff (Sheriffs Association of Texas), Bryan, TX Registering, but not testifying: On: Kirchoff, Kim Legislative Liaison (Texas Association of Counties), Austin, TX HB 1541 FOR: Gonzalez, Eddie Director, Nueces Co. CSCD (Self), Corpus Christi, TX Vargis, Robert Judge, Nueces County Court of Law #1 (Self), Corpus Christi, TX Registering, but not testifying: For: Villarreal, Juan Operations Manager (Fighting to Rid Gangs in America, Inc.), Corpus Christi, TX HB 1658 ON: Scott, Wayne Executive Director (TDCJ) HB 1659 ON: Scott, Wayne Executive Director (TDCJ), Huntsville, TX HB 1680 Registering, but not testifying: For: Clark, Mark Police Officer (Texas Union of Police & Sheriffs), Houston, TX Jones, Chris (CLEAT), Austin, TX


Source code for blue_st_sdk.firmware_upgrade.utils.firmware_file
################################################################################
# COPYRIGHT(c) 2018 STMicroelectronics #
# #
# Redistribution and use in source and binary forms, with or without #
# modification, are permitted provided that the following conditions are met: #
# 1. Redistributions of source code must retain the above copyright notice, #
# this list of conditions and the following disclaimer. #
# 2. Redistributions in binary form must reproduce the above copyright #
# notice, this list of conditions and the following disclaimer in the #
# documentation and/or other materials provided with the distribution. #
# 3. Neither the name of STMicroelectronics nor the names of its #
# contributors may be used to endorse or promote products derived from #
# this software without specific prior written permission. #
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" #
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE #
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE #
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE #
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR #
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF #
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS #
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN #
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) #
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE #
# POSSIBILITY OF SUCH DAMAGE. #
################################################################################
"""firmware_file
The firmware_file module is responsible for handling a firmware file.
"""
# IMPORT
import sys
import os
from enum import Enum
from blue_st_sdk.firmware_upgrade.utils.stm32crc32 import STM32Crc32
# CLASSES
[docs]class FirmwareFile():
[docs] def __init__(self, filename):
"""Constructor.
Args:
filename (str): File name of the firmware file.
Raises:
:exc:`OSError` if the file is not found or is inaccessible.
"""
try:
self._filename = filename
self._fd = None
self._set_type(self._filename)
self._set_size(self._filename)
except OSError as e:
raise e
[docs] def get_type(self):
"""Get the firmware type.
Returns:
:class:`blue_st_sdk.firmware_upgrade.utils.firmware_file.FirmwareType`:
The firmware type.
"""
return self._type
[docs] def get_size(self):
"""Get the firmware size in bytes.
Returns:
int: The firmware size in bytes.
"""
return self._size
def _set_type(self, filename):
"""Set the firmware type.
Args:
filename (str): File name of the firmware file.
"""
if filename.lower().endswith("bin"):
self._type = FirmwareType.BIN
#elif filename.lower().endswith("img"):
# self._type = FirmwareType.IMG
else:
self._type = FirmwareType.UNKNOWN
def _set_size(self, filename):
"""Set the firmware size in bytes.
Args:
filename (str): File name of the firmware file.
Raises:
:exc:`OSError` if the file is not found or is inaccessible.
"""
try:
self._size = os.path.getsize(filename)
except OSError as e:
raise e
[docs] def open(self):
"""Open the firmware file.
Raises:
:exc:`OSError` if the file is not found or is inaccessible.
Returns:
file: The file descriptor of the firmware file.
"""
try:
self._fd = open(self._filename, 'rb')
except OSError as e:
raise e
return self._fd
[docs] def close(self):
"""Close the firmware file.
Raises:
:exc:`OSError` if the file is not found or is inaccessible.
"""
try:
self._fd.close()
except OSError as e:
raise e
[docs] def get_crc_32(self):
"""Getting the 32 bit CRC of the firmware file.
The file size must be multiple of 32 bits.
Raises:
:exc:`ValueError` if the firmware file can not be read properly.
Returns:
int: The CRC of the firmware file.
"""
crc = STM32Crc32()
tmp_fd = open(self._filename, 'rb')
tmp_size = self._size - self._size % 4
try:
for i in range(0, tmp_size, 4):
data = tmp_fd.read(4)
if len(data) == 4:
crc.update(data)
else:
raise ValueError('Could not read data from firmware file.')
tmp_fd.close()
return crc.get_value()
except ValueError as e:
tmp_fd.close()
raise e
[docs]class FirmwareType(Enum):
"""Firmware type.
Currently only BIN format is handled.
"""
UNKNOWN = 0
BIN = 1
#IMG = 2


Psalm 53
For the chief musician; set to Mahalath. A maschil of David.
1 A fool says in his heart, "There is no God."
They are corrupt and have done abominable iniquity;
there is no one who does good.
2 God looks down from heaven on the sons of mankind
to see if there are any who understand,
who seek after him.
3 Everyone of them has gone back; all have become filthy;
there is no one who does good, no, not one.
4 Do they not know anything, those who commit iniquity,
those who eat up my people as they eat bread
but who do not call on God?
5 They were in great fear, although no reason to fear was there;
for God will scatter the bones of whoever will camp against you;
such people will be put to shame because God has rejected them.
6 Oh, that the salvation of Israel would come from Zion!
When God brings back his people from the captivity,
then Jacob will rejoice and Israel will be glad!


The Game object allows you to access the properties of your game, and the engine itself. There is always one and only Game object available and it's stored in a predefined variable Game.
| Diagnostic functions | |
| LOG | Writes a text string to the system log file. |
| Msg | Writes a quick diagnostic message to the screen. |
| DumpTextureStats | Writes texture usage data to a text file in CSV format. |
| Object manipulation | |
| ValidObject | Queries whether a given object reference is valid. |
| UnloadObject | Removes an object from memory. |
| LoadActor | Loads a new actor from a file. |
| LoadActor3D | Loads a new 3D actor from a file. |
| LoadEntity | Loads a new entity from a file. |
| LoadWindow | Loads a new window from a file. |
| ExpandString | Expands a given string using the string table. |
| Music functions | |
| MusicCrossfade | Crossfades two music channels |
| PlayMusic | Plays a music. |
| StopMusic | Stops a music playback. |
| PauseMusic | Pauses a music playback. |
| ResumeMusic | Resumes a paused music playback. |
| SetMusicPosition | Sets the music's current playing position. |
| GetMusicPosition | Queries the music's current playing position |
| IsMusicPlaying | Queries whether the music is currently playing |
| GetMusic | Queries the filename of the current music |
| SetMusicVolume | Sets the volume of currently playing music. |
| GetMusicVolume | Queries the music's current volume. |
| PlayMusicChannel | Plays a music in a specified channel. |
| StopMusicChannel | Stops a music playback in a specified channel. |
| PauseMusicChannel | Pauses a music playback in a specified channel. |
| ResumeMusicChannel | Resumes a paused music playback in a specified channel. |
| SetMusicChannelPosition | Sets the music's current playing position in a specified channel. |
| GetMusicChannelPosition | Queries the music's current playing position in a specified channel. |
| IsMusicChannelPlaying | Queries whether the music is currently playing in a specified channel |
| GetMusicChannel | Queries the filename of the current music in a specified channel |
| SetMusicChannelVolume | Sets the volume of currently playing music in a specified channel. |
| GetMusicChannelVolume | Queries the music's current volume in a specified channel. |
| Script functions | |
| AttachScript | Executes a script file and attaches it to the object. |
| DetachScript | Terminates a specified script file and detaches it from an object. |
| IsScriptRunning | Queries whether a specified script file is running and attached to an object. |
| CanHandleMethod | Queries whether the object supports a method of a specified name. |
| Sound functions | |
| GetSoundLength | Queries length of a given sound file |
| PlaySound | Plays a sound. If the filename is omitted, the currently assigned sound is played (if any). |
| PlaySoundEvent | Plays a sound and triggers an event when the sound is over. If the filename is omitted, the currently assigned sound is played (if any). |
| StopSound | Stops the currently playing sound (if any). |
| PauseSound | Pauses the currently playing sound. |
| ResumeSound | Resumes a paused sound playback. |
| IsSoundPlaying | Queries whether a sound playback is in progress. |
| SetSoundPosition | Sets the sound's current playing position. |
| GetSoundPosition | Queries the sound's current playing position |
| SetSoundVolume | Sets a volume of the currently playing sound. |
| GetSoundVolume | Gets a volume of the currently playing sound. |
| LoadSound | Initializes a sound from file and makes it ready to be played. |
| Sound effects functions | |
| SoundFXNone | Removes any sound effect currently assigned to this object. |
| SoundFXEcho | Assigns an echo effect to the sounds played by this object. |
| SoundFXReverb | Assigns a reverb effect to the sounds played by this object. |
| Event functions | |
| ApplyEvent | Applies a named event to the object. |
| CanHandleEvent | Queries whether the object has an event handler for a specified event. |
| Miscelaneous functions | |
| SkipTo | Moves an object to a specified location. |
| SetMousePos | Sets the mouse cursor position. |
| QuitGame | Quits the current game session. |
| FileExists | Queries whether a given file exists. |
| Screenshot | Takes a screenshot of the current game and saves it into a BMP file. |
| ScreenshotEx | Takes an (optionally resized) screenshot of the current game and saves it into a BMP file. |
| LoadStringTable | Loads the string table from a file. |
| AddSpeechDir | Adds a directory to be used when WME automatically looks for speech files. |
| RemoveSpeechDir | Removes a directory from the list of dirs to look for speech files automatically. |
| Reset | Resets the game's persistent data. |
| OpenDocument | Opens a specified document file or internet URL in an associated program. |
| SetLoadingScreen | Sets an image to be displayed while loading a saved game. |
| SetSavingScreen | Sets an image to be displayed while saving the game. |
| ClearScriptCache | Clears the content of the engine script cache. |
| DisplayLoadingIcon | Briefly displays a "loading" icon. |
| HideLoadingIcon | Hides a "loading" icon displayed by DisplayLoadingIcon() |
| Video functions | |
| PlayVideo | Plays a given AVI video file |
| PlayTheora | Plays a given Theora video file |
| Registry functions | |
| RegWriteNumber | Writes a given number to the Windows Registry. |
| RegWriteString | Writes a given string to the Windows Registry. |
| RegReadNumber | Reads a numeric value from the Windows Registry. |
| RegReadString | Reads a string value from the Windows Registry. |
| Save/load functions | |
| SaveGame | Saves a game to the given save slot. |
| LoadGame | Loads a game from the given save slot. |
| IsSaveSlotUsed | Queries whether a given save slot is in use. |
| GetSaveSlotDescription | Queries a description of a given save slot. |
| EmptySaveSlot | Empties a given save slot. |
| Volume functions | |
| SetGlobalSFXVolume | Sets the volume of sound effects. |
| SetGlobalSpeechVolume | Sets the volume of speech. |
| SetGlobalMusicVolume | Sets the volume of music. |
| SetGlobalMasterVolume | Sets the master volume. |
| GetGlobalSFXVolume | Gets the current sound effects volume. |
| GetGlobalSpeechVolume | Gets the current speech volume. |
| GetGlobalMusicVolume | Gets the current music volume. |
| GetGlobalMasterVolume | Gets the current master volume. |
| Cursor functions | |
| SetCursor | Sets the standard cursor. |
| GetCursor | Returns the filename of the cursor sprite (or null if no cursor is set) |
| GetCursorObject | Returns a reference to the cursor sprite (or null if no cursor is set) |
| RemoveCursor | Removes the standard cursor. |
| HasCursor | Queries whether the standard cursor is set. |
| SetActiveCursor | Sets the active cursor. |
| GetActiveCursor | Returns the filename of the active cursor sprite (or null if no cursor is set) |
| GetActiveCursorObject | Returns a reference to the active cursor sprite (or null if no cursor is set) |
| RemoveActiveCursor | Removes the active cursor. |
| HasActiveCursor | Queries whether the active cursor is set. |
| SetWaitCursor | Sets the non-interactive cursor. |
| GetWaitCursor | Returns the filename of the non-interactive cursor sprite (or null if no cursor is set) |
| GetWaitCursorObject | Returns a reference to the non-interactive cursor sprite (or null if no cursor is set) |
| RemoveWaitCursor | Removes the non-interactive cursor. |
| Fading functions | |
| FadeOut | Fades the screen out to a specified color. |
| FadeIn | Fades the screen in from a specified color. |
| GetFadeColor | Gets the current fading color. |
| Scene functions | |
| ChangeScene | Loads a specified scene file. |
| Responses/inventory | |
| AddResponse | Adds a single response sentence to the response box. |
| AddResponseOnce | Adds a single response sentence to the response box. The response is only added once per a dialogue branch. |
| AddResponseOnceGame | Adds a single response sentence to the response box. The response is only added once per a game session. |
| ResetResponse | Revives a previously disabled response. |
| GetResponse | Displays a response box and waits for the player's choice. |
| GetNumResponses | Queries the number of remaining responses in the response box. |
| GetInventoryWindow | Returns a reference to the window object used by the inventory box. |
| GetResponsesWindow | Returns a reference to the window object used by the responses box. |
| StartDlgBranch | Denotes a start of a dialogue branch. |
| EndDlgBranch | Denotes an end of a dialogue branch. |
| GetCurrentDlgBranch | Queries a current dialogue branch name. |
| LoadResponseBox | Reloads a response box from file. |
| LoadInventoryBox | Reloads an inventory box from file. |
| LoadItems | Loads inventory items from a definition file. |
| Item functions | |
| TakeItem | Adds an item into the inventory. |
| DropItem | Removes an item from the inventory. |
| GetItem | Queries an inventory item. |
| HasItem | Queries whether a given item is in inventory of any of this object. |
| IsItemTaken | Queries whether a given item is in inventory of any of the game objects. |
| Dynamic object creation | |
| CreateEntity | Creates a new entity object. |
| DeleteEntity | Destroys a entity object. |
| CreateWindow | Creates a new window object. |
| DeleteWindow | Destroys a window object. |
| CreateItem | Creates a new inventory item object. |
| DeleteItem | Destroys an item object. |
| 3D characters related | |
| SetShadowImage | Sets and image to be used as a simple shadow for 3D characters |
| GetShadowImage | Gets the currently assigned image to be used as a simple shadow for 3D characters |
| Type (read only) | Returns always "game" |
| Accelerated (read only) | Returns true if the game currently uses 3D acceleration to display graphics. |
| CurrentTime (read only) | Returns the time elapsed since the game has started. |
| WindowsTime (read only) | Returns the time elapsed since Windows has started. |
| TextEncoding | Specifies text encoding used for in-game texts, 0..ANSI, 1..UTF8 |
| TextRTL | Specifies if the game uses right-to-left reading order (for Henrew and Arabic). Only affects TrueType fonts! |
| MouseX | The current X position of the mouse cursor |
| MouseY | The current Y position of the mouse cursor |
| MainObject | The object which is used for the scene's auto scrolling, can be (set to) null |
| ActiveObject (read only) | Returns the object which is currently under the mouse cursor (or null if there's none) |
| InventoryObject | The object whose inventory is currently displayed. |
| ScreenWidth (read only) | Returns the screen's width in pixels. |
| ScreenHeight (read only) | Returns the screen's height in pixels. |
| DebugMode (read only) | Returns whether the game runs in the debugging mode. |
| SoundAvailable (read only) | Returns whether the sound is available and enabled. |
| Keyboard (read only) | Returns a reference to the Keyboard State object. |
| Subtitles | Specifes whether the speech subtitles are enabled. |
| VideoSubtitles | Specifes whether the AVI/Theora video subtitles are enabled. |
| SubtitlesSpeed | Specifies the speech subtitles speed (in milliseconds per one character) |
| Scene (read only) | Returns a reference to the currently loaded scene object. |
| SelectedItem | Currently selected inventory item (or null for no item). |
| NumItems (read only) | Returns the number of items in the player's inventory. |
| InventoryVisible | Specifies whether the inventory box is currently visible. |
| ResponsesVisible (read only) | Returns whether a response box is visible (i.e. the game awaits player's choice). |
| WindowedMode (read only) | Returns true if the game runs in windowed mode. |
| Hwnd (read only) | Returns the window handle (HWND) of the game window (only useful for plugin development). |
| PrevScene (read only) | Returns the name of the previous scene. |
| PrevSceneFilename (read only) | Returns the filename of the previous scene. |
| LastResponse (read only) | Returns the text of the most recently selected response. |
| FPS (read only) | Returns the current framerate (in frames per second) |
| Shadows | Specifies if shadows are enabled for 3D characters |
| SimpleShadows | Specifies if simple shadows are to be used for 3D characters. This attribute has no effect if real-time shadows are unsupported |
| SupportsRealTimeShadows (read only) | Returns true if the videocard supports real-time shadows |
| Direct3DDevice (read only) | Returns the pointer to the underlying IDirect3DDevice8 object (plugins only) |
| DirectDrawInterface (read only) | Returns the pointer to the underlying IDirectDraw7 object (plugins only) |
| Frozen (read only) | Returns true if the game is currently in frozen state |
| Name | The internal name of the object. |
| Caption | The caption of the object. |
| X | The X position of the object. |
| Y | The Y position of the object. |
| Height (read only) | Returns the current height of the object. In case of actors and entities the scaling is taken into account. |
| Filename (read only) | Returns the filename. |
| Ready (read only) | Returns whether the object isn't currently performing any action. |
| Interactive | Specifies whether the object recieves user input. |
| SoundPanning | Specifies whether the sounds played by this object are automatically panned depending on object's position on screen. |
| NonIntMouseEvents | Specifies if the object can receive the MouseEntry and MouseLeave events even if the game is in non-interactive mode. |
| LeftClick | The left mouse button has been pressed. |
| RightClick | The right mouse button has been pressed. |
| MiddleClick | The middle mouse button has been pressed. |
| LeftDoubleClick | The left mouse button has been double-clicked. |
| LeftRelease | The left mouse button has been released. |
| RightRelease | The right mouse button has been released. |
| MiddleRelease | The middle mouse button has been released. |
| MouseWheelUp | The mouse wheel has been rolled up. |
| MouseWheelDown | The mouse wheel has been rolled down. |
| Keypress | Some key has been pressed. Use the Keyboard variable to find out the details. |
| BeforeSave | The game is about to save its state. |
| AfterLoad | The game just loaded its state. |
Writes a text string to the system log file.
When the game runs in debug mode, it generates a "wme.log" file in the same directory where the project file resides. Using this method you can add your own diagnostic messages to the log file.
Writes a quick diagnostic message to the screen.
The quick message disappears after a few seconds.
Writes texture usage data to a text file in CSV format.
This method is only available if the game runs in accelerated mode.
Queries whether a given object reference is valid.
If the object reference is valid, the return value is true.
If you store an object reference in a variable, you can ensure this object is still valid using the ValidObject method. Objects become invalid after they are unloaded from memory (ether explicitly or for example by changing to a different scene).
Removes an object from memory.
If you load an object using the Game.LoadActor, Game.LoadEntity and similar methods, you should unload those when you no longer need them to free memory. Otherwise those objects will be released when the game quits.
Loads a new actor from a file.
A reference to the new Actor object. If the method fails, the return value is null.
Loads a new 3D actor from a file.
A reference to the new 3D actor object. If the method fails, the return value is null.
Loads a new entity from a file.
A reference to the new Entity object. If the method fails, the return value is null.
Loads a new window from a file.
Returns a reference to a newly created window object or null if the loading fails.
Expands a given string using the string table.
Returns the expanded string.
Note that methods such as Actor.Talk() do expand strings automatically, you don't need to expand them yourself.
Crossfades two music channels
There can be always only two channels crossfading at one moment.
Plays a music.
If the method succeeds, the return value is true.
Stops a music playback.
If the method succeeds, the return value is true.
Pauses a music playback.
If the method succeeds, the return value is true.
Resumes a paused music playback.
If the method succeeds, the return value is true.
Sets the music's current playing position.
If the method succeeds, the return value is true.
Queries the music's current playing position
Returns the current playing position (in milliseconds).
Queries whether the music is currently playing
Returns true if music is playing.
Queries the filename of the current music
Returns the current music filename or null if music isn't playing.
Sets the volume of currently playing music.
Queries the music's current volume.
The volume in percent.
Plays a music in a specified channel.
If the method succeeds, the return value is true.
Stops a music playback in a specified channel.
If the method succeeds, the return value is true.
Pauses a music playback in a specified channel.
If the method succeeds, the return value is true.
Resumes a paused music playback in a specified channel.
If the method succeeds, the return value is true.
Sets the music's current playing position in a specified channel.
If the method succeeds, the return value is true.
Queries the music's current playing position in a specified channel.
Returns the current playing position (in milliseconds).
Queries whether the music is currently playing in a specified channel
Returns true if music is playing.
Queries the filename of the current music in a specified channel
Returns the current music filename or null if music isn't playing.
Sets the volume of currently playing music in a specified channel.
Queries the music's current volume in a specified channel.
The volume in percent.
Executes a script file and attaches it to the object.
Returns true if the script hs been executed succesfuly.
Each WME object can have multiple scripts attached.
Terminates a specified script file and detaches it from an object.
Returns true if the script has been detached succesfully.
Queries whether a specified script file is running and attached to an object.
Returns true if a specified script file is attached to an object.
Queries whether the object supports a method of a specified name.
Returns true if the object is able to handle the specified method.
Queries length of a given sound file
Returns length of the sound file (in milliseconds).
Plays a sound. If the filename is omitted, the currently assigned sound is played (if any).
If the method succeeds, the return value is true.
Plays a sound and triggers an event when the sound is over. If the filename is omitted, the currently assigned sound is played (if any).
If the method succeeds, the return value is true.
Stops the currently playing sound (if any).
If the method succeeds, the return value is true.
Pauses the currently playing sound.
If the method succeeds, the return value is true.
Resumes a paused sound playback.
If the method succeeds, the return value is true.
Queries whether a sound playback is in progress.
If the sound is playing, the return value is true.
Sets the sound's current playing position.
If the method succeeds, the return value is true.
Queries the sound's current playing position
Returns the current playing position (in milliseconds).
Sets a volume of the currently playing sound.
If the method succeeds, the return value is true.
Gets a volume of the currently playing sound.
Returns the volume of the currently playing sound (in percent).
Initializes a sound from file and makes it ready to be played.
If the method succeeds, the return value is true.
Use this method to pre-cache a sound file. Initializing the sound takes some time and sometimes it's desirable to move all sound initialization to e.g. scene start so that the subsequent PlaySound calls don't slow the game down. That's what LoadSound is for. To play the pre-cached sound simply call PlaySound without specifying a filename, for example SomeObject.PlaySound(false);
Removes any sound effect currently assigned to this object.
Assigns an echo effect to the sounds played by this object.
Example: actor.SoundFXEcho(50, 50);
Assigns a reverb effect to the sounds played by this object.
Example: actor.SoundFXReverb(0, 0, 2000);
Applies a named event to the object.
Returns true it the event has been applied succesfuly.
Queries whether the object has an event handler for a specified event.
Returns true if the object is able to handle the specified event.
Moves an object to a specified location.
Sets the mouse cursor position.
Quits the current game session.
Queries whether a given file exists.
If the specified file exists, the return value is true.
Takes a screenshot of the current game and saves it into a BMP file.
If the method succeeds, the return value is true.
Takes an (optionally resized) screenshot of the current game and saves it into a BMP file.
If the method succeeds, the return value is true.
Loads the string table from a file.
The string table is NOT part of the saved game. You need either to ask user for language selection each time the game is started or store the setting in the registry.
Adds a directory to be used when WME automatically looks for speech files.
By default WME looks for speech files in a "speech" directory only.
Removes a directory from the list of dirs to look for speech files automatically.
Resets the game's persistent data.
This method deletes all scene states, selected responses, sets timer to zero and also clears all global variables, except those holding game objects (such as windows or entities). Use this method if you want to start a new game.
Opens a specified document file or internet URL in an associated program.
This method uses the Windows extension associations to run the right program. Note that the document file MUST NOT be stored inside the game packages. It must be a regular file and you must reference it either by full filename or a filename relative to the game directory.
Sets an image to be displayed while loading a saved game.
Sets an image to be displayed while saving the game.
Clears the content of the engine script cache.
Normally the engine caches compiled scripts so that they don't need to be compiled multiple times. This method allows you to flush the script cache, for example if you generate scripts dynamically and need them to be always re-compiled.
Briefly displays a "loading" icon.
You can use this function to briefly display a "work-in-progress" symbol; for example call this method before calling a command which takes a long time (loading a window, long animation etc.). The icon is displayed until the script returns control back to the engine, unless the Persistent parameter is set to true. In that case you have to manually hide the icon by calling the Game.HideLoadingIcon() method.
Hides a "loading" icon displayed by DisplayLoadingIcon()
Plays a given AVI video file
If the method succeeds, the return value is true.
Plays a given Theora video file
If the method succeeds, the return value is true.
Writes a given number to the Windows Registry.
Writes a given string to the Windows Registry.
Reads a numeric value from the Windows Registry.
Returns the number read from the Windows Registry.
Reads a string value from the Windows Registry.
Returns the string read from the Windows Registry.
Saves a game to the given save slot.
If the method succeeds, the return value is true.
Loads a game from the given save slot.
If the method fails, the return value is false.
Queries whether a given save slot is in use.
If the save slot is already in use, the return value is true.
Queries a description of a given save slot.
The description of a given save slot.
Empties a given save slot.
Sets the volume of sound effects.
If the method succeeds, the return value is true.
Sets the volume of speech.
If the method succeeds, the return value is true.
Sets the volume of music.
If the method succeeds, the return value is true.
Sets the master volume.
If the method succeeds, the return value is true.
Gets the current sound effects volume.
Returns the sound volume (in percent).
Gets the current speech volume.
Returns the speech volume (in percent).
Gets the current music volume.
Returns the music volume (in percent).
Gets the current master volume.
Returns the master volume (in percent).
Sets the standard cursor.
Returns true if the cursor has been set succesfuly.
Returns the filename of the cursor sprite (or null if no cursor is set)
Returns a reference to the cursor sprite (or null if no cursor is set)
Removes the standard cursor.
Queries whether the standard cursor is set.
Returns true if the object has a custom mouse pointer assigned.
Sets the active cursor.
Returns true if the cursor has been set succesfuly.
The "active" cursor is used when the mouse pointer is over an interactive object.
Returns the filename of the active cursor sprite (or null if no cursor is set)
Returns a reference to the active cursor sprite (or null if no cursor is set)
Removes the active cursor.
Queries whether the active cursor is set.
Returns true it the object has a custom mouse pointer assigned.
Sets the non-interactive cursor.
Returns true if the cursor has been set succesfuly.
Returns the filename of the non-interactive cursor sprite (or null if no cursor is set)
Returns a reference to the non-interactive cursor sprite (or null if no cursor is set)
Removes the non-interactive cursor.
Fades the screen out to a specified color.
The FadeOut method blocks the script execution until the fading is over, while the FadeOutAsync method returns immediately. The SystemFadeOut and SystemFadeOutAsync methods continue fading even after the game enters the system exclusive mode.
Fades the screen in from a specified color.
The FadeIn method blocks the script execution until the fading is over, while the FadeInAsync method returns immediately. The SystemFadeIn and SystemFadeInAsync methods continue fading even after the game enters the system exclusive mode.
Gets the current fading color.
Returns the current fading color in the encoded color format.
You can use the GetRValue(), GetGValue(), GetBValue() and GetAValue() functions to extract individual color components.
Loads a specified scene file.
Adds a single response sentence to the response box.
Adds a single response sentence to the response box. The response is only added once per a dialogue branch.
The engine will only add the response to the response box if it wasn't selected before by the player in the current dialogue branch. You must denote the dialogue branch using the Game.StartDlgBranch() and Game.EntDlgBranch() to make this method work.
Adds a single response sentence to the response box. The response is only added once per a game session.
The engine will only add the response to the response box if it wasn't selected before by the player before. You must denote a dialogue branch using the Game.StartDlgBranch() and Game.EntDlgBranch() to make this method work.
Revives a previously disabled response.
If you add a response using the Game.AddResponseOnce() or Game.AddResponseOnceGame() methods, it gets disabled once the player selects it. Use the ResetResponse method to make such response reappear.
Displays a response box and waits for the player's choice.
An ID number of the selected response.
Queries the number of remaining responses in the response box.
Returns the number of responses remaining in the response box.
Some of the responses added by the AddResponseOnce or AddResponseOnceGame methods may have not been actually added to the response box. Use this method to find out how many responses currently really are prepared in the response box.
Returns a reference to the window object used by the inventory box.
A reference to the inventory window object.
Returns a reference to the window object used by the responses box.
A reference to the responses window object.
Denotes a start of a dialogue branch.
Dialogue branches only need to be explicitly denoted if you want to use the Game.AddResponseOnce() or Game.AddResponseOnceGame() methods.
Denotes an end of a dialogue branch.
Dialogue branches only need to be explicitly denoted if you want to use the Game.AddResponseOnce() or Game.AddResponseOnceGame() methods.
Queries a current dialogue branch name.
Returns the name of the current dialogue branch (started by the Game.StartDlgBranch method) or returns null if no dialgue branch has been started.
Reloads a response box from file.
Returns true if the method succeeded.
Reloads an inventory box from file.
Returns true if the method succeeded.
Loads inventory items from a definition file.
Returns true if the items were successfuly loaded.
Adds an item into the inventory.
Removes an item from the inventory.
Queries an inventory item.
A reference to the item object of a given name or at a given index in the inventory.
Queries whether a given item is in inventory of any of this object.
If the specified item is in the inventory of this object, the return value is true.
Note that this method only searches the current object, use the Game.IsItemTaken() method if you want to search all game objects.
Queries whether a given item is in inventory of any of the game objects.
If the specified item is in the inventory, the return value is true.
Creates a new entity object.
Returns a reference to the newly created entity.
Destroys a entity object.
Creates a new window object.
Returns a reference to the newly created window.
Destroys a window object.
Creates a new inventory item object.
Returns a reference to the newly created item.
Destroys an item object.
This method permanently destroys the inventory item. You can no longer reference it in methods like TakeItem etc.
Sets and image to be used as a simple shadow for 3D characters
Returns true if the image has been successfuly set.
Gets the currently assigned image to be used as a simple shadow for 3D characters
Returns the filename of currently assigned shadow image or null if no image is set.


{%extends 'base.html'%} {%block content%} {%block styles %} {{block.super}} {%endblock%} {% for photo in results %}
{{comment.comment}}
Comments
{%for comment in comments%} {%if comment.photo == photo%}
{{comment.user}}
{{comment.comment}}


Id: 224
Name: Michael McLick
Status: Alive
Species: Human
Type:
Gender: Male
OriginName: unknown
OriginUrl:
LocationName: Interdimensional Cable
LocationUrl: https://rickandmortyapi.com/api/location/6
Image: https://rickandmortyapi.com/api/character/avatar/224.jpeg
Episode: ['https://rickandmortyapi.com/api/episode/19']
Url: https://rickandmortyapi.com/api/character/224
Created: 2017-12-30T15:49:28.666Z


Example requestsedit
Here are a couple of examples:
Response response = restClient.performRequest("GET", "/", Collections.singletonMap("pretty", "true")); System.out.println(EntityUtils.toString(response.getEntity())); //index a document HttpEntity entity = new NStringEntity( "{\n" + " \"user\" : \"kimchy\",\n" + " \"post_date\" : \"2009-11-15T14:12:12\",\n" + " \"message\" : \"trying out Elasticsearch\"\n" + "}", ContentType.APPLICATION_JSON); Response indexResponse = restClient.performRequest( "PUT", "/twitter/tweet/1", Collections.<String, String>emptyMap(), entity);
The ContentType
that you specify for the HttpEntity
is important
because it will be used to set the Content-Type
header so that Elasticsearch
can properly parse the content. Future releases of Elasticsearch will require this
to be set properly.
Note that the low-level client doesn’t expose any helper for json marshalling and un-marshalling. Users are free to use the library that they prefer for that purpose.
The underlying Apache Async Http Client ships with different
org.apache.http.HttpEntity
implementations that allow to provide the request body in different formats
(stream, byte array, string etc.). As for reading the response body, the
HttpEntity#getContent
method comes handy which returns an InputStream
reading from the previously buffered response body. As an alternative, it is
possible to provide a custom
org.apache.http.nio.protocol.HttpAsyncResponseConsumer
that controls how bytes are read and buffered.
The following is a basic example of how async requests can be sent:
int numRequests = 10; final CountDownLatch latch = new CountDownLatch(numRequests); for (int i = 0; i < numRequests; i++) { restClient.performRequestAsync( "PUT", "/twitter/tweet/" + i, Collections.<String, String>emptyMap(), //assume that the documents are stored in an entities array entities[i], new ResponseListener() { @Override public void onSuccess(Response response) { System.out.println(response); latch.countDown(); } @Override public void onFailure(Exception exception) { latch.countDown(); } } ); } //wait for all requests to be completed latch.await();


We are currently making use of video snippets of vehicle traffic across the world and perform the surveillance on that.
{% set details=[
{'area': 'West Bengal', 'content': 'The number of road accidents across the Indian state of West Bengal in 2018 was around 12.7 thousand. Traffic discrepancies have been a major source of death, injury and damage to property every year. In 2018, over-speeding of vehicles was the main reason for road accident casualties. India ranked first out of 200 reported in World Road Statistics that year for the number of road accident deaths'},
{'area': 'Vietnam', 'content': 'The abundance of motorcycles in Vietnam makes it one of the most desirable places to hit the road. However, it is also one of the most dangerous places to drive. As per the WHO, approximately 14,000 people lose their lives each year in Viet Nam as a result of road traffic crashes. Motorcyclists account for a high proportion (59%) of the road traffic collisions in the country'},
{'area': 'Uttar Pradesh', 'content': 'The number of persons killed in road crashes in India touched all time high in 2018 registering over 1.51 lakh fatalities, an increase of nearly 3,500 more people losing their lives as compared to 2017, with UP recording maximum road fatalities'},
{'area': 'Taiwan', 'content': 'In Taiwan, every year about 1.3 million people are wiped out in road crashes and as many as 50 million injured, according to the World Health Organization (WHO) and the World Bank. That’s more than 3,500 people dying daily, most of them kids, the elderly, pedestrians and cyclists. These figures are set to increase by 65 percent over the next 20 years if nothing changes'},
{'area': 'New Delhi', 'content': 'Delhi has the highest number of fatal accidents among all cities across the country, with five deaths per day. The share of fatal road accidents have increased phenomenally as Indian cities are giving more importance to high speed roads for vehicles'} ] %}
{% for i in range(1,6)%}
{% set link= "static/vid"+i|string+".mp4" %}
{% set ref= "videos/vid"+i|string %}


:navtop
:heading File upload dialog
When creating a new entry or creating a thumbnail metadata the below form is shown that supports
selecting a file or drag-and-dropping a file. You can also paste an image or text into the "Or drag files here" area.
Image 1: File Upload
:heading Drag and Drop in Wiki Editor
The wiki editor supports drag-and-drop of files. The file is uploaded to the RAMADDA server and a new
entry is created. The user is then asked what should be embedded in the wiki text, e.g.: as an
image:
Image 2: Drag and drop
The wiki editor also supports pasting an image that has been copied to the clipboard (e.g., through a screen grab). A new image entry is created and the above dialog is shown.
:heading Search in page
The is a wiki display component,
display_simplesearch,
that supports searching within a page.
This can be seen in the
Maps Gallery
Image 3: Search in page
Add this to a page with:
{{display_simplesearch doPageSearch=true placeholder="Search in page"}}
This supports grid, gallery and entry tree/table displays.
:heading Full-screen mode
In wiki text add the below to provide a full screen mode. When mousing over the
component an icon
is shown
in the upper right.
+fullscreen
Anything here...
-fullscreen
:heading Draft Pages
Using the wiki tags +draft/-draft will show the enclosed section as a draft.
....
+draft
Anything here...
-draft
...
:heading Skip
To skip a block of text do:
....
+skip
Anything here...
-skip
...
Or
:skip Any line


Saldier lands the Morgiana Hurdle for Willie Mullins
by Will O'CallaghanTrainer Willie Mullins has won a 10th Morgiana Hurdle at Punchestown.
Saldier took the win for the Carlow handler, Henry De Bromhead's Petit Mouchoir battled back to finish second with pre-race favourite Klassical Dream third.
"His nose was in bits, but we decided not to have it operated and let nature take its course. We had the same trouble with Briar Hill, but operating on him didn't work.
"His run in the Fishery Lane (behind Espoir D'Allen) showed us he could be Grade One material.
"He quickened up well at the last and won like a nice horse. Hopefully they will all improve.
"Klassical Dream threw himself at the first hurdle and then he was just too keen. I think he'll improve from that, and a stronger gallop will help them all too.
"Patrick (Mullins) was never happy on Sharjah. I'd imagine he wanted the run badly and he'd want better ground.
"It has been a lucky race for us, not always with the first string, but they are all there doing their best and that's what happens."


{% load static %} {% load widget_tweaks %}
Profile
Book Appointment
Admit Details
Your Health
Call A Doc
Medical Reports
Feedback
Logout
Height: {{ p_form.height|add_class:"form-control form-control-alternative" }} cm
Weight: {{ p_form.weight|add_class:"form-control form-control-alternative" }} kg


cipher-suite / net.corda.v5.cipher.suite / CryptoServiceTestSupport / delete
delete
abstract fun delete(alias: String): Unit
Deletes the key corresponding to the input alias.
This method doesn't throw if the alias is not found.
Exceptions
CryptoServiceException
- if the key cannot be removed.


Reports abuse of atomics which should be replaced with volatiles.
Atomic is considered abused when only get
and/or set
methods called.
Sample of atomic box abuse:
private final AtomicReference<T> tRef = new AtomicReference<>(); ... return tRef.get(); ... tRef.set(value);
Sample of atomic updater abuse:
private volatile T t; ... return tUpdater.get(this); ... tUpdater.set(this, value); ... private static final AtomicReferenceFieldUpdater<...> tUpdater = ...;
Fix:
private volatile T t; ... return t; ... t = value;
The inspection is provided by Mike's IDEA Extensions.


--- title: Downloads a file from a URL if it not already in the cache. type: docs repo: https://github.com/rstudio/keras menu: main: name: Downloads a file from a URL if it not already in the cache. - keras parent: keras-reference aliases: - /reference/keras/get_file.html - /keras/reference/get_file.html - /guide/keras/reference/get_file.html - /tools/tools/keras/reference/get_file.html - /installation/keras/reference/get_file.html - /tutorials/keras/reference/get_file.html - /guide/tools/keras/reference/get_file.html - /deploy/keras/reference/get_file.html - /tools/keras/reference/get_file.html - /tutorials/tools/keras/reference/get_file.html ---
Passing the MD5 hash will verify the file after download as well as if it is already present in the cache.
get_file(
fname,
origin,
file_hash = NULL,
cache_subdir = "datasets",
hash_algorithm = "auto",
extract = FALSE,
archive_format = "auto",
cache_dir = NULL,
untar = FALSE
)
| fname | Name of the file. If an absolute path |
| origin | Original URL of the file. |
| file_hash | The expected hash string of the file after download. The sha256 and md5 hash algorithms are both supported. |
| cache_subdir | Subdirectory under the Keras cache dir where the file is
saved. If an absolute path |
| hash_algorithm | Select the hash algorithm to verify the file. options are 'md5', 'sha256', and 'auto'. The default 'auto' detects the hash algorithm in use. |
| extract | True tries extracting the file as an Archive, like tar or zip. |
| archive_format | Archive format to try for extracting the file. Options are 'auto', 'tar', 'zip', and None. 'tar' includes tar, tar.gz, and tar.bz files. The default 'auto' is ('tar', 'zip'). None or an empty list will return no matches found. |
| cache_dir | Location to store cached files, when |
| untar | Deprecated in favor of 'extract'. boolean, whether the file should be decompressed |
Path to the downloaded file


|
| dictionary | error_messages |
| |
| | profile_username |
| |
A form on the Profile page that handles the user changing their username.
Definition at line 9 of file change_username_form.py.
◆ __init__()
| def capstoneproject.app_forms.change_username_form.ChangeUsernameForm.__init__ |
( |
|
self, |
|
|
|
args, |
|
|
|
kwargs |
|
) |
| |
◆ save_username()
| def capstoneproject.app_forms.change_username_form.ChangeUsernameForm.save_username |
( |
|
self, |
|
|
|
request |
|
) |
| |
Updates the user's username to the new value.
:param request: The HTML request containing the user's current information.
:return: True if the username was updated.
Definition at line 47 of file change_username_form.py.
◆ update_username()
| def capstoneproject.app_forms.change_username_form.ChangeUsernameForm.update_username |
( |
|
self, |
|
|
|
request |
|
) |
| |
This function facilitates changing the user's username.
:param request: The HTML request containing the user's current information.
:return: False if the username could not be changed, otherwise True.
Definition at line 66 of file change_username_form.py.
◆ username_available()
| def capstoneproject.app_forms.change_username_form.ChangeUsernameForm.username_available |
( |
|
self | ) |
|
Checks if the desired new username is available. Raises a Validation Error if the username is unavailable.
:return: None.
Definition at line 58 of file change_username_form.py.
◆ error_messages
| dictionary capstoneproject.app_forms.change_username_form.ChangeUsernameForm.error_messages |
|
static |
Initial value:= {
'unavailable_username': _("The username is unavailable.")}
Definition at line 13 of file change_username_form.py.
◆ profile_username
| capstoneproject.app_forms.change_username_form.ChangeUsernameForm.profile_username |
|
static |
Initial value:= forms.CharField(
label=_("New Username"),
max_length=20,
strip=False,
widget=forms.TextInput(
attrs={'class': 'form-control',
'placeholder': 'Enter username'}),
help_text=_("Enter a new username with less than 20 characters."))
Definition at line 16 of file change_username_form.py.
The documentation for this class was generated from the following file:


mkdir ~/.npm-global npm config set prefix '~/.npm-global'
... add to profile:
NPM_PACKAGES="$HOME/.npm-global" PATH="$NPM_PACKAGES/bin:$PATH" export NPM_PACKAGES PATH
This has been tested on IntelliJ 2019.1!
Situation: you have a project X which sets up a Sparkserver. This one runs on port abcd. In this case, debugging will be set up on port 8086 on your local development machine:
.suo
file in .vs/{PROJECT_NAME}/v15
Close()
FormBorderStyle: none Opacity: 0 ShowIcon: false ShowInTaskbar: false WindowState: Minimized
Visible = false
at the end of Form1_Load
, this will hide the icon when using ctrl + tabTray Icon: 16x16, 20x20, 24x24
App Icon: 16x16, 24x24, 32x32, 48x48, 64x64, 96x96, 128x128, 192x192, 256x256
Add the MsTest.TestAdapter and MsTest.TestFramework nuget packages to your unittest solution.
Then you can annotate your method with DataTestMethod
and use DataRow
's to pass data to the method:
[TestClass] public class NumbersTests { [DataRow(0, 0)] [DataRow(1, 1)] [DataRow(2, 1)] [DataTestMethod] public void VerifyThatTwoSelectedNumbersAreEqual(int number1, int number2) { Assert.AreEqual(number1, number2); } }
Yep, fails in the 3rd test ...


Long settled by indigenous peoples of the Dorset culture, the island was abandoned when visited by the Icelandic Viking Leif Eriksson in the 11th century, who called the new land "Vinland". The next European visitors to Newfoundland were Portuguese, Basque, Spanish, French and English migratory fishermen. The island was visited by the Genoese navigator John Cabot (Giovanni Caboto), working under contract to King Henry VII of England on his expedition from Bristol in 1497. In 1501, Portuguese explorers Gaspar Corte-Real and his brother Miguel Corte-Real charted part of the coast of Newfoundland in a failed attempt to find the Northwest Passage. (After European settlement, colonists first called the island Terra Nova, from "New Land" in Portuguese and Latin.)
X


[DOCS] for sample:
Which sample?
Sample name or URL
Link to closest heading
What is the issue with this sample’s docs?


git-show-index - Show packed archive index
git show-index < idx-file
Reads given idx file for packed Git archive created with git pack-objects command, and dumps its contents.
The information it outputs is subset of what you can get from git verify-pack -v; this command only shows the packfile offset and SHA-1 of each object.
Part of the git(1) suite


This week I made a pillow case and a hat with some words on it. The hat was very easy to make; however, I feel that I need a lot of practice with the sewing machine to make a perfect pillow case and etc. It is hard to sew in a straight line.


| GTK+ 2.0 Tutorial using Ocaml | ||
|---|---|---|
| <<< Previous | Container Widgets | Next >>> |
Scrolled windows are used to create a scrollable area with another widget inside it. You may insert any type of widget into a scrolled window, and it will be accessible regardless of the size by using the scrollbars.
The function GBin.scrolled_window is used to create a new scrolled window.
val GBin.scrolled_window : ?hadjustment:GData.adjustment -> ?vadjustment:GData.adjustment -> ?hpolicy:Gtk.Tags.policy_type -> ?vpolicy:Gtk.Tags.policy_type -> ?placement:Gtk.Tags.corner_type -> ?shadow_type:Gtk.Tags.shadow_type -> ?border_width:int -> ?width:int -> ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> scrolled_window |
Where the argument hadjustment is the adjustment for the horizontal direction, and vadjustment, the adjustment for the vertical direction. These are almost always not given.
method set_hpolicy : Gtk.Tags.policy_type -> unit method set_vpolicy : Gtk.Tags.policy_type -> unit |
This sets the policy to be used with respect to the scrollbars. The set_hpolicy sets the policy for the horizontal scrollbar, and the set_vpolicy for the vertical scrollbar.
The policy may be one of `AUTOMATIC or `ALWAYS. `AUTOMATIC will automatically decide whether you need scrollbars, whereas `ALWAYS will always leave the scrollbars there.
You can then place your object into the scrolled window using the following function.
method add_with_viewport : GObj.widget -> unit |
Here is a simple example that packs a table with 100 toggle buttons into a scrolled window. I've only commented on the parts that may be new to you.
(* file: scrolledwin.ml *) let main () = (* Create a new dialog window for the scrolled window to be * packed into. *) let window = GWindow.dialog ~title:"ScrolledWindow example" ~width:300 ~height:300 ~border_width:0 () in window#connect#destroy ~callback:GMain.Main.quit; (* Create a new scrolled window *) let scrolled_window = GBin.scrolled_window ~border_width:10 ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC ~packing:window#vbox#add () in (* Create a table of 10 by 10 squares. * Set the spacing to 10 on x and 10 on y *) let table = GPack.table ~rows:10 ~columns:10 ~row_spacings:10 ~col_spacings:10 ~packing:scrolled_window#add_with_viewport () in for i = 0 to 10 do for j=0 to 10 do GButton.toggle_button ~label:("button ("^ string_of_int i ^","^ string_of_int j ^")\n") ~packing:(table#attach ~left:i ~top:j ~expand:`BOTH) () done done; (* Add a "close" button to the bottom of the dialog *) let button = GButton.button ~label:"close" ~packing:window#action_area#add () in button#connect#clicked ~callback:(window#destroy); (* This grabs this button to be the default button. Simply hitting * the "Enter" key will cause this button to activate. *) button#grab_default (); window#show (); GMain.Main.main () let _ = Printexc.print main () |
Try playing with resizing the window. You'll notice how the scrollbars react. You may also wish to use the #misc#set_size_request method call to set the default size of the window or other widgets.
| <<< Previous | Home | Next >>> |
| Viewports | Up | Button Boxes |


The autocomplete component creates a text input that filters a data source based on user entries and then displays search results in a dropdown list. Users enter text in the text input, and then the component searches the data source. Search results appear in a dropdown list, and users can select an item from the filtered list. The selected item appears in the text input, and the autocomplete component stores and saves the entire object.
The autocomplete component is effective for scenarios where users know what they are looking for and can select a single item. For guidance on which selection inputs to use in other scenarios, see the form design guidelines.


Modal Example
Open Modal
×
Modal Header
Some text in the modal.
Challenge Management
Add challenge:
Challenge name:
Remove challenge:
Challenge name:
View challenges:
Level Management
Add level:
Level name:
Challenge under:
Remove level:
Level name:
Challenge name:
View Levels:
Question Management
Add questions:
Question:
Correct Answer:
Level:
Challenge
View all questions:
Remove Question
Question Number:
Level name:
Challenge name:
User Management
Add user:
Name:
Surname:
Username:
Password:
Email Address
Type:
Player
Admin
Remove user:
Username:


Hai!!!!.I am Arunachalam.I started coding at my age of 18.After started learning I felt that I started too late !!!.Because there are many things to learn ,challenges needed to solve the problems.However I liked the way it has taken me to get experience to develop real world applications .
These experiences made me a Creative web developer dedicated to building and optimizing the performance of user-centric, high-impact websites for nationwide, F500 and global companies. Leverage technical, analytical and problem-solving skills to create dynamic, high-speed websites, apps and platforms fueling competitive advantage and revenue growth.
View ResumeWebsite designed for a startup company in Zoho Platform.The website was developed in bootstrap.I has learned to implement the card and modal in an effective way.Added jquery functions to it.
Website for downloading the pdf and audio books for free.Voice conversion code was implemented in python.Then the website is designed in bootstrap.Backend frameworks php is used
Website was developed to get the proper study resources for my department.All the files have been attached in this website so that the students can get benefited from it.


Sorry, your browser doesn't support canvas. Please try another.
Terms and Condition:1. The following amount shall be redeemed to you. 2. After the completion of 3 projects. 3. The amount shall be credited to you with your respective pay for 3 projects.


Modern JavaScript for Ancient Web Developers trackchanges.postlight.com/modern-javascr…
Thu, 23 Mar 2017 at 2:01pm
RT @ChainReactConf: "When to Go Native Over Javascript"? @htormey has the answers in his talk at #chainreact2017! https://t.co/l3qD9Q2Zfn
Thu, 23 Mar 2017 at 1:50pm


Green = Publishing nodes Blue = Consuming nodes Orange = Relaying nodes Grey = Inactive nodes on this stream


I see how my own values drive my relationships, my success and my decisions. These values encase my own identity so lets dive right on in and get to know me…
Sorry I had trouble shortening this list…..
The Aotearoa i’ve grown up is filled with people who accept the differences and choices of others and enjoying simple pleasures and experiences. I know that because of this I have been extremely lucky. I grew up with a dad that only shops at secondhand clothing stores and has biked to work everyday for 45 years. A mother who has worked as a nurse both in her professional and personal life, constantly sacrificing for the people around her.
I have grown up in a family where the culture is unconditional love, acceptance and courage, where what we were was always enough.
Living in a society littered with hypocrisy, the values I associate with are challenged everyday. The decision I feel confronts me most often is the attitude and mindset towards consumption. What we consume and how we consume it.
Because of my upbringing and privilege one ethical decision I have made and continue to make each day is to bike or walk as a primary means of transport.
Originally making this decision I thought about the extra time and effort needed to get around. I realised beyond turning up sweaty to all future social engagements it was really no real sacrifice at all it just requiring slightly better organisation on my part and some comfy shoes.
I think my main strengths in a working environment are being kind and open, determined, logical and easy going. My main limitations in a work environment are feeling like a burden. I can take things too personally and not ask for help when I know it’s needed. I’m also a rubbish public speaker :)
I can see how being too easy going, I may forfeit opportunities to extend myself in this programme and I’ll have to work on the public speaking side of things. I know how important it is to be able to communicate ideas, successes, failures and ask for help. These are a few of my goals to work on while at dev and beyond the programme.
In my last place of work as an accountant I received a lot of resistance from the CEO who didn’t like dealing with numbers. She was all about doing it on the fly, no plan and figuring it out as we go, as a conservative decision maker this was really hard for me.
Eventually we discussed how we could better communicate the financial aspects of the company performance so i could feel heard and she could feel informed. We decided to implement a more visual approach to the interaction and this really improved our communication and the quality of the decision making.


Jumbotron
This is jumbotron
mjhdsgja jhhfkdauhyi jhadkuihfi jhdasiuyf jhaskuhyia kjhdsfaiuo kjhasdiuhf
Hi there


Luxury Resorts "R" Us
Amenities
Activities
Pictures
Contact_Us
Book_Now
Guest Submitted Photos
Return to Home


Home
Login
Contact Us
Reservation
About
Fill in the details
First Name
Last Name
Country
India
Canada
USA
Subject


Musical Minesweepers
Project 2 of IGME230.FIND YOUR INNER MINESWEEPER.
WIN AT SOME KIND OF SWEEPSTAKES.

Play the minesweeper game here.
FIND YOUR INNER MINESWEEPER.
WIN AT SOME KIND OF SWEEPSTAKES.

Play the minesweeper game here.


Postez votre avis .
Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order won’t be shipped until the funds have cleared in our account.


@firedream
.

Calculate
Curation rewards may change according to future upvotes/downvotes and feed-price
Steem Curation
Rewards


Boilerplate with Frontstart components to kickstart front-end projects.
Go to Github organization for more information.


Dave Rennie named new Australia head coach but will see out season with Glasgow Warriors
by Duncan SmithGlasgow boss Dave Rennie has confirmed he will be leaving Scotstoun at the end of the season to become the next head coach of Australia.
He will be succeeded by Scotland assistant coach Danny Wilson, who led Cardiff Blues to European Challenge Cup glory in Bilbao as well as coaching Wales Under-20s between 2010 and 2014.
Kiwi coach Rennie, who had also been linked with the All Blacks job, joined the Warriors in 2017 from Super Rugby side Waikato Chiefs, guided his side to the Guinness PRO14 Final at Celtic Park in May, which ended in an 18-15 loss to Leinster, and the quarter-finals of the Heineken Champions Cup last season.
Rennie said: “We’ve loved our time here around great people. It’s been as good as I could have wished for after leaving New Zealand.
“It’s an exciting opportunity to coach at international level and an added bonus that we’ll be a little closer to home, near our kids and grandkids.
“All my focus is on the rest of the season in Glasgow as we strive to be in the mix come play-off time in both comps again.”
SRU chief executive Mark Dodson said: “I’d like to thank Dave for the contribution he has made to the development of Glasgow Warriors over the past two seasons.
“He has led a talented playing and coaching group with passion and encouraged the team to express themselves and play positive rugby throughout.
“He enhanced the strong, positive culture at Scotstoun and pushed the team to achieve significant results, playing some outstanding rugby on the way.
“Dave has conducted himself throughout with great professionalism and I know he will want to sign off his time in Glasgow with some silverware. We wish him well for the future.”


keyboard_backspace
Back to menu
Information Protection
Additive Cipher
Encrypt
Decrypt
Key
Input
Output
Result of decryption without key
Submit
Multiplicative Cipher
Encrypt
Decrypt
Key
The key you entered can't be used for this cipher method!
Input
Output
Result of decryption without key
Submit
Affine Cipher
Encrypt
Decrypt
Key #1
The key you entered can't be used for this cipher method!
Key #2
Input
Output
Result of decryption without key
Submit


Doctor_Strange
While on a journey of physical and spiritual healing, a brilliant neurosurgeon is drawn into the world of the mystic arts.


LHCC, we believe the following
- Jesus is the only way to heaven
- Jesus is God
- Jesus died and rose again and he will come to take us
- Every one has God a godly gift and talent to excel in the world
- Every one has got a Godly destiny during his life time in the world
- We believe in holy trinity
- We believe in holiness as the only ticket to heaven
- We believe in fellowship as the way to serve God


The GECCO (Genetic and Evolutionary Computation Conference) Proceedings include excellent tutorials on many of these subjects for further reading.
Exercise
Break into groups and discuss:
What drives selection in biological evolution? Can these selection pressures be expressed, quantified, or measured? How can we replicate selection pressures in artificial evolution?


ESP32 Project Update 1
march 29, 2019
A lot of planning and soldering was done today. Because the neopixel nano 2427s were not possible to mount directly to the touch sensors by themselves (the DIN pin pointed into the touch button, which would require a wire going underneath the led to connect to it), I've decided to make a strip of the leds separately. For each of the LEDs, a wire was soldered to each of the pins and hot glue was added on top to protect the solder joints, as they really weren't meant to be soldered this way.
LED solder pattern
DIN, VCC, DOUT, GND from top right, clockwise
Tray of finished LEDs
These were then tested with an Arduino with example FastLED code just to check that the colors and pins were correct.
Testing LEDs with an Arduino
Now that the LEDs have been mde separate, there's no real reason to keep the LEDs on the touch sensors, as they would just drain power and be distracting to the viewer. Because of this, I desoldered the LEDs from all the touch sensors and covered the solder pads with hot glue to prevent any possible short circuits. Internally, the circuit for the LED was probably in parallel, which means that despite the removal of the LED, the touch sensor is still fully functional
Finished Touch Sensors


Lessening road mishaps
THE government, through the elite Philippine National Police-Highway Patrol Group (PNP-HPG), is out to lessen the number of vehicular accidents in various parts of the country.
PNP-HPG records show that a total of 9,663 road crashes were recorded nationwide for the first nine months of the year, killing 1,186 persons and hurting 8,376 others.
Last year, the group recorded 11,179 road mishaps that led to the death of 1,50l persons and injuries to 13,233 others.
Today, we see a government that appears committed to address the problems confronting the commuting public, notably drivers, conductors, passengers and even pedestrians.
Certainly, the PNP-HPG under B/Gen. Dionardo Carlos has a multi-pronged and highly-effective “program of action” aimed at ensuring the safety of land travel across the country.
Part of the program is educating the country’s drivers of both public and private motor vehicles on responsible driving and continued road clearing operations as decreed by President Duterte.
“Tutulong kami sa local government units sa clearing operations para mas maging maluwag, may space ang motorista para sila ay makapagpatakbo ng sasakyan,” said the one-star PNP general.
Nobody will argue with the PNP-HPG director, a known disciplinarian, when he said: “If we reduce these mistakes, ang human factor, mas magiging ligtas ang driver at rider.”
Carlos, a former spokesman of the 190,000-member PNP which is civilian in nature but national in scope, attributed vehicular accidents to human error and lack of road discipline.
Lack of discipline includes overspeeding, drunk driving, bad overtaking, use of mobile phone while driving, bad turning, mechanical defects and poor maintenance, he said.
We cannot overemphasize the importance of concerned government authorities reminding our motorists, passengers and even pedestrians to obey traffic laws, rules and regulations.


301_Gambler147.py
class Solution:
def eatenApples(self, apples: List[int], days: List[int]) -> int:
# greedy, use a heap
# (minimum day, number)
n = len(apples)
h = []
res = 0
for i, c in enumerate(apples):
# push
if c > 0:
heapq.heappush(h, (i + days[i] - 1, c))
while h and h[0][0] < i:
heapq.heappop(h)
# get top apple
if h:
res += 1
j, y = heapq.heappop(h)
if y > 1:
heapq.heappush(h, (j, y-1))
# now calculate how many apples we can eat after day n
cur = n
while h:
j, y = heapq.heappop(h)
# we can eat min(y, j-n)
if j >= cur:
res += min(y, j-cur+1)
cur += min(y, j-cur+1)
return res


Authentication demo
Email
Password
Login
Local storage demo:
Quiz activation demo
Get my quizzes
My quizzes:
Player demo:
Access code:
Join quiz
Professor demo:
Activate quiz width ID 1
Registration demo:
First name
Last name
Email
Password
Register
Option 1:
Option 2:
Option 3:
Option 4:


This example will use a slightly different form of transaction table. Here the transaction records explicitly tell the MERGE command what to do. 'I' records will insert new values, 'U' records will update existing records, and 'D' will delete records from the product table. If records are not matched, they are ignored. This means that deletes and updates of unknown product records will not take place, but no error record is generated.
This first example will fail because the transaction records contain a duplicate key value (3) for deletes.


I want to become a software engineer. I started learning computer from age 5. My dad taught basic computer knowledge. To achieve my goal, I need to learn programming languages. I attended a free trial class in (Whitehat Jr) but I didn’t feel like joining the programming language because of the platform they are using.
Presently, I am learning Python language. My dad’s colleague started teaching me python at first. After some days I created a small programme. It even helped in maths like calculating big numbers and BOADMAS. I spend a lot of time on computers to achieve goals.
My inspiration is Bill Gates co-founder of Microsoft and Tanmay Bakshi, youngest programmer, author and employee at Google.
My dream is creating an OS like Windows and Mac.
I realized that I am very interested in computers. During covid-19 pandemic lockdown holidays, I started exploring windows 10. My uncle teaches me some computer knowledge like activating Windows and Microsoft Office with the product key.
Finally, I upgraded my laptop from Windows 10 to windows 11 on my own. I am exploring more in windows 11. My parents and my uncle support me in doing all these activities.


One high voltage ear-numbing brain-wracking quiz to begin your Pearl. Audio-Visual quiz, starting on Midnight.
The classic India quiz. A medley of questions encompassing everything and anything Indian.
An assortment of refreshingly different and unpredictable questions. Come and see for yourself!


Mahotas is a computer vision and image processing library for Python based on NumPy. Contact: Luis Pedro Coelho


{% load static %}
Click on a button to take action or secure yourself.
View safe routes to reach a destination; or mark an area as unsafe for women.
Feeling unsafe & unsure? Set a timer alert that alerts authorities after 10 minutes of inactivity.
Send an automatic 100 call and alert registered near ones.


The game uses assets from the official release. If they failed to be fetched automatically, you can provide your own copy here.


Welcome to Velociraptor Escape.
If you're here by mistake,
click here
.
If you're here for the puzzle,
click here
.
Thanks
xkcd
!


{% extends "horizon/common/_modal_form.html" %} {% load i18n %} {% load url from future %} {% block modal-header %} Forgot your password? {% endblock %} {% block form_action %}{% url 'fiware_auth_request' %}{% endblock %} {% block modal-body %}
Write down the email address you associated to your account and you will receive an email with instructions about how to reset your password in a few minutes
{% include "horizon/common/_form_fields.html" %} {% endblock %} {% block modal-footer %} {% endblock %}


The youngest of five, Turley was born in Charleston, West Virginia. His Dad was a pipe fitter and his Mother a seamstress and housewife. Although Richard’s life has been filled with what others perceive as tragedy, he exudes a positive spirit contagious to all whom cross his path. Woven throughout his life story, he demonstrates the ability to direct energy from life challenges into an optimistic attitude that continues to drive him forward.
read moreTurley has worked with all of the top studios, musicians, engineers and publishing companies in Nashville, LA, and Atlanta. His production portfolio includes just about every kind of music. Contact him today to get started!
If you want to see Turley live, check out my calendar to see when I will be in your area. If you are interested in booking me to play at your venue, reach out and let me know!
+1<PHONE_NUMBER>


Last Updated: 10:45am on Thursday 1st August 2019
The information distributed in conjunction with this website is offered to you on your acceptance of these Terms of Use, our Privacy Policy and other notices posted on this website. Your use of any content presented in any and all areas of the website indicates your acknowledgment and agreement to these Terms of Use, our Privacy Policy and other notices posted on this website. If you do not agree to be bound by and comply with all of the foregoing, you may not access or use our information or website services. We suggest you print a copy of each of these documents for your records.
shall have the right, at its sole discretion, to modify, add or remove any terms or conditions of these Terms of Use without notice or liability to you. Any changes to these Terms of Use shall be effectively immediately following the posting of such changes on this website. The most recent version of these Terms of Use may always be found at /terms_of_use/. You agree to review these Terms of Use from time to time and agree that any subsequent use by you of this website following changes to these Terms of Use shall constitute your acceptance of all such changes.
You agree to follow all applicable laws and regulations when using this website. Furthermore, you agree that you shall not:
By uploading, posting or otherwise transmitting through or to our website any content, you grant to us, our successors and assigns, a non-exclusive, world-wide, royalty free, perpetual, non-revocable license to use or distribute such content in any manner otherwise than as stated in our Privacy Policy.
You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where "" is hosted, USA, or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that "" have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, "" shall not be held responsible for any hacking attempt that may lead to the data being compromised
By accessing "", you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use "". We may change these at any time and we’ll do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of "" after changes mean you agree to be legally bound by these terms as they are updated and/or amended.
The Services and all information, content, materials, products (including software), and other services included on or otherwise made available to you through the Services are provided by on an "as is" and "as available" basis. makes no representations or warranties of any kind, express or implied, as to the operation of the Services, or the information, content, materials, products (including software), or other services included on or otherwise made available to you through the Services. You expressly agree that your use of the Services is at your sole risk. To the full extent permissible by law, disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose. does not warrant that the Services, information, content, materials, products (including software) or other services included on or otherwise made available to you through the Services, servers, or electronic communications sent from are free of viruses or other harmful components.
To the full extent permissible by law, will not be liable for any loss of profits or any indirect, incidental, punitive, special or consequential damages arising out of or in connection with this these Terms. Further, to the full extent permissible by law, ’s aggregate liability arising out of or in connection with these Terms will not exceed the total amounts you have paid (if any) to under this Agreement during the twelve (12) months immediately preceding the events giving rise to such liability. These limitations and exclusions regarding damages apply even if any remedy fails to provide adequate compensation.
This section only applies to the extent permitted by applicable law. If you are prohibited by law from entering into the indemnification obligation below, then you assume, to the extent permitted by law, all liability for all claims, demands, actions, losses, liabilities, and expenses (including attorneys’ fees, costs and expert witnesses’ fees) that are the stated subject matter of the indemnification obligation below.
You agree to defend, indemnify, and hold harmless , its affiliates, and licensors, and their respective officers, directors, employees, contractors, agents, licensors, and suppliers from and against any claims, liabilities, damages, judgments, awards, losses, costs, expenses, or fees (including reasonable attorneys’ fees) resulting from your User Contributions or violation of these Terms.


Step 1
Copy all products underneath: "Artikelspecificatie" that you want in your spreadsheet. This can also include Emballage and Bestelkosten if you want them in your sheet.
Step 2
Paste the data into the textField with the name: "Bestelde producten".
step 5
click on the "Format" button.


What?
Post view is a quick way to share articles you find on the web. You can go the New page and fill in the post info, and get a link. This way, you can send only the link, while still being able to share information about the post.
Post view is a quick way to share articles you find on the web. You can go the New page and fill in the post info, and get a link. This way, you can send only the link, while still being able to share information about the post.


Information
| SR. No | HospitalName | ChronicDisease | Disease | DiseaseType | DiseaseCategory | symptom | allergies | AlcoholConsumption | SmokingHabits | medicines | tests | Date |
|---|
| SR. No | HospitalName | ChronicDisease | Disease | DiseaseType | DiseaseCategory | symptom | allergies | AlcoholConsumption | SmokingHabits | medicines | tests | Date |
|---|


News App
Home
Technology
Business
Sports
Entertainment
{{sourcename}}'s Top Headlines
{%for article in articles%}
{{article.title}}
Published on : {{article.description}}
Published on : {{article.publishedAt}}
Read Online
{%endfor%}


Mr. KIRONJI
Hi there, I am a self proclaimed artist with a passion for web design and programming. I'm currently studying web development at Moringa School, a Silicon Savanna Tech hub, in Kenya Nairobi.
I decided to take programming and advance my tech skills after having been to University and studied Computer Science. However, I did not feel like the knowledge acquired there could equip me with the necessary programming skills required in the Tech Industry. And so, I took up the challange and decided to enroll in a bootcamp and have never looked back ever since.
I had done some simple projects prior to joining Moringa written in languages like
I currently have different hobbies revolving around


Class Circle
Represents a circle EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Circle : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceCircle()
Initializes a new instance of the Circle
class.
Declaration
public Circle()
Circle(Vector2, Double)
Initializes a new instance of the Circle
class.
Declaration
public Circle(Vector2 center, double radius)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | center | Circle Vector2 in world coordinates. |
| System.Double | radius | Circle radius. |
Circle(Vector3, Double)
Initializes a new instance of the Circle
class.
Declaration
public Circle(Vector3 center, double radius)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | center | Circle Vector3 in world coordinates. |
| System.Double | radius | Circle radius. |
Properties
| Improve this Doc View SourceCenter
Gets or sets the circle Vector3 in world coordinates.
Declaration
public Vector3 Center { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Radius
Gets or set the circle radius.
Declaration
public double Radius { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Thickness
Gets or sets the circle thickness.
Declaration
public double Thickness { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Methods
| Improve this Doc View SourceClone()
Creates a new Circle that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Circle that is a copy of this instance. |
Overrides
| Improve this Doc View SourcePolygonalVertexes(Int32)
Converts the circle in a list of vertexes.
Declaration
public List<Vector2> PolygonalVertexes(int precision)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | precision | Number of vertexes generated. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<Vector2> | A list vertexes that represents the circle expressed in object coordinate system. |
ToPolyline(Int32)
Converts the circle in a Polyline.
Declaration
public LwPolyline ToPolyline(int precision)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | precision | Number of vertexes generated. |
Returns
| Type | Description |
|---|---|
| LwPolyline | A new instance of LwPolyline that represents the circle. |
TransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Non-uniform scaling is not supported, create an ellipse from the circle data and transform that instead.
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.


Linear Regression
December 19, 2017
Python pandas machine learning matplotlibThis post covers the first exercise from Andrew Ng’s Machine Learning Course on Coursera.
Linear Regression with One Variable
Read the data into a pandas dataframe.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
data1 = pd.read_csv('ex1data1.txt', names=['Population', 'Profit'])
data1.head()
| Population | Profit | |
|---|---|---|
| 0 | 6.1101 | 17.5920 |
| 1 | 5.5277 | 9.1302 |
| 2 | 8.5186 | 13.6620 |
| 3 | 7.0032 | 11.8540 |
| 4 | 5.8598 | 6.8233 |
Plotting the Data
Visualize the data.
plt.figure(figsize=(12, 8))
plt.xlabel('Population of City in 10,000s')
plt.ylabel('Profit in $10,000s')
plt.grid()
plt.plot(data1.Population, data1.Profit, 'rx')
[<matplotlib.lines.Line2D at 0x1103eee80>]
Gradient Descent
Fit the linear regression parameters $\theta$
to the dataset using gradient descent.
Update Equations
The objective of linear regression is to minimize the cost function
$J(\theta)=\frac{1}{2m} \sum_{i=1}^m(h_\theta(x^{(i)})-y^{(i)})^2$
where the hypothesis $h_{\theta}(x)$
is given by the linear model
$h_{\theta}(x)=\theta^{T} x=\theta_0+\theta_1x_1$
The parameters of the model are the $\theta_j$
values. These values will be adjusted to minimize cost $J(\theta)$
. One way to do this is to use the batch gradient descent algorithm. In batch gradient descent, each iteration performs the update
$\theta_j:=\theta_j-\alpha\frac{1}{m} \sum_{i=1}^m(h_\theta(x^{(i)})-y^{(i)})x_j^{(i)}$
(Simultaneously update $\theta_j$
for all $j$
)
With each step of gradient descent, the parameters $\theta_j$
come closer to the optimal values that will achieve the lowest cost $J(\theta)$
.
Implementation
Add another one dimension to the data to accommodate the $\theta_0$
intercept term and initialize $\theta_j$
to $0$
.
# Get the number of features.
n = len(data1.columns)-1 # subtract the target column
# Create a function to pepare the data.
def prepareData(data, n):
"""
Add 1s column, convert to matrices,
initialize theta.
Args:
data: read the data file
n: int
Return:
x: a m by n+1 matrix
y: a m by 1 vector
theta: a n+1 by 1 vector
"""
# Add a column with 1s in the data set.
data.insert(0, 'Ones', 1)
# Define X and y, separating the data set.
x = data.iloc[:, 0:n+1]
y = data.iloc[:, n+1:n+2]
# Convert to matrices and initialize parameters theta to 0s.
# Theta is a vector [n + 1 x 1] and Theta Transpose is a vector [1 x n+1],
# where n is the number of features.
x = np.matrix(x.values)
y = np.matrix(y.values)
theta = np.matrix(np.zeros((n+1, 1)))
return x, y, theta
x, y, theta = prepareData(data1, n)
Initialize the learning rate $\alpha$
to 0.01 and the iterations to 1500.
# Initialize parameters for iterations and learning rate α.
iterations = 1500
alpha = 0.01
# Check the dimensions of the matrices.
x.shape, y.shape, theta.shape
((97, 2), (97, 1), (2, 1))
Computing the Cost $J(\theta)$
Performing gradient descent to learn minimize the cost function $J(\theta)$
, it is helpful to monitor also the convergence by computing the cost. Implement a function to calculate $J(\theta)$
and check the convergence of gradient descent implementation.
# Create a function to compute cost.
def computeCost(x, y, theta):
"""
Compute the cost function.
Args:
x: a m by n+1 matrix
y: a m by 1 vector
theta: a n+1 by 1 vector
Returns:
cost: float
"""
m = len(x)
cost = np.sum(np.square((x * theta) - y)) / (2 * m)
return cost
computeCost(x, y, theta)
32.072733877455676
Gradient Descent
Implement gradient descent with a loop structure. The cost $J(\theta)$
is parameterized by the vector $\theta$
, not $x$
and $y$
. That is, we minimize the value of $J(\theta)$
by changing the values of the vector $\theta$
, not by changing $x$
or $y$
. A good way to verify that gradient descent is working correctly is to look at the value of $J(\theta)$
and check that it is decreasing with each step. After the correct implementation of gradient descent and computeCost, the value of $J(\theta)$
should never increase, and should converge to a steady value by the end of the algorithm. The final parameters will be used to plot the linear fit and make predictions on profits in areas of 35,000 and 70,000 people.
# Create a function to implement gradient descent.
def gradientDescent(x, theta, iterations):
"""
Implement gradient descent.
Args:
x: a m by n+1 matrix
theta: a n+1 by 1 vector
Return:
theta: a n+1 by 1 vector
J_vals: a #iterations by 1 vector
"""
m = len(x)
J_vals = []
for i in range(iterations):
error = (x * theta) - y
for j in range(len(theta.flat)):
theta.T[0, j] = theta.T[0, j] - (alpha/m) * np.sum(np.multiply(error, x[:, j]))
J_vals.append(computeCost(x, y, theta))
return (theta, J_vals)
theta, J_vals = gradientDescent(x, theta, iterations)
Plot the Fit Line
theta_f = list(theta.flat)
xs = np.arange(5, 23)
ys = theta_f[0] + theta_f[1] * xs
plt.figure(figsize=(12, 8))
plt.xlabel('Population of City in 10,000s')
plt.ylabel('Profit in $10,000s')
plt.grid()
plt.plot(data1.Population, data1.Profit, 'rx', label='Training Data')
plt.plot(xs, ys, 'b-', label='Linear Regression: h(x) = %0.2f + %0.2fx'%(theta[0], theta[1]))
plt.legend(loc=4)
<matplotlib.legend.Legend at 0x113aaae80>
Predictions
# Predict the profit for population of 35000 and 70000.
print((theta_f[0] + theta_f[1] * 3.5) * 10000)
print((theta_f[0] + theta_f[1] * 7) * 10000)
4519.7678677
45342.4501294
Visualizing $J(\theta)$
Plot the cost over a 2-dimensional grid of $\theta_0$
and $\theta_1$
values to better understand the cost function $J(\theta)$
.
from mpl_toolkits.mplot3d import axes3d
# Create meshgrid.
xs = np.arange(-10, 10, 0.4)
ys = np.arange(-2, 5, 0.14)
xx, yy = np.meshgrid(xs, ys)
# Initialize J values to a matrix of 0's.
J_vals = np.zeros((xs.size, ys.size))
# Fill out J values.
for index, v in np.ndenumerate(J_vals):
J_vals[index] = computeCost(x, y, [[xx[index]], [yy[index]]])
# Create a set of subplots.
fig = plt.figure(figsize=(16, 6))
ax1 = fig.add_subplot(121, projection='3d')
ax2 = fig.add_subplot(122)
# Create surface plot.
ax1.plot_surface(xx, yy, J_vals, alpha=0.5, cmap='jet')
ax1.set_zlabel('Cost', fontsize=14)
ax1.set_title('Surface plot of cost function')
# Create contour plot.
ax2.contour(xx, yy, J_vals, np.logspace(-2, 3, 20), cmap='jet')
ax2.plot(theta_f[0], theta_f[1], 'rx')
ax2.set_title('Contour plot of cost function, showing minimum')
# Create labels for both plots.
for ax in fig.axes:
ax.set_xlabel(r'$\theta_0$', fontsize=14)
ax.set_ylabel(r'$\theta_1$', fontsize=14)
Linear Regression with Multiple Variables
The file ex1data2.txt contains a training set of housing prices in Portland, Oregon. The first column is the size of the house (in square feet), the second column is the number of bedrooms, and the third column is the price of the house.
data2 = pd.read_csv('ex1data2.txt', names=['Size', 'Bedrooms', 'Price'])
data2.describe()
| Size | Bedrooms | Price | |
|---|---|---|---|
| count | 47.000000 | 47.000000 | 47.000000 |
| mean | 2000.680851 | 3.170213 |<PHONE_NUMBER>74 |
| std | 794.702354 | 0.760982 |<PHONE_NUMBER>86 |
| min | 852.000000 | 1.000000 |<PHONE_NUMBER>00 |
| 25% | 1432.000000 | 3.000000 |<PHONE_NUMBER>00 |
| 50% | 1888.000000 | 3.000000 |<PHONE_NUMBER>00 |
| 75% | 2269.000000 | 4.000000 |<PHONE_NUMBER>00 |
| max | 4478.000000 | 5.000000 |<PHONE_NUMBER>00 |
Feature Normalization
Load and display some values from this dataset. By looking at the values, note that house sizes are about 1000 times the number of bedrooms. When features differ by orders of magnitude, first performing feature scaling can make gradient descent converge much more quickly:
- Subtract the mean value of each feature from the dataset.
- After subtracting the mean, additionally scale (divide) the feature values by their respective standard deviations.
# Normalize features, but NOT target price!
data2.iloc[:, 0:2] = data2.iloc[:, 0:2].apply(lambda x: (x - np.mean(x)) / np.std(x))
data2.describe()
| Size | Bedrooms | Price | |
|---|---|---|---|
| count | 4.700000e+01 | 4.700000e+01 | 47.000000 |
| mean | -9.448707e-18 | 2.480285e-16 |<PHONE_NUMBER>74 |
| std | 1.010811e+00 | 1.010811e+00 |<PHONE_NUMBER>86 |
| min | -1.461049e+00 | -2.882690e+00 |<PHONE_NUMBER>00 |
| 25% | -7.233261e-01 | -2.260934e-01 |<PHONE_NUMBER>00 |
| 50% | -1.433229e-01 | -2.260934e-01 |<PHONE_NUMBER>00 |
| 75% | 3.412850e-01 | 1.102205e+00 |<PHONE_NUMBER>00 |
| max | 3.150993e+00 | 2.430504e+00 |<PHONE_NUMBER>00 |
Gradient Descent
Previously, gradient descent was implemented on a univariate regression problem. The only difference now is that there is one more feature in the matrix $x$
. The hypothesis function and the batch gradient descent update rule remain unchanged. The code in the previous single variable part already supports multiple variables and can be used here too.
n = len(data2.columns)-1
x, y, theta = prepareData(data2, n)
# Initialize learning rate α.
alpha = 0.15
# Check the dimensions of the matrices.
x.shape, y.shape, theta.shape
((47, 3), (47, 1), (3, 1))
Selecting Learning Rates
A learning rate that converges quickly shall be found. Gradient descent will be run for 50 iterations at the chosen learning rate. The gradientDescent
function also returns the history of $J(\theta)$
values in a vector J_vals
. Finally, the J values are plotted against the number of the iterations. A learning rate within a good range is depicted in the following graph.
theta, J_vals = gradientDescent(x, theta, iterations=50)
plt.xlabel('Number of Iterations')
plt.ylabel('Cost J')
plt.title('Convergence of gradient descent with an appropriate learning rate', y=1.08)
plt.grid()
plt.plot(range(50), J_vals, 'r')
[<matplotlib.lines.Line2D at 0x113f74978>]
Make a Prediction
Make a price prediction for a 1650-square-foot house with 3 bedrooms.
# Predict the price for a 1650-square-foot house with 3 bedrooms.
# First normalize features using the std and mean values.
size = (1650 - 2000.680851) / 794.702354
bedrooms = (3 - 3.170213) / 0.760982
theta_f = list(theta.flat)
print('Price: $', (theta_f[0] + theta_f[1] * size + theta_f[2] * bedrooms))
Price: $<PHONE_NUMBER>48
Normal Equations
The closed-form solution to linear regression is
$\theta=(X^{T}X)^{-1}X^{T}y$
This formula does not require any feature scaling and gives an exact solution in one calculation: there is no “loop until convergence” like in gradient descent. It is still needed to add a column of 1’s to the $X$
matrix to have an intercept term $\theta_0$
.
from numpy.linalg import inv
data2 = pd.read_csv('ex1data2.txt', names=['Size', 'Bedrooms', 'Price'])
n = len(data2.columns)-1
x, y, theta = prepareData(data2, n)
# Create the normal equation.
def normalEquation(x, y):
"""
Get the analytical solution to linear regression,
using the normal equation.
Args:
x: a m by n+1 matrix
y: a m by 1 vector
Return:
theta: a n+1 by 1 vector
"""
theta = np.dot(np.dot(inv(np.dot(x.T, x)), x.T), y)
return theta
theta = normalEquation(x, y)
Check Prediction
Make the same prediction for a 1650-square-foot house with 3 bedrooms to check the analytical solutions.
# No need to normalize the features now!
theta_f = list(theta.flat)
print('Price: $', (theta_f[0] + theta_f[1] * 1650 + theta_f[2] * 3))
Price: $<PHONE_NUMBER>35
As it was expected, the predicted price with the normal equation is pretty similar to the one using the model fit with gradient descent.


Ferrari 488
In Kolkata
Home
Gallery
_
&
_
Encyclopedia
Supercars
_
In
_
Kolkata
Top
_
10
_
Lists
About
jquery slideshow
by WOWSlider.com v8.7


SumatraPDF documentation
SumatraPDF is a free PDF, EPUB, MOBI, CHM, XPS, DjVu, CBZ and CBR reader for Windows.
It’s small and starts up fast. Simplicity of user interface is important to us.
Downloads:
- latest stable release
- pre-release builds (latest features, potentially less stable)
Found a bug? Have feature request? Use issue tracker .
Have feedback or question? Discuss in forums .
Want to make SumatraPDF work better in your language? Contribute a translation .
Documentation for users
Use Sumatra as a pre-viewer for LaTeX editors
Configure Sumatra for restricted use
Setting Sumatra as default PDF reader
Information for developers
Join the project as a developer


AfipService
Example
Copyright © 2011 [name of plugin creator], released under the MIT license
[Validate]
Generated with the Darkfish Rdoc Generator 2.