Check variability in popular Cryptocurrencies
Select range:
Bitcoin Price
Bitcoin Price Variability
Ether Price
Ether Price Variability
Litecoin Price
Litecoin Price Variability
Statistics:
Ether
Litecoin
Bitcoin


Hello, My name is Muhammad Rakha Firdaus, I'm a student at Universitas Komputer Indonesia.
I'm passionate about IT and i have a many experience about Web Development, Software Engineering, and Data Science.
So, Lets get the course and we can learn together


Introduction
Get started with Fire UI, an open-source framework to help you build website easier.
Quick start
CSS
Copy and paste the stylesheet link
into your head
element to load Fire UI CSS.
<link rel="stylesheet" type="text/css" href="https://unpkg.com/<EMAIL_ADDRESS>Javascript
Some of our components require Javascript to work well, such as Code
and Navbar
feature. To do so: Place the
following script
tags inside your HTML file


Hundreds of millions of people store documents, photos, and videos in OneDrive.
Now with OneDrive for Business support (preview)!
OneDrive API provides your app access to more of what OneDrive has to offer. Use the rich API to integrate your app with OneDrive. Connect to OneDrive or OneDrive for Business (preview) with the OneDrive API.
Use the same API to connect to OneDrive and OneDrive for Business. Less code, more scenarios.
Give your app its own folder in OneDrive.
List changes to files and folders, to keep large sets of files in sync efficiently.
Reliably upload large files up to 10 GB.
Call the OneDrive API from your own web app.
Picker SDKs enable your app to open and save files on OneDrive with hardly any code.
Open and save files to OneDrive with ease from your Android app.
Quickly open and save files with your JavaScript app.
Use the document picker view to open and save files in OneDrive.
Use the Windows File Picker classes to open and save in your app.
Try out the new OneDrive API in an interactive API console.
Learn more about the OneDrive API through code samples.
Get started using the OneDrive API.
Still using Live SDK? Find the reference and sample code here.


Graduated from Rostov State University (Russia) in 1965.
PhD Phys & Math, ILTPE, 1974.
Assistant at the Department of Theoretical and Nuclear Physics of Rostov State University 1965-1973;
Started work at ILTPE in 1976 as a junior researcher, 1986-1991, researcher, 1991 - 2009 senior researcher.
Theoretical investigation of the phase transition and dynamical properties of the rare-earth magnetics.


Below is a log of the meals you've purchased at different Duke vendors. To add to this log, enter your information into the 'Enter a new meal page'!


--- layout: default ---
Antisemitic incidents in schools are a widespread and pervasive phenomenon. The ADL has reported a three-fold increase in school-based antisemitic incidences between 2015 and 2018, and a nearly two-fold increase in violent and non-violent incidences of antisemitism in general nationwide.
This project utilizes data from the ADL H.E.A.T. Map between 2016 and 2019 to identify incidents of antisemitism that specifically took place in schools.
These incidents in schools are influenced by demographic, historical, social, and political factors. This project brings this data together to construct a community typology at the national level. This typology will provide insight into the ways that school-based incidents of hate are enacted and reported in context.
Developing a community typology will allow providers to better target specific demographic, historical, and political attributes of the communities in which these incidents occur through curriculum and learning experiences.


Texas A&M-CC gets first win, beats UT Rio Grande Valley
by The Associated PressCORPUS CHRISTI, Texas (AP) — Jashawn Talton-Thomas scored 23 points with nine rebounds and Texas A&M-Corpus Christi beat UT Rio Grande 63-55 on Sunday at the Islander Invitational.
The Islander won their first game of the season to end a four-game losing streak.
For the third time this season the Islanders led at halftime and this time they made it hold up. They led 32-29 and never trailed in the second half.
Jalen White made 1 of 2 foul shots for a 9-8 Vaqueros lead with 15:49 before halftime. They never led again.
Myles Smith scored 15 points and Elijah Schmidt added 11 for Texas A&M-Corpus Christi. The Islanders had a 45-25 rebounding advantage over the Vaqueros (1-4).
Jordan Jackson led UT Rio Grande Valley with 13 points.
_____
For more AP college basketball: https://apnews.com/Collegebasketball and https://twitter.com/AP_Top25
The Associated Press


Previous: Topological Sorting, Up: Determining the Class Precedence List
This example determines a class precedence list for the class pie. The following classes are defined:
(defclass pie (apple cinnamon) ()) (defclass apple (fruit) ()) (defclass cinnamon (spice) ()) (defclass fruit (food) ()) (defclass spice (food) ()) (defclass food () ())
The set S_{pie}~= {pie, apple, cinnamon, fruit, spice, food, standard-object, t}. The set R~= {(pie, apple), (apple, cinnamon), (apple, fruit), (cinnamon, spice), \break (fruit, food), (spice, food), (food, standard-object), (standard-object, t)}.
The class pie is not preceded by anything, so it comes first; the result so far is (pie). Remove pie from S and pairs mentioning pie from R to get S~= {apple, cinnamon, fruit, spice, food, standard-object, t} and R~=~{(apple, cinnamon), (apple, fruit), (cinnamon, spice),\break (fruit, food), (spice, food), (food, standard-object), (standard-object, t)}.
The class apple is not preceded by anything, so it is next; the result is (pie apple). Removing apple and the relevant pairs results in S~= {cinnamon, fruit, spice, food, standard-object, t} and R~= {(cinnamon, spice), (fruit, food), (spice, food), (food, standard-object),\break (standard-object, t)}.
The classes cinnamon and fruit are not preceded by anything, so the one with a direct subclass rightmost in the class precedence list computed so far goes next. The class apple is a direct subclass of fruit, and the class pie is a direct subclass of cinnamon. Because apple appears to the right of pie in the class precedence list, fruit goes next, and the result so far is (pie apple fruit). S~= {cinnamon, spice, food, standard-object, t}; R~= {(cinnamon, spice), (spice, food),\break (food, standard-object), (standard-object, t)}.
The class cinnamon is next, giving the result so far as (pie apple fruit cinnamon). At this point S~= {spice, food, standard-object, t}; R~= {(spice, food), (food, standard-object), (standard-object, t)}.
The classes spice, food, standard-object, and t are added in that order, and the class precedence list is (pie apple fruit cinnamon spice food standard-object t).
It is possible to write a set of class definitions that cannot be ordered. For example:
(defclass new-class (fruit apple) ()) (defclass apple (fruit) ())
The class fruit must precede apple because the local ordering of superclasses must be preserved. The class apple must precede fruit because a class always precedes its own superclasses. When this situation occurs, an error is signaled, as happens here when the system tries to compute the class precedence list of new-class.
The following might appear to be a conflicting set of definitions:
(defclass pie (apple cinnamon) ()) (defclass pastry (cinnamon apple) ()) (defclass apple () ()) (defclass cinnamon () ())
The class precedence list for pie is (pie apple cinnamon standard-object t).
The class precedence list for pastry is (pastry cinnamon apple standard-object t).
It is not a problem for apple to precede cinnamon in the ordering of the superclasses of pie but not in the ordering for pastry. However, it is not possible to build a new class that has both pie and pastry as superclasses.
Previous: Topological Sorting, Up: Determining the Class Precedence List


Department Head: Amanda Meyer At the earliest levels, science classes are concerned with observation and reasoning. Students engage in a variety of projects, some lasting a few minutes and others lasting the full year. Students are expected to learn how to make coherent conjectures based on their experiences and their observations. They learn how to use experiment to test, support, and refute conjecture. Everything should be hands-on, with a strong emphasis on organization and clarity. This spirit continues through upper level classes. At each stage, students are asked to analyze conjecture and evidence. At times this is done via historical account. Students learn how people in the past resolved certain issues and are asked how they might design experiments to bolster or reject past explanations. Again, and always, experiments and organization dominate and, in so far as possible, every bit of information is produced by hands on activity. As the classes continue, it becomes increasingly difficult to maintain this principle. The body of available knowledge is so great that one can not reasonably expect to replicate all of it. This is inevitable, though it is hoped that by this stage students will have learned enough about the nature of scientific reasoning to have formed an appreciation of this body of knowledge--a respect for it, of course, but also a healthy degree of skepticism. Students must make and defend clear statements. All arguments are possible, but only defensible arguments may stand. Conjecture is the name of the game, but only testable conjectures are to be considered. That is, a viable conjecture must come with a set of tests which that conjecture might conceivably fail. Students are guided through that process from inception, from the mystery that comes with raw observation, to the careful analysis of experimental result. Clarity of exposition is critical throughout. Students are taught to present their experiment (its design and its results) lucidly and precisely. Where relevant, students read about science from historical and philosophical viewpoints. As with all disciplines, we teach science as an evolving set of beliefs and techniques and we emphasize not only the great successes of the field, but also its historical failures, its bounds and its limits. It is our belief that students learn science best through constant hands-on observation and experimentation. Wherever possible, all facts are demonstrated from scratch in the laboratory. As this becomes impractical, in upper level courses students are nonetheless encouraged to challenge the facts they receive. Even in cases where the student cannot hope to carry out the relevant experiment, it is a useful exercise to perform thought experiments and to try to imagine what experiments one might perform were practical or ethical considerations removed.
|


Coronation Street's Alexandra Mardell wows fans with throwback bikini snap
Alexandra joined Coronation Street last year
by Charlotte RodriguesAlexandra Mardell, who plays Emma Brooker in Coronation Street, has wowed fans with her throwback bikini picture.
The actress posted the picture to her Instagram page.
She captioned the post: "Jumping into Monday.
"5 years ago, now it's more of a crawl."
Fans rushed to comment on the picture.
One wrote: "You look amazing."
A second commented: "You look gorgeous, happy Monday xx."
A third said: "Wow."
Fans of Coronation Street know Alexandra joined the cast last year, however it was only this year viewers got to know the character a bit more.
Read More: Liz McDonald won't be killed off when Beverley Callard leaves Coronation Street
A couple of months ago, viewers discovered Emma is the daughter of Fiona Middleton, a former cobbles resident who lived in Weatherfield from 1992 till 1998.
After discovering Emma's dad John wasn't her biological father, Audrey figured out Emma's dad could be Steve McDonald when she realised Fiona was Emma's mum.
After doing a DNA test, Steve found out Emma was his daughter and, although Emma wasn't happy at first, she finally accepted that Steve was her biological dad.
Read More: Coronation Street's Lisa George shares a sweet pic with former co-star Katie McGlynn
Recently after her appendix burst and Emma was taken into hospital, Steve stayed by her side and Emma decided to take him up on his offer of staying at his flat whilst she recovered.
Steve's youngest daughter Amy was thrilled when her half-sister decided to stay with them and even faked a foot injury to get her sister to stay longer.
However, when Emma told her they couldn't got to their Little Mix concert if she had a foot injury, Amy was forced to admit she wasn't really hurt.
Coronation Street airs on Mondays, Wednesdays and Fridays at 7.30pm and 8.30pm on ITV.
Leave us a comment on our Facebook page @EntertainmentDailyFix and let us know what you think!


