innovaphone.lib1
Includes
The library has no dependencies on other Javascript files.
Static helper functions
Functionality that is often needed in apps.
- innovaphone.lib1.openLink(url)
-
Used for opening mailto-Links.
Events
innovaphone.lib1.Event defines an interface for events. Listeners can attach an detach to an event. Attached listeners are called when the event fires.
- innovaphone.lib1.Event(sender)
-
Constructor for the event. The specified sender object will be passed to the attached listener functions.
- attach(listener)
-
Attaches a listener function with the following parameters.
- sender
- The sender object specified by the constructor of the event.
- value (optional)
- Additional information about the event, typically an object.
- detach(listener)
-
Detaches a listener function.
- notify(value)
- Fires the event and notifies the attached listeners
Example
// define event
var oncall = new Event(this);
// attach a listener
oncall.attach(function(sender, value) {
console.log(value.name + " calling");
});
// notify listeners
oncall.notify({ name: "John Doe" });
The start object
The start object is passed to an app. It provides access to the parameters of the app itself and encapsulates the communication with the client.
Properties
- url
- The websocket base URL to be used by the app.
- name
- The name of the app.
- title
- The display name of the app.
- args
- An object containing the URI parameters that have been passed to the app.
- margs
-
An object containing the URI parameters that have been passed to the app as arrays
so that no argument is lost, if the same argument is passed multiple times.
- lang
- The two-letter code of the current language (e.g. "en").
- scheme
- The current color scheme ("light" or "dark").
Events
- onargschanged
- Fires when the content of the "args" property has changed.
- onlangchanged
- Fires when the content of the "lang" property has changed.
- onschemechanged
- Fires when the content of the "scheme" property has changed.
- onmenustatechanged
- Fires if the optional hamburger menu of the app (initialized using start.setMenuState) has been opened or closed by the user. Possible values are "open" or "closed".
Callback functions
- onopenchannel(channel, opener, args)
- Apps can set this callback function in order to accept incoming communication channels from other apps.
Methods
- show()
- Tells the client to bring the app to the front.
- show(applink)
- Opens the specified app link that might be the same app or a different app.
- bringToFront()
- Tells the client that the window of the app (detached app window or main window of the client) should be brought to the front and get the focus. Depending on the operating system this function might not have an effect.
- close()
- Tells the client to close the app.
- home()
- Tells the client to show the home screen without closing the app.
- setArgs(args, title)
- Sets the app arguments that are needed to re-open the current page. Will be used by the client to create booksmarks and for the browser history. Additionally an optional title for the current page can be given.
- startActivity()
- Brings the app to the front for displaying an activity, like an incoming call. After the activity is finished, the app must call finishActivity().
- finishActivity()
- Tells the client that the app has finished the activity that was started using startActivity(). The client will go back to the last app that was displayed before the activity.
- provideApi(api)
- Tells the client that the app is providing a specific API (e.g. "com.innovaphone.phone"). The function should be called only after the app is connected and ready to receive API messages. Returns an object that encapsulates the handling of that API.
- consumeApi(api)
- Subscribes for a specific API (e.g. "com.innovaphone.phone"). Returns an object that encapsulates the handling of that API.
- openChannel(dst, args)
- Opens a communication channel to another app (dst) and returns an object that encapsulates the handling of that channel.
- acceptChannel(channel)
- Can be used inside the
onopenchannel
callback to accept an incoming channel. Returns an object that encapsulates the handling of that channel.
- rejectChannel(channel)
- Can be used inside the
onopenchannel
callback to reject an incoming channel.
- requestPrepareReload(callback)
- Registers a callback that is called before the app is closed and reloaded in a new iframe by the client. For example this happens when the app is attached or detached from the main window of myApps for windows. When the app has finished its preparations for reloading it should call start.prepareReloadComplete().
- prepareReloadComplete()
- Tells the client that the app has finished its preparations for reloading the app in a new iframe and that the current iframe can be closed now.
- setMenuState(state)
- Tells the client if the optional hamburger menu of the app is open or closed. Possible states are "open" and "closed". The function needs to be called once to tell the client that the app provides a menu.
- setBadge(value)
- Sets a badge at the app icon in the start bar and on home. Usually value is a number, but you can use any UTF8-Character to indicate states of the running app. Note that this function is only useful to indicate states while the app is running. If badge counts should appear also while it's not running the badge count should be set from the backend.
Example
The following example demonstrates how apps can use the initial parameters in the start object and handle parameter changes during runtime.
var innovaphone = innovaphone || {};
innovaphone.Example = innovaphone.Example || function (start) {
var colors = {
dark: {
"--background": "black",
"--foreground": "white"
},
light: {
"--background": "white",
"--foreground": "black"
}
};
var translations = {
en: {
hello: "Hello!"
},
de: {
hello: "Hallo!"
}
};
var schemes = new innovaphone.ui1.CssVariables(colors, start.scheme),
langs = new innovaphone.lib1.Languages(translations, start.lang),
app = new innovaphone.appwebsocket.Connection(start.url, start.name);
start.setMenuState("closed");
showPage(start.args.page);
start.onschemechanged.attach(function () {
schemes.activate(start.scheme);
});
start.onlangchanged.attach(function () {
langs.activate(start.lang);
});
start.onargschanged.attach(function () {
showPage(start.args.page);
});
start.onmenustatechanged.attach(function(sender, value) {
if (value == "open") {
// show menu
}
else {
// hide menu
}
});
function showPage(id) {
// ...
}
};
Client APIs
Apps can communicate with other apps using APIs. Each API is identified using a string constant (e.g. "com.innovaphone.phone").
Apps can both provide APIs and consume APIs that are provided by another app.
API messages
A consumer can send requests to a provider. The provider can send back responses to the originating consumer.
The framework treats the messages as opaque data and does not interpret them. The actual format is specified by the API.
API model
An API provider can publish a model object containing its current state. The model can be observed by the consumers of the API.
For example a phone API provider could publish the registration state and the active calls. Phone API consumers.
Providing an API
Apps that want to provide an API, must register at the client using the start.provideApi method. The method returns an object that encapulates the interface to be used by the API provider.
The API provider interface
- onmessage
-
Event that fires on incoming requests. The value of the event is an object with the following properties:
- msg
- The actual message, typically an object.
- consumer
- The name of the consumer that sent the request.
- src
- A value that should be echoed back to the consumer in every response to that request.
- onconsumerclosed
-
Event that fires if an API consumer for the API is closed. The provider can abort pending API requests from that consumer.
- consumer
- The name of the consumer that sent the request.
- send(msg, consumer, src)
-
Sends a response to a request that was received using the onmessage event.
- msg
- The response message, typically an object.
- consumer
- The name of the consumer that sent the request.
- src
- The src value from the corresponding request.
- update(model)
- Publishes an arbitrary model object, that can be observed by the consumers of the API.
- isDefaultApiProvider()
- Returns true, if the app is the default provider of the API.
Example
// register API
var phoneApi = start.provideApi("com.innovaphone.phone");
// process incoming messages
phoneApi.onmessage.attach(function(sender, obj) {
if (obj.msg.mt == "StartCall") {
startCall(obj.msg.num);
phoneApi.send({ mt: "StartCallResult" }, obj.consumer, obj.src);
}
});
// publish model
phoneApi.update({ calls: [] });
Consuming an API
Apps can consume an API by calling the start.consumeApi method. The method returns an object that encapsulates the interface to be used by the API consumer.
The API consumer interface
- providers
- An array that contains the names of all providers of the API.
- model
-
An object, that contains all providers of the API with some additional information and their published model.
- title
- The displayname of API provider.
- url
- The URL of the API provider.
- info
- An object that contains static info provided by the app service of the provider. The format is defined by the API.
- model
- An object that contains dynamic info published by the app provider. The format is defined by the API.
- defaultApiProvider
- The name of the current defaultApiProvider (can be null).
- restart
- A counter that reflects how many times the API provider was restarted. This information can be used to detect restarts in order to renew subscriptions to that provider.
Note that the initial value is undefined and changes to 0 when the provider was started the first time. So a change to 0 does not indicate a restart.
- send(msg, provider, src, title)
-
Sends a request to an API provider.
- msg
- The request message, typically an object.
- provider (optional)
- The name of the provider that should receive the request. If no provider is specified, the client lets the user select the provider. If "*" is specified, the request is broadcasted to all available providers of the API.
- src (optional)
- An optional value that will be echoed in the responses.
- title (optional)
- An optional title that is displayed by the client, if the user is asked which app should be used.
- onmessage
-
Event that fires on incoming responses. The value of the event is an object with the following properties:
- msg
- The actual message, typically an object.
- provider
- The name of the provider that sent the request.
- src
- The value from the corresponding request.
- onupdate
- An event that fires on API model changes. The consumer is supposed to re-evaluate the model, if needed.
Example
var phoneApi = start.consumeApi("com.innovaphone.phone");
phoneApi.send({ mt: "StartCall", num: "200" });
List of app APIs
The API messages and models are transparent to the client, so every app developer can define new APIs.
As of now innovaphone defined the following APIs to communicate with their apps.
Communication channels between apps
Apps or other iframes like status info displays can open a direct communication channel to another app. The programming interface of a channel is similar to a websocket connection.
The channel implementation uses window messages.
Opening a channel
The start.openChannel
method can be used to open a channel to another app. Additionally arguments with additional information for the app can be passed.
The method returns a channel object.
Example
var ch = start.openChannel("someapp", {arg1: 3});
Accepting channels
If an app wants to accept incoming channels, it needs to set the start.onopenchannel
callback.
Inside the callback the incoming channel can be accepted using start.acceptChannel
or rejected using start.rejectChannel
.
Example
start.onopenchannel = function(channel, opener, args) {
if (opener == expectedOpener) {
var ch = start.acceptChannel(channel);
}
else {
start.rejectChannel(channel);
}
};
The channel object
The channel object provides an interface to handle the lifetime of the communication channel and for sending and receiving messages.
Callbacks
- onconnected()
- Called if the connection was established.
- onclosed()
- Called if the connection failed or has been closed by the remote endpoint.
- onmessage(msg)
- Called on an incoming message. The message is a javascript object.
Methods
- send(msg)
- Sends the
msg
object. The remote endpoint will get it using the onmessage
callback.
- close()
- Closes the channel. The remote endpoint will get the
onclosed
callback.
Example
// source endpoint
var ch = start.openChannel("someapp", {arg1: 4});
ch.onconnected = function() {
ch.send({mt: "Echo"});
};
ch.onclosed = function() {};
ch.onmessage = function(msg) {
if (msg.mt == "EchoResult") ch.close();
};
// destination endpoint
start.onopenchannel = function(channel, opener, args) {
var ch = start.acceptChannel(channel);
ch.onconnected = function() {};
ch.onclosed = function() {};
ch.onmessage = function(msg) {
if (msg.mt == "Echo") {
ch.send({mt: "EchoResult"});
}
};
};
Multi-language support
innovaphone.lib1.Languages defines a library for translating texts. Standalone it can be used to create static texts.
In conjunction with innovaphone.ui1.lib (see innovaphone.ui1.nodePrototype.addTranslation) dynamic texts can be put into UI nodes that are updated automatically, when the language changes.
- innovaphone.lib1.Languages(texts, lang)
-
Constructor for the event. The specified sender object will be passed to the attached listener functions.
-
- texts
- An object containing the translations for all supported languages.
- The texts can contain numbered placeholders ($0, $1, $2, ...) that can be substituted during translation.
- lang
- The two-letter code of the current language (e.g. "en").
-
Example:
var texts = {
en: {
conn: "Connected as $0",
hello: "Hello!"
},
de: {
conn: "Verbunden als $0",
hello: "Hallo!"
}
};
var langs = innovaphone.lib1.Languages(texts, "en");
- current
- Property containing the two-letter code of the current language.
- activate(lang)
-
Switches the current language.
-
- lang
- The two-letter code of the language (e.g. "en").
-
Example:
langs.activate("de");
- text(id, args)
- Returns the translation of a text and substitues placeholders.
-
- id
- The ID of the text.
- args (optional)
- An array containing the values for substituting the placeholders in the tranlated text.
-
Example:
var text1 = langs.text("hello");
var text2 = langs.text("conn", ["John Doe"]);
- clear(node)
- Detaches UI nodes, so that they won't receive further updates when the language is changing.
- This method is needed only when the library is used by innovaphone.ui1.lib.
-
- node (optional)
- If specified, the library only detaches the UI nodes that are in the subtree of the given node. Otherwise all UI nodes are detached.


