Posts

Showing posts from December 1, 2018

Set different websocket interceptors for different channels

Image
up vote 0 down vote favorite I have the following websocket configuration in my Spring Boot app: @Configuration @EnableWebSocketMessageBroker public class WebSocketConfiguration implements WebSocketMessageBrokerConfigurer public static final String WEBSOCKET_HANDSHAKE_ENDPOINT_URI = "/api/wsocket"; public static final String QUOTE_CHANNEL_URI = "/quote"; @Autowired private RabbitTemplate rabbitTemplate; @Override public void configureMessageBroker(MessageBrokerRegistry config) config.enableSimpleBroker(QUOTE_CHANNEL_URI); /*Enable a simple in-memory broker for the clients to subscribe to channels and receive messages*/ config.setApplicationDestinationPrefixes("/app"); /*The prefix for the message mapping endpoints in the controller*/ @Override public void registerStompEndpoints(StompEndpointRegistry registry) /*websocket handshaking endpoint*/ registry.addEndpoint(WEBSOCKET_HANDSHAKE_ENDPOINT_URI) /*TODO remove this after developm

Robert Duncan (poet)

Image
Clash Royale CLAN TAG #URR8PPP For other people named Robert Duncan, see Robert Duncan (disambiguation). This article includes a list of references, but its sources remain unclear because it has insufficient inline citations . Please help to improve this article by introducing more precise citations. (June 2015) (Learn how and when to remove this template message) Robert Duncan Robert Edward Duncan (January 7, 1919 in Oakland, California – February 3, 1988) [1] was an American poet and a devotee of Hilda "H.D." Doolittle and the Western esoteric tradition who spent most of his career in and around San Francisco. Though associated with any number of literary traditions and schools, Duncan is often identified with the poets of the New American Poetry and Black Mountain College. Duncan saw his work as emerging especially from the tradition of Pound, Williams and Lawrence. Duncan was a key figure in the San Francisco Renaissance. Contents 1 Overview 2 Birth and early lif

Pandas scatter plot

Image
Pandas scatter plot Im new to Python and Pandas but have a CSV file with multiple columns that I have read in to a dataframe. I would like to plot a scatter plot of x=Index and y='data'. Where the index is Index of the dataframe and is a date. Thanks heaps Jason 2 Answers 2 You can use plot_date : plot_date plot_date(df.index, df.data) Great. I'd didnt realise it was as simple as passing df.index. I was having trouble because I was trying to use the column names but the index doesnt have a column name. – user1911866 Dec 18 '12 at 11:39 I would use `df.plot()', would be more "pandas-like". – bmu Dec 18 '12 at 20:03 @bmu trying to scatter plot with datetimes is not as straightforward as you might expect. You will end up with KeyErrors if you attempt to provide datetimes as the x in df.plot() and you'll notice pd.Series.plot() has no 'scatter' argument for kind . – conner.xyz Sep 21 '15 at 20:52 df.plot() pd.S

In the EU, what rights do you have if your rental car agency fails to deliver?

Image
up vote 5 down vote favorite Several times in the past few years, I have made a confirmed, paid booking for a rental car, and turned up at the appointed pick-up time only to be told that no cars are available. The rental agency would then tell me that my only options are to either (1) cancel the booking and receive a full refund, (2) wait a certain period until a car becomes available, or (3) travel to another office where they assure me a car will be available. In my experience the second two "solutions" are unreliable; on one occasion I delayed my trip by one day, and on another occasion I travelled to the next-nearest rental office, only to find that the promised car still wasn't available. I'm always aggravated when this happens, as it throws off my travel plans. I end up frantically cancelling hotel or event reservations, scrambling to find alternative transportation by bus or train, and/or paying for a trip to the next rental car office at my own ex