C. Rebhuhn, R. Skeele, J. J. Chung, G. Hollinger and K. Tumer, "Learning to trick cost-based planners into cooperative behavior," in Proc. IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Hamburg, Germany, Sept. 2015, pp. 4627-4633.
A. Nicolai, R. Skeele, C. Eriksen, and G. Hollinger, "Deep learning for laser based odometry estimation," in Proc. Robotics: Science and Systems Conference Workshop on Limits and Potentials of Deep Learning in Robotics (RSS), Ann Arbor, MI, June, 2016.
R. Skeele, J. Chung, G. Hollinger, and K. Tumer, "Risk aware graph search with uncertain edge costs," in Proc. IEEE International Conference on Robotics and Automation Workshop on Planning for Solving Complex Tasks, Reducing Uncertainty, and Generating Informative Paths & Policies (ICRA), Seattle, WA, May 2015.
C. Rebhuhn, R. Skeele, J. Chung, G. Hollinger, and K. Tumer, "Promoting cooperative behavior between cost-based planners," in Proc. IEEE International Conference on Robotics and Automation Workshop on Taxonomies of Interconnected Systems: Asymmetric Interactions in Distributed Robotics (ICRA), Seattle, WA, May 2015.


Home
Log In
|
My Trolley
|
My Account
|
Store Locator
|
Careers
|
Help
SEARCH:
Music
DVD
Games
Video
Music
DVD
Video
Games
Digital Music
Pre-Order
Ringtones
Gift Vouchers
Special Offers
Power Search
Welcome to MVC.co.uk
First time visitor?
|
Check out our pre-order pages
Search our 200,000
CDs
,
DVDs
and
Games
!
Home
Pre-Order
New Releases
Music
DVD
Video
Games
Special Offers
Features
Home
Your trolley is empty
DVD Pre Orders
Star Wars Trilogy (Episodes IV - VI) [Box Set]
DVD PG
RRP £44.99
£26.99
Kill Bill Volume 2
DVD 18
RRP £19.99
£16.99
21 Grams
DVD 15
RRP £19.99
£16.99
Dawn Of The Dead [2004]
DVD 18
RRP £19.99
£16.99
Smallville - Complete Season 2 Box Set
DVD 12
RRP £54.99
£45.99
Pre Order Music
Now That's What I Call Music! 58
- Various Artists
CD
£12.99
Always Outnumbered, Never Outgunned
- Prodigy
CD
£9.99
The Hives -
Tyrannosaurus Hives
CD
£9.99
Deborah Harry & Blondie -
The Finest Collection
CD
£6.99
Van Halen -
The Best Of Both Worlds - The Very Best Of Van Halen
CD
£9.99
Pre-Order Games
Grand Theft Auto: San Andreas
Playstation 2
RRP £39.99
£29.99
Doom 3
PC
RRP £39.99
£34.99
Half Life 2
PC
RRP £39.99
£34.99
Gran Turismo 4
Playstation 2
RRP £39.99
£36.99
The Sims 2
PC
RRP £39.99
£34.99
Pre-Order Videos
Kill Bill Volume 2
VHS 18
RRP £14.99
£12.99
21 Grams
VHS 15
RRP £12.99
£10.99
Starsky & Hutch
VHS 15
RRP £14.99
£12.99
Angel - Season 5 Box Set 1
VHS 15
RRP £34.99
£29.99
Agent Cody Banks 2
VHS 12
RRP £9.99
£7.99
Essential Titles
Essential Music
Wonderful World
- Eva Cassidy
CD
£9.99
Clubland Vol. 5
- Various Artists
CD
£10.99
More Music
Essential DVD
Finding Nemo [Collector's Edition]
DVD U
RRP £21.99
£11.99
Cold Mountain
DVD 15
RRP £22.99
£16.99
More DVDs
Essential Video
Cold Mountain
VHS 15
RRP £14.99
£10.99
Lost In Translation
VHS 15
RRP £12.99
£9.99
More Videos
Essential Games
Tom Clancy's Splinter Cell: Pandora Tomorrow
Microsoft XBOX
RRP £39.99
£31.99
UEFA Euro 2004
Playstation 2
£29.99
More Games
Home
|
Help
|
Contact Us
|
Terms & Conditions
|
Disclaimer
|
Privacy Statement


Get a Reference implicitly
Entity Beans returned by a query will have Reference/Proxy objects.
Note: From an Object graph perspective
they are the 'leaves' of the tree.
FindById find = new FindById(Bug.class, 1);
Bug bug = (Bug)Ebean.find(find);
// user is a reference/proxy
User user = bug.getUserLogged();
// details is also a reference/proxy
List details = bug.getDetails();
// this invokes a query for the user
String name = user.getName();
// this invokes a query for the details
int size = details.size();
The resulting SQL from the above is three separate queries. The last two are the
result of the lazy loading of userLogged and details.
<sql summary='[app.data.Bug]'>
SELECT b.id, b.body, b.cretime, b.duplicate_of, b.fixed_version,
b.reported_version, b.resolution, b.title, b.updtime,
b.priority_code, b.product_id, b.status_code, b.type_code,
b.user_assigned_id, b.user_logged_id
FROM b_bug b
WHERE b.id = ?
</sql>
<sql summary='[app.data.User]'>
SELECT u.id, u.cookie_login, u.cretime, u.email, u.error_count,
u.last_login, u.name, u.pwd, u.reset_code, u.reset_time,
u.salt, u.updtime, u.status_code
FROM s_user u
WHERE u.id = ?
</sql>
<sql summary='[app.data.BugDetail]'>
SELECT d.id, d.body, d.cretime, d.post_date, d.title, d.updtime,
d.bug_id, d.user_id
FROM b_bug_detail d
WHERE bug_id = ?
</sql>
setInclude()
If you knew that you where going to get the userLogged and details information then you
would likely be better off including them in the original query. The next example uses
the find.setInclude() method to specify that we want to also get that information.
FindById find = new FindById(Bug.class, 1);
// also include these associations in the query
find.setInclude("userLogged; details; ");
Bug bug = (Bug)Ebean.find(find);
// user is a reference/proxy
User user = bug.getUserLogged();
// details is also a reference/proxy
List details = bug.getDetails();
// this invokes a query for the user
String name = user.getName();
// this invokes a query for the details
int size = details.size();
The resulting SQL is:
<sql summary='[app.data.Bug, userLogged] +many[details]'>
SELECT b.id, b.body, b.cretime, b.duplicate_of, b.fixed_version,
b.reported_version, b.resolution, b.title, b.updtime,
b.priority_code, b.product_id, b.status_code, b.type_code,
b.user_assigned_id
, cu.id, cu.cookie_login, cu.cretime, cu.email, cu.error_count,
cu.last_login, cu.name, cu.pwd, cu.reset_code, cu.reset_time,
cu.salt, cu.updtime
, ed.id, ed.body, ed.cretime, ed.post_date, ed.title,
ed.updtime, ed.bug_id, ed.user_id
FROM b_bug b
LEFT OUTER JOIN s_user cu ON b.user_logged_id = cu.id
LEFT OUTER JOIN b_bug_detail ed ON b.id = ed.bug_id
WHERE b.id = ?
</sql>
In general, if you know you are going to use the information then you should
probably look to include it in the query.
Negative: including a OneToMany(or ManyToMany) repeats 'master'
In the example above we included the 'details' which is a OneToMany association.
If you take the sql and execute it you will note that the bug and userLogged information
(columns prefixed with b. and cu.) are repeated for each row in the
bug details (b_bug_detail) table.
That is, for 'master detail' queries (where a associated OneToMany or ManyToMany is included
in the query) the benefit of getting the 'details' in the same query as the 'master' needs
to be balanced against the cost of 'master' columns being repeated.
Note: Only one OneToMany(or ManyToMany) can be included
Also note that only one OneToMany or ManyToMany association is allowed to be included in the
query. The reason is that including more than one would result in a cartesian product and that
is likely to be unwise due to cost.
For the Bug entity bean it has two OneToMany associations in Details and Attachments. You could include
the Details or the Attachments but not both in a single query.
|


Namespace Fibula.Communications.Packets.Outgoing
Classes
AddCreaturePacket
Class that represents a packet with information about a creatue that was added to the game.
AnimatedTextPacket
Class that represents a packet with information about animated text that should be displayed to the player.
CharacterListPacket
Class that represents an outgoing character list packet.
ContainerAddItemPacket
Class that represents a packet for an item added to a container.
ContainerClosePacket
Class that represents a packet for a container being closed.
ContainerOpenPacket
Class that represents a packet for a container being opened.
ContainerRemoveItemPacket
Class that represents a packet for an item being removed to a container.
ContainerUpdateItemPacket
Class that represents a packet for an item being updated within a container.
CreatureHealthPacket
Class that represents a creature health packet.
CreatureLightPacket
Class that represents a creature light packet.
CreatureMovedPacket
Class that represents a packet for when a creature has moved.
CreatureSkullPacket
Class that represents a creature skull packet.
CreatureSpeechPacket
Class that represents a packet for when a creature speaks.
CreatureSpeedChangePacket
Class that represents a creature speed change packet.
CreatureTurnedPacket
Class that represents a packet for when a creature has turned.
GameServerDisconnectPacket
Class that represents a game server disconnect packet.
GatewayServerDisconnectPacket
Class that represents an outgoing login server disconnection packet.
HeartbeatPacket
Class that represents a packet for cancelling a player's walk.
HeartbeatResponsePacket
Class that represents a packet for cancelling a player's walk.
MagicEffectPacket
Class that represents a magic effect packet.
MapDescriptionPacket
Class that represents a map description packet.
MapPartialDescriptionPacket
Class that represents a partial map description packet.
MessageOfTheDayPacket
Class that represents an outgoing message of the day packet.
PlayerCancelAttackPacket
Class that represents a packet for cancelling a player's attack.
PlayerCancelWalkPacket
Class that represents a packet for cancelling a player's walk.
PlayerConditionsPacket
Class that represents a player's conditions packet.
PlayerDeathPacket
Class that represents a packet for a player's death.
PlayerInventoryClearSlotPacket
Class that represents a player's clear inventory slot packet.
PlayerInventorySetSlotPacket
Class that represents a player's filled inventory slot packet.
PlayerLoginPacket
Class that represents a player login packet.
PlayerSkillsPacket
Class that represents a player's skills packet.
PlayerStatsPacket
Class that represents a player stats packet.
ProjectilePacket
Class that represents a projectile packet.
RemoveAtLocationPacket
Class that represents a remove at positiion packet.
SquarePacket
Class that represents a square around a creature packet.
TextMessagePacket
Class that represents a text message packet.
TileUpdatePacket
Class that represents a tile update packet.
WaitingListPacket
Class that represents a waiting list packet.
WorldLightPacket
Class that represents a world light packet.


Dynamic update marker properties
Marker position
Popup text
Focus
Not focus
Popup message:
Draggable
Draggable
Not draggable
Icon
Default
Leaflet Icon
AwesomeMarker Icon
AwesomeIcon color
Red
Blue
Green
AwesomeIcon icon
Tag
USD
Heart
Home


Address Book¶
-
class
O365.address_book.
AddressBook
(*, parent=None, con=None, **kwargs)[source]¶ Bases:
O365.address_book.ContactFolder
A class representing an address book
-
__init__
(*, parent=None, con=None, **kwargs)[source]¶ Create a contact folder component
- Parameters
parent (BaseContactFolder or Account) – parent folder/account for this folder
con (Connection) – connection to use if no parent specified
protocol (Protocol) – protocol to use if no parent specified (kwargs)
main_resource (str) – use this resource instead of parent resource (kwargs)
-
-
class
O365.address_book.
BaseContactFolder
(*, parent=None, con=None, **kwargs)[source]¶ Bases:
O365.utils.utils.ApiComponent
Base Contact Folder Grouping Functionality
-
__init__
(*, parent=None, con=None, **kwargs)[source]¶ Create a contact folder component
- Parameters
parent (BaseContactFolder or Account) – parent folder/account for this folder
con (Connection) – connection to use if no parent specified
protocol (Protocol) – protocol to use if no parent specified (kwargs)
main_resource (str) – use this resource instead of parent resource (kwargs)
-
get_contact_by_email
(email)[source]¶ Returns a Contact by it’s email
- Parameters
email – email to get contact for
- Returns
Contact for specified email
- Return type
-
get_contacts
(limit=100, *, query=None, order_by=None, batch=None)[source]¶ Gets a list of contacts from this address book
To use query an order_by check the OData specification here: http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/ part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions -complete.html
- Parameters
limit (int or None) – max no. of contacts to get. Over 999 uses batch.
query (Query or str) – applies a OData filter to the request
order_by (Query or str) – orders the result set based on this condition
batch (int) – batch size, retrieves items in batches allowing to retrieve more items than the limit.
- Returns
list of contacts
- Return type
list[Contact] or Pagination
-
message_constructor
¶ alias of
O365.message.Message
-
-
class
O365.address_book.
Contact
(*, parent=None, con=None, **kwargs)[source]¶ Bases:
O365.utils.utils.ApiComponent
,O365.utils.attachment.AttachableMixin
Contact manages lists of events on associated contact on office365.
-
__init__
(*, parent=None, con=None, **kwargs)[source]¶ Create a contact API component
- Parameters
parent (Account) – parent account for this folder
con (Connection) – connection to use if no parent specified
protocol (Protocol) – protocol to use if no parent specified (kwargs)
main_resource (str) – use this resource instead of parent resource (kwargs)
-
property
business_address
¶ Business Address
- Getter
Get the address of contact
- Setter
Update the address
- Type
dict
-
property
business_phones
¶ Business Contact numbers
- Getter
Get the contact numbers of contact
- Setter
Update the contact numbers
- Type
list[str]
-
property
categories
¶ Assigned Categories
- Getter
Get the categories
- Setter
Update the categories
- Type
list[str]
-
property
company_name
¶ Name of the company
- Getter
Get the company name of contact
- Setter
Update the company name
- Type
str
-
property
created
¶ Created Time
- Return type
datetime
-
delete
()[source]¶ Deletes this contact
- Returns
Success or Failure
- Return type
bool
- Raises
RuntimeError – if contact is not yet saved to cloud
-
property
department
¶ Department
- Getter
Get the department of contact
- Setter
Update the department
- Type
str
-
property
display_name
¶ Display Name
- Getter
Get the display name of the contact
- Setter
Update the display name
- Type
str
-
property
emails
¶ List of email ids of the Contact
- Return type
-
property
folder_id
¶ ID of the folder
- Return type
str
-
property
full_name
¶ Full Name (Name + Surname)
- Return type
str
-
get_profile_photo
(size=None)[source]¶ Returns this contact profile photo :param str size: 48x48, 64x64, 96x96, 120x120, 240x240,
360x360, 432x432, 504x504, and 648x648
-
property
home_address
¶ Home Address
- Getter
Get the address of contact
- Setter
Update the address
- Type
dict
-
property
home_phones
¶ Home Contact numbers
- Getter
Get the contact numbers of contact
- Setter
Update the contact numbers
- Type
list[str]
-
property
job_title
¶ Job Title
- Getter
Get the job title of contact
- Setter
Update the job title
- Type
str
-
property
main_email
¶ Primary(First) email id of the Contact
- Return type
str
-
message_constructor
¶ alias of
O365.message.Message
-
property
mobile_phone
¶ Personal Contact numbers
- Getter
Get the contact numbers of contact
- Setter
Update the contact numbers
- Type
list[str]
-
property
modified
¶ Last Modified Time
- Return type
datetime
-
property
name
¶ First Name
- Getter
Get the name of the contact
- Setter
Update the name
- Type
str
-
new_message
(recipient=None, *, recipient_type=<RecipientType.TO: 'to'>)[source]¶ This method returns a new draft Message instance with contacts first email as a recipient
- Parameters
recipient (Recipient) – a Recipient instance where to send this message. If None first email of this contact will be used
recipient_type (RecipientType) – section to add recipient into
- Returns
newly created message
- Return type
Message or None
-
property
office_location
¶ Office Location
- Getter
Get the office location of contact
- Setter
Update the office location
- Type
str
-
property
other_address
¶ Other Address
- Getter
Get the address of contact
- Setter
Update the address
- Type
dict
-
property
personal_notes
¶
-
property
preferred_language
¶ Preferred Language
- Getter
Get the language of contact
- Setter
Update the language
- Type
str
-
save
()[source]¶ Saves this contact to the cloud (create or update existing one based on what values have changed)
- Returns
Saved or Not
- Return type
bool
-
property
surname
¶ Surname of Contact
- Getter
Get the surname of the contact
- Setter
Update the surname
- Type
str
-
property
title
¶ Title (Mr., Ms., etc..)
- Getter
Get the title of the contact
- Setter
Update the title
- Type
str
-
-
class
O365.address_book.
ContactFolder
(*, parent=None, con=None, **kwargs)[source]¶ Bases:
O365.address_book.BaseContactFolder
A Contact Folder representation
-
create_child_folder
(folder_name)[source]¶ Creates a new child folder
- Parameters
folder_name (str) – name of the new folder to create
- Returns
newly created folder
- Return type
ContactFolder or None
-
get_folder
(folder_id=None, folder_name=None)[source]¶ Returns a Contact Folder by it’s id or child folders by name
- Parameters
folder_id – the folder_id to be retrieved. Can be any folder Id (child or not)
folder_name – the folder name to be retrieved. Must be a child of this folder
- Returns
a single contact folder
- Return type
-
get_folders
(limit=None, *, query=None, order_by=None)[source]¶ Returns a list of child folders
- Parameters
- Returns
list of folders
- Return type
list[ContactFolder]
-
move_folder
(to_folder)[source]¶ Change this folder name
- Parameters
to_folder (str or ContactFolder) – folder_id/ContactFolder to move into
- Returns
Moved or Not
- Return type
bool
-
new_contact
()[source]¶ Creates a new contact to be saved into it’s parent folder
- Returns
newly created contact
- Return type
-
new_message
(recipient_type=<RecipientType.TO: 'to'>, *, query=None)[source]¶ This method returns a new draft Message instance with all the contacts first email as a recipient
- Parameters
recipient_type (RecipientType) – section to add recipient into
query (Query or str) – applies a OData filter to the request
- Returns
newly created message
- Return type
Message or None
-


class Concurrent::MVar
An `MVar` is a synchronized single element container. They are empty or contain one item. Taking a value from an empty `MVar` blocks, as does putting a value into a full one. You can either think of them as blocking queue of length one, or a special kind of mutable variable.
On top of the fundamental `#put` and `#take` operations, we also provide a `#mutate` that is atomic with respect to operations on the same instance. These operations all support timeouts.
We also support non-blocking operations `#try_put!` and `#try_take!`, a `#set!` that ignores existing values, a `#value` that returns the value without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. You shouldn't use these operations in the first instance.
`MVar` is a [Dereferenceable](Dereferenceable).
`MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala.
Note that unlike the original Haskell paper, our `#take` is blocking. This is how Haskell and Scala do it today.
@!macro copy_options
## See Also
-
Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th
ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991.
-
-
Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](dl.acm.org/citation.cfm?id=237794).
In Proceedings of the 23rd Symposium on Principles of Programming Languages (PoPL), 1996.
-
Constants
- EMPTY
Unique value that represents that an `MVar` was empty
- TIMEOUT
Unique value that represents that an `MVar` timed out before it was able to produce a value.
Public Class Methods
Create a new `MVar`, either empty or with an initial value.
@param [Hash] opts the options controlling how the future will be processed
@!macro deref_options
# File lib/concurrent/mvar.rb, line 54 def initialize(value = EMPTY, opts = {}) @value = value @mutex = Mutex.new @empty_condition = ConditionVariable.new @full_condition = ConditionVariable.new set_deref_options(opts) end
Public Instance Methods
acquires lock on the from an `MVAR`, yields the value to provided block, and release lock. A timeout can be set to limit the time spent blocked, in which case it returns `TIMEOUT` if the time is exceeded. @return [Object] the value returned by the block, or `TIMEOUT`
# File lib/concurrent/mvar.rb, line 86 def borrow(timeout = nil) @mutex.synchronize do wait_for_full(timeout) # if we timeoud out we'll still be empty if unlocked_full? yield @value else TIMEOUT end end end
Returns if the `MVar` is currently empty.
# File lib/concurrent/mvar.rb, line 195 def empty? @mutex.synchronize { @value == EMPTY } end
Returns if the `MVar` currently contains a value.
# File lib/concurrent/mvar.rb, line 200 def full? !empty? end
Atomically `take`, yield the value to a block for transformation, and then `put` the transformed value. Returns the transformed value. A timeout can be set to limit the time spent blocked, in which case it returns `TIMEOUT` if the time is exceeded. @return [Object] the transformed value, or `TIMEOUT`
# File lib/concurrent/mvar.rb, line 123 def modify(timeout = nil) raise ArgumentError.new('no block given') unless block_given? @mutex.synchronize do wait_for_full(timeout) # If we timed out we'll still be empty if unlocked_full? value = @value @value = yield value @full_condition.signal apply_deref_options(value) else TIMEOUT end end end
Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet.
# File lib/concurrent/mvar.rb, line 179 def modify! raise ArgumentError.new('no block given') unless block_given? @mutex.synchronize do value = @value @value = yield value if unlocked_empty? @empty_condition.signal else @full_condition.signal end apply_deref_options(value) end end
Put a value into an `MVar`, blocking if there is already a value until it is empty. A timeout can be set to limit the time spent blocked, in which case it returns `TIMEOUT` if the time is exceeded. @return [Object] the value that was put, or `TIMEOUT`
# File lib/concurrent/mvar.rb, line 103 def put(value, timeout = nil) @mutex.synchronize do wait_for_empty(timeout) # If we timed out we won't be empty if unlocked_empty? @value = value @full_condition.signal apply_deref_options(value) else TIMEOUT end end end
Non-blocking version of `put` that will overwrite an existing value.
# File lib/concurrent/mvar.rb, line 169 def set!(value) @mutex.synchronize do old_value = @value @value = value @full_condition.signal apply_deref_options(old_value) end end
Remove the value from an `MVar`, leaving it empty, and blocking if there isn't a value. A timeout can be set to limit the time spent blocked, in which case it returns `TIMEOUT` if the time is exceeded. @return [Object] the value that was taken, or `TIMEOUT`
# File lib/concurrent/mvar.rb, line 66 def take(timeout = nil) @mutex.synchronize do wait_for_full(timeout) # If we timed out we'll still be empty if unlocked_full? value = @value @value = EMPTY @empty_condition.signal apply_deref_options(value) else TIMEOUT end end end
Non-blocking version of `put`, that returns whether or not it was successful.
# File lib/concurrent/mvar.rb, line 156 def try_put!(value) @mutex.synchronize do if unlocked_empty? @value = value @full_condition.signal true else false end end end
Non-blocking version of `take`, that returns `EMPTY` instead of blocking.
# File lib/concurrent/mvar.rb, line 142 def try_take! @mutex.synchronize do if unlocked_full? value = @value @value = EMPTY @empty_condition.signal apply_deref_options(value) else EMPTY end end end
Protected Instance Methods
# File lib/concurrent/mvar.rb, line 206 def synchronize(&block) @mutex.synchronize(&block) end
Private Instance Methods
# File lib/concurrent/mvar.rb, line 212 def unlocked_empty? @value == EMPTY end
# File lib/concurrent/mvar.rb, line 216 def unlocked_full? ! unlocked_empty? end
# File lib/concurrent/mvar.rb, line 224 def wait_for_empty(timeout) wait_while(@empty_condition, timeout) { unlocked_full? } end
# File lib/concurrent/mvar.rb, line 220 def wait_for_full(timeout) wait_while(@full_condition, timeout) { unlocked_empty? } end
# File lib/concurrent/mvar.rb, line 228 def wait_while(condition, timeout) if timeout.nil? while yield condition.wait(@mutex) end else stop = Concurrent.monotonic_time + timeout while yield && timeout > 0.0 condition.wait(@mutex, timeout) timeout = stop - Concurrent.monotonic_time end end end