Biological Physics Mexico City 2019
04-09-2019 to 06-09-1019
Frontier Science at the Intersection of Physics, Math and Biology
The BioPhys Mexico City 2019 conference, the third in a biennial series, is intended as an international, multidisciplinary scientific forum to discuss the latest developments in biological physics, including experimental, theoretical and computational methods, from a single molecule perspective to complex multi-component environments.
The conference is expected to boost the new paradigm of interdisciplinary approaches converging into specific problems in biological physics. Hence, the conference audience is broad: We aim to attract the attention of biologists as well as biochemists, organic chemists, engineers, computational scientists, physicists, and mathematicians. The venue is highly convenient since there are four major Research Universities in Mexico City's metropolitan area, with extensive undergraduate and graduate programs in physics, biology, medicine, engineering and mathematics.
The program includes:
- Talks by national and international experts
- Poster session for undergraduate/graduate students
- Round-Table session on new trends in biological physics
- A dedicated issue of conference proceedings.
Due to the generosity of the sponsoring institutions, no fees will be charged to those selected to participate in this conference.
3rd International Summer Symposium on Systems Biology
05-08-2019 to 06-08-1019
3rd International Summer Symposium on Systems Biology
Those are the proceedings for the 3rd edition of the “International Summer Symposium on Systems Biology”. The meeting took place at the National Institute of Genomic Medicine (INMEGEN) in Mexico City from August 4-6, 2014. This event was the first of a series of meetings to encourage the development of the systems biology in Mexico and the development of this area to tackle basic and applied research in medical and biomedical fields.
This effort was supported by the Laboratory of Human Systems Biology-INMEGEN to create a scientific ambiance for discussing some methods and strategies to develop the bases of a systemic and personalized medicine in a national and international perspective.
The purposes of the meeting are:
- Discuss some of the frontier research in Systems Biology and its applications for understanding human diseases.
- Create an ambiance to establish collaborations among groups that will promote different computational frameworks for modeling human diseases.
- Design strategies to encourage growth in this area in biomedical, medicine and genomic sciences at the undergraduate and graduate levels since these are areas with potential for dealing with health problems in Mexico.
To reach these goals, the meeting brought together some national and international qualified experts from different research groups, providing an excellent occasion for academic exchange between local and foreign colleagues in a pleasant and collaborative environment. The program included plenary lectures, poster sessions, a discussion panel and a series of short presentations geared towards postdoctoral researchers and advanced graduate students.
Biological Physics Mexico City 2017
17-05-2017 to 19-05-2017
Frontiers at the interface of Physics, Math and Biology.
This conference (the second in a series) is intended as an international, multidisciplinary scientific forum to discuss the latest developments in biological physics (including proteins, peptides and enzymes, among many other topics).
The conference is expected to boost a new paradigm of interdisciplinary approaches converging into specific problems in biological physics. Hence, the conference audience is broad: We aim to attract the attention of biologists as well as biochemists, organic chemists, engineers, computational scientists, physicists, and mathematicians. The venue is highly convenient since there are four major Research Universities in Mexico City’s metropolitan area, with extensive undergraduate and graduate programs in physics, biology, medicine, engineering and mathematics.
The program includes:
- Talks by national and international experts
- Poster session for undergraduate/graduate students
- Round-Table session on new trends in biological physics
- A dedicated issue of conference proceedings.
2nd International Summer Symposium on Systems Biology
02-08-2016 to 04-08-2016
With great pleasure we are hereby announcing the 2nd International Summer Symposium on Systems Biology (IS3B) taking place in Mexico City, Mexico from August 2nd - 4th 2016. The IS3B 2016 is organized by The Human Systems Biology Laboratory (HSBL), RAI-UNAM & INMEGEN.
The IS3B is currently the largest symposium on Systems Biology in Mexico and Latin America, and strives to unite leading researchers and students in an informal setting with the aim to present current research in Systems Biology and Systems Medicine. The aims of the meeting are:
- Discuss current research in Systems Biology and its applications for understanding human diseases
- Create an ambiance that enables scientific collaborations among experimental and theoretical groups working on human diseases.
To this extent we invite national and international researchers and students working in the aforementioned fields during all stages of their academic career with the possibility to present their work as a poster or short talk to a highly qualified research community.
The registration deadline has been extended until June 15th, 2016!
1st International Summer Symposium on Systems Biology
04-08-2014 to 06-08-2014
Those are the proceedings for the 1st edition of the “International Summer Symposium on Systems Biology: From networks to phenotypes in human diseases”. The meeting took place at the National Institute of Genomic Medicine (INMEGEN) in Mexico City from August 4-6, 2014. This event was the first of a series of meetings to encourage the development of the systems biology in Mexico and the development of this area to tackle basic and applied research in medical and biomedical fields. This effort was supported by the Laboratory of Human Systems Biology-INMEGEN and Fundación Televisa to create a scientific ambiance for discussing some methods and strategies to develop the bases of a systemic and personalized medicine in a national and international perspective.
The purposes of the meeting were:
Discuss some of the frontier research in Systems Biology and its applications for understanding human diseases.
Create an ambiance to establish collaborations among groups that will promote different computational frameworks for modeling human diseases.
Design strategies to encourage growth in this area in biomedical, medicine and genomic sciences at the undergraduate and graduate levels since these are areas with potential for dealing with health problems in Mexico.
To reach these goals, the meeting brought together some national and international qualified experts from different research groups, providing an excellent occasion for academic exchange between local and foreign colleagues in a pleasant and collaborative environment. The program included plenary lectures, poster sessions, a discussion panel and a series of short presentations geared towards postdoctoral researchers and advanced graduate students.


--- layout: post title: Welcome Alia! html: True image: /img/team/alia.jpg bigimgasas: /img/team/alia.jpg summary: We are very happy to see Alia join our team. ---
We are very happy to see Alia join our team. Alia recently graduated from UT and she is our new research associate.


Choose Notice type
| Select | Name | Roll | Registration No |
|---|---|---|---|
|
|
{{foundStudentForSearch?.name}} | {{foundStudentForSearch?.roll_no}} | {{foundStudentForSearch?.registration_no}} |
List of Student Who will Receive this Notiece
| NO. | Roll No | Registration No |
|---|---|
| {{i+1}} | {{item}} |


In dart, compile-time constants can be created as long as the object's deep structure can be determined at compile time.
import 'dart:math';
// compile-time constants are defined using 'const'
const name = "greg";
// Objects can also be declared at compile-time
const Rectangle bounds = const Rectangle(0, 0, 5, 5);
main() {
print(name);
print(bounds);
}
$ dart const.dart
greg
Rectangle (0, 0) 5 x 5


The video will automatically start playing as I'm usign the attribute `data-autoplay`.
And because I'm not using the attribute `data-keepplaying` the video will automatically stop playing after leaving the section or slide.


