Using Lambda with Amazon MQ
Amazon MQ is a managed message broker service for
Apache ActiveMQ
Amazon MQ can also manage Amazon Elastic Compute Cloud (Amazon EC2) instances on your behalf by installing ActiveMQ brokers and by providing different network topologies and other infrastructure needs.
You can use a Lambda function to process records from your Amazon MQ message broker. Your function is triggered through an event source mapping, a Lambda resource that reads messages from your broker and invokes the function synchronously.
The Amazon MQ event source mapping has the following configuration restrictions:
-
Authentication – Only the ActiveMQ SimpleAuthenticationPlugin
is supported. User credentials associated with the broker are the only method of connection. For more information about authentication, see Messaging Authentication and Authorization for ActiveMQ in the Amazon MQ Developer Guide. -
Connection quota – Brokers have a maximum number of allowed connections per wire-level protocol. This quota is based on the broker instance type. For more information, see the Brokers section of Quotas in Amazon MQ in the Amazon MQ Developer Guide.
-
Connectivity – You can create brokers in a public or private virtual private cloud (VPC). For private VPCs, your Lambda function needs access to the VPC to interact with the records. For more information, see Event source mapping API later in this topic.
-
Event destinations – Only queue destinations are supported. However, you can use a virtual topic, which behaves as a topic internally while interacting with Lambda as a queue. For more information, see Virtual Destinations
on the Apache ActiveMQ website. -
Network topology – Only one single-instance or standby broker is supported per event source mapping. Single-instance brokers require a failover endpoint. For more information about these broker deployment modes, see Amazon MQ Broker Architecture in the Amazon MQ Developer Guide.
-
Protocols – Lambda consumes messages using the OpenWire/Java Message Service (JMS) protocol. No other protocols are supported. Within the JMS protocol, only
TextMessage
and BytesMessage
are supported. For more information about the OpenWire protocol, see OpenWire on the Apache ActiveMQ website.
Lambda automatically supports the latest versions of ActiveMQ that Amazon MQ supports. For the latest supported versions, see Amazon MQ Release Notes in the Amazon MQ Developer Guide.
By default, Amazon MQ has a weekly maintenance window for brokers. During that window of time, brokers are unavailable. For brokers without standby, Lambda cannot process any messages during that window.
Sections
Lambda consumer group
To interact with Amazon MQ, Lambda creates a consumer group which can read from your Amazon MQ brokers. The consumer group is created with the same ID as the event source mapping UUID.
Lambda will pull messages until it has processed a maximum of 6 MB, until timeout, or until the batch size is fulfilled. When configured, batch size determines the maximum number of items to retrieve in a single batch. Your batch is converted into a Lambda payload, and your target function is invoked. Messages are neither persisted nor deserialized. Instead, they are retrieved by the consumer group as a BLOB of bytes and are base64-encoded for a JSON payload.
The maximum function invocation time is 14 minutes.
Lambda processes all incoming batches concurrently and automatically scales the concurrency
to meet demands.
You can monitor a given function's concurrency usage using the ConcurrentExecutions
metric in
Amazon CloudWatch. For more information about concurrency, see Managing concurrency for a Lambda function.
Example Amazon MQ record event
{
"eventSource": "aws:amq",
"eventSourceArn": "arn:aws:mq:us-west-2:112556298976:broker:test:b-9bcfa592-423a-4942-879d-eb284b418fc8",
"messages": { [
{
"messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-west-2.amazonaws.com-37557-1234520418293-4:1:1:1:1",
"messageType": "jms/text-message",
"data": "QUJDOkFBQUE=",
"connectionId": "myJMSCoID",
"redelivered": false,
"destination": {
"physicalname": "testQueue"
},
"timestamp":<PHONE_NUMBER>958,
"brokerInTime":<PHONE_NUMBER>958,
"brokerOutTime":<PHONE_NUMBER>959
},
{
"messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-west-2.amazonaws.com-37557-1234520418293-4:1:1:1:1",
"messageType":"jms/bytes-message",
"data": "3DTOOW7crj51prgVLQaGQ82S48k=",
"connectionId": "myJMSCoID1",
"persistent": false,
"destination": {
"physicalname": "testQueue"
},
"timestamp":<PHONE_NUMBER>958,
"brokerInTime":<PHONE_NUMBER>958,
"brokerOutTime":<PHONE_NUMBER>959
}
]
}
}
Execution role permissions
To read records from an Amazon MQ broker, your Lambda function needs the following permissions added to its execution role:
When using an encrypted customer managed key, add the kms:Decrypt
permission as well.
Configuring a broker as an event source
Create an event source mapping to tell Lambda to send records from an Amazon MQ broker to a Lambda function. You can create multiple event source mappings to process the same data with multiple functions, or to process items from multiple sources with a single function.
To configure your function to read from Amazon MQ, create an MQ trigger in the Lambda console.
To create a trigger
-
Open the Functions page
on the Lambda console. -
Choose a function.
-
Under Designer, choose Add trigger.
-
Choose a trigger type.
-
Configure the required options and then choose Add.
Lambda supports the following options for Amazon MQ event sources:
-
MQ broker – Select an Amazon MQ broker.
-
Batch size – Set the maximum number of messages to retrieve in a single batch.
-
Queue name – Enter the Amazon MQ queue to consume.
-
Source access configuration – Select the AWS Secrets Manager secret that stores your broker credentials.
-
Enable trigger – Disable the trigger to stop processing records.
To enable or disable the trigger (or delete it), choose the MQ trigger in the designer. To reconfigure the trigger, use the event source mapping API operations.
Event source mapping API
To manage an event source with the AWS CLI or AWS SDK
To create the event source mapping with the AWS Command Line Interface (AWS CLI),
use the create-event-source-mapping
By default, Amazon MQ brokers are created with the PubliclyAccessible
flag set to false. It is only when PubliclyAccessible
is set to true that the broker is given a public IP address.
For full access with your event source mapping, your broker must either use a public endpoint or provide access to the VPC. To meet the Amazon VPC access requirements, you can do one of the following:
-
Configure one NAT gateway per public subnet. For more information, see Internet and service access for VPC-connected functions.
-
Create a connection between your Amazon VPC and Lambda. Your Amazon VPC must also connect to AWS STS and Secrets Manager endpoints. For more information, see Configuring interface VPC endpoints for Lambda.
The Amazon Virtual Private Cloud (Amazon VPC) security group rules that you configure should have the following settings at minimum:
-
Inbound rules – For a broker without public accessibility, allow all traffic on all ports for the security group that's specified as your source. For a broker with public accessibility, allow all traffic on all ports for all destinations.
-
Outbound rules – Allow all traffic on all ports for all destinations.
The Amazon VPC configuration is discoverable through the Amazon MQ API and does not need to be configured in the
create-event-source-mapping
setup.
The following example AWS CLI command creates an event source which maps a Lambda
function named
MQ-Example-Function
to an Amazon MQ broker named ExampleMQBroker
. The command also
provides a Secrets Manager secret named ExampleMQBrokerUserPassword
that stores the broker
credentials.
aws lambda create-event-source-mapping \
--event-source-arn arn:aws:mq:us-east-1:12345678901:broker:ExampleMQBroker:b-b4d492ef-bdc3-45e3-a781-cd1a3102ecca
\
--function-name MQ-Example-Function
\
--source-access-configuration Type=BASIC_AUTH,URI=arn:aws:secretsmanager:us-east-1:12345678901:secret:ExampleMQBrokerUserPassword-xPBMTt
\
--queues ExampleQueue
You should see the following output:
{ "UUID": "91eaeb7e-c976-1234-9451-8709db01f137", "BatchSize": 100, "EventSourceArn": "arn:aws:mq:us-east-1:12345678901:broker:ExampleMQBroker:b-b4d492ef-bdc3-45e3-a781-cd1a3102ecca", "FunctionArn": "arn:aws:lambda:us-east-1:12345678901:function:MQ-Example-Function", "LastModified":<PHONE_NUMBER>.741, "LastProcessingResult": "No records processed", "State": "Creating", "StateTransitionReason": "USER_INITIATED", "Queues": [ "ExampleQueue" ], "SourceAccessConfigurations": [ { "Type": "BASIC_AUTH", "URI": "arn:aws:secretsmanager:us-east-1:12345678901:secret:ExampleMQBrokerUserPassword-xPBMTt" } ] }
Using the update-event-source-mapping
command, you can configure additional options such as how batches are processed and
to specify when to discard records that can't be processed. The following example
command
updates an event source mapping to have a batch size of 2.
aws lambda update-event-source-mapping \
--uuid 91eaeb7e-c976-1234-9451-8709db01f137
\
--batch-size 2
You should see the following output:
{ "UUID": "91eaeb7e-c976-1234-9451-8709db01f137", "BatchSize": 2, "EventSourceArn": "arn:aws:mq:us-east-1:12345678901:broker:ExampleMQBroker:b-b4d492ef-bdc3-45e3-a781-cd1a3102ecca", "FunctionArn": "arn:aws:lambda:us-east-1:12345678901:function:MQ-Example-Function", "LastModified":<PHONE_NUMBER>.531, "LastProcessingResult": "No records processed", "State": "Updating", "StateTransitionReason": "USER_INITIATED" }
Updated settings are applied asynchronously and aren't reflected in the output until
the process completes. To
view the current status of your resource, use the get-event-source-mapping
aws lambda get-event-source-mapping \
--uuid 91eaeb7e-c976-4939-9451-8709db01f137
You should see the following output:
{ "UUID": "91eaeb7e-c976-4939-9451-8709db01f137", "BatchSize": 2, "EventSourceArn": "arn:aws:mq:us-east-1:12345678901:broker:ExampleMQBroker:b-b4d492ef-bdc3-45e3-a781-cd1a3102ecca", "FunctionArn": "arn:aws:lambda:us-east-1:12345678901:function:MQ-Example-Function", "LastModified":<PHONE_NUMBER>.531, "LastProcessingResult": "No records processed", "State": "Enabled", "StateTransitionReason": "USER_INITIATED" }
Event source mapping errors
When a Lambda function encounters an unrecoverable error, your Amazon MQ consumer
stops processing records. Any
other consumers can continue processing, provided they don't encounter the same error.
To determine the potential
cause of a stopped consumer, check the StateTransitionReason
field in the return details of your
EventSourceMapping
for one of the following codes:
ESM_CONFIG_NOT_VALID
-
The event source mapping configuration is not valid.
EVENT_SOURCE_AUTHN_ERROR
-
Lambda failed to authenticate the event source.
EVENT_SOURCE_AUTHZ_ERROR
-
Lambda does not have the required permissions to access the event source.
FUNCTION_CONFIG_NOT_VALID
-
The function's configuration is not valid.
Records also go unprocessed if they are dropped due to their size. The size limit
for Lambda records is 6 MB.
To redeliver messages upon function error, you can use a redelivery policy and dead-letter
queue (DLQ) handling
with Amazon MQ. For more information, see Message Redelivery and DLQ Handling


