Service Provider
for testing
Service Provider
for testing
SePro is a Java EE application which provides various services available via remote APIs. The aim is to have an infrastructure for testing remote calls without a need of mock services if they are not needed.
REST Services
-
Acronyms Dictionary
#{urlRoot}/rest/acronymOperations:
- Add acronym POST
#{urlRoot}/rest/acronym
curl -i -H 'Content-type: application/json' -d '{"abbreviation":"REST", "meaning":"Representational state transfer"}' -X POST #{urlRoot}/rest/acronym
Content:
- "application/json"
{"abbreviation":"REST", "meaning":"Representational state transfer"}
- "application/xml"
<acronym xmlns="http://sepro.jboss.org"><abbreviation>REST</abbreviation><meaning>Representational state transfer</meaning></acronym>
- "application/json"
- Get acronyms GET
#{urlRoot}/rest/acronym/{abbreviation}
curl -i -H "Accept: application/json" -X GET #{urlRoot}/rest/acronym/REST
Result:
- "application/json"
[{"abbreviation":"REST","meaning":"Representational state transfer"}]
- "application/xml"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><collection xmlns:sep="http://sepro.jboss.org"><sep:acronym><sep:abbreviation>REST</sep:abbreviation><sep:meaning>Representational state transfer</sep:meaning></sep:acronym></collection>
- "application/json"
- Get dictionary GET
#{urlRoot}/rest/acronym
curl -i -H "Accept: application/json" -X GET #{urlRoot}/rest/acronym
Result:
- "application/json"
{"map":{"REST":[{"abbreviation":"REST","meaning":"Representational state transfer"}]}}
- "application/xml"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><sep:dictionary xmlns:sep="http://sepro.jboss.org"><sep:map><entry key="REST"><value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="sep:acronym"><sep:abbreviation>REST</sep:abbreviation><sep:meaning>Representational state transfer</sep:meaning></value></entry></sep:map></sep:dictionary>
- "application/json"
- Remove acronym DELETE
#{urlRoot}/rest/acronym
curl -i -H 'Content-type: application/json' -d '{"abbreviation":"REST", "meaning":"Representational state transfer"}' -X DELETE #{urlRoot}/rest/acronym
Content:
- "application/json"
{"abbreviation":"REST", "meaning":"Representational state transfer"}
- "application/xml"
<acronym xmlns="http://sepro.jboss.org"><abbreviation>REST</abbreviation><meaning>Representational state transfer</meaning></acronym>
- "application/json"
- Add acronym POST
#{urlRoot}/rest/acronym
-
Echo
#{urlRoot}/rest/echoOperations:
- Ping GET
#{urlRoot}/rest/echo/ping
curl -i -X GET #{urlRoot}/rest/echo/ping
Result: pong
- Complete GET
#{urlRoot}/rest/echo/complete/{option}
curl -i -X GET #{urlRoot}/rest/echo/complete/hello
Possible options and their results:
- ping -> pong
- hello -> world
- ANY OTHER -> default
- Echo POST
#{urlRoot}/rest/echo
curl -i -H 'Content-type: application/json' -d '{"a":10, "b":"none"}' -X POST #{urlRoot}/rest/echo
Content:
- "text/plain" - ANY
- "application/json" - ANY
- "application/xml" - ANY
Result:
- "text/plain" - INPUT
- "application/json" - INPUT
- "application/xml" - INPUT
- Ping GET
#{urlRoot}/rest/echo/ping
-
HTTP Status
#{urlRoot}/rest/statuscurl -i -X GET #{urlRoot}/rest/status/401
Operations:
- Get status GET
#{urlRoot}/rest/status/{code}
Result: HTTP Response with the given status CODE
- Get status GET
#{urlRoot}/rest/status/{code}
-
Timeout
#{urlRoot}/rest/timeoutcurl -i -X GET #{urlRoot}/rest/timeout/1000
Operations:
- Wait GET
#{urlRoot}/rest/timeout/{millis}
Result: Empty HTTP 200 OK Response after the time in milliseconds (1 - 60 000)
- Wait GET
#{urlRoot}/rest/timeout/{millis}
-
User Management
#{urlRoot}/rest/userOperations:
- Register new user POST #{urlRoot}/rest/user
curl -i -H 'Content-type: application/json' -d '{"username":"test","password":"test123;"}' -X POST #{urlRoot}/rest/user
Content:
- "application/json"
{"username":"ibek", "password":"ibek123;"}
- "application/xml"
<user xmlns="http://sepro.jboss.org"><username>ibek</username><password>ibek123;</password></user>
- "application/json"
- Get user list GET
#{urlRoot}/rest/user
curl -i -H "Accept: application/json" -X GET http://localhost:8080/sepro/rest/user
Result:
- "application/json"
[{"username":"ibek","password":"3661d19fb31714848bc2148c2489b41897facd9f4ecb62680c79c6d4d70b870b"}]
- "application/xml"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><collection xmlns:sep="http://sepro.jboss.org"><sep:user><sep:password>3661d19fb31714848bc2148c2489b41897facd9f4ecb62680c79c6d4d70b870b</sep:password><sep:username>ibek</sep:username></sep:user></collection>
- "application/json"
- Get user details GET
#{urlRoot}/rest/user/{username}
curl -i -H "Accept: application/json" -X GET #{urlRoot}/rest/user/ibek
Result:
- "application/json"
{"username":"ibek","password":"3661d19fb31714848bc2148c2489b41897facd9f4ecb62680c79c6d4d70b870b"}
- "application/xml"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><sep:user xmlns:sep="http://sepro.jboss.org"><sep:password>3661d19fb31714848bc2148c2489b41897facd9f4ecb62680c79c6d4d70b870b</sep:password><sep:username>ibek</sep:username></sep:user>
- "application/json"
- Remove user DELETE
#{urlRoot}/rest/user
curl -i -H 'Content-type: application/json' -d '{"username":"test","password":"test123;"}' -X DELETE #{urlRoot}/rest/user
Only a user with the role ADMIN can remove other users.
Content:
- "application/json"
{"username":"ibek", "password":"ibek123;"}
- "application/xml"
<user xmlns="http://sepro.jboss.org"><username>ibek</username><password>ibek123;</password></user>
- "application/json"
- Register new user POST #{urlRoot}/rest/user
Security
-
Basic
?security=basiccurl -i -u 'ibek:ibek123;' -X GET #{urlRoot}/rest/echo/ping?security=basic
Every REST service is secured when "security" is set to "basic" like #{urlRoot}/rest/echo/ping?security=basic
The users are managed by UserManagement REST service.
Asynchronous
- ?asynch=true
curl -i -X GET #{urlRoot}/rest/echo/ping?asynch=true
Asynchronous Job Service is enable. For any asynchronous REST request set "asynch" parameter to "true" like #{urlRoot}/rest/echo/ping?asynch=true
Http response with "202 Accepted" status code is returned with the location of result (e.g. #{urlRoot}/rest/asynch/jobs/1403270895037-4).
Web Services
-
Acronyms Dictionary
#{urlRoot}/AcronymsDictionaryService?wsdl -
Echo
#{urlRoot}/EchoService?wsdl -
HTTP Status
#{urlRoot}/HttpStatusService?wsdl -
Timeout
#{urlRoot}/TimeoutService?wsdl -
User Management
#{urlRoot}/UserManagementService?wsdl
Security
The users are managed by UserManagement Web service.
-
Basic
To perform a secured Web Service call, it is enough to fill basic security authentication details in the HTTP request header.
-
WS-Security
All the web services support WS-Security, so when a SOAP message contains a security SOAP header, the user is authenticated according to the credentials. For a password the both types can be used:
- PasswordText(plaintext)
<soapenv:Envelope xmlns:sep="http://sepro.jboss.org" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:UsernameToken wsu:Id="UsernameToken-3"> <wsse:Username>ibek</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ibek123;</wsse:Password> <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">NUXxUJrNiuxc3dLuy8+Ihg==</wsse:Nonce> <wsu:Created>2014-08-13T09:41:52.515Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <sep:echo> <!--Optional:--> <message>Hello World</message> </sep:echo> </soapenv:Body> </soapenv:Envelope>
- PasswordDigest(hashed password Base64(SHA-1(nonce +
created + password)))
<soapenv:Envelope xmlns:sep="http://sepro.jboss.org" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:UsernameToken wsu:Id="UsernameToken-4"> <wsse:Username>ibek</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">uxmSFj+RXm3wiC0YtoVTi2pnkQQ=</wsse:Password> <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">Ls0LCw4gPxPidfA3ZAxfng==</wsse:Nonce> <wsu:Created>2014-08-13T09:49:22.170Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <sep:echo> <!--Optional:--> <message>Hello World</message> </sep:echo> </soapenv:Body> </soapenv:Envelope>
- PasswordText(plaintext)
Asynchronous
Asynchronous web services require WS-Addressing SOAP header to determine where to send the response.
JMS Services
Remote address to connect: remote://#{manager.IPAddress}:4447
Since scaling does not work now, only port-forwarding ('rhc port-forward sepro') can be used to access JMS services.
-
Acronyms Dictionary
queue/AcronymsDictionaryResponse topic: "topic/AcronymsDictionaryResponse"
-
Echo
queue/EchoResponse topic: "topic/EchoResponse"
Security and Connection
Add a new user via ./eap6/bin/add_user.sh script and put the following user into the group "guest" for the default settings.
Username: ibek Password: ibek1234;


Healthcare and medicine security and privacy is one of the most important research area of SPQR Lab. We contribute to the security and healthcare communities by discovering potential security and privacy issues and raising attentions. We also develop and offer insights into defenses against such security and privacy issues.
In this project we investigate the reliability of temperature-based control systems from a security and safety perspective and show how unexpected consequences and safety risks can be induced by physical-level attacks on analog temperature sensing components. Specifically, we demonstrate that an adversary could remotely manipulate the temperature sensor measurements of an infant incubator by exploiting the unintended rectification effect that can be induced in operational and instrumentation amplifiers to control the sensor output, leading to potential safety issues.
Electromagnetic interference (EMI) affects circuits by inducing voltages on conductors. We show that with specially crafted EMI we can inhibit pacing and induce defibrillation shocks on implantable cardiac electronic devices. Our contribution to securing cardiac devices includes a novel defense mechanism that probes for forged pacing pulses inconsistent with the refractory period of cardiac tissue.
Implantable medical devices (IMDs) feature wireless communication which enable remote monitoring of patients’ vital signs and improve care providers’ ability to deliver timely treatment. Such wireless connectivity, however, can be exploited to compromise the confidentiality of the IMD’s transmitted data or to send the IMD unauthorized commands. In this project we design a device called the shield that sits near the IMD and acts as jammer-cum-receiver proxy. With the shield, we effectively provides confidentiality for private data and protects the IMD from unauthorized commands without modifying the IMD device itself.
The Archimedes Center for Medical Device Security was established to help manufacturers and industry experts navigate the operational hazards of cybersecurity implementation and prepare them for future challenges of FDA requirements. Archimedes is an independent, pioneering center focused on the education and advancement of medical device security where key industry players come together for learning in a safe place.
The Strategic Health IT Advanced Research Projects on Security (SHARPS) was an inter-disciplinary and multi-institutional collection of projects supported by the Office of the National Coordinator for Health IT in the Department of Health and Human Services. It developes technologies and policy insights concerning the requirements, foundations, design, development, and deployment of security and privacy tools and methods as they apply to health information technology.


cdemi's
16 April 2019 |
Software Development |
Microservices and Serverless Computing (vunvulearadu.blogspot.com) |
| Development, Programming, Issues, Visual Studio, Windows Azure, Microsoft, Windows 8... Read more |
The Path to Becoming a Software Architect (medium.com) |
| Have you ever wondered what career opportunities a developer has? What directions are open, beyond what horizons to grow. And most…... Read more |
Stack Overflow Developer Survey 2019 (insights.stackoverflow.com) |
| Nearly 90,000 took this comprehensive, annual survey of people who code. Demographics. Most loved, dreaded and wanted technologies. Salary and careers.... Read more |
.NET |
.NET Core Workers in Azure Container Instances (devblogs.microsoft.com) |
| .NET Core Workers in Azure Container Instances In .NET Core 3.0 we are introducing a new type of application template called Worker Service. This template is intended to give you a starting point for writing long running services in .NET Core.... Read more |
Introducing Time Travel Debugging for Visual Studio Enterprise 2019 (devblogs.microsoft.com) |
| The Time Travel Debugging (TTD) preview in Visual Studio Enterprise 2019 provides the ability to record a Web app running on a Azure Virtual Machine (VM) and then accurately reconstruct and replay the execution path.... Read more |
Distributed .NET Core (devmentors.io) |
| About course: Complete guide for creating, managing and orchestrating microservices using .NET Core platform, C# language, Docker technology and many more. Almost 20 hours of videos along with the whole source code and lots of practical samples that can be found on GitHub. Welcome to the teas... Read more |
Front End |
Native image lazy-loading for the web! (addyosmani.com) |
| In this post, we'll look at the new loading attribute which brings native <img> and <iframe> lazy-loading to the web!. For the curious, here&...... Read more |
DevOps |
Deploying Grafana for production deployments on Azure (azure.microsoft.com) |
| Grafana is one of the popular and leading open source tools for visualizing time series metrics.... Read more |
Cloud |
Free eBook: An Introduction to Microsoft Azure and the Microsoft Cloud (newsletters.cdemi.io) |
| Azure is full of services and products, offering a complete solution for any organization and Microsoft is doing its best to ensure that the platform provides for any scenario, especially where big data, analytics, AI and machine learning are concerned. Throughout this guide, you will learn what cloud computing is all about and how Microsoft Azure can help you to migrate and run your business from the cloud, either in full or in part.... Read more |
Making hybrid- and multi-cloud computing a reality (cloud.google.com) |
| Today, we’re excited to introduce Anthos, Google Cloud’s new hybrid cloud platform that lets you run an app, unmodified, on existing on-prem hardware investments or in the public cloud.... Read more |
Data |
Altinity ClickHouse Operator for Kubernetes (altinity.com) |
| When I was setting up my first ClickHouse clusters 3 years ago it was like a journey to an unknown world full of caveats. ClickHouse is very simple and easy to use but not THAT simple. Sometimes I dreamed that setting up the cluster would be as easy as making a cup of coffee. It took u...... Read more |
How Skype modernized its backend infrastructure using Azure Cosmos DB (azure.microsoft.com) |
| Founded in 2003, Skype has grown to become one of the world’s premier communication services, making it simple to share experiences with others wherever they are. Since its acquisition by Microsoft in 2010, Skype has grown to more than four billion total users, more than 300 million monthly...... Read more |
Designing Highly Scalable Database Architectures (red-gate.com) |
| While architecting cloud native applications, you need to ensure that your system is highly available, performant, scalable, fault tolerant, and has the capability to recover from a disaster scenario. In this article, Samir Behara discusses the options available when designing the database architecture to achieve scalability.... Read more |
Why a data scientist is not a data engineer (oreilly.com) |
| Or, why science and engineering are still different disciplines.... Read more |
Security |
Microsoft admits: Yes, miscreants leafed through some Hotmail, MSN, Outlook inboxes after support rep pwned (theregister.co.uk) |
| Email contents exposed for unlucky punters... Read more |
Quality Assurance |
The real reason Boeing's new plane crashed twice (youtu.be) |
| Two Boeing airplanes have fallen out of the air and crashed in the past six months. On the surface, this is a technical failure. But the real story is about a company's desire to beat their rival.... Read more |
AI |
OpenAI bot crushes Dota 2 champions, and now anyone can play against it (arstechnica.com) |
| Reigning International champions Team OG were soundly beaten over the weekend.... Read more |
iGaming |
Exclusive: Former Kindred R&D chief named Casumo CTO (egr.global) |
| Jahan Jahanshahi joins Malta operator after a nine month search for the right candidate ... Read more |
Cherry applies to delist from Nasdaq Stockholm (igamingbusiness.com) |
| Cherry has applied to delist from Nasdaq Stockholm as the consortium looking to acquire the business moved a step closer to acquiring 100% of shares in the Swedish gaming group. ... Read more |
Norsk Tipping launches sportsbook tender (igamingbusiness.com) |
| Norsk Tipping has launched a tender process to select a platform provider for its sports betting offering, with a view to launching the new offering ahead of next year's Euro 2020 football tournament.... Read more |
Global Gaming cancels shareholder dividend after Sweden struggles (egr.global) |
| Operator’s revenues down almost one-third QoQ after re-regulation in its core market ... Read more |
NJ sets sports betting and igaming revenue records in March (igamingbusiness.com) |
| Monthly record revenue across regulated sports wagering and online gambling in New Jersey helped to push total gaming revenue up by 34.5% year-on-year to $294.0m (£224.7m/€259.8m) in March.... Read more |
LeoVegas could face UKGC investigation over self-exclusion failings (egr.global) |
| Newspaper investigation reveals operator allegedly sent marketing emails to problem gambler... Read more |
Bet365 hails “game changer” potential of new Kubernetes technology (egr.global) |
| Operator says in-house developed cluster marks a new phase in the development of its sport betting platform... Read more |
Space |
First ever black hole image released (bbc.com) |
| The "monster" black hole is three million times the size of Earth.... Read more |
Random |
The treasures of Notre-Dame (bbc.com) |
| What is it about the cathedral that made it stand out in a city full of iconic buildings?... Read more |
|
This newsletter is made with 💖 by cdemi and sponsored by moo Research. You can find this MIT Licensed open-source project on GitHub cdemi/NewsletterCurator. You can also find an archive of all sent newsletters on GitHub at https://newsletters.cdemi.io/. If you want to unsubscribe from this newsletter, please click here. If you're new and you want to subscribe to this newsletter, please click here. |


Enter Name:
Connect
Disconnect
From
Time
Message
Live Users
No other user Present.
Send To
Name of receiver
Message
Send
Not connected
Message sent successfully.


Class KHRDisplay
- java.lang.Object
-
- org.lwjgl.vulkan.KHRDisplay
-
public class KHRDisplay extends java.lang.Object
This extension provides the API to enumerate displays and available modes on a given device.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR
A global alpha value must be specified that will be applied to all pixels in the source image.static int
VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR
The source image will be treated as opaque.static int
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR
The alpha value will be determined by the alpha channel of the source image’s pixels.static int
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR
This is equivalent toDISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR
except the source alpha values are assumed to be premultiplied into the source image’s other color channels.static java.lang.String
VK_KHR_DISPLAY_EXTENSION_NAME
The extension name.static int
VK_KHR_DISPLAY_SPEC_VERSION
The extension specification version.static int
VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR
VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHRVkStructureType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static int
vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, long display, VkDisplayModeCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pMode)
Array version of:CreateDisplayModeKHR
static int
vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, long display, VkDisplayModeCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pMode)
Creates a display mode.static int
vkCreateDisplayPlaneSurfaceKHR(VkInstance instance, VkDisplaySurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSurface)
Array version of:CreateDisplayPlaneSurfaceKHR
static int
vkCreateDisplayPlaneSurfaceKHR(VkInstance instance, VkDisplaySurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSurface)
Creates aVkSurfaceKHR
structure representing a display plane and mode.static int
vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, long display, int[] pPropertyCount, VkDisplayModePropertiesKHR.Buffer pProperties)
Array version of:GetDisplayModePropertiesKHR
static int
vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, long display, java.nio.IntBuffer pPropertyCount, VkDisplayModePropertiesKHR.Buffer pProperties)
Gets the set of mode properties supported by the display.static int
vkGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, long mode, int planeIndex, VkDisplayPlaneCapabilitiesKHR pCapabilities)
Gets the capabilities of a mode and plane combination.static int
vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, int planeIndex, int[] pDisplayCount, long[] pDisplays)
Array version of:GetDisplayPlaneSupportedDisplaysKHR
static int
vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, int planeIndex, java.nio.IntBuffer pDisplayCount, java.nio.LongBuffer pDisplays)
Determines which displays a plane is usable with.static int
vkGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, int[] pPropertyCount, VkDisplayPlanePropertiesKHR.Buffer pProperties)
Array version of:GetPhysicalDeviceDisplayPlanePropertiesKHR
static int
vkGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pPropertyCount, VkDisplayPlanePropertiesKHR.Buffer pProperties)
Queries the plane properties.static int
vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, int[] pPropertyCount, VkDisplayPropertiesKHR.Buffer pProperties)
Array version of:GetPhysicalDeviceDisplayPropertiesKHR
static int
vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pPropertyCount, VkDisplayPropertiesKHR.Buffer pProperties)
Queries information about the available displays.
-
-
-
Field Detail
-
VK_KHR_DISPLAY_SPEC_VERSION
public static final int VK_KHR_DISPLAY_SPEC_VERSION
The extension specification version.- See Also:
- Constant Field Values
-
VK_KHR_DISPLAY_EXTENSION_NAME
public static final java.lang.String VK_KHR_DISPLAY_EXTENSION_NAME
The extension name.- See Also:
- Constant Field Values
-
VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR
VkStructureType- See Also:
- Constant Field Values
-
VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR
VkStructureType- See Also:
- Constant Field Values
-
VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR
public static final int VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR
The source image will be treated as opaque.- See Also:
- Constant Field Values
-
VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR
public static final int VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR
A global alpha value must be specified that will be applied to all pixels in the source image.- See Also:
- Constant Field Values
-
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR
public static final int VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR
The alpha value will be determined by the alpha channel of the source image’s pixels. If the source format contains no alpha values, no blending will be applied. The source alpha values are not premultiplied into the source image’s other color channels.- See Also:
- Constant Field Values
-
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR
public static final int VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR
This is equivalent toDISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR
except the source alpha values are assumed to be premultiplied into the source image’s other color channels.- See Also:
- Constant Field Values
-
-
Method Detail
-
vkGetPhysicalDeviceDisplayPropertiesKHR
public static int vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pPropertyCount, VkDisplayPropertiesKHR.Buffer pProperties)
Queries information about the available displays.If
pProperties
isNULL
, then the number of display devices available forphysicalDevice
is returned inpPropertyCount
. Otherwise,pPropertyCount
must point to a variable set by the user to the number of elements in thepProperties
array, and on return the variable is overwritten with the number of structures actually written topProperties
. If the value ofpPropertyCount
is less than the number of display devices forphysicalDevice
, at mostpPropertyCount
structures will be written. IfpPropertyCount
is smaller than the number of display devices available forphysicalDevice
,INCOMPLETE
will be returned instead ofSUCCESS
to indicate that not all the available values were returned.Valid Usage
physicalDevice
must be a validVkPhysicalDevice
handlepPropertyCount
must be a pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a pointer to an array ofpPropertyCount
VkDisplayPropertiesKHR
structures
- Parameters:
physicalDevice
- a physical devicepPropertyCount
- a pointer to an integer related to the number of display devices available or queriedpProperties
- eitherNULL
or a pointer to an array ofVkDisplayPropertiesKHR
structures
-
vkGetPhysicalDeviceDisplayPlanePropertiesKHR
public static int vkGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pPropertyCount, VkDisplayPlanePropertiesKHR.Buffer pProperties)
Queries the plane properties.Images are presented to individual planes on a display. Devices must support at least one plane on each display. Planes can be stacked and blended to composite multiple images on one display. Devices may support only a fixed stacking order and fixed mapping between planes and displays, or they may allow arbitrary application specified stacking orders and mappings between planes and displays.
If
pProperties
isNULL
, then the number of display planes available forphysicalDevice
is returned inpPropertyCount
. Otherwise,pPropertyCount
must point to a variable set by the user to the number of elements in thepProperties
array, and on return the variable is overwritten with the number of structures actually written topProperties
. If the value ofpPropertyCount
is less than the number of display planes forphysicalDevice
, at mostpPropertyCount
structures will be written.Valid Usage
physicalDevice
must be a validVkPhysicalDevice
handlepPropertyCount
must be a pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a pointer to an array ofpPropertyCount
VkDisplayPlanePropertiesKHR
structures
- Parameters:
physicalDevice
- a valid physical devicepPropertyCount
- a pointer to an integer related to the number of display planes available or queriedpProperties
- eitherNULL
or a pointer to an array ofVkDisplayPlanePropertiesKHR
structures
-
vkGetDisplayPlaneSupportedDisplaysKHR
public static int vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, int planeIndex, java.nio.IntBuffer pDisplayCount, java.nio.LongBuffer pDisplays)
Determines which displays a plane is usable with.If
pDisplays
isNULL
, then the number of displays usable with the specifiedplaneIndex
forphysicalDevice
is returned inpDisplayCount
. Otherwise,pDisplayCount
must point to a variable set by the user to the number of elements in thepDisplays
array, and on return the variable is overwritten with the number of structures actually written topDisplays
. If the value ofpDisplayCount
is less than the number of display planes forphysicalDevice
, at mostpDisplayCount
structures will be written. IfpDisplayCount
is smaller than the number of displays usable with the specifiedplaneIndex
forphysicalDevice
,INCOMPLETE
will be returned instead ofSUCCESS
to indicate that not all the available values were returned.Valid Usage
physicalDevice
must be a validVkPhysicalDevice
handlepDisplayCount
must be a pointer to auint32_t
value- If the value referenced by
pDisplayCount
is not 0, andpDisplays
is notNULL
,pDisplays
must be a pointer to an array ofpDisplayCount
VkDisplayKHR
handles planeIndex
must be less than the number of display planes supported by the device as determined by callingGetPhysicalDeviceDisplayPlanePropertiesKHR
- Parameters:
physicalDevice
- a physical deviceplaneIndex
- the plane which the application wishes to use, and must be in the range[0, physicaldeviceplanecount − 1]
pDisplayCount
- a pointer to an integer related to the number of display planes available or queriedpDisplays
- eitherNULL
or a pointer to an array ofVkDisplayKHR
structures
-
vkGetDisplayModePropertiesKHR
public static int vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, long display, java.nio.IntBuffer pPropertyCount, VkDisplayModePropertiesKHR.Buffer pProperties)
Gets the set of mode properties supported by the display.If
pProperties
isNULL
, then the number of display modes available on the specified display forphysicalDevice
is returned inpPropertyCount
. Otherwise,pPropertyCount
must point to a variable set by the user to the number of elements in thepProperties
array, and on return the variable is overwritten with the number of structures actually written topProperties
. If the value ofpPropertyCount
is less than the number of display modes forphysicalDevice
, at mostpPropertyCount
structures will be written. IfpPropertyCount
is smaller than the number of display modes available on the specifieddisplay
forphysicalDevice
,INCOMPLETE
will be returned instead ofSUCCESS
to indicate that not all the available values were returned.Valid Usage
physicalDevice
must be a validVkPhysicalDevice
handledisplay
must be a validVkDisplayKHR
handlepPropertyCount
must be a pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a pointer to an array ofpPropertyCount
VkDisplayModePropertiesKHR
structures
- Parameters:
physicalDevice
- the physical device associated with the displaydisplay
- a display present on the physical devicepPropertyCount
- the number of entries in the array pointed to bypProperties
pProperties
- a pointer to an array ofpPropertyCount
VkDisplayModePropertiesKHR
structures
-
vkCreateDisplayModeKHR
public static int vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, long display, VkDisplayModeCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pMode)
Creates a display mode.Valid Usage
physicalDevice
must be a validVkPhysicalDevice
handledisplay
must be a validVkDisplayKHR
handlepCreateInfo
must be a pointer to a validVkDisplayModeCreateInfoKHR
structure- If
pAllocator
is notNULL
,pAllocator
must be a pointer to a validVkAllocationCallbacks
structure pMode
must be a pointer to aVkDisplayModeKHR
handle
Host Synchronization
- Host access to
display
must be externally synchronized
- Parameters:
physicalDevice
- the physical device associated withdisplay
display
- the display to create an additional modepCreateInfo
- aVkDisplayModeCreateInfoKHR
structure describing the new mode to createpAllocator
- controls host memory allocationpMode
- returns the handle of the mode created
-
vkGetDisplayPlaneCapabilitiesKHR
public static int vkGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, long mode, int planeIndex, VkDisplayPlaneCapabilitiesKHR pCapabilities)
Gets the capabilities of a mode and plane combination.Applications that wish to present directly to a display must select which layer, or "plane" of the display they wish to target, and a mode to use with the display. Each display supports at least one plane. The capabilities of a given mode and plane combination are determined by calling this command.
Valid Usage
physicalDevice
must be a validVkPhysicalDevice
handlemode
must be a validVkDisplayModeKHR
handlepCapabilities
must be a pointer to aVkDisplayPlaneCapabilitiesKHR
structure
Host Synchronization
- Host access to
mode
must be externally synchronized
- Parameters:
physicalDevice
- the physical device associated with thedisplay
mode
- the display mode the application intends to program when using the specified plane. Note this parameter also implicitly specifies a display.planeIndex
- the plane which the application intends to use with the display, and is less than the number of display planes supported by the devicepCapabilities
- a pointer to aVkDisplayPlaneCapabilitiesKHR
struct
-
vkCreateDisplayPlaneSurfaceKHR
public static int vkCreateDisplayPlaneSurfaceKHR(VkInstance instance, VkDisplaySurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSurface)
Creates aVkSurfaceKHR
structure representing a display plane and mode.Valid Usage
instance
must be a validVkInstance
handlepCreateInfo
must be a pointer to a validVkDisplaySurfaceCreateInfoKHR
structure- If
pAllocator
is notNULL
,pAllocator
must be a pointer to a validVkAllocationCallbacks
structure pSurface
must be a pointer to aVkSurfaceKHR
handle
- Parameters:
instance
- the instance corresponding to the physical device the targeted display is onpCreateInfo
- a pointer to an instance of theVkDisplaySurfaceCreateInfoKHR
structure containing the parameters affecting the creation of the surface objectpAllocator
- controls host memory allocationpSurface
- points to aVkSurfaceKHR
handle in which the created surface is returned
-
vkGetPhysicalDeviceDisplayPropertiesKHR
public static int vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, int[] pPropertyCount, VkDisplayPropertiesKHR.Buffer pProperties)
Array version of:GetPhysicalDeviceDisplayPropertiesKHR
-
vkGetPhysicalDeviceDisplayPlanePropertiesKHR
public static int vkGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, int[] pPropertyCount, VkDisplayPlanePropertiesKHR.Buffer pProperties)
Array version of:GetPhysicalDeviceDisplayPlanePropertiesKHR
-
vkGetDisplayPlaneSupportedDisplaysKHR
public static int vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, int planeIndex, int[] pDisplayCount, long[] pDisplays)
Array version of:GetDisplayPlaneSupportedDisplaysKHR
-
vkGetDisplayModePropertiesKHR
public static int vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, long display, int[] pPropertyCount, VkDisplayModePropertiesKHR.Buffer pProperties)
Array version of:GetDisplayModePropertiesKHR
-
vkCreateDisplayModeKHR
public static int vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, long display, VkDisplayModeCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pMode)
Array version of:CreateDisplayModeKHR
-
vkCreateDisplayPlaneSurfaceKHR
public static int vkCreateDisplayPlaneSurfaceKHR(VkInstance instance, VkDisplaySurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSurface)
Array version of:CreateDisplayPlaneSurfaceKHR
-
-