from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from builtins import object
# leaflet object
[docs]class Leaflet(object):
""" Create a bilayer Leaflet representation.
This class object is used to group lipids together according to their bilayer leaflet. It is primarily meant to
store the indices of LipidCOMs as they are in a Frame.lipidcom list. This class also
creates sub-groups within the Leaflet based on the LipidCOM.type using LipidGroup objects. Instances of Leaflet
are created by the MemSys class.
"""
def __init__(self, name):
"""Initializes an instance of a Leaflet object.
Args:
name (str): The name of the bilayer leaflet being initialized ('upper' and 'lower' are used by the MemSys class).
Attributes:
name (str): The name of the Leaflet (e.g. 'upper' or 'lower').
members (list of int): A list containing the integer indices associated with the LipidCOM objects within
a Frame that are assigned to the Leaflet instance.
groups (list of obj:LipidGroup): A list of the LipidGroup objects (uniquely named) that are created by the Leaflet instance
as new members are added.
group_dict (dict): A dictionary keyed according to the names of the LipidGroup objects created, which stores the
corresponding index of that LipidGroup in self.groups.
"""
#the name of the leaflet - e.g. 'upper' or 'lower'
self.name = name
#initialize a list to store the indices of lipids assigned to this leaflet
self.members = []
#initialize a list to hold the LipidGroup objects
self.groups = []
#initialize a dictionary to store the self.groups index of LipidGroup objects
self.group_dict = {}
return
def __str__(self):
return '%s leaflet of a Membrane System with %s members and %s lipid groups' % (self.name, len(self.members), len(self.groups))
def __repr__(self):
return '%s leaflet of a Membrane System with %s members and %s lipid groups' % (self.name, len(self.members), len(self.groups))
def __len__(self):
""" Have len(Leaflet) return the number of lipids that have been added to the Leaflet instance.
Returns:
int: Number of lipids in the Leaflet.
"""
return len(self.members)
#consider changing var name of input 'resname' to something that doesn't conflict with LipidCOM.type
[docs] def add_member(self, com_index, resname, resid):
""" Add new lipids to the Leaflet.
This function is meant to be used to add new lipids according to their Frame.lipidcom index
to the Leaflet and to a LipidGroup according resname/type/name.
Args:
com_index (int): The COMFrame.lipidcom index of the lipid being added to the Leaflet.
resname (str): The resname (or LipidCOM.type) of the lipid being added.
resid (int): The topological resid of the lipid being added to the leaflet.
"""
if len(self.members) == 0:
self.members.append([com_index, resname, resid])
self.groups.append(LipidGroup(resname))
self.groups[0].add_member(com_index)
self.group_dict.update({resname: 0})
else:
self.members.append([com_index, resname])
addgroup = True
group_ind = 0
for rn in self.groups:
if resname == rn.lg_name:
addgroup = False
break
group_ind+=1
if addgroup:
self.groups.append(LipidGroup(resname))
ng = len(self.groups)
self.groups[ng-1].add_member(com_index)
self.group_dict.update({resname: ng-1})
else:
self.groups[group_ind].add_member(com_index)
#self.members=sorted(self.members,key=lambda self.members:self.members[1])
return
[docs] def get_group_indices(self, group_name):
""" Get the indices of lipids in the Leaflet belonging to a specific LipidGroup.
Args:
group_name (string): The name of the LipidGroup pull LipidCOM indices from.
Passing the string 'all' will return indices of all the lipids assigned to
the Leaflet instance. If the group_name is not recognised (i.e. is not in the group_dict)
The function defaults to 'all'.
Returns:
list of int: A list containing the integer indices of lipids in the Leaflet that
belong to the specified LipidGroup.
"""
indices = []
if group_name == "all":
return self.get_member_indices()
elif group_name in self.group_dict:
gindex = self.group_dict[group_name]
indices = self.groups[gindex].lg_members
else:
#unkwown group name- print warning and use the default "all"
print("!! Warning - request for unknown Lipid Group \'",group_name,"\' from the ",self.name," leaflet")
print("!! using the default \"all\"")
return self.get_member_indices()
return list(indices)
[docs] def get_member_indices(self):
""" Get the indices of all lipids (LipidCOM) in the Leaflet.
This member function Returns: the list of indices for the lipids grouped in the Leaflet instance.
Returns:
list of int: A list of integer indices of the lipids associated with the Leaflet instance.
"""
indices = []
for element in self.members:
indices.append(element[0])
return list(indices)
[docs] def get_member_resids(self):
""" Get the 'resid's of all lipids in the Leaflet.
This member function Returns: the list of resid for the lipids grouped in the Leaflet instance.
Returns:
list of int: A list of integer 'resid's of the lipids associated with the Leaflet instance.
"""
return [element[2] for element in self.members]
[docs] def get_member_resnames(self):
""" Get the 'resname's of all lipids in the Leaflet.
This member function Returns: the list of resnames for the lipids grouped in the Leaflet instance.
Returns:
list of int: A list of 'resname's of the lipids associated with the Leaflet instance.
"""
return [element[1] for element in self.members]
[docs] def get_member_resname_from_resid(self, resid):
resids = self.get_member_resids()
if resid in resids:
index = resids.index(resid)
return self.get_member_resnames()[index]
else:
raise ValueError('resid is not in this leaflet')
[docs] def has_group(self, group_name):
""" Check if there is a LipidGroup with the specified name.
Args:
group_name (str): The name to checked against the names of existing LipidGroup objects.
Returns:
bool: True if there is a LipidGroup with name group_name, and False otherwise.
"""
if group_name == 'all':
return True
return group_name in list(self.group_dict.keys())
[docs] def num_groups(self):
""" Get the number of LipidGroups in the Leaflet.
Returns:
int: The number of unique LipidGroups.
"""
return len(self.groups)
[docs] def get_group_names(self):
""" Get the names of all the LipidGroup objects in the Leaflet
Returns:
list of str: A list of the names of current LipidGroup objects.
"""
return [group.lg_name for group in self.groups]
[docs]class LipidGroup(object):
""" Object to group lipid indices by type/resname/name.
Instances of this object are created by the Leaflet class.
"""
def __init__(self, name):
""" Initializes LipidGroup object.
Args:
name (str): The name/type/resname of the lipids being grouped in this object.
Attributes:
lg_members (list of int): A list to hold the indices of lipids added to this
this LipidGroup.
lg_name (str): The name/type/resname of the lipids being grouped in this object.
"""
#initialize a list to hold the member indices
self.lg_members = []
# the name of this lipid group
self.lg_name = name
return
[docs] def add_member(self, new_mem):
""" Add lipid index to to the LipidGroup.
Args:
new_mem (int): The index of the lipid being added to this LipidGroup.
"""
self.lg_members.append(new_mem)
return
[docs] def name(self):
""" Get the name associated with this LipidGroup.
Returns:
str: The name of the lipid group (i.e. lg_name)
"""
return self.lg_name
#@classmethod
#def leaflet_from_mda_frame


There is a list, it is {{info}}
I will print the elements of this list in order.
{% for element in info %}{{element}}
{% end %}info[{{index}}] is {{element}} {% if element == "python" %}
I love this language--{{element}}
{% end %} {% end %} {% if<EMAIL_ADDRESS>in info %}A Ha, this the python lesson of LaoQi, It is good! His email is {{info[2]}}
{% end %}Would you like {{var}}?


--- layout: post title: Block, a Processing Sketch comments: true ---
So far the only suggestion for what I should call this is 'The Dancing Block,' will accept any other ideas at this point.


To change this content, go to your deployed app and makes changes to the HTML located under /custom/terms.html