Form POST
To run example, start the Node server in a separate terminal tab:
cd server npm start
Name:
E-mail:
Message:
Submit


Special Topics
In 1947, a Laboratory of Experimental Oncology (LEO) was created as a collaborative effort between the city of San Francisco, The National Cancer Institute, and the UC School of Medicine. Created with the full support of Surgeon General Thomas Parran, the Laboratory of Experimental Oncology was literally an outlying colony of the NCI designed for clinical research; it filled this need until a large national clinical center opened in Bethesda in 1953. During its five years of operation (1947-1953), LEO investigators produced 124 scientific papers, based upon 605 "experimental treatments" conducted on 467 cancer patients admitted to the lab's experimental ward. By the time the lab closed in 1953, 90% of these patients had died, and 82% were autopsied as part of the laboratory's program.
The Laboratory of Experimental Oncology had a carefully constructed public image. The administrative staff was active in public relations, welcoming curious guests, inviting the press to view the lab, and keeping a careful record of the laboratory's press coverage. Scrapbook entries show Dr. Shimkin and colleagues traveling around the state, speaking to physicians at other hospitals and local medical societies, as well as to the general public. A series of photos taken to document the LEO's activities reveal the lab and hospital ward facilities in some detail and provide a rare glimpse of the tools of early postwar clinical research.
Shimkin, Michael B. "Upon Man and Beast -- Adventures in Cancer Epidemiology: Presidential Address," Cancer Research 34 (July, 1974):1525-1535.