# -*- coding: utf-8 -*-
""" Phase-Amplitude Coupling
Phase-Amplitude Coupling (*PAC*) is the most famous and prominent approach for
studuying the Cross Frequency Coupling between slow and faster oscillations. The
phase of a low frequency drive the power of a higher frequency.
"""
# Author: Avraam Marimpis<EMAIL_ADDRESS>from .estimator import Estimator
from ..analytic_signal import analytic_signal
import numpy as np
[docs]def pac(data, f_lo, f_hi, fs, estimator, pairs=None):
""" Phase-Amplitude Coupling
Compute the Phase Amplitude Couplgin using the given estimator for the given *data*,
between the specified *pairs* of channels.
Parameters
----------
data : array-like, shape = [n_electrodes, n_samples]
Multichannel recording data.
pairs : array-like
Each element is a tuple of length two.
f_lo : list of length 2
The low and high frequencies.
f_hi : list of length 2
The low and high frequencies.
fs : float
Sampling frequency.
estimator: iplv | plv | pli | corr
Estimator used
Valid options:
'iplv' : Imaginary Phase Locking Value
'plv' : Phase Locking Value
'pli' : Phase Lag Index
Returns
-------
ts : complex array-like, shape = [n_electrodes, n_electrodes, n_samples]
The PAC computed each time series.
avg : complex array-like, shape = [n_electrodes, n_electrodes]
The average PAC across all samples.
"""
pac = PAC(f_lo, f_hi, fs, estimator, pairs)
phases, phases_lohi = pac.preprocess(data)
return pac.estimate(phases, phases_lohi)
[docs]class PAC(Estimator):
""" Phase Amplitude Coupling (PAC)
"""
def __init__(self, f_lo, f_hi, fs, estimator, pairs=None):
self.f_lo = f_lo
self.f_hi = f_hi
self.fs = fs
self.estimator = estimator
self.pairs = pairs
[docs] def preprocess(self, data):
hilberted_lo, _, _ = analytic_signal(data, self.f_lo, self.fs)
phase = np.angle(hilberted_lo)
hilberted_hi, _, _ = analytic_signal(data, self.f_hi, self.fs)
amp = np.abs(hilberted_hi)
hilberted_lohi, _, _ = analytic_signal(amp, self.f_lo, self.fs)
phase_lohi = np.angle(hilberted_lohi)
return phase, phase_lohi
[docs] def mean(self, ts):
return self.estimator.mean(ts)
[docs] def estimate(self, phases, phases_lohi):
num_ts, ts_len = np.shape(phases)
self.pairs = [(r1, r2) for r1 in range(0, num_ts) for r2 in range(r1, num_ts)]
pacs_ts = np.zeros((num_ts, num_ts, ts_len), dtype=np.complex)
pacs_avg = np.zeros((num_ts, num_ts))
for pair in self.pairs:
p1, p2 = pair
phase1 = phases[p1,]
phase1_lohi = phases_lohi[p2,]
ts, avg = self.estimator.estimate_pair(phase1, phase1_lohi)
pacs_ts[pair] = ts
pacs_avg[pair] = avg
return pacs_ts, pacs_avg
[docs] def estimate_pair(self, phase1, phase1_lohi):
ts, avg = self.estimator.estimate_pair(phase1, phase1_lohi)
return ts, avg