Note: Due to the fact that this is for an excercise and to the lack of time, many bugs and shortcomings might still occurs. One of which is the fact that this web will break if browsed from any devise that is 960 px or lower (moble devices).
I declare that in submitting all work for this assessment I have read, understood and agree to the content and expectations of the Assessment declaration.
Git and GitHub are tools that allows the user to perform software management by tracking any changes that occurs in the files as well as for verson control. While Git takes the form of a distributed verson system, which its codebase and history is downloaded into the user's computer, that makes every Git directory in a computer a fully independent directory, free from any reliance from Internet connection or central server; GitHub takes the form of a web-based system that allows the user to upload and download files in online repositories. Because of their designed nature, Git is more focused on verson-control and code sharing, while GitHub is more focused on being a centralized hub for hosting codes.
Both Git and GitHub are very widely used, with an enourmous amount of users and programs that is maintained using either one or with both of them. This is due to the fact that both of them are open-sources and being mostly free, with GitHub offers basic services for free, while the more advanced versons is reserved for commercial use.
a. Download Git for Windows
- Go to https://git-scm.com/downloads and click on the link for window to start download.
(or select the package to download manually).
Manual download link for Windows
Download link for different operating systems
b. Extract and launch Git
- Look for and launch the Git installer in the browser's download shortcut.
- Review the license, click Next to continue.
- The installer will ask about things like installation location, components, start menu folder, text editor and PATH enviroment,... Just leave it at default if don't need to change anything and click Next.
- Once completed, launch Git bash and click Finish.
Git Bash installation tutorial
Since Github is a web-based platform, it is possible to just use its website verson. however, for those who want to interact with Github with the computer then Github Desktop is a good choice.
Installation steps:
- Open browser.
- Go to https://desktop.github.com and click on the "Download for Window (64 bit).
(as in picture)
- Wait for the download to complete.
- Allow the installation to run and install.
GitHub Desktop installation tutorial
- Go to https://github.com and either create an account or sign in using an already existed account
Sign up screen
Sign in screen
- Go to profile icon --> Your repositories --> . After that, a form will appears
should be: username.github.io
Choose Public
Choose Add a README file
(optional)
not required to write
New repository creation form
Choose Create repository
- Upon completion, there will be a screen appears:
- Go to , scroll down until GitHub pages appears
Choose main
Choose save
GitHub Pages (Settings)
1. Git config: a function to set Git values locally or on a global level.
When doing group project or during open-sources projects, conflict is something that's happens naturally and is inevitable. Conflicts happen when two or more people change the same file. Conflicts can happens locally in the user's own repository or in remote repository such as GitHub.
When that happens, Git will include some key words into the file for the developer to decide which direction should be choosen.
example of a conflict screen
After a decision is made, it simply just a matter of git add to create a new unified file and of git commit to create a new commit to the files.
In order to reduce the frequency of having conflicts, it it recommended that there is a set of rules and/or guidelines that is used as a basis for the group's work with git. These can be things like effectively divide the work between members, and that there shouldn't be too many people working on a branch at any momment, always pull before start working/ resuming work or commit often, with small files instead of only commit once but with a very big file, ...
Branch is a function that allows the user to create a repository that is simmilar to the one currently using, which allows the user to diverge from the current work without changing the main branch. This function is useful in many ways, including verson-testing and bug-patching.
Some basic branch command:
1. Create a new branch and switch from the current one to it:
syntax: git checkout -b <branchname>
2. Switch branch:
Syntax: git checkout <branchname>
3. List all the branches and highlight the branch currently in:
Syntax: git branch
4. Detete branch (locally):
Syntax: git branch -d <branchname>
5. Push the selected branch to the remote repository:
Syntax: git push origin <branchname>
6. Push all branches:
Syntax: git push --all origin
7.Merge branch:
Syntax: git merge <branchname>
1.To navigate between folder: for the purpose of navigation, there are a number of commands that can be used, such as:
- pwd: to show file pathway that the user is currently in
- cd .. : to move upwards to the parent folder
- cd <filename>: to go downwards from the parent folder to the sub-folder
2. Removal of files:
- rm <path to file>: to remove a file from a folder
(rm <filename> can also be used to acheive the same results if already navigated to the desinated file.)
3. removal of folder:
- rm -r <path to folder>
or rm -r <foldername> if alreaady navigated to the folder.
( the -r stands for "recursive"
created with
Website Builder Software .


Use your mouse to select SETs from the board.
A set consists of three cards satisfying all of these conditions:
The rules of Set are summarized by: If you can sort a group of three cards into "two of ____ and one of ____", then it is not a set.
For example, these three cards form a set:
Given any two cards from the deck, there is one and only one other card that forms a set with them.
There are cases when there will not be any sets on the board, you can than use the '+3 cards' button for a better chance at finding a set.
You can use the 'Hint' and '+3 cards' buttons if you ever get stuck.
Rules taken from Wikipedia


{% comment %} Include this template to build the submit button in the advanced search controls for permissions.FilterSet. {% endcomment %}


Login
Create an account
Weekend Specials
$1000
Top selling items
Samsung Galaxy S6
$500
IN STOCK
Samsung Galaxy S6
$500
IN STOCK
Samsung Galaxy S6
$500
IN STOCK
Samsung Galaxy S6
$500
IN STOCK
Samsung Galaxy S6
$500
IN STOCK
Samsung Galaxy S6
$500
IN STOCK
Samsung Galaxy S6
$500
IN STOCK
Samsung Galaxy S6
$500
IN STOCK


Lean, Mean, Protein Machine!
Helping protein designers predict protein localization since 2021.
Protein localization
The localization of proteins is critical to its function. Expressed proteins either remain in the cytoplasm, attach to the membrane or get secreted out of the cell. The mechanisms that determine protein localization depend on the species. A common problem in protein expression experiments is expressing the proteins in an incorrect localization. Hence, predicting protein localization in commonly used expression systems is relevant to protein designers.
Our model
Protein localization can be predicted from its sequence. Our model processes the protein sequence to a unified statistical representation (Unirep) and builds a random forest classifier to predict the localization of the protein. The model was trained using all the proteins in the Uniprot datasets for Escherichia coli, Saccharomyces cerevisiae, and Homo sapiens, achieving a test accuracy of 98.79%, 96.41%, and 92.59%, respectively.
Applications
Predicting protein localization helps protein designers in its day-to-day tasks. The versatility of the model can be used to compare the protein localization across multiple organisms or to predict the most likely localization in a given host organism. We also offer the possibility to optimize the localization of interest by testing all residue substitutions in certain sequence positions, thus recreating a site-saturation mutagenesis experiment computationally.


--- layout: page category: spec title: "HTML 5.1" ---
| Current Status: | Recommendation (REC) |
|---|---|
| Canonical URI: |
http://www.w3.org/TR/html51
|
| Abstract: | This specification defines the 2nd edition of the 5th major version, first minor revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML). In this version, a significant error with HTML 5.1 has been rectified, as noted in the Errata corrected section. Meanwhile, new features continue to be introduced to help Web application authors, new elements continue to be introduced based on research into prevailing authoring practices, and special attention continues to be given to defining clear conformance criteria for user agents in an effort to improve interoperability in the development of HTML 5.2. |
HTML 5.1Updates:


Who am I?
- Assistant professor at CSE since 2017
- PhD at ETH Zurich
- Postdoc at MIT
My Research
- Program Verification: how to prove the program is doing the right thing?
- Program Synthesis: how to generate a program that does the right thing?
The Crew
Teaching Assistants
- Shraddha Barke
- Aidan Denlinger
- Zheng Guo
Tutors
- Justin Du
- Rana Lulla
- Melody Ruth
Lecture Format
In-person + live on Zoom
For those joining on Zoom:
- Keep your mic off unless you are talking
- Keep your video on if you can
- Two ways to ask a question:
- “Raise your hand” in zoom and I will call on you
- Type into zoom chat
- Please do not use public Zoom chat for random commentary, it’s distracting
- Same if I ask you a question
Lectures will also be recorded and published on canvas and/or podcast
A Programming Language
Two Variables
x
,y
Three Operations
x++
x--
x = 0 ? L1 : L2
Example Program
(What does it do?)
L1: x++
--
y= 0 ? L2 : L1
y L2: ...
The above language is “equivalent to” every PL!
(See wikipedia)
But good luck writing
- QuickSort
- Fortnite
- Spotify
Two lessons:
- All Programming Languages share something fundamental
- But also: your Programming Language shapes your Programming Thought
What is CSE 130 not about?
Learning…
- JavaScript in March
- Haskell in April
- C++ in May
- etc.
New languages come (and go …)
There was no
- Python 35 years ago
- Java 30 years ago
- C# 25 years ago
- Rust 12 years ago
- WebAssembly 5 years ago
What is CSE 130 about?
- Concepts in programming languages
- Language design and implementation
If you don’t trust me, ask PL Twitter!
Course Goals
Free Your Mind.
Goal: Learn the Anatomy of PL
- What makes a programming language?
- Which features are fundamental and which are syntactic sugar?
Goal: Learn New Languages / Constructs
New ways to describe and organize computation, to create programs that are:
- Correct
- Readable
- Extendable
- Reusable
Goal: How to Design new Languages
New hot languages being designed in industry as we speak:
- Hack, Flow, React @ Facebook
- Rust @ Mozilla (now The Rust Foundation)
- TypeScript @ Microsoft
- Swift @ Apple
- WebAsssembly @ Google + Mozilla + Microsoft
Buried in every large system is a (domain-specific) language
- DB: SQL
- Word, Excel: Formulas, Macros, VBScript
- Emacs: LISP
- Latex, shell scripts, build scripts (makefiles), …
If you work on a large system, you will design a new PL!
Course Syllabus
- Lambda calculus (2 weeks)
- The simplest language on Earth
- Haskell (5 weeks)
- A cool functional language
- Build your own language (3 weeks)
- How do we implement a new language (in Haksell)?
- How do we formalize a language and prove things about it?
QuickSort in C
void sort(int arr[], int beg, int end){
if (end > beg + 1){
int piv = arr[beg];
int l = beg + 1;
int r = end;
while (l != r-1)
if(arr[l] <= piv) l++;
else swap(&arr[l], &arr[r--]);
if(arr[l]<=piv && arr[r]<=piv)
=r+1;
lelse if(arr[l]<=piv && arr[r]>piv)
{l++; r--;}
else if (arr[l]>piv && arr[r]<=piv)
(&arr[l++], &arr[r--]);
swapelse r=l-1;
(&arr[r--], &arr[beg]);
swap(arr, beg, r);
sort(arr, l, end);
sort}
}
QuickSort in Haskell
sort [] = []
sort (x:xs) = sort ls ++ [x] ++ sort rs
where
= [ l | l <- xs, l <= x ]
ls = [ r | r <- xs, x < r ] rs
(not a wholly fair comparison…)
Course Logistics
- webpage
- calendar, lecture notes, programming assignments, …
- canvas
- lecture recordings
- lecture recordings
- piazza
- announcements and discussions
- gradescope (code: XV6YV4)
- homework/exam submissions, grades
- classquestion (code: GXJVJ)
- anonymous questions during lecture
Grading
- 45% Homework assignments
- 25% Midterm
- 30% Final
- 05% Extra credit for Piazza discussion
- To top 20 best participants
Assignments
- 6 programming assignments
- Released online, at least a week before due date
- Due on Wednesday at 11:59pm
- no assignment Weeks 1 and 2
- 8 late days, no more than 4 late days per assignment
- used atomically (5 mins late = 1 late day)
- Submitted via Gradescope
- submission instructions in the assignment
- Solve alone or in groups of two
- user this piazza thread to find a partner
Exams
- Midterm on May 8
- Gradescope multiple choice
- individual
- 24h timespan
- Final: June 15
- programming assignment
- individual
- 24h timespan
- Formats subject to change!
- You can use any general resources you want (class material, Wikipedia), but do not:
- search or post Chegg etc
- post on StackOverflow etc
- try to find past exams that are not publicly posted
- communicate with each other during the exam
- The final is cumulative
- Midterm grade is calculated as
midterm > 0 ? max(final, midterm) : 0
- you get a second chance if you don’t do well on the midterm
- you must turn in both the midterm and the final
In-class Quizzes
We will do quizzes in class via ClassQuestion
- Make class interactive
- Help you and me understand what’s tricky
Protocol
- Discuss
- I show the quiz on screen
- If in class: discuss with your neighbor
- If remote: discuss with a friend on zoom chat (or any other chat)
- Try to reach consensus
- Vote
- On the ClassQuestion website
- Class Discuss
- What was easy or tricky?
TEST QUIZ
How can you earn 5% extra credit for this class?
A do all my homework alone
B answers other students’ questions on Piazza
C submit all my homework on due date (without using late days)
D post snarky comments on zoom chat during lecture
Your Resources
- Discussion section: Wed 7pm
- PCYNH 106 and/or on Zoom
- same Zoom link as lecture
- Office hours
- every day, check calendar
- Piazza
- we answer during work hours
- No text
- online lecture notes and links
Academic Integrity
Programming assignments: do not copy from classmates or from previous years
Exams done alone
- Zero Tolerance
- Offenders punished ruthlessly
- Please see academic integrity statement
Students with Disabilites
Students requesting accommodations for this course due to a disability or current functional limitation must provide a current Authorization for Accommodation (AFA) letter issued by the Office for Students with Disabilities (OSD).
Students are required to present their AFA letters to Faculty (please make arrangements to contact me privately) and to the CSE OSD Liaison in advance so that accommodations may be arranged.
Diversity and Inclusion
Goal
- Create a diverse and inclusive learning environment
- Where all students feel comfortable and can thrive
- If there is a way we can make you feel more included, please let one of the course staff know
Expectations
- We expect that you will honor and respect your classmates
- Abide by the UCSD Principles of Community
- Understand that others’ backgrounds, perspectives and experiences may be different than your own
- Help us to build an environment where everyone is respected and feels comfortable.
If you experience any sort of harassment or discrimination, please contact the Office of Prevention of Harassment and Discrimination. Students may receive confidential assistance at the Sexual Assault Resource Center at<PHONE_NUMBER> or Counseling and Psychological Services (CAPS) at<PHONE_NUMBER>.