--- layout: post title: Someday by Allison McGhee date: 2011-03-01 16:05:27.000000000 -08:00 type: post parent_id: '0' published: true pd: '' status: publish categories: - Book Reviews - Classroom Talk tags: - Book Reviews - children's books - kidlit - picturebooks - reading - Someday by Allison McGhee author: login: k email: k@k display_name: mcary first_name: '' last_name: '' ---
Classroomtalk Book Reviews
There are so many great children’s books out there to be discovered that I’d like to invite my readers to share your favorite children’s books on this page. If you’d like to submit a review to share with other Classroomtalk readers, append your submission in a Word or Word Perfect format as an attachment to your e-mail to Classroomtalk. Type “Book Review” in your e-mail subject line.
by: Allison McGhee. Illustrated by: Peter H. Reynolds
I hadn’t heard of this book when I stumbled upon it in the book store. When I picked it up and began to read, I had no idea that by the time I finished I’d have tears running down my face and be reaching for a tissue while other book lovers shot me odd glances for blubbering in the kidlit section. Someday is a sentimental story of a mother’s memories of love for her daughter. Much like the book I Love You Forever by Robert Munsch, it’s a book that many adult readers will have difficulty reading aloud without tearing up. It’s simple text and thoughtful illustrations captivate young listeners while evoking feelings in adult readers of melancholy and loss, but also of hope and joy.
This book makes a beautiful gift from mother to daughter and is a perfect gift for baby showers. I’d highly recommend it for children ages 3-8 and for parents of all ages.


YouTuber 3kliksphilip recently posted a video titled "Case Unboxing Millionaire #2", wherein he showed a single run simulation of him 'unboxing' cases for the first-person-shooter computer game Counter Strike: Global Offensive. These cases are digital items which, when opened, unlock a decorative weapon 'skin'. These skins can be used by players in the game to show off to their friends. Such skins have developed quite a market for themselves and can be bought and sold for hundreds or even thousands of dollars through various online marketplaces.
3kliksphilip uploaded another video titled Case Unboxing Millionaire #3, where he did a simulated run of unlocking the "eSportsCase 2013" until he opened a knife. My previous analysis showed the expected value to be a loss of $5,720.96. This analysis calculates the information for the "Winter Offensive Weapon Case", as 3kliksphilip has challenged viewers to submit a guess for this case in his latest video.
It costs $5.20 to open, and can contain skins worth between a few dollars to around $300. 3kliksphilip challenged his viewers to estimate his profit or loss from opening this case up until he unlocked a knife skin, the rarest skin to obtain. I have calculated this expected value to be a loss of $415.03.
How did I do this?
For a full, step-by-step walk-through of my methods, please feel welcome to inspect the code here.
The expected value of each case opening can be calculated by:
Calculating the average value of every item, by finding the market balue for every item-condition pair, e.g. an AWP | Redline (Field-Tested) is currently valued around $18.19 on the Steam Marketplace. Then, using the skin conditions probability distribution, calculate the average value.
Once the average value of every item is calculated, we can find the average value of any colour or rarity of item for a box by assuming all items of a given rarity level for a case are equally likely. So, we just take the average of the averages of those items.
Then, calculated the avarage value of any opening of the case is as simple as multiplying by the skin drops probability distribution.
In this case, we calculate that the average value of each opening of the "Winter Offensive Weapon Case" is $3.08. Since it costs $5.20 to open, the expected loss per opening is -$2.12. Given the probability of opening of opening a knife is ~0.25%, we can estimate that it will take ~200 case openings to open a knife (or, ~200 case opening to reach a probability of 0.5 that a knife will be opened).
Given this, we can expect an average loss of -$415.03 if we open cases until we open a knife.


val index: Int
the index of the variation in the GameTree
GameTree
index - the index of the variation in the GameTree
index


Rs.50.00
Add
View More
Onion 1kg
Sri lankan best kitchen vege...
Rs.90.00
Add
View More
Mango
Frshly taken from estate by farmers hand...
Rs.60.00
Add
View More
Tea Leaves
Start Morinig with drinking this special...
Rs.40.00
Add
View More
Red Rice Packet
Ariya's qulity red rice with high...
Rs.220.00
Add
View More
Pumpkin
Ourala's new pumpkin with free chillies...
Rs.409.00
Add
View More
Mango
Frshly taken from estate by...
Rs.60.00
Add
View More
Tea Leaves
Start Morinig with drinking this special...
Rs.40.00
Add
View More
Potato Chips
Potato crusty chips with red hot chilli...
Rs.550.00
Add
View More
Ice Cream Pack
Dried grapes filled with apple flavoured...
Rs.321.00
Add
View More
Strawberry Strings
Strawberry slavoured strings from...
Rs.19.00
Add
View More
Samaposha
Children's Favourite with new flavoured...
Rs.69.00
Add
View More


I am Jake Halloran, a computer engineering student at the University of Pittsburgh. I am a senior taking classes in both electrical/computer engineering and in programming.
Somehow I have managed to cobble together knoweldge in C, C++, Java, Python, Javascript, Model Sim, Autodesk, SQL, HTML/CSS, and more.


Welcome to Study Buddies!
v.0.3.1
Hello students, welcome to the new Study Buddies system. In here you can send request to current registered student peer tutors and seek assistance on school subject from them.
Please follow the video tutorial below to understand how to use this website!


Feed parser in Ruby
There are a number of ways of parsing an RSS feed in Ruby, but one of the best is a gem called Feedzirra. The main advantage of Feedzirra is its speed; it parses feeds very quickly, but it is also useful as it can parse many different types of feed.
To install Feedzirra we first need to make sure that http://gems.github.com
is in our list of gem sources. If not we’ll need to add it.
gem sources -a http://gems.github.comNow we can install the gem:
sudo gem install pauldix-feedzirraNotice: When I was installing the gem, there are several libs needed, including libcurl4-gnutls-dev libcurl3-gnutls libxslt1-dev, you may not meet this issue, it’s not a big deal, just install what it rely on. Several dependencies will also be installed alongside the gem. Once everything’s installed we’ll need to add a reference to the gem in our application’s /config/environment.rb file.
config.gem "pauldix-feedzirra", :lib => "feedzirra", :source => "http://gems.github.com"That’s it. We’re ready to start parsing RSS feeds in our application.
Getting start: Assume that, you’ve got a model to store the feed content which is fetched by the parser, so the model should be like :
class FeedEntry < ActiveRecord::Base def self.updatefromfeed(feedurl) feed = Feedzirra::Feed.fetchandparse(feedurl) add_entries(feed.entries) endA more detailed manual is here!private def self.addentries(entries) entries.each do |entry| unless exists? :guid => entry.id create!( :name => entry.title, :summary => entry.summary, :url => entry.url, :publishedat => entry.published, :guid => entry.id ) end end end end