Class: CSVDecision::Paths Private
- Inherits:
-
Object
- Object
- CSVDecision::Paths
- Defined in:
- lib/csv_decision/paths.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Build an index for a decision table with one or more input columns designated as keys
Instance Attribute Summary collapse
-
#paths ⇒ Hash
readonly
private
The index hash mapping in input values to one or more data array row indexes.
Class Method Summary collapse
-
.scan(table:) ⇒ CSVDecision::Paths
private
Build the index of paths.
-
.symbol(value) ⇒ nil, Symbol
private
Non-empty string converted to a symbol.
-
.value(current_value, index) ⇒ Integer, Array
private
New path key value.
Instance Method Summary collapse
-
#initialize(table:, columns:) ⇒ Paths
constructor
private
A new instance of Paths.
Constructor Details
#initialize(table:, columns:) ⇒ Paths
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Paths
45 46 47 48 49 50 51 52 |
# File 'lib/csv_decision/paths.rb', line 45 def initialize(table:, columns:) @paths = [] @columns = columns build(table) freeze end |
Instance Attribute Details
#paths ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The index hash mapping in input values to one or more data array row indexes.
41 42 43 |
# File 'lib/csv_decision/paths.rb', line 41 def paths @paths end |
Class Method Details
.scan(table:) ⇒ CSVDecision::Paths
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build the index of paths
16 17 18 19 20 21 22 |
# File 'lib/csv_decision/paths.rb', line 16 def self.scan(table:) # Do we even have paths? columns = table.columns.paths.keys return [] if columns.empty? table.paths = Paths.new(table: table, columns: columns).paths end |
.symbol(value) ⇒ nil, Symbol
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Non-empty string converted to a symbol.
36 37 38 |
# File 'lib/csv_decision/paths.rb', line 36 def self.symbol(value) value.blank? ? nil : value.to_sym end |
.value(current_value, index) ⇒ Integer, Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns New path key value.
27 28 29 30 31 32 |
# File 'lib/csv_decision/paths.rb', line 27 def self.value(current_value, index) return [current_value, index] if current_value.is_a?(Integer) current_value[-1] = index current_value end |