- This keybinding is set up to launch new windows of running applications, rather than launching applications themselves. (Launching a running application only brings it to the foreground). This is meant to mimic the launcher keybindings available in Ubuntu.


Fishing Guild Member:
Fancy yourself a fisherman?
Fishing Shot will help you catch more.
They're comparable to soulshots.
"Please make me some Fishing Shot."


---
title: Homeopathic A&E
comments: true
tags:
- Humour
- Health
- Facepalm
thumbnail: https://img.youtube.com/vi/HMGIbOGu8q0/default.jpg
blogger_orig_url: http://stickmanscorral.blogspot.com/2011/11/homeopathic.html
---
Following Monday's post, which touched on the murky world of alternative medicine... South African comedian, Warren Robertson links to a brilliant Mitchell and Webb skit, "Homeopathic A&E":


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 2
Tom brings together tastes from the sea and land with a mix of shellfish, fish and asparagus.
Equipment: you will need a steamer
Discard and replace any mussels and clams with broken shells or that refuse to close when tapped firmly. Heat a large, lidded saucepan and add the wine, mussels and clams. Cook with the lid on for 3½–4 minutes, or until the shellfish have opened, then remove them and set aside. Discard any that remain closed.
Season the halibut with salt and drizzle with 1 tablespoon oil. Place onto buttered baking paper and cook in the steamer for 6–8 minutes, or until cooked.
Heat a lidded saucepan over a medium–high heat and add the remaining oil. Roll the six whole asparagus tips in the oil, then add a ladle or two of fish stock. Cover with the lid and cook for 4 minutes, or until just tender, adding more stock if needed. Remove the asparagus and set aside.
Simmer the fish stock without the lid until reduced. Whisk in the butter and lemon juice. Return the asparagus, mussels and clams to the pan and stir in the brown shrimps, winkles and sea purslane. Simmer for 2–3 minutes, until everything is cooked and hot through.
Place the shellfish mixture into the centre of two shallow bowls and put the halibut on top. Garnish with slices of raw asparagus.


This is a fake Yelp website
Wonder where is the best place for your afternoon tea?
Search the "tea" by using our ©Fake Yelp
Only interested in San Francisco?
Using the "location" option to search in a particular area!
What is your criteria?
Distance? Rate? or frequency of visting of other users? All of needs could be met in our ©Fake Yelp!


Copyright (c) 2004 Karl Scherer
This game is played on the following 10x10 square board:
|
| An example Black's turn. Black can choose the marked stone has the pivot, and move the four stones from there until the green dot (i.e., the line of stones will land at a9,b9,c9,d9). Notice that the black stone at h9 was not part of the rotating line. White cannot avoid Black capturing one of the two stones on the next turn, thus losing by stalemate. |
|
| Another
example
The pivot and the rotating line of stones can be a subset of an entire line of stones of the same color. |
There is a ZRF to play Squaredance with Zillions. A related move concept can be found at Twirls of Action.


To save memory, global pinned tabs are loaded only once and then moved to whichever window is
active.
So, as soon as this tab's window gets the focus - or when you release your mouse button -
you should see your site.
In the meantime, here are the details of your site:


Nikola Tesla (1856—1943) was a Serbian-American inventor, electrical engineer, mechanical engineer, and futurist best known for his contributions to the design of the modern alternating current (AC) electricity supply system.
Born and raised in the Austrian Empire, Tesla studied engineering and physics in the 1870s without receiving a degree, gaining practical experience in the early 1880s working in telephony and at Continental Edison in the new electric power industry. In 1884 he emigrated to the United States, where he became a naturalized citizen. He worked for a short time at the Edison Machine Works in New York City before he struck out on his own. With the help of partners to finance and market his ideas, Tesla set up laboratories and companies in New York to develop a range of electrical and mechanical devices. His alternating current (AC) induction motor and related polyphase AC patents, licensed by Westinghouse Electric in 1888, earned him a considerable amount of money and became the cornerstone of the polyphase system which that company eventually marketed.
Attempting to develop inventions he could patent and market, Tesla conducted a range of experiments with mechanical oscillators/generators, electrical discharge tubes, and early X-ray imaging. He also built a wireless-controlled boat, one of the first-ever exhibited. Tesla became well known as an inventor and demonstrated his achievements to celebrities and wealthy patrons at his lab, and was noted for his showmanship at public lectures. Throughout the 1890s, Tesla pursued his ideas for wireless lighting and worldwide wireless electric power distribution in his high-voltage, high-frequency power experiments in New York and Colorado Springs. In 1893, he made pronouncements on the possibility of wireless communication with his devices. Tesla tried to put these ideas to practical use in his unfinished Wardenclyffe Tower project, an intercontinental wireless communication and power transmitter, but ran out of funding before he could complete it.
After Wardenclyffe, Tesla experimented with a series of inventions in the 1910s and 1920s with varying degrees of success. Having spent most of his money, Tesla lived in a series of New York hotels, leaving behind unpaid bills. He died in New York City in January 1943. Tesla's work fell into relative obscurity following his death, until 1960, when the General Conference on Weights and Measures named the SI unit of magnetic flux density the tesla in his honor.
“But I cannot help thinking how much better it would have been if the ingenious men, who have originated these 'systems' had invented something of their own instead of depending on me altogether.”
—The True Wireless (1919)
Literary Works
A New System of Alternate Current Motors and Transformers, AIEE Address, May 16, 1888
Phenomena of Alternating Currents of Very High Frequency, Electrical World, Feb. 21, 1891
Experiments with Alternate Currents of Very High Frequency and Their Application to Methods of Artificial Illumination, AIEE, Columbia College, N.Y., May 20, 1891
Experiments with Alternate Currents of High Potential and High Frequency, IEE Address, London, February 1892
On Light and Other High Frequency Phenomena, Franklin Institute, Philadelphia, February 1893, and National Electric Light Association, St. Louis, March 1893
On the Dissipation of the Electrical Energy of the Hertz Resonator, Electrical Engineer, Dec. 21, 1892
On Electricity, Electrical Review, January 27, 1897
High Frequency Oscillators for Electro-therapeutic and Other Purposes, Electrical Engineer, November 17, 1898
Plans to Dispense With Artillery of the Present Type, The Sun, New York, November 21, 1898
Tesla Describes His Efforts in Various Fields of Work, Electrical Review - New York, November 30, 1898
On Current Interrupters, Electrical Review, March 15, 1899
The Problem of Increasing Human Energy, Century Illustrated Magazine, June 1900
Tesla's New Discovery, The Sun, New York, January 30, 1901
Talking With Planets, Collier's Weekly, February 9, 1901
The Transmission of Electrical Energy Without Wires, Electrical World, March 5, 1904
Electric Autos, Manufacturers' Record, December 29, 1904
The Transmission of Electrical Energy Without Wires as a Means for Furthering Peace, Electrical World and Engineer, January 7, 1905
Tuned Lightning, English Mechanic and World of Science, March 8, 1907
Tesla's Wireless Torpedo, New York Times, March 19, 1907
Possibilities of Wireless, New York Times, Oct. 22, 1907
The Future of the Wireless Art, Wireless Telegraphy & Telephony, Van Nostrand, 1908
Mr. Tesla's Vision, New York Times, April 21, 1908
Nikola Tesla's New Wireless, The Electrical Engineer - London, December 24, 1909
Dr. Tesla Talks of Gas Turbines, Motor World, September 18,1911
Tesla's New Monarch of Machines, New York Herald, Oct. 15, 1911
The Disturbing Influence of Solar Radiation On the Wireless Transmission of Energy, Electrical Review and Western Electrician, July 6, 1912
How Cosmic Forces Shape Our Destinies, New York American, February 7, 1915
Some Personal Recollections, Scientific American, June 5, 1915
The Wonder World To Be Created By Electricity, Manufacturer's Record, September 9, 1915
Nikola Tesla Sees a Wireless Vision, New York Times, Sunday, October 3, 1915
Tesla's New Device Like Bolts of Thor, New York Times, December 8, 1915
Wonders of the Future, Collier's Weekly, December 2, 1916
Electric Drive for Battle Ships, New York Herald, February 25, 1917
My Inventions, Electrical Experimenter, February-June and October 1919
Famous Scientific Illusions, Electrical Experimenter, February 1919
The True Wireless, Electrical Experimenter, May 1919
Electrical Oscillators, Electrical Experimenter, July 1919
World System of Wireless Transmission of Energy, Telegraph and Telegraph Age, October 16, 1927
Our Future Motive Power, Everyday Science and Mechanics, December 1931
Pioneer Radio Engineer Gives Views On Power, New York Herald Tribune, September 11, 1932
The Eternal Source of Energy of the Universe, Origin and Intensity of Cosmic Rays, New York, October 13, 1932
Tesla on Power Development and Future Marvels, New York World Telegram, July 24, 1934
The New Art of Projecting Concentrated Non-dispersive Energy Through Natural Media, 1935
A Machine to End War, Liberty, February 1935
Tesla Predicts Ships Powered by Shore Beam, New York Herald Tribune, May 5, 1935