The messaging-clustering-singleton
quickstart uses a JMS topic and a queue to demonstrate clustering using JBoss EAP messaging with MDB singleton configuration where only one node in the cluster will be active.
What is it?
The messaging-clustering-singleton
quickstart demonstrates the use of clustering with integrated Apache ActiveMQ Artemis. It uses the same code as in helloworld-mdb quickstart, with only a difference in the configuration to run it as a clustered singleton. Instructions are provided to run the quickstart on either a standalone server or in a managed domain.
These are the two JMS resources contained in this quickstart:
-
A queue named
HELLOWORLDMDBQueue
bound in JNDI asjava:/queue/HELLOWORLDMDBQueue
-
A topic named
HELLOWORLDMDBTopic
bound in JNDI asjava:/topic/HELLOWORLDMDBTopic
Both contain a singleton configuration as specified in the file WEB-INF/jboss-ejb3.xml:
<c:clustering>
<ejb-name>*</ejb-name>
<c:clustered-singleton>true</c:clustered-singleton>
</c:clustering>
The wildcard (*) in the ejb-name
element indicates that all MDBs contained in the application will be clustered singleton. As a result, only one node in the cluster will have those MDBs active at a specific time. If that node shuts down, another node in the cluster will become the active node with MDBs, called the singleton provider.
Also, we can find a configuration for delivery group in the same file:
<d:delivery>
<ejb-name>HelloWorldTopicMDB</ejb-name>
<d:group>my-mdb-delivery-group</d:group>
</d:delivery>
Here, you can see that only one of the MDBs, HelloWorldTopicMDB
, is associated with a delivery group. All delivery groups used by an MDB must be declared in the ejb
subsystem configuration, and they can be enabled or disabled. If the delivery group is disabled in a cluster node, all MDBs belonging to that group will be inactive in that node. Notice that delivery groups can be used in non-clustered environments as well. In that case, the MDB will be active in the server whenever the delivery group is enabled in the server. A delivery group can be enabled using the management CLI as you will see in this quickstart.
If a delivery group is used in conjunction with singleton, as is the case of this quickstart, the MDB will be active in the singleton provider node only if that node has delivery-group
enabled. If not, the MDB will be inactive in that node and all remainder nodes of the cluster.
System Requirements
The application this project produces is designed to be run on Red Hat JBoss Enterprise Application Platform 7.4 or later.
All you need to build this project is Java 8.0 (Java SDK 1.8) or later and Maven 3.3.1 or later. See Configure Maven to Build and Deploy the Quickstarts to make sure you are configured correctly for testing the quickstarts.
Use of the EAP_HOME_1, EAP_HOME_2, and QUICKSTART_HOME Variables
When deploying this quickstart to a managed domain, replace EAP_HOME
with the actual path to your JBoss EAP installation. The installation path is described in detail here: Use of EAP_HOME and JBOSS_HOME Variables.
When deploying this quickstart to multiple standalone servers, this quickstart requires that you clone your EAP_HOME
installation directory and run two servers. In the following instructions, replace EAP_HOME_1
with the path to your first JBoss EAP server and replace EAP_HOME_2
with the path to your second cloned JBoss EAP server.
When you see the replaceable variable QUICKSTART_HOME, replace it with the path to the root directory of all of the quickstarts.
Build the Project
Follow these steps to build the project without deploying it.
-
Open a terminal and navigate to the root directory of this quickstart.
-
Type this command to build the archive:
$ mvn clean install
Configure the Server and Deploy the Quickstart
You can choose to configure and deploy this quickstart to a managed domain or to a standalone server. The sections below describe how to configure and start the server for each configuration.
Configure the Server and Deploy the Quickstart to a Managed Domain
You configure the server by running the install-domain.cli
script provided in the root directory of this quickstart.
Back Up the JBoss EAP Managed Domain Configuration
Before you begin, back up your server configuration files.
-
If it is running, stop the JBoss EAP server.
-
Back up the following files:
EAP_HOME/domain/configuration/domain.xml EAP_HOME/domain/configuration/host.xml
After you have completed testing this quickstart, you can replace these file to restore the server to its original configuration.
Start the JBoss EAP Managed Domain
-
Open a terminal and navigate to the root of the JBoss EAP directory.
-
Start the JBoss EAP managed domain by typing the following command.
$ EAP_HOME/bin/domain.sh
NoteFor Windows, use the EAP_HOME\bin\domain.bat
script.
Configure the Domain Server and Deploy the Quickstart Using the JBoss CLI
-
Review the
install-domain.cli
file located in the root of this quickstart directory. This script creates the server group and servers and configures messaging clustering for testing this quickstart. You will note it does the following:-
Stops the servers.
-
Creates the
quickstart-messaging-clustering-singleton-group
server group to test ActiveMQ clustering. -
Enables console logging to allow you to view the quickstart output.
-
Adds two servers to the
server-group
. -
Configures ActiveMQ clustering in the
full-ha
profile. -
Creates a delivery group named
my-mdb-delivery-group
, with initial active value set totrue
. -
Deploys the
messaging-clustering-singleton.war
archive. -
Starts the servers that were added to the managed domain.
-
-
Open a new terminal, navigate to the root directory of this quickstart, and run the following command, replacing
EAP_HOME
with the path to your server:$ EAP_HOME/bin/jboss-cli.sh --connect --file=install-domain.cli
NoteFor Windows, use the EAP_HOME\bin\jboss-cli.bat
script.You should see the following output:
{ "outcome" => "success", "result" => undefined, "server-groups" => undefined } The batch executed successfully { "outcome" => "success", "result" => "STARTED" } { "outcome" => "success", "result" => "STARTED" }
Configure the Server and Deploy the Quickstart to a Standalone Server
If you choose to use standalone servers rather than a managed domain, you need two instances of the application server. The second server must be started with a port offset parameter provided to the startup script as -Djboss.socket.binding.port-offset=100
.
Since both application servers must be configured in the same way, you must configure the first server and then clone it.
Back Up the JBoss EAP Standalone Server Configuration
Before you begin, back up your server configuration file.
-
If it is running, stop the JBoss EAP server.
-
Back up the
EAP_HOME/standalone/configuration/standalone-full-ha.xml
file.
After you have completed testing this quickstart, you can replace this file to restore the server to its original configuration.
Start the JBoss EAP Standalone Server
-
Open a terminal and navigate to the root of the JBoss EAP directory.
-
Start the JBoss EAP server with the full HA profile by typing the following command.
$ EAP_HOME/bin/standalone.sh -c standalone-full-ha.xml
NoteFor Windows, use the EAP_HOME\bin\standalone.bat
script.
Configure the Standalone Server and Deploy the Quickstart Using the JBoss CLI
-
Review the
install-standalone.cli
file located in the root of this quickstart directory. This script configures clustering for a standalone server. You will note it does the following:-
Because the console is disabled by default in the Full HA profile, it enables console logging to allow you to view the quickstart output.
-
Enables clustering and sets a cluster password.
-
Creates a delivery group named
my-mdb-delivery-group
, with initial active value set totrue
. -
Deploys the
messaging-clustering-singleton.war
archive. -
Reloads the server configuration.
-
-
Open a new terminal, navigate to the root directory of this quickstart, and run the following command, replacing
EAP_HOME
with the path to your server:$ EAP_HOME_1/bin/jboss-cli.sh --connect --file=install-standalone.cli
NoteFor Windows, use the EAP_HOME_1\bin\jboss-cli.bat
script.You should see the following output:
The batch executed successfully process-state: reload-required
Clone the JBoss EAP Directory
After you have successfully configured the server, you must make a copy of this JBoss EAP directory structure to use for the second server.
-
Stop the server.
-
Make a copy of this JBoss EAP directory structure to use for the second server.
-
Remove the following directories from the cloned instance:
EAP_HOME_2/standalone/data/activemq/bindings EAP_HOME_2/standalone/data/activemq/journal EAP_HOME_2/standalone/data/activemq/largemessages
Start the JBoss EAP Standalone Servers with the Full HA Profile
Use the following commands to start the standalone servers with the full HA profile.
$ EAP_HOME_1/bin/standalone.sh -c standalone-full-ha.xml
$ EAP_HOME_2/bin/standalone.sh -c standalone-full-ha.xml -Djboss.socket.binding.port-offset=100
|
Note
|
For Windows, use the EAP_HOME_1\bin\standalone.bat and EAP_HOME_2\bin\standalone.bat scripts.
|
Access the Application
Access the Application Running in a Managed Domain
The application will be running at the following URL: http://localhost:9080/messaging-clustering-singleton/HelloWorldMDBServletClient.
It will send some messages to the queue.
To send messages to the topic, use the following URL: http://localhost:9080/messaging-clustering-singleton/HelloWorldMDBServletClient?topic
Access the Application Running in a Standalone Server
The application will be running at the following URL: http://localhost:8080/messaging-clustering-singleton/HelloWorldMDBServletClient.
It will send some messages to the queue.
To send messages to the topic, use the following URL: http://localhost:8080/messaging-clustering-singleton/HelloWorldMDBServletClient?topic
Investigate the Server Console Output
Review the messages in both JBoss EAP server consoles or logs.
The following messages are sent to the queue:
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-0 (ActiveMQ-client-global-threads)) Received Message from queue: This is message 1
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-2 (ActiveMQ-client-global-threads)) Received Message from queue: This is message 3
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-4 (ActiveMQ-client-global-threads)) Received Message from queue: This is message 5
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-3 (ActiveMQ-client-global-threads)) Received Message from queue: This is message 4
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldQueueMDB] (Thread-1 (ActiveMQ-client-global-threads)) Received Message from queue: This is message 2
The following messages are sent to the topic:
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-5 (ActiveMQ-client-global-threads)) Received Message from topic: This is message 1
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-6 (ActiveMQ-client-global-threads)) Received Message from topic: This is message 2
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-8 (ActiveMQ-client-global-threads)) Received Message from topic: This is message 4
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-7 (ActiveMQ-client-global-threads)) Received Message from topic: This is message 3
INFO [class org.jboss.as.quickstarts.mdb.HelloWorldTopicMDB] (Thread-9 (ActiveMQ-client-global-threads)) Received Message from topic: This is message 5
You will notice that only one of the nodes, elected as the singleton provider node, will be receiving the messages. For that, check both servers, only one will contain the received message log entries.
Server Log: Expected Warnings and Errors
You will see the following warnings in the server logs. You can ignore these warnings as they are intended for production servers.
WARNING [org.jgroups.protocols.UDP] (Thread-0 (ActiveMQ-server-ActiveMQServerImpl::serverUUID=c79278db-56e6-11e5-af50-69dd76236ee8-1573164340)) JGRP000015: the send buffer of socket DatagramSocket was set to 1MB, but the OS only allocated 212.99KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
WARNING [org.jgroups.protocols.UDP] (Thread-0 (ActiveMQ-server-ActiveMQServerImpl::serverUUID=c79278db-56e6-11e5-af50-69dd76236ee8-1573164340)) JGRP000015: the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 212.99KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
WARNING [org.jgroups.protocols.UDP] (Thread-0 (ActiveMQ-server-ActiveMQServerImpl::serverUUID=c79278db-56e6-11e5-af50-69dd76236ee8-1573164340)) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
WARNING [org.jgroups.protocols.UDP] (Thread-0 (ActiveMQ-server-ActiveMQServerImpl::serverUUID=c79278db-56e6-11e5-af50-69dd76236ee8-1573164340)) JGRP000015: the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 212.99KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
Electing a New Singleton Provider Server
If you reboot the singleton server node, the other node will be elected the new singleton provider, and will start receiving the MDB messages instead.
You should see the following output in the new singleton provider server:
WFLYCLSV0003: master:quickstart-messagingcluster-nodeX elected as the singleton provider of the org.wildfly.ejb3.clustered.singleton service
Where nodeX
will be either node1
or node2
, depending on which node is the new singleton provider.
If you now try to access the servlet urls, you will see that the new provider is receiving all new messages.
You will see the following warnings in the log of the server that is not the singleton provider. These messages show that the other node went down unexpectedly, which is exactly the scenario we are reproducing in this quickstart. For that reason, those warnings can be ignored.
WARN [org.apache.activemq.artemis.core.client] (Thread-2 (ActiveMQ-client-global-threads)) AMQ212037: Connection failure has been detected: AMQ119015: The connection was disconnected because of server shutdown [code=DISCONNECTED]
WARN [org.apache.activemq.artemis.core.server] (Thread-2 (ActiveMQ-client-global-threads)) AMQ222095: Connection failed with failedOver=false
You may see the following log message as well. When a server is restarted, it may broadcast that it is up and running (with its nodeID) while other nodes still reference the previous server instance for the same nodeID. Eventually, the cluster will be informed of the new instance representing the given nodeID but as the warning explains, it is possible to see this log (once or more) when a server is restarted.
WARN [org.apache.activemq.artemis.core.client] (activemq-discovery-group-thread-dg-group1) AMQ212034: There are more than one servers on the network broadcasting the same node id. You will see this message exactly once (per node) if a node is restarted, in which case it can be safely ignored. But if it is logged continuously it means you really do have more than one node on the same network active concurrently with the same node id. This could occur if you have a backup node active at the same time as its live node. nodeID=a114b652-689e-11e7-a2f4-54ee751c6182
The next error message is a known issue. You can ignore it, as it does not affect the scenario that this quickstart reproduces:
ERROR [org.apache.activemq.artemis.core.server] (Thread-3 (ActiveMQ-client-global-threads)) AMQ224037: cluster connection Failed to handle message: java.lang.IllegalStateException: Cannot find binding for jms.queue.HelloWorldMDBQueuedea3e995-713c-11e7-85f2-b8f6b112daf7 on ClusterConnectionImpl@1129705701[nodeUUID=dabaa1fa-713c-11e7-8f3a-b8f6b112daf7, connector=TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEndpoint=http-acceptor&activemqServerName=default&httpUpgradeEnabled=true&port=9080&host=localhost, address=jms, server=ActiveMQServerImpl::serverUUID=dabaa1fa-713c-11e7-8f3a-b8f6b112daf7]
at org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl$MessageFlowRecordImpl.doConsumerCreated(ClusterConnectionImpl.java:1294)
at org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl$MessageFlowRecordImpl.handleNotificationMessage(ClusterConnectionImpl.java:1029)
at org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl$MessageFlowRecordImpl.onMessage(ClusterConnectionImpl.java:1004)
at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1001)
at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:49)
at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1124)
at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Rebooting the Singleton Provider Server Node in a Managed Domain
Run the following command, replacing EAP_HOME
with the path to your server, and replacing NODE_X
in the script name with either node1
or node2
, depending on whether the current singleton provider is node1
or node2
.
$ EAP_HOME/bin/jboss-cli.sh --connect --file=restart-NODE_X-domain.cli
|
Note
|
For Windows, use the EAP_HOME\bin\jboss-cli.bat script.
|
Rebooting the Singleton Provider Server Node in a Standalone Server
Stop the provider server and restart it again, using the same command you used to start the server initially.
Disable and Enable the Delivery Group
To disable the delivery group "my-mdb-delivery-group" to which the topic belongs, run the disable-delivery-group-domain.cli
or disable-delivery-group-standalone.cli
script, located in the root directory of this quickstart. Follow the instructions in the next sections, depending on the server configuration you choose to run.
After disabling the delivery group, try sending messages to the topic, You should notice that the topic messages are not delivered when the delivery group is inactive.
Next, enable the delivery group using the appropriate enable-delivery-group-domain.cli
or enable-delivery-group-standalone.cli
script, also located in the root directory of this quickstart, so that the topic messages can be delivered again.
Disable and Enable Delivery Group in a Managed Domain
To disable the delivery group named "my-mdb-delivery-group" to which the topic belongs, run the disable-delivery-group-domain.cli
script, replacing EAP_HOME
with the path to your server:
$ EAP_HOME/bin/jboss-cli.sh --connect --file=disable-delivery-group-domain.cli
|
Note
|
For Windows, use the EAP_HOME\bin\jboss-cli.bat script.
|
Similarly, to enable the delivery group, run the enable-delivery-group-domain.cli
script:
$ EAP_HOME/bin/jboss-cli.sh --connect --file=enable-delivery-group-domain.cli
|
Note
|
For Windows, use the EAP_HOME\bin\jboss-cli.bat script.
|
Disable and Enable Delivery Group in a Standalone Server
To disable the delivery group named "my-mdb-delivery-group" to which the topic belongs, run the disable-delivery-group-standalone.cli
script on both servers, replacing EAP_HOME
with the path to your server:
$ EAP_HOME_1/bin/jboss-cli.sh --connect --file==disable-delivery-group-standalone.cli
$ EAP_HOME_2/bin/jboss-cli.sh --connect controller=localhost:10090 --file=disable-delivery-group-standalone.cli
|
Note
|
For Windows, use the EAP_HOME_1\bin\jboss-cli.bat and EAP_HOME_2\bin\jboss-cli.bat scripts.
|
Similarly, to enable the delivery group, run the enable-delivery-group-standalone.cli
script in both servers:
$ EAP_HOME_1/bin/jboss-cli.sh --connect --file==enable-delivery-group-standalone.cli
$ EAP_HOME_2/bin/jboss-cli.sh --connect controller=localhost:10090 --file=enable-delivery-group-standalone.cli
|
Note
|
For Windows, use the EAP_HOME_1\bin\jboss-cli.bat and EAP_HOME_2\bin\jboss-cli.bat scripts.
|
Undeploy the Archive
When you are finished testing, use the following instructions to undeploy the quickstart.
Undeploy the quickstart in a Managed Domain
-
Start the JBoss EAP managed domain as described above.
-
Open a new terminal, navigate to the root directory of this quickstart, and run the
undeploy-domain.cli
script, replacingEAP_HOME
with the path to your server:$ EAP_HOME/bin/jboss-cli.sh --connect --file==undeploy-domain.cli
|
Note
|
For Windows, use the EAP_HOME\bin\jboss-cli.bat script.
|
Undeploy the quickstart in a Standalone Server
-
Start the JBoss EAP server with the standalone full HA profile as described above.
-
Open a terminal, navigate to the root directory of this quickstart, and run the
undeploy-standalone.cli
script, replacingEAP_HOME_1
andEAP_HOME_2
with the path to the appropriate server:$ EAP_HOME_1/bin/jboss-cli.sh --connect --file==undeploy-standalone.cli $ EAP_HOME_2/bin/jboss-cli.sh --connect controller=localhost:10090 --file==undeploy-standalone.cli
|
Note
|
For Windows, use the EAP_HOME_1\bin\jboss-cli.bat and EAP_HOME_2\bin\jboss-cli.bat scripts.
|
Restore the Server Configuration
Restore the Domain Server Configuration
You can Restore the domain configuration by manually restoring the backup configuration files or by running the management CLI script.
Restore the Domain Server Configuration Manually
|
Important
|
This method ensures the server is restored to its prior configuration. |
-
If it is running, stop the JBoss EAP server.
-
Restore the
EAP_HOME/domain/configuration/domain.xml
andEAP_HOME/domain/configuration/host.xml
files with the back-up copies of the files. Make sure you replaceEAP_HOME
with the path to your server.
Restore the Domain Server Configuration by Running the Management CLI Script
|
Important
|
This script returns the server to a default configuration and the result might not match the server configuration prior to testing this quickstart. If you were not running with the default configuration before testing this quickstart, you should follow the intructions above to manually restore the configuration to its previous state. |
-
Start the JBoss EAP managed domain as described above.
-
Open a new terminal, navigate to the root directory of this quickstart, and run the
remove-domain.cli
script, replacingEAP_HOME
with the path to your server.$ EAP_HOME/bin/jboss-cli.sh --connect --file=remove-domain.cli
NoteFor Windows, use the EAP_HOME\bin\jboss-cli.bat
script.This script removes the server configuration that was done by the
install-domain.cli
script. You should see the following result following the script commands:The batch executed successfully
Restore the Standalone Server Configuration
You can Restore the domain configuration by manually restoring the back-up copies the configuration files or by running the management CLI script.
Restore the Standalone Server Configuration Manually
|
Important
|
This method ensures the server is restored to its prior configuration. |
-
If they are running, stop both JBoss EAP servers.
-
Restore the
EAP_HOME_1/standalone/configuration/standalone-full-ha.xml
file with the back-up copies of the file. Make sure you replaceEAP_HOME_1
with the path to your server.
Restore the Standalone Configuration by Running the Management CLI Script
|
Important
|
This script returns the server to the default configuration, which might not match the server configuration that existed prior to testing this quickstart. If you were not running with the default configuration before testing this quickstart, you should follow the intructions above to manually restore the standalone configuration to its previous state. |
-
Start the JBoss EAP server by typing the following, replacing
EAP_HOME_1
with the path to your first server:$ EAP_HOME_1/bin/standalone.sh -c standalone-full-ha.xml
NoteFor Windows, use the EAP_HOME_1\bin\standalone.bat
script. -
Open a new terminal, navigate to the root directory of this quickstart, and run the
remove-standalone.cli
script, replacingEAP_HOME_1
with the path to your first server.$ EAP_HOME_1/bin/jboss-cli.sh --connect --file=remove-standalone.cli
NoteFor Windows, use the EAP_HOME_1\bin\jboss-cli.bat
script.This script removes the server configuration that was done by the install-standalone.cli script. You should see the following result following the script commands:
The batch executed successfully
Delete the Cloned Standalone JBoss EAP Directory
-
If it is running, stop the second instance of the JBoss EAP server.
-
Delete the cloned directory.
Run the Quickstart in Red Hat CodeReady Studio or Eclipse
This quickstart is not supported in Red Hat CodeReady Studio.
JBoss EAP for OpenShift Incompatibility
This quickstart is not compatible with JBoss EAP for OpenShift or JBoss EAP for OpenShift Online templates.