Start your preferred method of packet capture from your phone/tablet.
Start Summoner's War and wait until the Press to Start message is displayed.
Stop the packet capture.
Upload the resulting .pcap file here.
Note: PCAP files over 5MB will not be accepted for upload.
{% include 'herders/profile/import_export/import_error_snippet.html' with errors=errors only %}
{% include 'herders/profile/import_export/import_validation_snippet.html' with errors=validation_failures only %}
{% crispy form %}


Authors: Pierre Defebvre.
server_ref() = atom() | {atom(), atom()} | {global, atom()} | {via, atom(), atom()} | pid()
| broadcast/2 | Broadcast message workers. |
| call/2 |
Send message to worker {Message, From} with expectation for reponse from Worker. |
| cast/2 | Send async message to worker. |
| code_change/3 | |
| get_workers/1 | Return list of workers. |
| handle_call/3 | |
| handle_cast/2 | |
| handle_info/2 | |
| init/1 | |
| reply/2 |
Abstract gen_server:reply |
| start/1 | |
| start_link/1 | |
| stop/1 | |
| subscribe/1 |
Add self() to worker pool. |
| subscribe/2 |
Add pid() to worker pool. |
| terminate/2 | |
| unsubscribe/1 |
Remove self() from worker pool. |
| unsubscribe/2 |
Remove pid() from worker pool. |
broadcast(Server::server_ref(), Message::any()) -> ok
Broadcast message workers
call(Server::server_ref(), Message::any()) -> any()
Send message to worker {Message, From}
with expectation for reponse from Worker.
Worker should reply via elb:reply(From, Reply)
cast(Server::server_ref(), Message::any()) -> ok
Send async message to worker
code_change(OldVsn, State, Extra) -> any()
get_workers(Server::server_ref()) -> {ok, [pid(), ...]}
Return list of workers
handle_call(Msg, From, State) -> any()
handle_cast(Msg, State) -> any()
handle_info(Msg, State) -> any()
init(Args) -> any()
reply(From::{pid(), reference()}, Message::any()) -> any()
Abstract gen_server:reply
start(Args::list()) -> {ok, pid()} | ignore | {error, any()}
start_link(Args::list()) -> {ok, pid()} | ignore | {error, any()}
stop(Server::server_ref()) -> ok
subscribe(Server::server_ref()) -> ok
Add self()
to worker pool
subscribe(Server::server_ref(), PID::pid()) -> ok
Add pid()
to worker pool
terminate(Reason, State) -> any()
unsubscribe(Server::server_ref()) -> ok
Remove self()
from worker pool
unsubscribe(Server::server_ref(), PID::pid()) -> ok
Remove pid()
from worker pool
Generated by EDoc, Oct 18 2017, 16:19:36.


Gecode::Set::LDSB Namespace Reference
Symmetry breaking for set variables. More...
Classes | |
| class | VariableMap |
| Map from variable implementation to index. More... | |
| class | LDSBSetBrancher |
| Symmetry-breaking brancher with generic view and value selection. More... | |
Functions | |
| template<class View > | |
| ValueSymmetryImp< View > * | specialUpdate (Space &home, ValueSymmetryImp< View > *s, IntSet usedValues) |
| Bulk update of a value symmetry s, using usedValues. | |
| template<class View , int n, class Val , unsigned int a> | |
| void | postldsbsetbrancher (Home home, ViewArray< View > &x, ViewSel< View > *vs[n], ValSelCommitBase< View, Val > *vsc, SymmetryImp< View > **syms, int nsyms, BranchFilter< typename View::VarType > bf, VarValPrint< typename View::VarType, Val > vvp) |
| bool | equalLUB (const Set::SetView &x, const Set::SetView &y) |
| Do two set variables have equal least-upper-bounds? | |
| SymmetryImp< SetView > * | createSetSym (Space &home, const SymmetryHandle &s, VariableMap variableMap) |
Detailed Description
Symmetry breaking for set variables.
Function Documentation
template<class View >
| ValueSymmetryImp<View>* Gecode::Set::LDSB::specialUpdate | ( | Space & | home, | |
| ValueSymmetryImp< View > * | s, | |||
| IntSet | usedValues | |||
| ) | [inline] |
Bulk update of a value symmetry s, using usedValues.
Calculates the intersection and difference of the values in the symmetry and usedValues, updates the symmetry to eliminate the used values, and makes a new symmetry containing the intersection values, if there are at least two. Returns the new symmetry, or NULL if the intersection has fewer than two elements.
Definition at line 104 of file brancher.hpp.
template<class View , int n, class Val , unsigned int a>
| void Gecode::Set::LDSB::postldsbsetbrancher | ( | Home | home, | |
| ViewArray< View > & | x, | |||
| ViewSel< View > * | vs[n], | |||
| ValSelCommitBase< View, Val > * | vsc, | |||
| SymmetryImp< View > ** | syms, | |||
| int | nsyms, | |||
| BranchFilter< typename View::VarType > | bf, | |||
| VarValPrint< typename View::VarType, Val > | vvp | |||
| ) | [inline] |
Definition at line 271 of file brancher.hpp.
| bool Gecode::Set::LDSB::equalLUB | ( | const Set::SetView & | x, | |
| const Set::SetView & | y | |||
| ) |
Do two set variables have equal least-upper-bounds?
Definition at line 44 of file sym-imp.cpp.
| SymmetryImp<SetView>* Gecode::Set::LDSB::createSetSym | ( | Space & | home, | |
| const SymmetryHandle & | s, | |||
| VariableMap | variableMap | |||
| ) |


Aloha! You've found my GitHub HTML test site! Please note that this is just for testing and nothing here actually does anything.
You can see my repository here, or you can return to the site's home here.
This page uses Bootstrap.
403
You are not authorized to access this page.
Please contact us if you believe this is in error.


I found some ceiling fans in the dumpster next to my apartment. The types of motors that come from ceiling fans are usually
single phase induction motors also known as split phase induction motors also known as fractional kilowatt motors
For sanding applications the low torque is not a problem. More often than not I’ve found conventional disk sanders to be too agressive. A slip of the hand can marr the work. But with a low-torque motor, the feed rate must be kept slow to keep the disk spinning. Rather than damage the work, the sander will just stop.


About Me.
Short Introduction
As a Man
I admire genius, badly. I think that's why I can't be a genius. I works hard to look like one.
As A Coder
I started programming shortly after I began my college life. I didn't code before that.
I had been using ruby for three years. I made some gems, which, unfortunately are not very serious project and it's not very useful.
I am also quit good at exercising javascript, but it's to the language itself. Writing javascript make me feels good.
Now, writing go is a daily routine of mine. I am quit into this language, which has very concise, simple syntax and excellent language design. I made a few serious tools out of go:
- Pak, a simple go library version management tool;
- GoGetter, a sample data management tool, which is to go what factory_girl is to ruby, but still need more cares.
Recently, I am also developing in objective-c.
Credos
- Do difficult and complicate things, in simple ways.
- Solve the principal problem (or trouble) first.
- Make beautiful stuff, literally and figuratively.
- Be a tough guy.
Chronicles
2013-Now
December, started using Objective-C.
May, joined The Plant.
May, left Wando Lab.
January, started using Go. I love Go.
2010
July, joined Wando Lab.
Also July, started using Ruby and Javascript. Officially became a web developer.
2009
September, started college life at Huizhou University.