This is an AMP page which has delivered an ad via DFP.
On click, AMP will eliminate the redirect to the adserver and instead send the user directly to the landing page.
Moreover, since the landing page is in AMP, the landing page will load in an instant.
AMP ad landing pages work in both cases where hosting page is AMP or non-AMP.
In order to make AMP landing pages work, include this tiny peice of JavaScript in your creative code:
Try the creative below :
To learn more about how AMP does this, read more here.


What Does WWF Do?
WWF's mission is to stop the degradation of our planet's natural environment, and build a future in which humans live in harmony with nature.
The World Wide Fund for Nature (WWF) is....
WWF's mission is to stop the degradation of our planet's natural environment, and build a future in which humans live in harmony with nature.
WWF's mission:
WWF's mission is to stop the degradation of our planet's natural environment,and build a future in which humans live in harmony with nature.
My family and I visited The Epcot center this summer.


The data values within a Table object can be modified in much the same manner as for numpy structured arrays by accessing columns or rows of data and assigning values appropriately. A key enhancement provided by the Table class is the ability to easily modify the structure of the table: one can add or remove columns, and add new rows of data.
The code below shows the basics of modifying a table and its data.
Make a table
>>> from astropy.table import Table, Column
>>> import numpy as np
>>> arr = np.arange(15).reshape(5, 3)
>>> t = Table(arr, names=('a', 'b', 'c'), meta={'keywords': {'key1': 'val1'}})
Modify data values
>>> t['a'] = [1, -2, 3, -4, 5] # Set all column values
>>> t['a'][2] = 30 # Set row 2 of column 'a'
>>> t[1] = (8, 9, 10) # Set all row values
>>> t[1]['b'] = -9 # Set column 'b' of row 1
>>> t[0:3]['c'] = 100 # Set column 'c' of rows 0, 1, 2
Add a column or columns
The add_column() and add_columns() functions can be used to add one or multiple columns to a table. In both cases the new columns must be specified as Column or MaskedColumn objects.
>>> c = Column(data=np.arange(5), name='d')
>>> t.add_column(c)
# Make a new table with the same number of rows and add columns to original table
>>> t2 = Table(np.arange(25).reshape(5, 5), names=('e', 'f', 'g', 'h', 'i'))
>>> t.add_columns(t2.columns.values())
Remove columns
>>> t.remove_column('f')
>>> t.remove_columns(['d', 'e'])
>>> del t['g']
>>> del t['h', 'i']
>>> t.keep_columns(['a', 'b'])
Rename columns
>>> t.rename_column('a', 'a_new')
>>> t['b'].name = 'b_new'
Add a row of data
>>> t.add_row([-8, -9])
Sort by one more more columns
>>> t.sort('b_new')
>>> t.sort(['a_new', 'b_new'])
Reverse table rows
>>> t.reverse()
Modify meta-data
>>> t.meta['key'] = 'value'
Reorder columns
Note
In this example, it is important that neworder is a tuple, and not a list, slice, or ndarray.
>>> t_acb = t['a','c','b']
>>> neworder = ('a','c','b')
>>> t_acb = t[neworder]
Modifying the table data and properties is fairly straightforward. There are only a few things to keep in mind:
Another subtlety to keep in mind are cases where the return value of an operation results in a new table in memory versus a view of the existing table data. As an example, imagine trying to set two table elements using column selection with t['a', 'c'] in combination with row index selection:
>>> t = Table([[1, 2], [3, 4], [5, 6]], names=('a', 'b', 'c'))
>>> t['a', 'c'][1] = (100, 100)
>>> print t
a b c
--- --- ---
1 3 5
2 4 6
This might be surprising because the data values did not change and there was no error. In fact what happened is that t['a', 'c'] created a new temporary table in memory as a copy of the original and then updated row 1 of the copy. The original t table was unaffected and the new temporary table disappeared once the statement was complete. The takeaway is to pay attention to how certain operations are performed one step at a time.


NOAA Storm Prediction Center
Relief Web Disaster Reports
Reload
Instructions
Oh no! Someone has vandalized our Boo 'The Cutest Dog In The World' fanpage!

Try your best to find them all!


Alexa: A Good Member of the Family?
Smart speakers and personal assistants are becoming ubiquitous.
by Darcia F. Narvaez Ph.D.Darcia F. Narvaez Ph.D.
During a hotel stay the other day, after noticing an Alexa, I asked her to turn herself off. I did not want “her” to eavesdrop on anything we said.
Smart speakers and personal assistants are becoming ubiquitous. And they are very handy in families. As per a conversation on NPR’s 1A, the advantageous uses were many (I’ve added a few):
- Alarm clock
- Dim the lights
- Shopping lists
- Reminders to feed the dog or do some errand
- Scheduling children for the bathroom (different music for each child) or brushing teeth
- Answering the same question over and over (as young children may do)
- Find and play a podcast
- Tell jokes
- Parents can share experiences with children, like requesting a song you grew up with and having a dance party.
All these options seem helpful for busy families. But parents noted several obvious drawbacks of having a family Alexa:
- children can request a song dozens of times a day (as occurred with “Baby Shark” recently)
- replacing things a parent should do, like reading a bedtime story
Will Alexa tell too much? For parents worried about answers to questions inappropriate for their child—such as, "Where do babies come from?"—Alexa creators have made a child-friendly “Free Time.” Parents can set limits, such as making Alexa unresponsive at homework or bed-time. Echo Dot Kids has parenting controls: no interaction past bedtime or during particular times like dinner time or homework.
But there are other concerns. Alexa is always “listening in” to family conversations. In fact, Alexa is not a computer and cannot process requests locally but sends the request to Amazon’s cloud service for transcription before responding.
Echo devices record and upload conversations that are analyzed by a team around the world. Amazon contends that this for improving consumer experience. This is monetization of private information. Who will end up seeing this information?
Perhaps it is safe then to use a hotel’s smart speaker because presumably, the company would not go to the trouble of figuring out who stayed in the room on a particular day (right?). Maybe next time a hotel room has Alexa I’ll keep it on and have it play my favorite childhood songs.
Post Comment
Your name
E-mail
The content of this field is kept private and will not be shown publicly.
Subject
Comment *
Notify me when new comments are posted
All comments
Replies to my comment
Leave this field blank


We were able to create and conjure up different ideas for stickers that we could put on our chromebooks or whatever we desired. I chose to do a hand making the peace sign, which while only printing out 1 sticker I was able to make 2. How did I do that? I took the original print out of the sticker, and then the scraps of it I was still able to use--- and give to my friend to put on her chromebook


from prev_ob_models.Birgiolas2020.isolated_cells import *
from olfactorybulb.database import CellModel, Odor, OdorGlom
[docs]class SliceBuilderNRN:
"""
Establishes an interface for Blender to load cells into NEURON
"""
[docs] def __init__(self):
"""
Starts NEURON, creates a BlenderNEURON node, and adds methods
to the node that Blender can call.
"""
# Load NRN
from neuron import h, gui
# Connect to Blender addon
from blenderneuron.neuronstart import BlenderNEURON as addon
# Add methods that can be called from Blender
addon.server.register_function(self.get_base_model_info)
addon.server.register_function(self.create_cell)
addon.server.register_function(self.get_odor_gloms)
# Keep track of cells
self.cells = {
"MC": [],
"TC": [],
"GC": [],
}
[docs] def get_base_model_info(self):
"""
Returns metadata information from the model database about each base cell model.
A base cell model is a NEURON model of a cell with a representative morphology
centered at the origin and rotated so the apical dendrites are aligned with the
Z axis.
The based models are positioned within layers, and oriented appropriately. MC and TC
lateral dendrites are also modified so they follow the curvature of the external
plexiform layer.
:return: A tuple of mc, tc, and gc dictionaries of metadata
"""
mc_base_models = self.get_model_info('MC')
tc_base_models = self.get_model_info('TC')
gc_base_models = self.get_model_info('GC')
return mc_base_models, tc_base_models, gc_base_models
[docs] def get_model_info(self, cell_type='MC'):
"""
Returns the list of metadata of base cell models of a given cell type.
See olfactorybulb.database.CellModel for metadata field names.
:param cell_type: One of 'MC', 'TC', or 'GC'
:return: A dictionary of base cell model class names and their metadata
"""
return {
cm["class_name"]: cm for cm in CellModel \
.select() \
.where((CellModel.source_id == 'Birgiolas (2020)') & (CellModel.cell_type == cell_type)) \
.order_by(CellModel.class_name)
.dicts() \
}
[docs] def create_cell(self, type, class_name):
"""
Creates an instance of a base cell model in NEURON.
:param type: One of 'MC', 'TC', or 'GC'
:param class_name: One of the cell classes in prev_ob_models.Birgiolas2020.isolated_cells
:return: The name that NEURON gives to the cell soma segment e.g. 'MC5[0].soma'
"""
exec ("cell = " + class_name + "()")
self.cells[type].append(cell)
return str(cell.soma.name())
[docs] def get_odor_gloms(self, odors):
"""
Gets the list of glomerular ids that are activated by the specified list of odors
:param odors: A list of odor names, or 'all'
:return: List of glomerulus ids, or None when 'all' odors were specified
"""
if odors == 'all':
return None
result = set()
for odor in odors:
odor_gloms = OdorGlom \
.select(OdorGlom.glom_id) \
.distinct() \
.join(Odor) \
.where(Odor.name == odor)
for glom in odor_gloms:
result.add(glom.glom_id)
return list(result)