{% extends "generic.html" %} {% block header %} {{ entry.title }} {% endblock %} {% load static %} {% if error_message %}
{{ error_message }}
{% endif %} {% block content %}This entry describes compiling and running an Android project using command line.
Make sure an emulator has been created using Android Studio or Qt and find it in its directory.
ls ~/.android/avd/
Pixel2.avd Pixel2.ini
~/Android/Sdk/emulator/emulator -avd Pixel2
Select File->New File or Project
Set the project name 'hello' as 'qmake' project. Then set kit to Android kit.
Verify the project was created.
ANDROID_NDK_ROOT=/home/<username>/Android/Sdk/ndk/21.0.6113669 /home/<username>/Qt/5.14.1/android/bin/qmake hello.pro
make
make apk
/home/<username>/Android/Sdk/platform-tools/adb install android-build/build/outputs/apk/debug/android-build-debug.apk
For my installation I need to change 'android-hello-deployment-settings.json'.
"sdk": "/home/<username>/Android/Sdk",
Verify the app has been installed and runs.
{% endblock %}


{% comment %} A modal dialog for creating a new post. Usage ===== {% include new_post_modal.html %} You also need to include, somewhere in your page, the link for opening the modal: {% include new_post_link.html %} {% endcomment %} {% assign modal_id = "new_post_modal" %} {% assign link_id = "new_post_link" %} {% assign close_id = "new_post_close" %}


Bacon Ipsum
Hard to read; no focal point on text or in image.
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Much easier to read; requires CSS filters.


Validation rules
ValJS is all about validation rules - they are the core engine of how ValJS works.
ValJS comes with a set of built in rules, but you also have the ability to create your own rules.
for (var i=0; i < 10; i++) { console.warn("meh"); }
ValJS is all about validation rules - they are the core engine of how ValJS works.
ValJS comes with a set of built in rules, but you also have the ability to create your own rules.
for (var i=0; i < 10; i++) { console.warn("meh"); }


Hello
This is a modest beginning to a lofty goal: collecting all the seminal texts in the history of the web in an organized, readable format.
Here's the first.
This is a modest beginning to a lofty goal: collecting all the seminal texts in the history of the web in an organized, readable format.
Here's the first.


Connect Docker with Pycharm
1. Install and run Docker
Basic requirement is we must have docker installed and running as well as Pycharm installed.
For more information see
Docker documentation.
2. Ensure you have a stable internet connection.
To operate with Docker you need the busybox image be available on your machine. Ensure that you have a stable
Internet connection, so that PyCharm can download and run busybox:latest. Once you have successfully configured
Docker, you can go offline.
3. Docker settings for TCP
If you are using Docker for Windows, enable connection to Docker via the TCP protocol: Right-click the Docker
icon Docker icon on the Notification bar on the Notification bar, select Settings from the context menu, and
then select the Expose daemon on tcp://localhost:2375 without TLS checkbox in the General section of your system
Docker settings.
4. Configure the Docker daemon connection settings
- In the Settings/Preferences dialog Ctrl+Alt+S, select Build, Execution, Deployment |
Docker
- Click The Add button to add a Docker configuration and specify how to connect to the Docker daemon.
The connection settings depend on your Docker version and operating system. For more information, see
Docker configuration.
The Connection successful message should appear at the bottom of the dialog.
5. Connect to Docker daemon
The configured Docker connection should appear in the Services tool window (View | Tool Windows | Services or
Alt+8). Select the Docker node Docker node, and click The Connect button, or select Connect from the context
menu.
The Services tool window (View | Tool Windows | Services or Alt+8) enables you to pull and push images, create
and run containers, manage Docker Compose, and so on. As with other tool windows, you can start typing the name
of an image or container to highlight the matching items.


texconfig-dialog - helper program for texconfig and texconfig-sys
texconfig-dialog is a helper program for texconfig and texconfig-sys, see the respective man pages for details.
Thomas Esser <te@dbs.uni-hannover.de>


Tea Time
Contract
Expand
Color
Tea is so great... I could drink it all the time :)
First Name:
* Must be at least 6 characters
Last Name:
* Must be at least 6 characters
Age:
* Not a Number >= 0


2 Kings 11:17
And Jehoiada made a covenant between the LORD and the king and the people, that they should be the LORD's people; between the king also and the people.