exec
(PHP 4, PHP 5, PHP 7)
exec — 执行一个外部程序
说明
string exec ( string $command [, array &$output [, int &$return_var ]] )
exec() 执行 command 参数所指定的命令。
参数
command
要执行的命令。
output
如果提供了 output 参数，那么会用命令执行的输出填充此数组，每行输出填充数组
中的一个元素。数组中的数据不包含行尾的空白字符，例如 \n 字符。请注意，如果
数组中已经包含了部分元素，exec() 函数会在数组末尾追加内容。如果你不想在数组
末尾进行追加，请在传入 exec() 函数之前对数组使用 unset() 函数进行重置。
return_var
如果同时提供 output 和 return_var 参数，命令执行后的返回状态会被写入到此变
量。
返回值
命令执行结果的最后一行内容。如果你需要获取未经处理的全部输出数据，请使用
passthru() 函数。
如果想要获取命令的输出内容，请确保使用 output 参数。
范例
Example #1 exec() 例程
注释
Warning
当用户提供的数据传入此函数，使用 escapeshellarg() 或 escapeshellcmd() 来确保用
户欺骗系统从而执行任意命令。
Note:
如何程序使用此函数启动，为了能保持在后台运行，此程序必须将输出重定向到文件
或其它输出流。否则会导致 PHP 挂起，直至程序执行结束。
Note: 安全模式启用时，可仅可用 safe_mode_exec_dir 执行文件。实际上，现在不
允许在到可执行的路径中存在 .. 组件。
Warning
安全模式启用时，命令字符串会被 escapeshellcmd() 转换。因此，echo y | echo x 会
变成 echo y \| echo x。
参见
• system() - 执行外部程序，并且显示输出
• passthru() - 执行外部程序并且显示原始输出
• escapeshellcmd() - shell 元字符转义
• pcntl_exec() - 在当前进程空间执行指定程序
• 执行运算符
User Contributed Notes 74 notes
===============================================================================
This will execute $cmd in the background (no cmd window) without PHP waiting
for it to finish, on both Windows and Unix.
/dev/null &");
}
}
?>
===============================================================================
(This is for linux users only).
We know now how we can fork a process in linux with the & operator.
And by using command: nohup MY_COMMAND > /dev/null 2>&1 & echo $! we can return
the pid of the process.
This small class is made so you can keep in track of your created processes (
meaning start/stop/status ).
You may use it to start a process or join an exisiting PID process.
command = $cl;
$this->runCom();
}
}
private function runCom(){
$command = 'nohup '.$this->command.' > /dev/null 2>&1 & echo $!';
exec($command ,$op);
$this->pid = (int)$op[0];
}
public function setPid($pid){
$this->pid = $pid;
}
public function getPid(){
return $this->pid;
}
public function status(){
$command = 'ps -p '.$this->pid;
exec($command,$op);
if (!isset($op[1]))return false;
else return true;
}
public function start(){
if ($this->command != '')$this->runCom();
else return true;
}
public function stop(){
$command = 'kill '.$this->pid;
exec($command);
if ($this->status() == false)return true;
else return false;
}
}
?>
===============================================================================
I too wrestled with getting a program to run in the background in Windows while
the script continues to execute. This method unlike the other solutions allows
you to start any program minimized, maximized, or with no window at all.
llbra@phpbrasil's solution does work but it sometimes produces an unwanted
window on the desktop when you really want the task to run hidden.
start Notepad.exe minimized in the background:
Run("notepad.exe", 7, false);
?>
start a shell command invisible in the background:
Run("cmd /C dir /S %windir%", 0, false);
?>
start MSPaint maximized and wait for you to close it before continuing the
script:
Run("mspaint.exe", 3, true);
?>
For more info on the Run() method go to:
http://msdn.microsoft.com/library/en-us/script56/html/wsMthRun.asp
===============================================================================
If you're having problems with any of the exec(), system() etc. functions not
working properly on windows, finding the cause can be very frustrating, as is
hard to diagnose.
I've found the free Process Monitor from Sysinternals (procmon.exe from
live.sysinternals.com) to be VERY helpful here. You can monitor anything done
by e.g. php.exe, cmd.exe and yourprogram.exe and it will list every access to
files, registry etc. with return codes. You usually find some ACCESS DENIED
somehwer in the log, correct the file's permissions and it works.
Has saved me a LOT of time.
===============================================================================
In Windows, exec() issues an internal call to "cmd /c your_command". This
implies that your command must follow the rules imposed by cmd.exe which
includes an extra set of quotes around the full command:
- http://ss64.com/nt/cmd.html
Current PHP versions take this into account and add the quotes automatically,
but old versions didn't.
Apparently, the change was made in PHP/5.3.0 yet not backported to 5.2.x
because it's a backwards incompatible change. To sum up:
- In PHP/5.2 and older you have to surround the full command plus arguments in
double quotes
- In PHP/5.3 and greater you don't have to (if you do, your script will break)
If you are interested in the internals, this is the source code:
sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
It can be found at http://svn.php.net/viewvc/ (please find php/php-src/trunk/
TSRM/tsrm_win32.c, the comment system doesn't allow the direct link).
===============================================================================
exec strips trailing whitespace off the output of a command. This makes it
impossible to capture signifigant whitespace. For example, suppose that a
program outputs columns of tab-delimited text, and the last column contains
empty fields on some lines. The trailing tabs are important, but get thrown
away.
If you need to preserve trialing whitespace, you must use popen() instead.
===============================================================================
This is the second time this one got me, I thought someone else might find this
note useful too.
I am creating a long running exec'd process that I can access with page
submissions up to 2 hours later. The problem is this, the first time I access
the page everything works like it should. The second time the web browser waits
and waits and never gets any messages -- the CPU time is not affected so it is
apparent that something is blocked.
What is actually happening is that all of the open files are being copied to
the exec'd process -- including the network connections. So the second time I
try to access the web page, I am being given the old http network connection
which is now being ignored.
The solution is to scan all file handles from 3 on up and close them all.
Remember that handles 0, 1, and 2 are standard input, standard output, and
standard error.
===============================================================================
I was thinking on how to make a wee command that can be used for getting the
Memory AND CPU usage of a program.
What this does is get the program's information, and splits it into either the
CPU or MEM usage.
Examples:
Nice and simple. :)
===============================================================================
If you're trying to use exec in a script that uses signal SIGCHLD, (i.e.
pcntl_signal(SIGCHLD,'sigHandler');) it will return -1 as the exit code of the
command (although output is correct!). To resolve this remove the signal
handler and add it again after exec. Code will be something like this:
...
pcntl_signal(SIGCHLD, 'sigHandler');
...
...
(more codes, functions, classes, etc)
...
...
// Now executing the command via exec
// Clear the signal
pcntl_signal(SIGCHLD, SIG_DFL);
// Execute the command
exec('mycommand',$output,$retval);
// Set the signal back to our handler
pcntl_signal(SIGCHLD, 'sigHandler');
// At this point we have correct value of $retval.
Same solution can apply to system and passthru as well.
===============================================================================
When calling exec() from within an apache php script, make sure to take care of
stdout, stderr and stdin (as in the example below). If you forget this and your
shell command produces output the sh and apache deamons may never return (they
will normally time out after a few minutes). From the calling web page the
script may seem to not return any data.
If you want to start a php process that continues to run independently from
apache (with a different parent pid) use nohub. Example:
exec('nohup php process.php > process.out 2> process.err < /dev/null &');
===============================================================================
Can’t get the output from your exec’d command to appear in the $output array?
Is it echo’ing all over your shell instead?
Append "2>&1" to the end of your command, for example:
exec("xmllint --noout ~/desktop/test.xml 2>&1", $retArr, $retVal);
Will fill the array $retArr with the expected output; one line per array key.
===============================================================================
I was trying to get an acceslist from a remote computer by executing cacls and
parse it in php, all in a Windows environment with Apache. First i discovered
psexec.exe from Windows SysInternals.
But with the following line, I didn´t get anything, it get hunged, although
from the command line it worked nice:
To make it work I just followed the next steps:
- execute services.msc and find the apache service (In my case wampapache)
- Right button>Log On tab and change from Local System Account to a user
created account, enter the username and the password and restart the service.
(I added this user to the administrators group to avoid permissions problems
but its not recommended...)
It worked! And it may work with IIS too so try it if you have the same
poblem....
Hope this helps someone, and sorry for my english
===============================================================================
I had a script calling a powershell script in one function. It worked fine on
XP but when we moved to Windows 7 it stopped working. The script seemed to hang
and expect a carriage return before it continued.
Adding "echo . |" before calling powershell gave it the desired carriage
return:
===============================================================================
I tried to execute a command in background under Windows.
After struggling for hours with all these half ready examples I would like to
share the syntax I found working (for windows at least). This is not tested
under Linux as there are more elegant ways to spawn a process.
Based on the function from Arno van den Brink.
/dev/null &");
}
}
?>
This works perfectly with e.g.
but the following does NOT work:
Why?
When windows sees quotation marks (\") it thinks this is the window title, not
the command.
So, when your command needs quotation marks you HAVE TO provide a window name
first, like
execInBackground("\"title\"" "\"c:\path with spaces\my program.exe\")
Quotation marks are mandatiory for window title. Otherwise windows thinks this
is the program name.
Weired, but "Hey! it's Windows!" :)
===============================================================================
Something you guys might find helpful:
If you guys start a process or e.g. a script which starts processes sub
processes, look that you uncouple them from your php script. Otherwise you get
the same problem as I, your php script will wait to get the feedback from the
server. So it will wait until the sub processes are dead.
I know two ways to counter that, one way is to make sure the sub processes dont
get linked to the parent process.
The other way is to fire and forget with php (on Unix/Linux just add "/dev/null
2>&1 &" to end of your command, but you should remember you wont get any output
from the process.)
Hope that will help some of you, I had a while until I came on this idea.
===============================================================================
A simple function to see if exec() is enabled on the server:
===============================================================================
Problem:
PHP's System program execution functions do not seem to execute Win32 GUI
applications.
Solution:
1.Give %system32%\cmd.exe read/execute permissions to IUSR account.
Why ?:
Delimits the unable to fork errors.
2.Make your web server's executable to interact with desktop and restart it.
Why ?:
If not you cannot see the GUI
3a.Use SysInternals Psexec with -i -d switches:
or
3b.Use Windows scripting shell COM object with false parameter to its Run
Function:
Run($cmd, 0,false);
echo $cmd;
return $oExec == 0 ? true : false;
}_exec("youexe.exe");
?>
Why ?:
If you use just exec then PHP waits for exe to terminate, but psexec with -d
option or WshShell->Run with false option overpass this limitation and do not
wait for process termination.
I hope this will help all from months' headaches...
===============================================================================
I was having trouble using the PHP exec command to execute any batch file.
Executing other commands (i.e., "dir") works fine). But if I executed a batch
file, I receieved no output from the exec command.
The server setup I have consists of Windows Server 2003 server running IIS6 and
PHP 5.2.3. On this server, I have:
1. Granted execute permissions to the Internet User on c:\windows\system32\
cmd.exe.
2. Granted Everyone->Full Control to the directory in which the batch file is
written.
3. Granted Everyone->Full Control on the entire c:\cygwin\bin directory and
its contents.
4. Granted the Internet User "log on as batch" permissions.
5. Specified the full path to each file being executed.
6. Tested these scripts running from the command line on the server and they
work just fine.
7. Ensured that %systemroot%\system32 is in the system path.
It turns out that even with all of the above in place on the server, I had to
specify the full path to cmd.exe in the exec call.
When I used the call:
$output = exec("c:\\windows\\system32\\cmd.exe /c $batchFileToRun");
then everything worked fine. In my situation, $batchFileToRun was the actual
system path to the batch file (i.e., the result of a call to realpath()).
===============================================================================
The article on exec() tells you to use passthrough() if you want to get more
than the last line of output from a command. However mor appropriate would be
to refer to shell_exec(), since passthrough will output the result (just like
print()) whereas shell_exec() will give the whole output as a $string, which is
more likely the thing you want if you are not content with exec() delivering
only the last line as $string
===============================================================================
Task: Invoke psexec from php to execute a command on a remote computer.
Environment:
-Windows XP Professional, Service Pack 3
-Apache 2.2 Installed (I used the version bundled in XAMP 1.6.6a)
-The executable to be run must be in your system PATH!!
PHP Script:
Problems:
-I kept getting Access Denied Errors
Observation(s):
-I noticed that when I put that same psexec command in a batch file and started
that batch file with the system account, I would get the same error
-This lead me to the cause
Cause:
-Apache was running as the system account, and so any process invoked by php
was started as the system account
-Starting a batch file that accesses a remote computer using the local system
account is a NO NO (at least for my setup)
Solution:
-Configure the Apache service to start as an account other than system (It must
have appropriate permissions on the local computer)
Start-->Run-->Services.msc-->RightClick Apache Service-->Properties-->Logon
Tab-->Enter in value for "Log on As"
Now load the same php page again.
Look at the error.log again
You should see an error code 0 returned for the process executed, indicating a
successful run
===============================================================================
If SAFE_MODE is on, and you are trying to run a script in the background by
appending "> /dev/null 2> /dev/null & echo $!" to the command line, the browser
will hang until the script is done.
My solution:
Create a shell script (ex. runscript.sh) which contains the execution line for
the script you are trying to run in the background.
The runscript.sh is run by an exec() call without the redirect string, which is
now placed in the runscript.sh.
runscript.sh will return almost immediately because output of the original
script is redirected, and so will not hang your browser and the script runs
fine in the background.
===============================================================================
When I tried to exec in my dreamhost virtual host nothing worked until I moved
my binary outside of the web directory and then it worked without any problem.
You may have the same problem.
===============================================================================
Does anyone know of any restrictions on using exec() in a virtual host? I have
complete control of my apache server, but obviously prefer to section content
into virtual hosts.
exec() doesn't do anything when applied to code inside a virtual host for me...
===============================================================================
To my way of thinking, it is a good idea to execute programs from the cgi-bin
directory of the Web server, to get a little control over configuring a system
(at install time, a pointer to the actual program can be symlinked from the
cgi-bin directory and the code won't ever have to be changed). If you'd like
to do this, under Apache at least, the following should work:
filename;
else $ProgPath = $ProgInfo["filename"];
}
exec("$ProgPath ...");
?>
===============================================================================
[EXEC] on [Windows]
Finally a simple way to get exec working w/o launching a black box window.
just do: exec('start /B "window_name" "path to your exe"',$output,$return);
The important part is the /B which makes it run in the background.
===============================================================================
It is possible to configure IIS so that user authentication is against an NT
domain. Giving read & execute permissions to the IUSR_* user only helps for
anonymous access.
For non-anonymous, give "Domain Users" read & execute permissions:
c:> cacls %COMSPEC% /E /G "%USERDOMAIN%\Domain Users":R
or more specifically:
c:> cacls c:\windows\system32\cmd.exe /E /G MYDOMAIN\Domain Users:R
For security reasons, it is strongly advised to NOT provide the IUSR_* access
to cmd.exe at all.
===============================================================================
Well, after hours of fighting with output redirection, input redirection, error
redirection, session_write_close (), blah blah blah, I think I found an easy
way to execute a program in background. I used the following command:
Proc_Close (Proc_Open ("./command --foo=1 &", Array (), $foo));
With the second argument you tell proc_open not to open any pipe to the new
process, so you don't have to worry about anything. The third argument is only
needed because it's not optional. Also, with the '&' operator the program runs
in background so the control is returned to PHP as soon as Proc_Close is
executed (it doesn't have to wait).
In my case I don't use the user session in the executed script (there's no way
it can be identified if it is not sended as a cookie or URL) so there's no need
for session_write_close (correct me if I'm wrong with this).
It worked for me.
===============================================================================
Note that on Linux/UNIX/etc, both the command and any parameters you send is
visible to anyone with access to ps.
For example, take some php code that calls an external program, and sends a
sort of password as a parameter.
The entire string (actually probably something like "secureprogram password")
will be visible to any user that executes ps -A -F. If you are going to be
doing a lot of external calling, or any of it needs to be somewhat secure, you
are probably better off writing a php extension.
===============================================================================
Recently I had to do some "root" stuff via PHP - I could do it through cronjob
based on the database, but since I was too lazy with doing that, I just wrote a
shell script to create all the IMAP stuff, chown properly all the Maildirs and
provision the user on the local system.
Executing that command as another user from inside of PHP was like this...
@exec("echo 'apache' | /usr/bin/sudo -u mail -S /var/www/html/mailset.sh
$name");
"Advantage" is that you can run in this way commands as any sudoer on your
system which can be fine-tuned and pretty useful. But again - password is
echoed in cleartext and option "-S" tells sudo to take password from stdin
which he does of course.
Major security risk - do it only if you really need to run some commands as
different users (nologin users) and if you are really lazy :)
Now, my solution is a cronjob which runs every 5 mins and gets datasets from
the MySQL table and does the work without exploiting any exec() from within PHP
- which is the right way to do it.
===============================================================================
Hi!
I just want to add a note to the function "jonas DOT info AT gmx DOT net"
contributed to keep processes running in the background.
Not like with the other exec/system/passthru etc. functions if you want to
execute a batch file on a MS-machine you need to add a simple exit in the last
line of your batch-file otherwise the CMD task does not close and your server
will be filled with dead processes ... No idea what happens with other programs
.
===============================================================================
From what I've gathered asking around, there is no way to pass back a perl
array into a php script using the exec function.
The suggestion is to just print out your perl array variables at the end of
your script, and then grabbing each array member from the array returned by the
exec function. If you will be passing multiple arrays, or if you need to keep
track of array keys as well as values, then as you print each array or hash
variable at the end of your perl script, you should concatenate the value with
the key and array name, using an underscore, as in:
foreach (@array) print "(array name)_(member_key)_($_)" ;
Then you would simply iterate through the array returned by the exec function,
and split each variable along the underscore.
Here I like to especially thank Marat for the knowledge. Hope this is useful to
others in search for similar answer!
===============================================================================
Remember that some shell commands in *NIX needs you to set a TERM enviroment.
For example:
&1', $error );
echo "Error: ";
exit($error[0]);
}
?>
This will echo "Error: TERM enviroment variable not set. " To fix it, add TERM
=xterm (Or some other terminal) to the exec-statement, like this
&1', $error );
echo "Error: ";
exit($error[0]);
}
?>
===============================================================================
Technique for debuging php in *nix environments:
SSH to your php directory and enter the following:
mkfifo -m 772 .debug
tail -f .debug
Now in your php scripts direct debug messages to the debug FIFO with:
exec("echo \"Some debug statement or $var\" > .debug");
When the php executes, you can watch the output in your terminal app.
This is helpful in situations where it's awkward to debug in a browser (i.e.
header commands).
===============================================================================
[ Editor's note: When passing multiple args in a URL like this, be sure to
enclose the URL in quotes otherwise the & will be interpreted as a detachment
flag and the rest of the command will be truncated. ]
The lynx browser can be used as simple way of executing a script from a remote
location without waiting for it to complete:
$command = "/usr/bin/lynx -dump https://www.anotherserver.com?var=blah >/dev/
null &";
exec($command);
===============================================================================
This seems to work for me on win2k server w/ iis 5 w/ php 4.2.2....
";
echo "done";
?>
For those that don't know what usrstat is, it's a program that is the admin
pack for win2k that lists users in a domain and thier last logon time. I used
it as the example to show that arguments can be passed (the domain).
The one "gotcha" is that usrstat.exe must be in the system path...ie if you are
at the server w/ a command window, anything you can type w/o typing in a path,
works. Try it with ping, since that should be in system32 for just about
everyone...
I've tried things like:
exec("c:\temp\usrstatexe...
exec("cmd /c c:\temp\usrstat.exe...
but can't seem to get anywhere with those...
even putting the exe on a shared drive with identical paths for the client and
server to the exe doesn't work (don't know why that would fix it, but was just
trying things...)
===============================================================================
There are (perhaps insurmountable) difficulties when trying to execute sudo
commands from a PHP script and from an external script called by PHP on SELinux
enabled machines.
SELinux won't let apache change the group id of the process by default.
You may need to use another solution, like make the PHP script deposit a file
in a directory which is monitored by cron or inotify and which will call
another script with root privileges.
===============================================================================
Took quite some time to figure out the line I am going to post next. If you
want to execute a command in the background without having the script waiting
for the result, you can do the following:
> /path/to/
log_file.log 2>&1 &");
?>
There are a few thing that are important here.
First of all: put the full path to the php binary, because this command will
run under the apache user, and you will probably not have command alias like
php set in that user.
Seccond: Note 2 things at the end of the command string: the '2>&1' and the '&
'. The '2>&1' is for redirecting errors to the standard IO. And the most
important thing is the '&' at the end of the command string, which tells the
terminal not to wait for a response.
Third: Make sure you have 777 permissions on the 'log_file.log' file
Enojy!
===============================================================================
if you are using exec on a w2k3 machine with IIS and after a few times the page
or IIS just hangs, you should add: " && exit" to your command.
this way the cmd will always exit.
example:
You could also try this when you have problems with the system-function or any
other method you use to execute a program!
Maybe also useful when using apache, but I'm not sure about that!
===============================================================================
[NOTE BY danbrown AT php DOT net: The following is a Linux script that the
contributor of this note suggests be placed in a file named 'pstools.inc.php'
to execute a process, check if a process exists, and kill a process by ID.
Inspired by the Windows version at http://php.net/exec#59428 ]
/dev/null 2>&1 & echo $!';
exec($command ,$op);
$pid = (int)$op[0];
if($pid!="") return $pid;
return false;
}
function PsExists($pid) {
exec("ps ax | grep $pid 2>&1", $output);
while( list(,$row) = each($output) ) {
$row_array = explode(" ", $row);
$check_pid = $row_array[0];
if($pid == $check_pid) {
return true;
}
}
return false;
}
function PsKill($pid) {
exec("kill -9 $pid", $output);
}
?>
===============================================================================
Run("cmd /C \" $cwd\\$cmd\"", 0,true);
return $oExec == 0 ? true : false;
}
?>
capture output using ob_start() if you like. Extra code looks for spaces and
adds quote marks as they are needed
===============================================================================
Run a DOS command and parse it for specific lines
0) {
print (trim($line));
echo ("\n");
}
}
?>
===============================================================================
On Windows-Apache-PHP servers there is a problem with using the exec command
more than once at the same time. If a script (with the exec command) is loaded
more than once by the same user at the same time the server will freeze.
In my case the PHP script using the exec command was used as the source of an
image tag. More than one image in one HTML made the server stop.
The problem is described here (http://bugs.php.net/bug.php?id=44942) toghether
with a solution - stop the session before the exec command and start it again
after it.
===============================================================================
Running a command that may never time out on a windows server inspired the
following code. The PsExecute() function allows you to run a command and make
it time out after a set period of time. The sleep parameter is the number of
seconds the script will pause becore checking if the process is complete.
Code utilizes the PsTools, found here: http://www.sysinternals.com/ntw2k/
freeware/pstools.shtml
Copy and paste the following code into an include file:
&1", $output);
while( list(,$row) = each($output) ) {
$found = stripos($row, 'with process ID ');
if( $found )
return substr($row, $found, strlen($row)-$found-strlen('with
process ID ')-1); // chop off last character '.' from line
}
return false;
}
function PsExists($pid) {
exec( dirname(__FILE__). "\\pslist.exe $pid 2>&1", $output);
while( list(,$row) = each($output) ) {
$found = stristr($row, "process $pid was not found");
if( $found !== false )
return false;
}
return true;
}
function PsKill($pid) {
exec( dirname(__FILE__). "\\pskill.exe $pid", $output);
}
?>
Place the above include file and the PsTools from (http://www.sysinternals.com/
ntw2k/freeware/pstools.shtml) in the same directory.
===============================================================================
On window.... escape char is "^"
>> this is working :
exec("\"C:\\Program Files\\VideoLAN\\VLC\\vlc\" get_video?video_id=aSW7YTk7tFs^
&t=hash^&fmt=18 --sout=#transcode{ vcodec=h264,vb=768,scale=1,acodec=mpga,ab=
96,channels=2 }:duplicate{ dst=std{access=udp,mux=ts,dst=<IP_ADDRESS>:1235} }
");
The parameters in the URL (&t=) not breaking the command now.....
===============================================================================
ON A LINUX SYSTEM:
Note that the exec() function calls the program DIRECTLY without any
intermediate shell. Compare this with the backtick operator that executes a
shell which then calls the program you ask for.
This makes the most difference when you are trying to pass complex variables to
the program you are trying to execute - the shell can interpret your parameters
before passing them thru to the program being called - making a dog's breakfast
of your input stream.
Remember: exec() calls the program DIRECTLY - the backtick (and, I THINK, the
system() call) execute the program thru a shell.
-Ben
===============================================================================
For windows get specjal folders data:
result :
Array
(
[0] => C:\Users\WJ\AppData\Roaming
)
===============================================================================
Side-note: regarding the API comment "For practical reasons, it is currently
not allowed to have .. components in the path to the executable."
It is still possible to pass the shell as the first command and a relative path
to the script as the second, so this limitation/security mechanism is not much
of one. "sh" can be used to run non-scripts with relative paths via something
like this:
$out = null;
$rc= 0;
exec('sh -c "exec /bin/../bin/ls"', $out, $rc);
print_r( $out);
echo 'rc = '.$rc."\n";
effectively bypassing any "security" gained by the ".." limitation.
===============================================================================
exec($cmd . " &") did not seem to work for backgrounding a task in linux, but
using the pclose(popen($cmd . ' &', 'r')); trick from the Windows advice did
work just fine.
This is, of course, without catching and throwing away or catching and saving
any output (stdout or stderr) from $cmd.
===============================================================================
If you're on windows, advice to use Sysinternals (procmon.exe from
live.sysinternals.com) is pretty darn good. Saved me also a lot of time, and
keeped me from having to open up my entire server to the anonymous web user.
===============================================================================
It is possible to only capture the error stream (STERR). Here it goes...
(some_command par1 par2 > /dev/null) 3>&1 1>&2 2>&3
-First STDOUT is redirected to /dev/null.
-By using parenthesis it is possible to gain control over STERR and STOUT
again.
-Then switch STERR with STOUT.
The switch is using the standard variable switch method -- 3 variables
(buckets) are required to swap 2 variables with each other. (you have 2
variables and you need to switch the contents - you must bring in a 3rd
temporary variable to hold the contents of one value so you can properly swap
them).
This link gave me this information:
http://www.cpqlinux.com/redirect.html
===============================================================================
For Win2k/XP systems, and probably NT as well, after beating my head against a
wall for a few days on this, I finally found a foolproof way of backgrounding
processes and continuing the script.
For some strange reason I just could not seem to get backgrounding to work with
either system or exec, or with the wsh.run method for that matter. I have used
all three in the past with success, but it just wasn't happening this time.
What I finally wound up doing was using psexec from the pstools package found
at http://www.sysinternals.com/ntw2k/freeware/pstools.shtml
You would use it like:
exec("psexec -d blah.bat");
which will start and immediately background blah.bat and immediately resume
running the rest of the php script.
===============================================================================
I am posting this as I see quite a few people looking to create a web based
interface to their MP3 player (XMMS or really what ever you want to call from
the command line) on Linux. Alas, I am not the only one, and I did not think
of it first ( suppose I have to result to other get rich quick schemes). And
even if there were a direct downloadable utility (as there is XMMS-Control)
you, like me, probably want the bowl of porage that is just right. Which means
you want to make your own because current versions of X, Y, or Z just don't do
what you want.
Most of the hard work is at the linux command shell (ugh! - I heard that! Drop
and give me 20 command line scripts!)
login as root
ensure /dev/dsp has the proper access privileges
chmod a+rw /dev/dsp
add apache to the local list of users for the xserver.
xhost +local:apache@
You should see the following if apache is not added to the xserver.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
** CRITICAL **: Unable to open display
And I am sure that error is as clear to you as it was to me!
NOTE !!! only change the following for testing purposes so that you can su to
apache from root and test xmms !!!!
Temporarily change the line
apache:x:48:48:Apache:/var/www:/sbin/nologin
To
apache:x:48:48:Apache:/var/www:/bin/bash
so that you can test out apache access to the Xserver and XMMS.
su apache
xmms
!!! Play a file - Don't just read this actually play a file!!! The reason is
that if it fails xmms will likely give an error you can track down like a
greyhound chases that little bunny at the dog track! (speaking of get rich
quick schemes)
And for the grand finale!
If you can call xmms from the command line you can likely do the following
(unless you are running php in safe mode). Ensure that the wav, mp3, or
whatever you decide to test it with is accessible to apache. I put the file
into /var/www/html/icould.wav and chmod a+rw icould.wav
At your browser ensure you hit shift+refresh(button) so your browser doesn't
give you a cahed the web page.
Brian J. Davis
===============================================================================
The note regarding how exec() works under safe_mode is wrong.
echo y | echo x does not become echo "y | echo x". It essentially becomes echo
"y" "|" "echo" "x". The entire string is passed through escapeshellcmd(),
which effectively splits arguments at spaces. Note that this makes it
impossible to reliably pass arguments containing spaces to exec() in safe_mode.
Since 4.3.3 escapeshellcmd() tries to pass quoted arguments through (so you
could try exec("cmd 'arg 1' 'arg 2'")), but not on win32, and will still
wrongly backslash escape any punctuation characters inside the quotes.
Not only can the path not contain '..' components, but no directory or filename
can contain the string '..'. e.g. /path/to/my..executable will refuse to run.
===============================================================================
I had a bit of trouble using exec with Windows when passing a parameter to a
PHP script file. I found I needed to create a Windows batch "wrapper" file to
get the script file to accept the optional argument.
1) PHP script file exists:
c:\www\script.php
2) PHP is installed in:
c:\www\php\
3) BAT file contains:
@c:\www\php\cli\php.exe c:\www\script.php %1
and is saved as:
c:\www\script.bat
4) Use exec statement from PHP:
exec("c:\www\script.bat $arg", $output);
If you want to pass more than one argument, carry on with %2, %3, %4, ..., ...
in your BAT file.
Hope this helps somebody
===============================================================================
If you try to use the psexec from Sysinternals on your Windows Server for
background-processes that need special user-rights and get an "Access denied"
oder "Wrong user or password" notice, although your username and password is
right, this could help you getting around this bug.
===============================================================================
I wrote a simple ping user function, useful for automatically determining
wether to show high bandwidth content or calculating download times.
It returns a number representing the milli seconds it took to send and receive
packets from the user.
===============================================================================
I wanted my script to:
* execute an external command.
* check if the execution was ok. (i.e. the return level)
* log the error output if the execution wasn't ok.
* not print the command's output in my script's output.
I saw the exec, system, shell_exec and passthru functions, and deduced that the
solution was to redirect the standard error (stderr) to the standard output
(stdout). It's not very clean, since it mixes stderr with stdout, and I only
wanted to log the stderr. But it seems to be the only solution (suggestions are
welcome).
This is the code I use:
&1", $out, $err);
if ($err) my_log_func(join("\n", $out));
?>
===============================================================================
I ran into the problem of not being able to set environment variables for my
kornshell scripts. In other words, I could not use putenv() (at least to my
understanding).
The solution I used was to write a script on the fly, then execute that script
using exec().
then delete the temp file (I keep it around for debugging.)
===============================================================================
If you're trying to run something in the background on a system that uses
systemd for its init, use the systemd-run utility to start your program in the
background. systemd-run will run the command in a transient unit file so that
you can query its status with systemctl and view its log with journalctl.
systemd-run returns immediately, launching your application for you and keeping
track of it, so you don't need to worry so much about a forgotten process
running on your server. From here you can query its status with
And see its log with
===============================================================================
For windows, winnt.. IIS6 and php 5 using the dll.
I was trying to figure out why exec commands were not working. There is a post
here suggesting you add iusr to the whole C drive which I am not ok with.
I eventually found that if I allowed the iusr account to access C:\windows\
system32\cmd.exe things worked.
Hope this helps.
~Stephen
===============================================================================
Execute an a software, for an example my WordPress Plugin ExecMe, with an a
error message and success message:
===============================================================================
I just tried the following:
exec('cp "/MySite/web/uploads/' .$matches[1][0]. '/startupvids/mp4/'. substr
($fileonly,0,strlen($fileonly)-4) .'.mp4" "/MySite/web/uploads/newfolder/
'.$video->getSiteId().'-'.substr($fileonly,0,strlen($fileonly)-4).'.mp4"');
I think exec has an issue with the amount of php commands within the exec - the
above doesn't work. To get around this issue put everything into variables
before hand so you end up with:
$location1 = "/MySite/web/uploads/' .$matches[1][0]. '/startupvids/mp4/'.
substr($fileonly,0,strlen($fileonly)-4) .'.mp4";
$location2 = "/MySite/web/uploads/startupvids/mp4/'.$video->getSiteId
().'-'.substr($fileonly,0,strlen($fileonly)-4).'.mp4"';
exec('cp '.$location1 .' ' .$location2);
===============================================================================
i have the same problem as philippe.hajjar above, but his solution didnt work
to me
my solution was change apache service (on Windows) to logON as an account of
network domain instead of local system account.
===============================================================================
You can embed php into a batch file so that it is essentially "double-click" to
run. This might be useful for script that does search and replace in numerous
files or other tedious task that are too complex for batch files but don't
warrant greater attention. Its really quite simple I'm sure someone has
thought of it before. You can add whatever batch code you want after :START
just make sure you exit before you get to */ so Windows doesn't fuss. @php %0
basically is saying "Open this file with php and run its php code". Obviously
its really only a useful trick on Windows, I only really use it for update
scripts on our company's servers. I suppose you could also just set Windows to
open php files with php.exe but that seems like a rather stupid thing to do as
you would most often want to edit php files, not run them directly. @pause is
optional of course, but you may want to look at what php outputted to the
command line before it exits.
example.bat:
@GOTO START
===============================================================================
PHP Exec : Delete statement execution problem
If filename is blank for exec: delete statement then it hangs the php
execution, hence have to trap it as follows
===============================================================================
Sometimes, it is convenient to let exec() return the status of the executed
command, rather than return the last line from the result of that command. In
Unix, just do:
$ret = exec('foo; echo $?');
Remember not to overdo it though. ;)
[ simon.cpu ]
===============================================================================
windExec() reloaded:
* unique timestamp name was probably a good idea for multiple instances of
function running @ same time
* includes handy FG/BG parameter
$outputfile";
$m = true;
}
else $m = false;
// Make a new instance of the COM object
$WshShell = new COM("WScript.Shell");
// Make the command window but dont show it.
$oExec = $WshShell->Run($cmdline, 0, $m);
if ($outputfile){
// Read the tmp file.
$retStr = file_get_contents($outputfile);
// Delete the temp_file.
unlink($outputfile);
}
else $retStr = "";
return $retStr;
}
===============================================================================
I had to combine many PDFs into a single one using pdftk and did this by
writing the commands into a batch file and running it with exec('cmd /c
blabla.cmd').
Using batch files under Windows, there's a line-length-limit of 1024
characters. So I made sure each line in the batch file doesn't exceed 1024
characters.
I now switched over to using exec('start /b ...') directly with the desired
command (instead of writing it into a batch file and calling that) and played
around with the line-length. Seems like the exec() command works with
command-strings of up to 4096 characters in length. If the string is longer, it
won't be executed.
===============================================================================
Hey guys, I just wanted to drop a note after spending , i dunno 6 hours or so
on getting exec() to work on an outside program with Win2k3 on IIS6 and PHP
installed as an ISAPI module. I originally had it installed with Ensim, but it
got confusing, so after a while of it not working I installed the latest PHP 5
binaries.
First thing I did was download the latest PHP 5 Binaries for Windows, but NOT
THE INSTALLER. I dunno what the installer does, but I read previously not to
use it, so I set it up like that.
After that I went into IIS manager, clicked on Add Extensions, added .PHP and
changed the executing location to c:\php\php5isapi.dll. Then I went into the
website portion, right clicked on it, went to properties, clicked on the Home
site tab, clicked Configure and added an extension with extention = .php and
executable = c:\php\php5isapi.dll.
After this , the thing that FINALLY WORKED! was , well, see at first I setup
permissions by adding IUSR_MyCompName to the allowed list, and checked Full
control, so i thought it had permissions.... Well, it was being overwritten
which is what bit me...
I went into the C: drive, and right clicked and went to Properties, clicked on
the Security tab, and then clicked on Advanced in the bottom right. If you see
any IUSR with Deny, simply remove it.
Then right click on c:\php and do the same, after all Deny's have been deleted
(Which override allows, which was my issue), go into c:\php and open the
security tab, make sure IUSR_yourcompname is added as allow, and then do the
same for c:\yoursoftwarefolder\ so your software has the same permissions.
The deny thing on C: overriding my c:\folder with allow was blowing it all up
for me, I deleted the deny and made sure IUSR_mycompname was with full control
on my outside apps file, and VUALA !!!
Theres now some trouble with it asking for a confirmation, but i'll figure that
out later, i can at least run it without troubles :)
ALSO! DO NOT FORGET! Add C:\php and C:\outsidesoftwarefolder as Environment
Variables to the Path variable in your system. It's easy, just right click my
comp, properties, click advanced tab, enviornment variable button at the
bottom, in the second scrolling list find the one with name of lowercase path,
double click it, and on the end, add a semi-colon to end the last folder and
type your folder location
so if it was originally c:\test;c:\windows\system32 and you wanna add php,
make it read c:\test;c:\windows\system32;c:\php
Hope this helps someone , the thing that helped the most was the Advanced
button in the security tab and removing the denies, which take ownership OVER
the allows.
... My 2 cents :)
===============================================================================
If you need generate new data .htpasswd file:
Luck!!!!!!!
===============================================================================
When trying to run an external command-line application in Windows 2000 (Using
IIS), I found that it was behaving differently from when I manually ran it from
a DOS prompt.
Turned out to be an issue with the process protection. Actually, it wasn't the
application itself that was having the problem but one it ran below it! To fix
it, open computer management, right-click on Default Web Site, select the Home
Directory tab and change Application Protection to 'Low (IIS Process)'.
Note, this is a rather dangerous thing to do, but in cases where it's the only
option...
===============================================================================
I had trouble getting the program execution functions to work on a Windows
server, even though it worked on my test machine. Here is something that
helped:
First, set the security permissions on the exe to allow USR_MachineName to
execute the program.
Then I changed the 'Log on as Batch Job' local security policy to include the
IUSR account (and rebooted). After I made that change, the programs were
allowed to run.
I also limited the permissions for the IUSR account to read and execute only.
===============================================================================
Note that when in 'Safe Mode' you must have the script or program you are
trying to execute in the 'safe_mode_exec_dir'. You can find out what this
directory is by using phpinfo().
===============================================================================
I've done a C program to act as a "timeout controller" process, by forking
itself and executing some other command received as parameter.
Then, in PHP I have a function that calls commands this way:
"
exec($command,$status);
echo "Exit status code of command is $status";
...
?>
I've noticed that exit status code returned from a C process is a "special"
integer.
I wanted "command" exit status code to be returned to controller, and then
controller to exit with same status code (to get this status from PHP).
Exit status was always 0 !!!
To solve this, i've found a C macro to use inside tout_controller:
..
waitpid(pid,&status,0); // wait for process that execs COMMAND
..
//exit(status); // that doesn't work
exit(WEXITSTATUS(ret)); // that's ok
..
It isn't exactly a PHP note, but may be useful to help some desperated
programmer's ;)