Tonight's dinner: Smoky baked beans with cheese and onion toast
by Eleanor SteafelA real rib-sticker of a dish. The treacle and smoked paprika give a depth of flavour which mean you can get away with rustling this up quickly for a mid-week dinner rather than waiting on a lengthy slow cook. It's a great way of using up store cupboard bits and bobs. Borlotti or haricot beans work best because they're nice and soft, though butter beans and cannellini would also work fine. Just not the dreaded kidney bean - however long you cook them for, they'll still end up like little bullets. Use dark muscovado sugar if you don't have any treacle.
SERVES
INGREDIENTS
- Olive oil
- 120g chorizo, roughly chopped
- An onion, finely chopped
- A rib of celery
- 2 carrots
- 2 bay leaves
- 1 tbsp tomato puree
- 1 tbsp smoked paprila
- 2 x tins chopped tomatoes
- 1 tbsp black treacle
- 2 x tins borlotti beans
- A loaf of good bread
- 1 tbsp dijon mustard
- 150g mature cheddar
- 6 spring onions, finely sliced
METHOD
- Heat a little oil in a deep sided pan over a medium heat. Fry the chorizo until beginning to brown. Then remove from the pan and add the onion and a little more oil if the pan is too dry. Turn the heat down and pop the lid on. Sweat for two minutes until the onions have begun to soften.
- Add the celery, carrots and garlic to the pan with a good pinch of salt. Stir, put the lid back on and leave to sweat for a further five minutes.
Turn the heat up and put the chorizo back in the pan along with the bay leaves, tomato puree, and smoked paprika and stir well.
Pour in the chopped tomatoes and treacle and simmer covered for five minutes.
Add the beans and their water, along with and a good pinch of salt and pepper. Simmer, covered, for 15 minutes.
Taste and adjust the seasoning, and a little more treacle or paprika if you think it needs it. The beans should be glossy and thick, so take the lid off for a couple of minutes if the liquid needs to reduce a bit.
In the meantime, toast your bread. Spread with a slick of mustard, top with slices of cheddar and the finely chopped spring onions. Either pop the pieces of toast under the grill or top them with another slice of toasted bread and fry in a little butter.


This section is a tutorial introduction to the Amzi! Prolog development tools. It is not intended to be an introduction to Prolog. If you need an introduction to the Prolog language we recommend Adventure in Prolog.
The tutorial makes use of a simple adventure game, Duck World, to illustrate how to use the Amzi! tools to build complex applications. Accordingly, it is composed of a number of files.
(Why Duck World? Because Amzi! inc. was located in an old farm house backed up on conservation land. We bought ducks out of whimsy one day, which were later discovered by the fox in the woods. The ducks proved to be an adventure.)
The tutorial demonstrates both the command-line and the Amzi! Eclipse IDE interfaces to Amzi! Prolog.
This tutorial starts by testing some of the basic predicates of Duck World in the listener. It then goes through the full example, showing how the program is modularized, how it is compiled and run using the listener, and how it is linked into a distributable application.
The source code for Duck World can be found in the samples/prolog/ducks sub-directory.
Quick Tutorial Contents:
An adventure game is a simulation of an environment, real or imagined, that the user explores, usually with some goal in mind. Duck World is a simple adventure game, where the objective is to go from the house, through the yard, to the duck pen to get an egg, and back to the house again, without losing any ducks to the fox.
The commands for manipulating the environment are all entered as legal Prolog goals (ending in periods).
They are:
When you have brought the egg into the house the game ends.
Amzi! Prolog programs can be run in interpreted mode using one of two different methods:
To start the listener from the operating system command-line, type the input shown in the left box. To do this within the IDE, select the menu items shown in the right box. General instructions are given in italics.
The IDE supports multiple perspectives. A perspective is an arrangement of views on the screen. For developing Prolog code, we will use the Amzi! Prolog and the Debugging perspectives. Perspectives are also available for C++, Java and many other languages and capabilities. A view is a window on the screen. Each view can optionally have its own tool bar and menu. Examples of views are the Project Navigator, Listener, editors and Outline.
| Command-Line alis | Amzi! Eclipse IDE |
c> alis |
Double-Click on Icon for the Amzi! Eclipse IDE Run / Listener or ?- button |
The copyright message will be displayed followed by the prompt, ?-
Amzi! Prolog <version information> Amzi! Prolog Listener Copyright (c)1987-2002 Amzi! inc. All Rights Reserved. Type 'quit.' to exit ?- |
You are now in a Prolog listener, which is awaiting your command. Try out this classic, being careful to remember the single quotes and the ending period.
?- write('Hello World'). Hello World |
Note: You can use the up and down arrow keys in the IDE listeners to bring up the prior commands you typed in and edit them.
To exit the listener, type "quit."
Before looking at the Duck World source code, create a small experimental file called dw.pro.
| Command-Line alis | Amzi! Eclipse IDE |
Use an editor to type in your code Save your file as dw.pro |
Create a Prolog Project File / New / Project / Prolog Enter the project name: duckworld File / New / File Enter the file name: dw.pro Type your code into the window File / Save or Save Button |
Type the following lines of Prolog code into dw.pro:
:- dynamic loc/2. |
In the IDE, you will see an outline for your Prolog code to the right of the editors. There is also a cross-referencing tool available in the view with the same name. To run the Cross Reference for your project, press the Refresh button or select the Refresh command from the Cross Reference View menu (a view menu is the menu under the black, down-facing triangle in the upper right corner of the view).
To play with dw.pro, consult it into the listener as shown:
| Command-Line alis | Amzi! Eclipse IDE |
?- consult(dw). yes |
Run / Run As / Interpreted Project or Run / Run As / Interpreted Single File |
You are now in the listener with dw.pro consulted.
Now that you've reached the listener, make sure your file was consulted by using listing.
?- listing. |
This will show you the predicates of dw.pro, although they will look a little different because the variables are renamed with an _X and a number, e.g. _X0.
You can try various queries from the listener.
?- loc(you, X). X = house |
You can test move.
?- move(yard), loc(you, X). X = yard ?- move(foobar), loc(you, X). X = foobar |
Because move doesn't check to see if the move makes sense, you might decide to add a goto predicate with more intelligence. You can enter it directly in the listener using add.
?- add. | goto(P) :- loc(you, X), nextto(X, P), move(P). | quit. ?- |
This is a useful technique for quick experiments, but the code typed in the listener is not entered into your source file. Because we want goto to be part of the game it is best to type it directly into the source file and then reconsult it.
This can be done by moving from the listener to the editor. You can use the built-in IDE editor, or invoke the editor of your choice. You can use reconsult/1, or exit out of and restart the listener.
(You need to reconsult, rather than consult, because consulting will simply add a second copy of your program to the Prolog workspace. Listing would show two of every predicate.)
| Command-Line alis | Amzi! Eclipse IDE |
Edit dw.pro in an editor then in the listener: ?- reconsult(dw). yes |
Edit dw.pro in its window File / Save or Save Button ?- reconsult(dw). or type 'quit.' in the listener then: Run / Run As / Interpreted Project |
You can then test it.
?- goto(yard). yes ?- goto(pen). yes ?- goto(yard). no |
It didn't work right, which leads to the next section.
goto lets you get into the pen, but doesn't let you get back out. In order to figure out why, you need to start the debugger and set-up the state required for testing. The steps are performed in a different order depending upon whether you are using the command-line or IDE. Note, starting the debugger takes you out of the Prolog Perspective and displays the Debug Perspective instead. You can switch back to the Prolog Perspective with Window / Open Perspective or by pressing on the Paw button on the left, vertical tool bar.
To make sure the game is in the state required for testing, enter the goals to place you in the pen. The listener gives you the ability to dynamically adjust the state of your application, effectively putting you in the middle of it. This, by itself, is a powerful tool for debugging.
You can now trace the execution of goto(yard) to see why it is failing. To do this you also need to start the debugger. Type:
| Command-Line alis | Amzi! Eclipse IDE |
?- retract(loc(you, _)), assert(loc(you, pen)). yes ?- debug. |
Type 'quit.' in the listener then: Run / Debug As / Interpreted Project or Run / Debug As / Interpreted Single File ?- assert(loc(you, pen)). |
The command line debugger is line-oriented, and is controlled from the keyboard. In the IDE, a separate debugger perspective is opened, which is controlled with the mouse. You enter your normal interaction with the program in the debug listener window.
Next, type in the goal to be traced at the listener's debugging prompt ??- or ?- for the IDE.
??- goto(yard). |
To step through the Prolog code type:
| Command-Line alis | Amzi! Eclipse IDE |
? c Alternatively ? [Enter] |
Click on the 'Step Over' button |
Here is what the trace looks like for goto(yard). In the IDE you will see only the current call stack. You can click on any entry in the stack to see the associated variable bindings in the Variables view. Also in the IDE, the current line in your source file will be highlighted. The color of the highlight indicates if it is a call, redo, fail or exit.
Calling: goto(yard) CALL:(1) goto(yard) ? c Calling: loc(you,H64) CALL: loc(you,pen) ? c EXIT: loc(you,pen) ? c Calling: nextto(pen,yard) FAIL: nextto(pen,yard) ? c FAIL: loc(you,pen) ? c FAIL: loc(you,H64) ? c FAIL: goto(yard) ? c FAIL: goto(yard) ? c no |
To leave the debugger:
| Command-Line alis | Amzi! Eclipse IDE |
??- quit. |
Click on the 'Stop' button |
The trace reveals that, although we've defined nextto(yard,pen), we haven't defined nextto(pen, yard). To get our program to work, we need a predicate that equates the two. The solution chosen for Duck World is the predicate connect/2, which is used instead of nextto/2 in the goto/1 definition.
connect(X, Y) :- nextto(X, Y). connect(X, Y) :- nextto(Y, X). |
This code can be added to the source file and the development process continues. This is the normal way to develop a Prolog application. Predicates are gradually added to the source file as the application grows. The application can be tested at any point during the development process and individual predicates can be tested and their execution traced to understand why the application is working the way it does.
As an application grows, it is natural to want to break it up into modules. At the simplest this means splitting the predicate definitions among various source files. These files can be consulted together and the application run from the listener.
However, it is often preferred to keep some of the predicates hidden within a file and to allow only certain predicates to be called from other source files. This is done with a variety of directives that define modules and the predicates that are imported and exported from them. See modules for details.
In the directory samples/prolog/duckworld there are two versions of Duck World. 'duckym.pro' has all of the modules in one file. It is also broken up into three files for purposes of illustration here. The three files, and their modules, are:
The files have many comments that explain the use of modules in Prolog.
You can run the modularized Duck World from inside the listener by consulting it and calling main/0, the predicate that starts it running. (You can also call any of the other predicates of Duck World to see if they're working and trace them if they're not.)
?- consult([dw_main, dw_rules, dw_data]). ?- main. Welcome to Duck World Go get an egg >> goto(yard). You are in the yard >> ..... |
You created a Prolog Project file (.project) in the IDE as described above. You can modify the project's properties by right-clicking on the project and selecting 'Properties'. These properties include:
Anytime you start the listener, all the project files (except the exclusions) are automatically consulted for you. Also when you build a project all the source files and libraries are compiled and linked as needed into an executable file (.xpl).
Compiling Duck World is easily done:
| Command-Line alis | Amzi! Eclipse IDE |
c> acmp dw_main c> acmp dw_rules c> acmp dw_data |
Project / Build All or Project / Rebuild All |
Note, under the IDE we simply build the project. This causes all the modified source files in the project to be recompiled.
acmp can also be invoked with no arguments, in which case it will prompt you for the names of the files. See the Compiler section for more details.
The result of compiling is Prolog object files, in this case, dw_main.plm, dw_rules.plm and dw_data.plm.
To build a stand-alone application first create a Prolog load module (.xpl file) with the Amzi! Prolog linker, alnk.
| Command-Line alis | Amzi! Eclipse IDE |
c> alnk dw dw_main dw_rules dw_data |
Project / Build All or Project / Rebuild All |
Note, under the IDE when a project is built, it is linked to create an .xpl file.
Using alnk, the first argument is the name of the .xpl file. The next two files are the .plm files that are linked together.
The .plm files are linked with abin/alib.plm, the Prolog portion of the Amzi! runtime engine, to form an application.
Alnk can also be invoked with no arguments, in which case it will prompt you for inputs. See the Linker section for more details.
To run Duck World, just type:
| Command-Line alis | Amzi! Eclipse IDE |
c> arun dw |
Run / Run As / Compiled Project |
Instead of typing arun dw, you can create a copy of arun(.exe) and name it dw(.exe). It will then, after examining its own name, automatically run dw.xpl. So the application can be started simply by typing dw.
If you decided to distribute Duck World, then to do so, you need these files for command-line environments:
For applications where Prolog is embedded in another tool/language, then dw(.exe) is not necessary.
You can enhance the Prolog engine with your own built-in predicates written in C/C++, Java, Delphi or Visual Basic.
For example, you might want to use a graphical interface for Duck World with quacking ducks and the like. In this case the Logic Server API allows you to either extend the Prolog language with graphics predicates written in C/C++ that are called directly by the Prolog code, or to write the user interface to the code in C/C++ (or Visual Basic under Windows) and call embedded Prolog for the logic. You can combine the techniques, both extending and embedding Prolog in the same application.
The section on the Logic Server API tells how integrate Prolog with other languages.
Copyright ©1987-2011 Amzi! inc. All Rights Reserved. Amzi! is a registered trademark and Logic Server is a trademark of Amzi! inc.