DESPERATE REMEDIES A film review by James Berardinelli Copyright 1994 James Berardinelli
Rating (Linear 0 to 10): 5.0
Date Released: 7/1/94 Running Length: 1:33 Rated: R (Nudity, sexual situations, violence)
Starring: Jennifer Ward-Lealand, Kevin Smith, Lisa Chappell, Cliff Curtis, Michael Hurst Directors: Stewart Main and Peter Wells Producer: James Wallace Screenplay: Stewart Main and Peter Wells Cinematography: Leon Narby Music: Peter Scholes Released by Miramax Films
About thirty minutes into DESPERATE REMEDIES, I finally asked myself the question: "What am I watching?" Defying categorization, this movie is just plain weird, and unlike anything else currently playing in theaters. DESPERATE REMEDIES is a grand melodrama that's completely aware of its over-the-top tendencies (in fact, it revels in them). The production is pervaded by an ongoing sense of surrealism, and seems unconcerned about whether anyone believes what's going on or not.
For the record, there is a story, and it's a fairly delightful blend of double-dealing and backstabbing. One wonders what this might have been like had it been filmed straight, without the production elements interfering with the general enjoyment of the movie. The closest thing I can come up with is DANGEROUS LIAISONS.
Fresh off a boat on the coast of a 19th Century arm of the British empire, Lawrence Hayes (Kevin Smith) finds his services requested by the cool-but-beautiful Dorothea Brook (Jennifer Ward-Lealand). Dorothea needs someone to marry her sister Rose to keep the girl away from her opium-supplying boyfriend Fraser (Cliff Curtis). In return for Lawrence's agreement to become Rose's husband, Dorothea is willing to grant him title to a substantial piece of property. The deal is sealed, but Lawrence has ulterior motives--he wants Dorothea, and intends to take any opportunity to get close to her. However, while Dorothea is as attracted to Lawrence as he is to her, she will not give up her lover Anne (Lisa Chappell), and is engaged to marry the local bigwig politician William Poyser (Michael Hurst). How all these various relationships get untangled, then re-tangled again, is the subject of DESPERATE REMEDIES.
Essentially, this is an arty Harlequin Romance--with the twist that it never takes itself seriously. Or, rather, it takes itself so seriously that it's plain that the directors are having fun with the material. Unfortunately, their amusement comes at the audience's expense. DESPERATE REMEDIES is not a particularly engaging motion picture. With its vividly-colorful settings and operatic score, this movie has difficulty curbing its excesses, and this overblown, self- conscious approach distances the audience.
That's not to say that there aren't some clever moments. Particularly memorable are instances where a comment about removing Fraser is accompanied by scissors snipping a thread, and where time running out is emphasized by the ticking of a watch. In general, however, all the perks in DESPERATE REMEDIES are visual or gimmicky in nature. When it comes to the story, this movie is more than a little flat.
- James Berardinelli<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Issue: COMPLEX-RATIONAL-RESULT
References: CLtL p.203
Category: CLARIFICATION
Edit history: Version 1, 20-Mar-89, by Moon
Version 2, 08-Apr-89, by Steele
Version 3, 28-Apr-89, by Steele
Problem description:
Referring to irrational and transcendental functions, CLtL says:
When the arguments to a function in this section are all rational and
the true mathematical result is also (mathematically) rational, then
unless otherwise noted an implementation is free to return either an
accurate result of type rational or a single-precision floating-point
approximation. If the arguments are all rational but the result cannot
be expressed as a rational number, then a single-precision
floating-point approximation is always returned.
Referring to EXPT, CLtL says:
If the base-number is of type RATIONAL and the power-number is an
INTEGER, the calculation will be exact and the result will be of
type RATIONAL; otherwise a floating-point approximation may result.
What about arguments of type (complex rational)?
Proposal (COMPLEX-RATIONAL-RESULT:EXTEND):
Extend the paragraph quoted above as follows to cover the components
of complex numbers. If the arguments to a function are all of type
(OR RATIONAL (COMPLEX RATIONAL)) and the true mathematical result is
(mathematically) a complex number with rational real and imaginary
parts, then unless otherwise noted an implementation is free to return
either an accurate result of type (OR RATIONAL (COMPLEX RATIONAL)) or
a single-precision floating-point approximation of type SINGLE-FLOAT
(permissible only if the imaginary part of the true mathematical
result is zero) or (COMPLEX SINGLE-FLOAT). If the arguments are
all of type (OR RATIONAL (COMPLEX RATIONAL)) but the result cannot be
expressed as a rational or complex rational number, then the returned
value will be of type SINGLE-FLOAT (permissible only if the imaginary
part of the true mathematical result is zero) or (COMPLEX SINGLE-FLOAT).
For EXPT of a (COMPLEX RATIONAL) to an integer power, the
calculation must be exact and the result will be of type
(OR RATIONAL (COMPLEX RATIONAL)).
Examples:
[a] (log #c(-16 16) #c(2 2)) => 3 or approximately #c(3.0 0.0)
or approximately 3.0 (unlikely)
[b] (abs #c(3/5 4/5)) => 1 or approximately 1.0
[c] (expt #c(2 2) 3) => #c(-16 16)
[d] (expt #c(2 2) 4) => -64
Rationale:
This seems most consistent with the treatment of real numbers.
Current practice:
[a] [b] [c] [d]
Symbolics Genera 7.4 #c(3.00... 1.40...e-7) 1 #c(-16 16) -64
Sun Common Lisp 3.0.1 #c(3.0 2.61...e-16) 1.0 #c(-16 16) -64
KCL of 9/16/86 on VAX #c(3.0s0 -1.40...s-7) 1.0s0 #c(-16 16) -64
Allegro CL (Mac II) #c(3.0 2.05...e-16) 1.0 #c(-16 16) -64
Cost to Implementors:
Only EXPT would have to change, since the type of the other results
is at the discretion of the implementation.
Cost to Users:
Probably none, but it is hard to predict.
Cost of non-adoption:
Slightly less self-consistent language.
Performance impact:
None of any significance.
Benefits/Esthetics:
More self-consistent language.
Discussion:
None.


Salmon Cookie Cutter
Make your own salmon-shaped cookies at home!
$9.95 each
Make your own salmon-shaped cookies at home!
$9.95 each
Men's and Women's styles available
S-M-L-XL: $19.95; 2XL-3XL: $24.95


Female
•
21
•
United States of America
Edit profile
Message
pts
Intermediate
pts
Karma
Summary
4 Weeks
1 Year
Lifetime
HIKES
Km
RAN
m
ELEVATION
HIKES
Km
RAN
m
ELEVATION
HIKES
Km
RAN
m
ELEVATION
Sac scale distribution
Hikes
Upcoming
Recent
Past
Routes created
Reviews


Hi,
Running emoncms 8.4.0. I recently installed the events module. I have a feed that is either 0 or 1. In the case this feed is 0 I want to set another feed to 0 (i.e. reset a kwd feed to 0).
So I have an event like so:
if feed1 == 0 set feed2 to 0
It works perfectly if I use the test button on the events page but it doesn't work by itself.
Any ideas?
Re: Events module test works but not automatically
Anything anyone? I can't find anyone with the same problem elsewhere in the forum. Thanks.
Re: Events module test works but not automatically
Same here, have no clue what is wrong. But Last True shows always: Last true: 1970-1-1 01:00:00
So probably here is something wrong. I'm using emoncms 8.5.2
Re: Events module test works but not automatically
Have you both used the "update & check" in admin ?
Paul
Re: Events module test works but not automatically
Yes have tried "update & check" several times - always telling me the database is up to date and nothing to do.
As I say it all works fine from the test button. I have tried setting the timing to various settings from mute, 5seconds, 1hour etc. - always no difference.
Also on Events page the True or False flag is set correctly depending on the monitored feed. It just doesn't work automatically.


The Process
Gallery
Contact me
Home Page
This is my first wireframe idea. I like the design however its design is too complicated for me to do.
This is my second wireframe idea.I think that this design is a bit more practical than the first.


Core Topics
Advanced Topics
Misc
Components
Widgetization
Components are Mithril's mechanism for hierarchical MVC.
In Mithril, modules are components. In scenarios where components don't need to cross-communicate a lot (for example, a dashboard full of unrelated widgets), it's often convenient to use fat controllers (i.e. controllers that hold state and methods).
Here's an example of a hierarchy of such components:
//root module
var dashboard = {};
dashboard.controller = function() {
this.userProfile = new userProfile.controller();
this.projectList = new projectList.controller();
}
dashboard.view = function(ctrl) {
return [
userProfile.view(ctrl.userProfile)
projectList.view(ctrl.projectList)
]
}
In the snippet above, there are three modules: dashboard
, userProfile
and projectList
. Each of the sub-components can reasonably be rendered as a standalone page, but here we see how we can put them together to create a bigger page.
An important point to note is that if you have fat controllers, you should never instantiate a controller class from a view (or call a function that does it). Views are re-rendered as a result of events firing, and can clobber state from sub-component controllers.
Divide and conquer
Another common reason why people need components is that some pages are inherently large and complex, and need to be sub-divided into smaller pieces in order to help keep code maintainable.
In these cases, components often need to communicate with one another frequently and in often unexpected ways. Because of the requirement of interconnectedness, the pattern of using fat controllers is not a good fit.
Instead, the best way to organize these types of components is to move code out of controllers into view-models.
A view-model can be thought of a special type of model entities. You are probably familiar with the idea of model entities being ORM classes to map to database tables, but in reality, the model layer is an abstract area where you should be putting everything related to data and the business logic surround it.
View-models are, by definition, entities that hold data about the state of the application. For example, which tab is open, which filters are applied to a grid, the temporary value of a resettable input, etc. This type of data typically doesn't fit in the ORM schema because it relates to the UI, and not the canonical data.
Refactoring a fat controller into using view-models allow better accessibility of data and provides a scalable structure for organizing and scoping non-ORM state.
Here's an example that illustrates how we can migrate from a fat-controller-based codebase to thin controllers. Suppose we have a module that displays a list of users:
var userList = {}
userList.controller = function() {
this.users = m.request({method: "GET", url: "/users"})
}
userList.view = function(ctrl) {
return ctrl.users().map(function(user) {
return user.name
})
}
Here you can see that the controller holds the state for the list of users. The problem with this is that with a large hierarchy of components, it becomes cumbersome to find this particular controller instance from any given view, and therefore it's difficult to access its data and call methods on it.
var userList = {}
userList.controller = function() {
userList.vm.init()
}
userList.vm = {}
userList.vm.init = function() {
this.users = m.request({method: "GET", url: "/users"})
}
userList.view = function() {
return userList.vm.users().map(function(user) {
return user.name
})
}
This pattern allows us to access the data for the userList module from anywhere in the application, as long as the view model has been initialized. Notice that refactoring from the fat controller is easy: we simply moved the controller function body into the init
function of the view model, and changed the reference to the controller in the view.
It's then possible to extend this pattern to create view-model dependency trees:
userList.controller = function() {
//here we specify that this component will require with a `search` view-model
userList.vm.init()
search.vm.init()
}
With that, we have a guarantee that all data and all methods from the required view-models will be available from anywhere within this component, even if it has multiple sub-views and view-models.
You might have noticed that we're simply sub-dividing a component into smaller pieces and not providing controllers for each of these pieces. You should be aware that these pieces aren't Mithril modules (because they don't contain both a view
function AND a controller
function), and therefore they are not components.

If we decide that a unit of functionality is indeed a reusable component, we can simply add a controller to it so that it follows the module interface.
//assuming we already have a view in `search`, adding a controller lets us use `search` as an independent component
search.controller = function() {
search.vm.init()
}
userList.controller = function() {
userList.vm.init()
//the controller encapsulates the scope that it is responsible for
new search.controller()
}
It's strongly recommended that you consider adopting the pattern of using thin controllers and view models. Moving logic out of fat controllers into the model layer brings your code structure closer to the original MVC pattern (where controllers merely exist to tell the views what actions are possible within a given context), and can dramatically reduce the complexity of cross-communicating modules in the long run.
Scoping to namespaces
Sometimes you might find that organizing code into various namespaces results in repetitive declarations of the namespace.
//repetitive namespace declarations
myApp.users.index.controller = function() {/*...*/}
myApp.users.index.vm = {/*...*/}
myApp.users.index.view = function() {
return myApp.users.index.vm.something
}
There's no rule for how you should organize code, and given that namespacing is often achieved with simple javascript, you can use simple javascript patterns to alias a long namespace and reduce the amount of typing:
new function() {
var module = myApp.users.index = {}
module.vm = {/*...*/}
module.controller = function() {/*...*/}
module.view = function() {
var vm = module.vm
return vm.something
}
}
Librarization
Applications often require reusable UI controls that aren't provided out of the box by HTML. Let's walk through how one might implement one. In this example, we'll create a very simple autocompleter control.
We can start building it as an singleton module as we did with our components in the previous section. Here's how an implementation might look like:
var autocompleter = {}
autocompleter.vm = {
term: m.prop(""),
filter: function(item) {
return autocompleter.vm.term() && item.name.toLowerCase().indexOf(autocompleter.vm.term().toLowerCase()) > -1
}
}
autocompleter.view = function(ctrl) {
var vm = autocompleter.vm
return [
m("div", [
m("input", {oninput: m.withAttr("value", vm.term), value: vm.term})
]),
ctrl.data().filter(vm.filter).map(function(item) {
return m("div", {onclick: ctrl.binds.bind(this, item)}, item.name);
})
];
}
As with our earlier examples, we put logic and UI state in a view model entity, and use it from our view. The <input>
updates the term
getter-setter via a binding, and the filter
function takes care of slicing the data set to display only relevant matches as a user types.
The problem with this component, as it stands, is that the module and its view-model are singletons, so the component can only be used once in a page. Fortunately this is easy to fix: we can simply put the whole thing in a factory function.
var autocompleter = function() {
var autocompleter = {}
autocompleter.vm = {
term: m.prop(""),
search: function(value) {
autocompleter.vm.term(value.toLowerCase())
},
filter: function(item) {
return autocompleter.vm.term() && item.name.toLowerCase().indexOf(autocompleter.vm.term()) > -1
}
}
autocompleter.view = function(ctrl) {
return [
m("div", [
m("input", {oninput: m.withAttr("value", autocompleter.vm.search)})
]),
ctrl.data().filter(autocompleter.vm.filter).map(function(item) {
return m("div", {onclick: ctrl.binds.bind(this, item)}, item.name);
})
];
}
return autocompleter
}
As you can see, the code is exactly the same as before, with the exception that it is wrapped in a function that returns the module. This allows us to easily create copies of the autocompleter:
//here's an example of using the autocompleter
var dashboard = {}
dashboard.controller = function() {
dashboard.vm.init()
}
dashboard.vm = {}
dashboard.vm.init = function() {
this.users = m.prop([{id: 1, name: "John"}, {id: 2, name: "Bob"}, {id: 2, name: "Mary"}]);
this.selectedUser = m.prop()
this.userAC = new autocompleter()
this.projects = m.prop([{id: 1, name: "John's project"}, {id: 2, name: "Bob's project"}, {id: 2, name: "Mary's project"}]);
this.selectedProject = m.prop()
this.projectAC = new autocompleter()
};
dashboard.view = function() {
var vm = dashboard.vm
return m("div", [
vm.userAC.view({data: vm.users, binds: vm.selectedUser}),
vm.projectAC.view({data: vm.projects, binds: vm.selectedProject}),
]);
};
//initialize
m.module(document.body, dashboard);
In the usage example above, we created a dashboard
top-level module, and instantiated two autocompleter
modules, along with some data to populate the autocompleter, and getter-setters to bind data to.


a Blue bubble is a comment to April Fool's posts.
a Red bubble is an April Fool's posts in r/dataisbeautiful.
The area of a buble is proportional to its "score", i.e upvotes - downvotes
Data source: The data I used was obtained by charlesjlee using a python api wrapper called PRAW.


We provide you with fast and free delivery regardless of the product size and value. Your order will be delivered in time for free.
We offer 100% money-back guarantee within 60days of payment. If you are not satisfied with the final product, you may return your purchase.
We are committed to increase the safety and security of your payments. Helping you shop more safely and take control over your money.
01 / 10 / 2015
Here at Watches, we love the big brands and some of the beautiful watches they produce year after year, but we also pride ourselves on bringing quality and affordable watches to the masses.
01 / 10 / 2015
Watches and sailboats; seems like the perfect match doesn't it? Expensive, high-end timepieces are often associated with luxury and wealth, much like owning a yacht.


Park Rules & Guidelines
This is not a puzzle.
We hope you have a wonderful time in Penny Park this weekend! In order to ensure maximum enjoyment for all you brilliant puzzlers in attendance, we want to make sure that you are familiar with our Park Rules and Guidelines.
Generating Buzz
We’re looking forward to you visiting all the attractions in the park. Every time you successfully experience an attraction, you’ll generate a small amount of Buzz about this place. The more Buzz you create, the more we’ll be able to open up new areas of the park for you to explore. And… if you’re able to generate enough Buzz, we just might not have to close the park.
Solving Attractions
We hear you’re experts in dealing with puzzles. Fantastic! When you think you have an answer for a puzzle, click on the SUBMIT button at the top of your screen. This will pull down an area where you’ll be able to enter your answer. Once you submit, Penny Park will automatically check to see if the answer is correct and let you know instantly. You won’t receive a phone call confirming an answer.
Submit Queue and Rate Limiting
This new ease of checking answers invites an obvious question — should you pepper an attraction with dozens of faintly plausible answers just on the off-chance they’re right? We’d prefer that you don’t. We’re excited to offer the convenience of instantaneous answer checking, but this depends on park guests not abusing it. We expect both forward and backsolving, and that’s fine, but we kindly ask you to submit answers only when you have some confidence in them. In addition, Penny Park has guardrails to discourage wild guessing. If you submit many answers rapidly for a given attraction, the park may queue up and delay checking those guesses. If that happens, you can remove queued answers, but the delay will remain. (If you feel you've been incorrectly or egregiously delayed, please contact<EMAIL_ADDRESS>PennyPasses
How often have you spent time at a park waiting for hours just to see something new and exciting? That’s why we’re proud to offer our guests PennyPasses, which are convenient ways to get immediate access to a NEW attraction in the land of your choice. Passes will be awarded for attending our exciting Events, while others may be awarded over time as a way of making sure that there’s always something fun to see or do!
You will receive a notification when you’ve acquired a pass. To redeem one, go to Guest Services and select for which land you’d like to see a new puzz… oh, we mean, attraction!
Note: PennyPasses expire after a certain amount of time, so don’t forget to use them!!
Hints
We know how frustrating it can be to visit an attraction and not even know what’s going on. Do I stand up or lie down on this ride? How can I eat that corn dog without getting sick? Why does this roller coaster look like a Sudoku?
At times in the hunt, you might get a notification that hints are available for a certain puzzle. To take a hint, {% if park_open %}{% end %}visit Guest Services{% if park_open %}{% end %} and click on the appropriate puzzle. Fill out the form, telling us what you’ve tried (e.g. “I jumped off the ferris wheel. Was that correct?”) and one of our Guest Services staff will respond shortly.
Our goal with hints is to provide assistance to visitors who might acutely benefit from a few well-placed bits of advice on how to experience our attractions. As such, taking a hint when they are available comes at no cost; if you’re offered a hint on an attraction, we suggest you accept this offer! In addition, after taking a hint on an attraction, you can continue to follow up with Guest Services for more details on that same attraction.
Finally, know that not everyone will be offered hints. In particular, we expect the most competitive park-goers will see (and need!) none at all.
Technology
Our attractions have been tested the most with Chrome, and we recommend Chrome on a typical laptop-sized (or larger) display for the best experience.
Park hours
Guest services and the Park will shut down at 5pm ET Sunday or when someone saves the Park, whichever is later.
The Golden Rule
At Penny Park, we operate under the principle of “Play fair. Have fun.” Please refrain from sharing answers with other teams, hacking the park server or the code of a particular puzzle, or anything else which feels beyond the spirit of the event.
Thanks for visiting Penny Park! We hope you have a glorious weekend!
— Penny, the Loonie Toonies, and the rest of us at Penny Park Guest Services


'This undervalues the competition' - Tipperary SFC final remains fixed for Saturday
The Tipperary SFC final remains fixed for this Saturday afternoon, despite the possibility of a Sunday throw-in being explored in recent days.
Clonmel Commercials and JK Brackens will contest the Tipperary football decider this Saturday (Semple Stadium, 2.30pm), the Templemore club less than pleased with the decision to take the final out of its traditional Sunday slot.
The Saturday throw-in also means a quick six-day turnaround for the JK Brackens players involved in last Sunday’s county SHC B final win.
In the initial masterplan drawn up by local fixture makers, the final was due to be played last Sunday.
The county’s involvement in the All-Ireland senior and U20 hurling finals, however, saw Tipperary’s county championship schedule, in both codes, pushed back a week.
That created a difficulty in that Tipperary hurling champions Borris-Ileigh entertain Cork’s Glen Rovers in the Munster club semi-final at Semple Stadium this Sunday.
A potential Thurles double-header this Sunday was decided against.
JK Brackens chairman Éamon Corcoran believes the county football final has been undervalued by being fixed for Saturday, rather than Sunday.
“I took a number of calls from businesses in the town [of Templemore] when the fixture came out.
“We have a number of players whose parents have businesses in the town, be they hairdressers, butchers, and publicans. They’ll get to the game but they shouldn’t have to make a decision,” Corcoran told Tipp Mid West Radio.
I personally think this undervalues the competition. If you had it on a Sunday, irrespective of where you had it, I think you could bring a bigger crowd.


{% extends "base_generic.html" %} {% block content %}
Welcome to Tech Blog, a website developed by Kgalabi Mongatane!
The Blog has the following record counts:


pca_lookup_file pca_lookup_file
NAME
pca_lookup_file, del_PathCache, del_PcaPathConf, new_PathCache,
new_PcaPathConf, pca_last_error, pca_path_completions, pca_scan_path,
pca_set_check_fn, ppc_file_start, ppc_literal_escapes - lookup a file
in a list of directories
SYNOPSIS
#include <libtecla.h>
PathCache *new_PathCache(void);
PathCache *del_PathCache(PathCache *pc);
int pca_scan_path(PathCache *pc, const char *path);
void pca_set_check_fn(PathCache *pc, CplCheckFn *check_fn,
void *data);
char *pca_lookup_file(PathCache *pc, const char *name,
int name_len, int literal);
const char *pca_last_error(PathCache *pc);
CPL_MATCH_FN(pca_path_completions);
DESCRIPTION
The PathCache object is part of the tecla library (see the libte-
cla(@LIBR_MANEXT@) man page).
PathCache objects allow an application to search for files in any colon
separated list of directories, such as the unix execution PATH environ-
ment variable. Files in absolute directories are cached in a PathCache
object, whereas relative directories are scanned as needed. Using a
PathCache object, you can look up the full pathname of a simple file-
name, or you can obtain a list of the possible completions of a given
filename prefix. By default all files in the list of directories are
targets for lookup and completion, but a versatile mechanism is pro-
vided for only selecting specific types of files. The obvious applica-
tion of this facility is to provide Tab-completion and lookup of exe-
cutable commands in the unix PATH, so an optional callback which
rejects all but executable files, is provided.
AN EXAMPLE
Under UNIX, the following example program looks up and displays the
full pathnames of each of the command names on the command line.
#include <stdio.h>
#include <stdlib.h>
#include <libtecla.h>
int main(int argc, char *argv[])
{
int i;
/*
* Create a cache for executable files.
*/
PathCache *pc = new_PathCache();
if(!pc)
exit(1);
/*
* Scan the user's PATH for executables.
*/
if(pca_scan_path(pc, getenv("PATH"))) {
fprintf(stderr, "%s\n", pca_last_error(pc));
exit(1);
}
/*
* Arrange to only report executable files.
*/
pca_set_check_fn(pc, cpl_check_exe, NULL);
/*
* Lookup and display the full pathname of each of the
* commands listed on the command line.
*/
for(i=1; i<argc; i++) {
char *cmd = pca_lookup_file(pc, argv[i], -1, 0);
printf("The full pathname of '%s' is %s\n", argv[i],
cmd ? cmd : "unknown");
}
pc = del_PathCache(pc); /* Clean up */
return 0;
}
The following is an example of what this does on my laptop under linux:
$ ./example less more blob
The full pathname of 'less' is /usr/bin/less
The full pathname of 'more' is /bin/more
The full pathname of 'blob' is unknown
$
FUNCTION DESCRIPTIONS
In order to use the facilities of this module, you must first allocate
a PathCache object by calling the new_PathCache() constructor function.
PathCache *new_PathCache(void)
This function creates the resources needed to cache and lookup files in
a list of directories. It returns NULL on error.
POPULATING THE CACHE
Once you have created a cache, it needs to be populated with files. To
do this, call the pca_scan_path() function.
int pca_scan_path(PathCache *pc, const char *path);
Whenever this function is called, it discards the current contents of
the cache, then scans the list of directories specified in its path
argument for files. The path argument must be a string containing a
colon-separated list of directories, such as
"/usr/bin:/home/mcs/bin:.". This can include directories specified by
absolute pathnames such as "/usr/bin", as well as sub-directories spec-
ified by relative pathnames such as "." or "bin". Files in the absolute
directories are immediately cached in the specified PathCache object,
whereas sub-directories, whose identities obviously change whenever the
current working directory is changed, are marked to be scanned on the
fly whenever a file is looked up.
On success this function return 0. On error it returns 1, and a
description of the error can be obtained by calling pca_last_error(pc).
LOOKING UP FILES
Once the cache has been populated with files, you can look up the full
pathname of a file, simply by specifying its filename to
pca_lookup_file().
char *pca_lookup_file(PathCache *pc, const char *name,
int name_len, int literal);
To make it possible to pass this function a filename which is actually
part of a longer string, the name_len argument can be used to specify
the length of the filename at the start of the name[] argument. If you
pass -1 for this length, the length of the string will be determined
with strlen(). If the name[] string might contain backslashes that
escape the special meanings of spaces and tabs within the filename,
give the literal argument, the value 0. Otherwise, if backslashes
should be treated as normal characters, pass 1 for the value of the
literal argument.
FILENAME COMPLETION
Looking up the potential completions of a filename-prefix in the file-
name cache, is achieved by passing the provided pca_path_completions()
callback function to the cpl_complete_word() function (see the cpl_com-
plete_word(@FUNC_MANEXT@) man page).
CPL_MATCH_FN(pca_path_completions);
This callback requires that its data argument be a pointer to a PcaP-
athConf object. Configuration objects of this type are allocated by
calling new_PcaPathConf().
PcaPathConf *new_PcaPathConf(PathCache *pc);
This function returns an object initialized with default configuration
parameters, which determine how the cpl_path_completions() callback
function behaves. The functions which allow you to individually change
these parameters are discussed below.
By default, the pca_path_completions() callback function searches back-
wards for the start of the filename being completed, looking for the
first un-escaped space or the start of the input line. If you wish to
specify a different location, call ppc_file_start() with the index at
which the filename starts in the input line. Passing start_index=-1 re-
enables the default behavior.
void ppc_file_start(PcaPathConf *ppc, int start_index);
By default, when pca_path_completions() looks at a filename in the
input line, each lone backslash in the input line is interpreted as
being a special character which removes any special significance of the
character which follows it, such as a space which should be taken as
part of the filename rather than delimiting the start of the filename.
These backslashes are thus ignored while looking for completions, and
subsequently added before spaces, tabs and literal backslashes in the
list of completions. To have unescaped backslashes treated as normal
characters, call ppc_literal_escapes() with a non-zero value in its
literal argument.
void ppc_literal_escapes(PcaPathConf *ppc, int literal);
When you have finished with a PcaPathConf variable, you can pass it to
the del_PcaPathConf() destructor function to reclaim its memory.
PcaPathConf *del_PcaPathConf(PcaPathConf *ppc);
BEING SELECTIVE
If you are only interested in certain types or files, such as, for
example, executable files, or files whose names end in a particular
suffix, you can arrange for the file completion and lookup functions to
be selective in the filenames that they return. This is done by regis-
tering a callback function with your PathCache object. Thereafter,
whenever a filename is found which either matches a filename being
looked up, or matches a prefix which is being completed, your callback
function will be called with the full pathname of the file, plus any
application-specific data that you provide, and if the callback returns
1 the filename will be reported as a match, and if it returns 0, it
will be ignored. Suitable callback functions and their prototypes
should be declared with the following macro. The CplCheckFn typedef is
also provided in case you wish to declare pointers to such functions.
#define CPL_CHECK_FN(fn) int (fn)(void *data, \
const char *pathname)
typedef CPL_CHECK_FN(CplCheckFn);
Registering one of these functions involves calling the
pca_set_check_fn() function. In addition to the callback function,
passed via the check_fn argument, you can pass a pointer to anything
via the data argument. This pointer will be passed on to your callback
function, via its own data argument, whenever it is called, so this
provides a way to pass appplication specific data to your callback.
void pca_set_check_fn(PathCache *pc, CplCheckFn *check_fn,
void *data);
Note that these callbacks are passed the full pathname of each matching
file, so the decision about whether a file is of interest can be based
on any property of the file, not just its filename. As an example, the
provided cpl_check_exe() callback function looks at the executable per-
missions of the file and the permissions of its parent directories, and
only returns 1 if the user has execute permission to the file. This
callback function can thus be used to lookup or complete command names
found in the directories listed in the user's PATH environment vari-
able. The example program given earlier in this man page provides a
demonstration of this.
Beware that if somebody tries to complete an empty string, your call-
back will get called once for every file in the cache, which could num-
ber in the thousands. If your callback does anything time consuming,
this could result in an unacceptable delay for the user, so callbacks
should be kept short.
To improve performance, whenever one of these callbacks is called, the
choice that it makes is cached, and the next time the corresponding
file is looked up, instead of calling the callback again, the cached
record of whether it was accepted or rejected is used. Thus if somebody
tries to complete an empty string, and hits tab a second time when
nothing appears to happen, there will only be one long delay, since the
second pass will operate entirely from the cached dispositions of the
files. These cached dipositions are discarded whenever pca_scan_path()
is called, and whenever pca_set_check_fn() is called with changed call-
back function or data arguments.
ERROR HANDLING
If pca_scan_path() reports that an error occurred by returning 1, you
can obtain a terse description of the error by calling
pca_last_error(pc). This returns an internal string containing an error
message.
const char *pca_last_error(PathCache *pc);
CLEANING UP
Once you have finished using a PathCache object, you can reclaim its
resources by passing it to the del_PathCache() destructor function.
This takes a pointer to one of these objects, and always returns NULL.
PathCache *del_PathCache(PathCache *pc);
THREAD SAFETY
In multi-threaded programs, you should use the libtecla_r.a version of
the library. This uses POSIX reentrant functions where available (hence
the _r suffix), and disables features that rely on non-reentrant system
functions. In the case of this module, the only disabled feature is
username completion in ~username/ expressions, in cpl_path_comple-
tions().
Using the libtecla_r.a version of the library, it is safe to use the
facilities of this module in multiple threads, provided that each
thread uses a separately allocated PathCache object. In other words, if
two threads want to do path searching, they should each call new_Path-
Cache() to allocate their own caches.
FILES
libtecla.a - The tecla library
libtecla.h - The tecla header file.
SEE ALSO
libtecla, gl_get_line, ef_expand_file,
cpl_complete_word
AUTHOR
Martin Shepherd<EMAIL_ADDRESS>pca_lookup_file


AND
.
Care will need to be taken to make sure that any filters used have appropriate indexes on the server side otherwise
the runtime of the endpoint will be very long. Related fields can be searched by specifying the field name as:
"link_name.remote_field", so if you wished to search the Accounts module by a related member account you would
use "members.sic_code".
| Name | Type | Description | Required |
|---|---|---|---|
| filter | String |
The filter expression. Filter expressions are explained below.
Note that JSON-encoded filters can be specified as query parameters
in one of two ways for GET requests:
|
False |
| filter_id | String |
Identifier for a preexisting filter. If filter is also set, the two
filters are joined with an AND .
|
False |
| max_num | Integer | A maximum number of records to return. Default is 20. | False |
| offset | Integer | The number of records to skip over before records are returned. Default is 0. | False |
| fields | String |
Comma delimited list of fields to return. Each field may be represented either by string, or by map
containing field name and additional field parameters (applicable to link and collection fields).
The fields id and date_modified will always be returned.
Example: name,account_type,description,{"name":"opportunities","fields":["id","name","sales_status"],"order_by":"date_closed:desc"}
For more details on additional field parameters, see Relate API and Collection API. |
False |
| view | String |
Instead of defining the fields argument, the view argument can be used instead. The field list is
constructed at the server side based on the view definition which is requested. This argument can be used
in combination with the fields argument. Common views are "record" and "list".
Example: record
|
False |
| order_by | String |
How to sort the returned records, in a comma delimited list with the direction appended to the column name
after a colon.
Example: name:DESC,account_type:DESC,date_modified:ASC
|
False |
| q | String | A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. | False |
| deleted | Boolean | Boolean to show deleted records in the result set. | False |
{ "filter":[ { "name":"Nelson Inc" } ] }
{ "filter":[ { "name":{ "$starts":"Nelson" } } ] }Below is a list of operation types:
| Operation | Description |
|---|---|
| $equals | Performs an exact match on that field. |
| $not_equals | Performs an exact match on that field. |
| $not_equals | Matches on non-matching values. |
| $starts | Matches on anything that starts with the value. |
| $ends | Matches anything that ends with the value. |
| $contains | Matches anything that contains the value |
| $in | Finds anything where field matches one of the values as specified as an array. |
| $not_in | Finds anything where field does not matches any of the values as specified as an array. |
| $is_null | Checks if the field is null. This operation does not need a value specified. |
| $not_null | Checks if the field is not null. This operation does not need a value specified. |
| $lt | Matches when the field is less than the value. |
| $lte | Matches when the field is less than or equal to the value. |
| $gt | Matches when the field is greater than the value. |
| $gte | Matches when the field is greater than or equal to the value. |
{ "filter":[ { "$or":[ { "name":"Nelson Inc" }, { "name":"Nelson LLC" } ] } ] }
{ "filter":[ { "$favorite":"_this" } ] }
| Name | Type | Description |
|---|---|---|
| next_offset | Integer | Displays the next offset for retrieval of additional results. -1 will be returned when there are no more records. |
| records | Array | An array of results containing matched records. |
{ "next_offset": -1, "records": [ { "id": "1", "user_name": "admin", "user_hash": "$2y$10$PXY1UPZHjcm.t6ZArbia0uVzjCNEDm0XcGu/whGGk2xaPzAEKrKLa", "system_generated_password": false, "pwd_last_changed": "", "authenticate_id": "", "sugar_login": true, "picture": "7772d3b4-5779-11e8-835a-6a00025a7f70", "first_name": "", "last_name": "Administrator", "full_name": "Administrator", "name": "Administrator", "is_admin": true, "external_auth_only": false, "receive_notifications": true, "description": "", "date_entered": "2018-05-14T16:19:36+03:00", "date_modified": "2018-05-14T16:27:43+03:00", "last_login": "2018-05-16T12:12:43+03:00", "modified_user_id": "1", "modified_by_name": "", "created_by": "", "created_by_name": "", "created_by_link": { "full_name": "", "id": "", "_acl": { "fields": [], "_hash": "654d337e0e912edaa00dbb0fb3dc3c17" } }, "title": "Administrator", "department": "", "phone_home": "", "phone_mobile": "", "phone_work": "", "phone_other": "", "phone_fax": "", "status": "Active", "address_street": "", "address_city": "", "address_state": "", "address_country": "", "address_postalcode": "", "UserType": "", "default_team": "1", "team_count": "", "team_count_link": { "team_count": "", "id": "", "_acl": { "fields": [], "_hash": "654d337e0e912edaa00dbb0fb3dc3c17" } }, "team_name": [ { "id": "1", "name": "Global", "name_2": "", "primary": false, "selected": false } ], "deleted": false, "portal_only": false, "show_on_employees": true, "employee_status": "Active", "messenger_id": "", "messenger_type": "", "reports_to_id": "", "reports_to_name": "", "reports_to_link": { "name": "", "id": "", "_acl": { "fields": [], "_hash": "654d337e0e912edaa00dbb0fb3dc3c17" } }, "email1": "", "email": [ { "email_address"<EMAIL_ADDRESS>"primary_address": true, "reply_to_address": false, "invalid_email": false, "opt_out": false, "email_address_id": "93634e90-577a-11e8-a2f0-6a00025a7f70" } ], "email_link_type": "", "is_group": false, "c_accept_status_fields": "", "calls": { "id": "" }, "m_accept_status_fields": "", "meetings": { "id": "" }, "accept_status_id": "", "accept_status_name": "", "accept_status_calls": "", "accept_status_meetings": "", "preferred_language": "", "acl_role_set_id": "", "my_favorite": false, "_acl": { "delete": "no", "fields": { "pwd_last_changed": { "write": "no", "create": "no" }, "last_login": { "write": "no", "create": "no" } } }, "_module": "Users" } ] }
| Version | Change |
|---|---|
| v11_2 |
Added /Administration/idm/users GET endpoint.
|


---
layout: post
title: 10 Ideas To Make Money From Programming
category: 10ideas
---
I currently have about $60,000 of debt from student loans. One of the goals when I had when I decided to make the career change to become a programmer was that I would be able to figure out a way to pay off all that debt before I turned 30. It is two months until my 28th birthday so I am running out of time.
The Ideas
- Get a Full Time Development job
- I know this one is obvious but it hasn't happened yet and is still priority number one.
- Work on free lancing projects on the side
- How and where to find free lance clients can be its own ideas list in the future
- Win hackathon prizes
- DevPost (formerly named Challenge Post) always has plenty of online and in person hackathons. Some have really great cash prizes.
- A great side effect from this strategy is that hackathons are great for networking and building a portfolio
- Possible future ideas list would be 10 DevPost hackathons that would be fun to enter, 10 possible problems I could solve for the hackathon that I choose to participate in, 10 possible solutions to one of the problems, and 10 ways to recruit a team to help win the hackathon
- Tutor students learning programming
- This includes doing one or two nights a week at DBC as a coach while working a full time job
- Build an online business
- An online Shopify store with a dropship business should be possible.
- Would be fun to do 10 ideas on products I could drop ship. It would be great to do this during Shopify's next build a business competition.
- Dev Bootcamp referral bonuses
- This isn't official yet, but it looks like they are going to offer alumni some sort of referral bonus for new students.
- Build an iPhone app
- This post on Medium got me all excited about how you can make a nice profit if you find the right niche and tell a compelling story.
- Sell an e-book based on my bootcamp experience and market it as a helpful guide for future bootcamp students.
- Create a getting started with Arduino guide
- Would be a great resource for bootcamp graduates trying to learn a new skill beyond web development
- Would need to learn Arduino first
- Build my Equibase database
- Can use this information to analyze statistics and figure out a way to beat the track


--- layout: page title: Project consulting permalink: /consulting/ ---
Two main areas: software development and website resets.
Project Management: seasoned management leadership and guru-level technical expertise from a veteran of domestic and international projects.
Turnarounds are my specialty: salvaging software projects, and working in difficult development situations.
Developer's Resource: elevate your team with project mentoring services.
Multilingual Applications: see my INTL Toolkit.
Website auditing: to get a solid understanding of your current situation
Web analytics: analyze your web traffic to reckon what's right and what's wrong with your current reach.
Website refinement: renewal to reflect current best practices and your position relative to competitors.
Application design and development: web-stores and custom data-driven, flexible, interactive websites.
Search engine marketing: optimize your website for search engines.


Overview of course material: Data Analysis and Machine Learning (weekly schedule may be revised)
Morten Hjorth-Jensen [1, 2]
[1] Department of Physics and Astronomy and Facility for Rare ion Beams and National Superconducting Cyclotron Laboratory, Michigan State University, USA
[2] Department of Physics and Center for Computing in Science Education (office FØ470), University of Oslo, Norway
The teaching material is produced in various formats for running codes (jupyter notebooks) and on-screen reading. Below you will also find a link to the lecture notes as a textbook in PDF format and as a jupyter notebook as well. Projects and exercise sets are also included.
Week 34 August 21-25:Basic introduction to the course with schedule etc and start Linear Regression
Week 35 August 28- September 1: Linear regression, from ordinary Least Squares to Ridge and Lasso Regression, Elements of Statistics
Week 36 September 4-8: Statistical analysis and discussion of Ridge and Lasso regression
Week 37 September 11-15: Resampling techniques, Cross-validation and the Bootstrap
Week 38 September 18-22: Summary of linear regression methods and start Logistic Regression
Week 39 September 25-29: Logistic Regression and Gradient methods
Week 40 October 2-6: Stochastic Gradient Descent and Neural Networks, starting to build a multi-layer Perceptron model, the Back Propagation algoritm
Week 41 October 9-13: Building a multi-layer perceptron code and introduction to Tensorflow
Week 42 October 16-20: Deep learning, Solving Differential Equations with NNs and Convolutional Neural Networks)
Week 43 October 23-27: Deep learning, Convolutional Neural Networks and Recurrent Neural Networks
Week 44 October 30- November 3: Decision Trees and Ensemble models
Week 45 November 6-10: Decision Trees, Random Forests and Gradient Boosting
Week 46 November 13-17: Support Vector Machines
Week 47 November 20-24: Support Vector Machines and unsupervised learning and Summary of Course with Future Perspectives
Textbook
Projects Fall 2023 (dates are tentative)
Project 1, Deadline October 9 (available September 3)
- LaTeX and PDF:
- HTML:
- Jupyter notebook:
Project 2, Deadline November 6 (available October 8)
- LaTeX and PDF:
- HTML:
- Jupyter notebook:
Project 3, Deadline December 11 (available November 5)
- LaTeX and PDF:
- HTML:
- Jupyter notebook:


Why Lightcord ?
We wanted to do an official-looking client, but customizable and portable. That means you can install it, for example, on a USB stick. We also included BandagedBD, but with some changes. You can use themes and plugins this way.
A simple - customizable - Discord Client !
We support themes ! You can add any theme from BetterDiscord, and even set up transparency with Glasstron !
This is a complete Discord Client. That means it has his own .exe and does not require the original Discord, plus it can't break when there's a new update.
We wanted to do an official-looking client, but customizable and portable. That means you can install it, for example, on a USB stick. We also included BandagedBD, but with some changes. You can use themes and plugins this way.
Lightcord includes BandagedBD. This way, you can use all the customization you were able with BetterDiscord. Like themes/plugins.
We wanted to make this client easy to use and secure. This way, you do not have to worry about things like, the security of your account/computer.
Lightcord scans plugins before executing them, searching for any threats.
Below, you can download it, or join our Discord !


Its causing me to put in endless input, never outputting anything from the loop, any ideas? I am also going to be spooling out the output, so i know some of it looks unorganized, i just want it to be outputting the right thing before i set up the spool.
int main()
{
double avgCost, cHours, cost, SSN, students, y, addAmt;
char instate;
cout << "How many students do you have to input?";
cin >> students;
cout << "Please input you social security number, followed by a y\n(for if you live instate)";
cout << "or a n (for if you live out of state),\nand finally type in your credit hours.\n";
y = 0;
avgCost = 0;