Announcement for all private accounts
Last announcement written:
Written on:
{{model.private.updated_at}}
{{model.private.author}}
Announcement for all business accounts
Written on:
Last announcement written:
{{model.business.updated_at}}
{{model.business.author}}


An invisible barrier of magical force appears and protects you. Until the start of your next turn, you have a +5 bonus to AC, including against the triggering attack, and you take no damage from magic missile.
An invisible barrier of magical force appears and protects you. Until the start of your next turn, you have a +5 bonus to AC, including against the triggering attack, and you take no damage from magic missile.


--- layout: default Title: Pay your allotment rent Breadcrumb1_url: ../payforit/pay-for-it.html Breadcrumb1_title: Pay for it ---
In order to pay your allotment rent online you will need to know your allotment reference number. This can be found on the top right of your allotment rent bill.
Pay allotment rent onlineYou can pay your allotment bill by calling the automated payments line on 0845 6035058, available 24 hours a day, seven days a week. Payments can only be made by all major credit and debit cards.
Payments can be made at One Stop Shops in Bath, Keynsham and Midsomer Norton.
Self-service payment kiosks are available for cash, debit and credit card payments. These machines are unable to accept £50 notes.
You'll need to have your account / reference / invoice number with you.
Automatic receipts are provided for payments.
Please make cheques payable to Bath & North East Somerset Council. Write your name, address and account / reference number on the back of your cheque and send it to the address given on your bill or invoice.
We cannot accept post-dated cheques and we do not send receipts for cheque payments.
It can take several days to process cheques, so allow plenty of time for your payment to be credited to your account.