Module socket.ftp
FTP (File Transfer Protocol) is a protocol used to transfer files between hosts.
The ftp namespace offers thorough support to FTP, under a simple interface. The implementation conforms to RFC 959.
High level functions are provided supporting the most common operations. These high level functions are implemented on top of a lower level interface. Using the low-level interface, users can easily create their own functions to access any operation supported by the FTP protocol. For that, check the implementation.
To really benefit from this module, a good understanding of LTN012, Filters sources and sinks is necessary.
URLs MUST conform to RFC 1738, that is, an URL is a string in the form:
[ftp://][<user>[:<password>]@]<host>[:<port>][/<path>][type=a|i]
The following constants in the namespace can be set to control the default behavior of the FTP module:
- PASSWORD: default anonymous password.
- PORT: default port used for the control connection;
- TIMEOUT: sets the timeout for all I/O operations;
- USER: default anonymous user;
Usage:
-- loads the FTP module and any libraries it requires
local ftp = require("socket.ftp")
Type socket.ftp
| socket.ftp.get(url) |
Downloads the contents of a URL. |
| socket.ftp.put(table) |
Uploads a string of content into a URL. |
Type socket.ftp
Field(s)
- socket.ftp.get(url)
-
Downloads the contents of a URL.
The get function has two forms. The simple form has fixed functionality: it downloads the contents of a URL and returns it as a string. The generic form allows a lot more control, as explained below. -- call to simple form ftp.get(url)
-- Call to generic form ftp.get{
host = string, sink = LTN12 sink, argument or path = string, [user = string,] [password = string] [command = string,] [port = number,] [type = string,] [step = LTN12 pump step,] [create = function]
}
Parameter
-
url
: URL of content to download as a #string or if the argument of the get function is a #table, the function expects at least the fields host, sink, and one of argument or path (argument takes precedence). Host is the server to connect to. Sink is the simple LTN12 sink that will receive the downloaded data. Argument or path give the target path to the resource in the server. The optional arguments are the following:- user, password :User name and password used for authentication. Defaults to<EMAIL_ADDRESS>- command: The FTP command used to obtain data. Defaults to "retr", but see example below;
- port: The port to used for the control connection. Defaults to 21;
- type: The transfer mode. Can take values "i" or "a". Defaults to whatever is the server default;
- step: LTN12 pump step function used to pass data from the server to the sink. Defaults to the LTN12 pump.step function;
- create: An optional function to be used instead of socket#socket.tcp when the communications socket is created.
Return values
-
#string: If successful, the simple version returns the URL contents as a #string.
-
#number: If successful, the generic function returns 1.
-
#nil, #string: In case of error, #nil and an error message describing the error.
Usages:
-- load the ftp support local ftp = require("socket.ftp") -- Log as user "anonymous" on server "ftp.tecgraf.puc-rio.br", -- and get file "lua.tar.gz" from directory "pub/lua" as binary. f, e = ftp.get("ftp://ftp.tecgraf.puc-rio.br/pub/lua/lua.tar.gz;type=i")
-- load needed modules local ftp = require("socket.ftp") local ltn12 = require("ltn12") local url = require("socket.url") -- a function that returns a directory listing function nlst(u) local t = {} local p = url.parse(u) p.command = "nlst" p.sink = ltn12.sink.table(t) local r, e = ftp.get(p) return r and table.concat(t), e end
-
- socket.ftp.put(table)
-
Uploads a string of content into a URL.
Parameter
-
#table table
: The function expects at least the fields host, source, and one of argument or path (argument takes precedence). Host is the server to connect to. Source is the simple LTN12 source that will provide the contents to be uploaded. Argument or path give the target path to the resource in the server. The optional arguments are the following:- user, password: User name and password used for authentication. Defaults to<EMAIL_ADDRESS>- command: The FTP command used to send data. Defaults to "stor", but see example below;
- port: The port to used for the control connection. Defaults to 21;
- type: The transfer mode. Can take values "i" or "a". Defaults to whatever is the server default;
- step: LTN12 pump step function used to pass data from the server to the sink. Defaults to the LTN12 pump.step function;
- create: An optional function to be used instead of socket#socket.tcp when the communications socket is created.
Return values
-
#number: 1 If successful
-
#nil, #string: In case of error, #nil and an error message describing the error.
Usage:
-- load the ftp support local ftp = require("socket.ftp") local ltn12 = require("ltn12") -- Log as user "fulano" on server "ftp.example.com", -- using password "silva", and append to the remote file "LOG", sending the -- contents of the local file "LOCAL-LOG" f, e = ftp.put{ host = "ftp.example.com", user = "fulano", password = "silva", command = "appe", argument = "LOG", source = ltn12.source.file(io.open("LOCAL-LOG", "r")) }
-


Cities are places where we can buy almost anything. These products come from somewhere - often from very far away. Here we visualise how things move around in our globalising world.
Created with d3, mapbox, bootstrap and 💛 for the Bartlett Centre for
Advanced Spatial Analysis CASA0003:
Digital Visualisation module by:


aboutMe
Who am I?
- Jeremy Zimmerman A tech geek, programmer, and open-source aficionado Working as a System Administrator in sunny Southern California, this blog is where I discuss ideas around technology, opensource, and software reviews that deserve more discussion than can be conveyed with 140 characters. Sometimes, I throw in a code snippet here and there for others to benefit from which cant be found elsewhere online.
- encryption lets-encrypt ssl https windows-server active-directory rsat powershell simpleicons icons opensource social-media


Thymeleaf - Bootstrap Radio Buttons
Home
(current)
About
Services
Contact
Model
model
Option1
Option2
Option3
Submit form