What is NoPaste?
NoPaste is an open-source website similar to Pastebin where you can store any piece of code,
and generate links for easy sharing
However, what makes NoPaste special is that it works with
no database, and
no back-end code.
Instead, the data is compressed and
stored entirely in the link that you share, nowhere else!
Because of this design:
🗑 Your data
cannot be deleted from NoPaste
🔞 Your data
cannot be censored
👁 The server hosting NoPaste (or any clone of it)
cannot read or access your data
⏳ Your data will be accessible
forever (as long as you have the link)
🔀 You can access your data on
every NoPaste clone, including
your own
🔍 Search engines
will not index your data, even if your link is public
If you want to know more, you can find more information on
GitHub


Multiple File Upload |
|
Star Rating |
|
Toggle Switch |
|
Auto Growing Textarea |
|
Popover |
|
Slider |
|
Dialog |
|
POP-UP Dialog(Datatable) |
|
Tooltip |
|
Messages |
|
Dialog |
|


GrowthFountain Capital LLC (GFC) is a funding portal registered with the US Securities and Exchange Commission (SEC) and a member of the Financial Industry Regulatory Authority (FINRA). GFC and its affiliates are not broker dealers and do not provide investment advice. GFC does not participate in the offerings made pursuant to Regulation Crowdfunding and such offerings are not guaranteed to be fully funded. Additional information is available at growthfountain.com.


{% extends "layout.html" %} {% block page_title %} Check before you start {% endblock %} {% block content %} {% include "includes/prototype_banner.html" %} {{formData | safe}} How many vehicles will you operate? How many vehicles will you operate? Number of vehicles {% endblock %}


Setup¶
use OpenCloud\Rackspace;
// Create a client object to communicate with various Rackspace Cloud services.
$client = new Rackspace(RACKSPACE_US, array(
'username' => 'Replace this with your Rackspace Cloud user name',
'apiKey' => 'Replace this with your Rackspace Cloud API key'
));
// Create a service object to use the object store service. The sample code
// creates the object store in the 'DFW' region.
$service = $client->objectStoreService('cloudFiles', 'DFW');
Create container¶
To create a new container, you just need to define its name:
$container = $service->createContainer('my_amazing_container');
If the response returned is FALSE, there was an API error - most likely due to the fact you have a naming collision.
Container names must be valid strings between 0 and 256 characters. Forward slashes are not currently permitted.
Note: when working with names that contain non-standard alphanumerical characters (such as spaces or non-English characters), you must ensure they are encoded with `urlencode <http://php.net/urlencode>`__ before passing them in
List containers¶
Return a list of containers¶
$containerList = $service->listContainers();
while ($container = $containerList->next()) {
// Do stuff; some examples below
printf("Container name: %s\n", $container->name);
printf("Number of objects within container: %d\n", $container->getObjectCount());
}
Container names are sorted based on a binary comparison, a single built-in collating sequence that compares string data using SQLite’s memcmp() function, regardless of text encoding.
The list is limited to 10,000 containers at a time. See 1.3 for ways to limit and navigate this list.
Return a formatted list of containers¶
Currently, the SDK only supports JSON-formatted responses.
Controlling a large list of containers¶
You may limit and control this list of results by using the marker and end_marker parameters. The former parameter (marker) tells the API where to begin the list, and the latter (end_marker) tells it where to end the list. You may use either of them independently or together. You may also use the limit parameter to fix the number of containers returned.
To list a set of containers between two fixed points:
$someContainers = $service->listContainers(array(
'marker' => 'container_55',
'end_marker' => 'container_2001'
));
Or to return a limited set:
$someContainers = $service->listContainers(array('limit' => 560));
Get container¶
To retrieve a certain container, either to access its object or metadata:
$container = $service->getContainer('container_name');
echo $container->getObjectCount();
echo $container->getBytesUsed();
Delete container¶
Deleting a container is easy:
$container->delete();
Please bear mind that you must delete all objects inside a container before deleting it. This is done for you if you set the $deleteObjects parameter to TRUE like so:
$container->delete(TRUE);
You can also do it manually:
$container->deleteAllObjects();
$container->delete();
Create or update container metadata¶
$container->saveMetadata(array(
'Author' => 'Virginia Woolf',
'Published' => '1931'
));
Please bear in mind that this action will set metadata to this array - overriding existing values and wiping those left out. To append values to the current metadata:
$metadata = $container->appendToMetadata(array(
'Publisher' => 'Hogarth'
));
If you only want to set the metadata to the local object, and not immediately retain these values on the API, you can use a standard setter method - which can contribute to eventual actions like an update:
$container->setMetadata(array('Foo' => 'Bar'));
Container quotas¶
The container_quotas middleware implements simple quotas that can be imposed on Cloud Files containers by a user. Setting container quotas can be useful for limiting the scope of containers that are delegated to non-admin users, exposed to formpost uploads, or just as a self-imposed sanity check.
To set quotas for a container:
use OpenCloud\Common\Constants\Size;
$container->setCountQuota(1000);
$container->setBytesQuota(2.5 * Size::GB);
And to retrieve them:
echo $container->getCountQuota();
echo $container->getBytesQuota();
Access log delivery¶
To view your object access, turn on Access Log Delivery. You can use access logs to analyze the number of people who access your objects, where they come from, how many requests for each object you receive, and time-based usage patterns (such as monthly or seasonal usage).
$container->enableLogging();
$container->disableLogging();
Syncing containers¶
You can synchronize local directories with your CloudFiles/Swift containers very easily. When you do this, the container will mirror exactly the nested file structure within your local directory:
$container->uploadDirectory('/home/Jamie/blog');
There are four scenarios you should be aware of:
| Local | Remote | Comparison | Action |
|---|---|---|---|
| File exists | File exists | Identical checksum | No action |
| File exists | File exists | Different checksum | Local file overwrites remote |
| File exists | File does not exist | Local file created in Swift | |
| Files does not exist | File exists | Remote file deleted |


Save
PlayFab
0"
>Last Local Save: {{ ms.lastSave | date: "medium" }}
0"
>Last PlayFab Save: {{ ms.lastPlayFabSave | date: "medium" }}
Game auto save on local storage every minute. Save on PlayFab every 3 minutes.
Data may be cleared from PlayFab's servers.
Changelog