BREAKING: Appeal court upholds Taraba governor Ishaku’s re-election
by Ade AdesomojuAde Adesomoju, Abuja
The Court of Appeal in Abuja on Monday upheld the second term election of Governor Darius Ishaku of Taraba State.
A five-man panel of the court dismissed the appeal by the All Progressives Congress and its governorship candidate in the March 9, 2019 poll, Abubakar Danladi.
The court affirmed the judgment of the Taraba State Governorship Election Tribunal, which had upheld the re-election Ishaku’s election on the platform of the Peoples Democratic Party.
The Court of Appeal held on Monday that APC had no candidate in the March 9, 2019 governorship election in Taraba State on the grounds of the disqualification of its candidate, Abubakar Danladi by the Jalingo division of the Federal High Court on March 6, 2019.
Details Later…


Home
Services
MY Account
Log-in
Register
Schedule
COntact-us
About us
Login Here
Username
Password
forgot password
Don't have an account?


Device
Feedback
Standard vs Specific Devices
If you select a 'standard' device, system sound settings can change what physical device this plugin affects.
If you select a specific device, this plugin will always try to change/use that device, even if it is no longer the default device in Windows.


Creative Innovation: About the Team
This project was conducted for the Data & Visual Analytics (CSE6242) Spring 2020 course at Georgia Tech.
The team consists of:
- Marc Boulet
- Minkwon Lee
- Michael Migliacio
- Ricardo Stamato
- Lisa Walkosz-Migliacio
- Catherine Yin