Some words about myself: Well, I`m 19, I study history in an university. I`m an everyday smoker and I like to experiment with other substances but I never use anything but marijuana and hashish frequently. Everybody knows I`m a smoker - and I don`t hide it. I have a lot of friends, I go on dates quite often and I make extra cash hustling around. I know I have homies who have got my back covered and a good future waiting for me. So I`m a positive person, never depressed, hardly ever do I feel stress.
The first contact was in spring, when me and my friend K had the opportunity to buy two brugmansia plants (each about 1 meter tall) from a fair held in town for its 800th birthday.
On that night we made some tea from a couple of middle-sized and a handful of smaller leaves. When a teaspoon of sugar was added, it didn`t taste bad at all, just odd. We had no effects what so ever.
By the end of summer, one of my other friend had two blossoms that had fell off. So he and another friend of his and me tested the plant by eating those two blossoms. Again, no effects occurred.
A week later, I had to have an emergency consumption of one of my blossoms. It had some kind of a vermin on, and none of the leaves didn`t grow any bigger for a week, and that blossom didn`t fully open, so I ate it.
I had totally forgotten about eating it. I was with K and another friend smoking pot, 5 hours later, when I felt that bodyhigh felt noticeably different, though it`s impossible to describe it. It was about the same time K and I went home. I had some pretty interesting dreams that night. Actually they were dream-like sequences I`ll describe later on. Though I only remember one of it from that night. I was sitting by a fire in a beach, having a conversation with someone. When I entered that dream the chat was already on but I knew instantly what it was about. I remember feeling the wind and I could actually smell that salty sea air. Incredible.
Along came September, which means I had to move back to the city I go to school in. There I went to the cityís botanical garden, and searched the plant in greenhouses for almost two hours. I had given up, when I saw huge Brugmansia trees growing on a small hill outside in the gardenís park. Four amazing trees bearing gigantic blossoms just waited me. I grabbed three of them and the next day an extra one. In the weekend I went back to my hood. We couldn`t go to a party, cause K had broken his leg, so we just had some Metaxa and some weed with K and another friend and there were couple of girls.
I insisted on making tea from those blossoms (I used three), eventually I was the only one consuming it. I had huge pupils, but that was it. Disappointed I just ate the remaining flower. About half an hour later outside, I fell over like a stick, hitting the ground with my jaw.  It had been so stupid, but I just didn`t control it. I remember little about that evening. Though I do remember everybody having a great time including me. Metaxa just does miracles.
I remember nothing about getting home or being home. Yeah there`s only a sequence in my memory, where I`m standing in my room, everything feeling different. There is a strange sickly green light glowing from everthing. And on the ground in a corner of my room I see a red balloon. When I try to pick it up, it gets smaller and smaller until it disappears between my hands. I can`t say if it was a hallucination or just a dream. I just remember it.
A week after we had a small gathering in some apartment, and I brought the flowers (I stole approximately 15 blossoms from that garden again before going to that place). There were 7 people and one of the girls was going to stay sober to look after us.  We listened to jungle most of the time. So I chopped up all the flowers and boiled them for about 20 minutes. It looked like piss, and smelled and tasted slightly like cabbage though some of the people complained about it tasting like an egg.
We each had two cups, with almost no effects, besides the slightly dilated pupils and some loss of motor skills. So me and another friend went on to raid the garden again. This time we brought back about 25 fresh flowers, which we decided to eat fresh. I also purchased some pot, so we smoked it while we waited the effects to kick in and slowly digesting and eating the flowers. The taste was bitter and foul.
So at some point while waiting and sharing bowls of Mary Jane, I had a conversation with a guy who was hanging around with us but I didn`t know him. Now we all knew he had schizophrenia, and he was high from his medicine even before we got there. He was kind of fatuous before, but now he just stared at me with huge eyes and a look I`ll never forget.
 Now this guy was like two times bigger than I am, so I was under a lot of pressure, being alert all the conversation, which lasted for about 15 minutes and was strategically aforethought from both sides. It was a true mind battle. In the end he accepted that I understood his position and he even called me 'lion' once, later on that night.
I weigh 55 kg and ate four huge fresh flowers. The only effects I noticed were a small buzz in my head and huge MDMA-like pupils, and it was hard to make up long sentences.
The only persons tripping hard were that crazy hawk and that friend I razed the garden with on the second time called E. They were both glassy-eyed and quietly mumbling when talking. Though E didn`t talk much. Lying on the couch he looked very sleepy. I went on the balcony to have a cigarette and rest from both trying and pretending to understand what that hawk-dude was trying to say, it was hard to remember the topic and most of the sentences were way too long. When I came back I saw E doing dancing moves with his hands while he lied on his back, eyes closed. The poor fool doesn`t even like drum and bass. The sight reminded me of a clip I saw about a person who had taken too much ecstasy. He also described to me how the 'walls went away but the room remained'.
It was about four hours from ingesting the first fresh flowers and I was getting pretty sleepy myself. I woke up E, who had now been completely sleeping for about half an hour, and we started walking home, totally forgetting about two other friends, because they had been sleeping in the other room for about an hour. Feeling only the effects of cannabis, they were bored and sleepy. On the way home, E kept on mumbling while walking next to me. I didn`t bother to talk to him, until one point he suddenly stopped, and asked what we were doing with a normal voice like being sober again all of a sudden. I explained that we were walking home from that apartment. He was stunned. He said something like 'but I was in Zavood. Just right now...' (Zavood is a pub we like to go).
We went along laughing.
The next day I felt a bit tired and I couldn`t focus my eyes on things close, like my cellphone`s display.
I was amazed about how E had tripped (he too weighs about 55 kg but he only ate 1.5 fresh flowers against my 4) and dissapointed about my own trip. So in the weekend while I was back in home I took one bigger thorn-covered apple from my brugmansia plant, to take it with me to school.
I planned to eat the seeds in my dormitory, where it was quite safe and the others could babysit me.
I cut the pod open and got all the seeds out and cleaned them from all the flesh. There were 236 tiny golden seeds. They dried very quickly, looking sapless 3 hours later when I thought it was the right moment to start with the experience.
[T+0:00]
I ate 55 seeds chewing them carefully and flushing them down with some water. I then chatted with a girl in messenger, waiting the effects to come on.
[T+30:00]
Not more than half an hour later, I noticed that my vision was getting a bit blurred and it was a lot harder to type. I smiled and wanted to describe it to my roommate called J who was sitting behind his computer nearby.  It sounded frighteningly false. I tried to get up, but landed back on my chair. Vain attempt. With another try I managed to stand up and stumbled across the room to get something to drink, my throat was so dry! I had a conversation in our kitchen with another roommate called E (not to be mistaken with my friend E). I managed to somehow control my voice, though some words came out sounding so high, they were more like peeps. And it was incredibly hard to follow anything we were talking about, though I understood most of it, and so did my conversation partner, even though I had to repeat my words very often, cause they sounded like mumbling. Talking was truly frustrating.
[T+1:00]
I went to have a piss. It was bizarrely hard to do it and I ended up urinating all over the toilet bowl and everywhere around it. I cleaned up, and when washing my hands in front of a mirror I first noticed my pupils were dilated and that my face was very red, but when I looked at my hands they were more like carotene. I did feel hot all over my body. I showed my hands to my roommate, being worried, because their colour was almost unearthly. He told me to relax and said that they look just fine. I believed him, though every time later during that evening when I happened to look at my hands, they were orange in colour.
[T+1:10]
I felt very sleepy and lay down on my bed. When I closed those peepers, I was almost instantly in a dream world, not really sleeping, cause I knew what was going on and I could open my eyes easily, being in a whole new situation, when closing them again. Unfortunately those dreams were hard to remember some minutes later.
[T+1:45]
I went to the toilet to urinate again. This time I was smarter and just sat on the closet like a lady. When I looked up, I saw E (my roommate) standing next to the sink, and J came out behind the shower curtain. I was happy to see them and we started to talk, while I was sitting on the toilet. It didn`t felt strange at all. That situation could have lasted 1-5 minutes, then all of the sudden I heard myself mumbling and the second I realised the door had been closed and locked all the time, they were gone. Mere hallucinations. I don`t remember that situation as clearly as other events that night leaving me to think that this dreamy state could be entered with opened eyes.
[T+1:50]
I continued my dream sessions. Never really falling asleep, but it was the most interesting thing to do.  It went on a long time, my dream sequences getting longer and longer, until I must have finally fell asleep. Normal sleep.
[T+3:30]
I woke up. My hands still didn`t look normal. I took off my clothes and got under the blanket. I re-entered that weird dream world with sudden startles for a short while. Then fell asleep. When I woke up the next day it was about 14:15. I couldn`t focus my eyes on things close and my pupils were pretty big the whole morning.
I lost most of my eagerness of eating that deliriant after my seeds experience. No, it wasn`t a bad trip. But I felt that my mission was completed. I had seen it, I had felt it. No need to look any closer for it is a venom.
I gave the rest of the seeds to a friend, who ate half of them and talked about similar effects (inability to talk, loss of motor skills etc) and he started to meditate on the floor of a cafe for some bizarre reasons. He drank liquer too that night and remembers very little.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Git routine.
I did not know the git routine on linux so i chose the dark side. GitHub for Windows was of enormous help to get me started with GitHub and i was happily clicking away to commit and push for over a month. But the day had finally come for me to switch back to linux and learn how the git (command line) routine.
One starts off with generating an (unique) SSH key on your computer and adding this to your GitHub profile. Refer to this github help article to know how to generate said SSH keys and adding them.
NOTE: if the directory ~/.ssh does not exist, then create one. If you haven't used ssh on your system so far, there will not exist one.
Information about your git repository is available in the .git sub folder.
$ git clone/pull https://github.com/username/repository.git
# to download from a GitHub repository.
# Unlike git clone, using git pull also needs
# adding a remote (destination) as follows
# git remote add repo https://github.com/username/repository.git
# git remote to see the difference
$ git add .
# or git add folder/file* to specifically
# select folders/files to be staged for commit
$ git commit -m 'commit message'
# instead git commit -a -m 'commit message'
# that combines the above two.
$ git push (branch)
$ git status
$ git rm folder/file
# to remove a folder/file from the github repo.
$ git diff
# git diff HEAD
# git diff --staged to check the changes on the staged commit
$ git log
# to show commmits made


Training
Over 200 hours of training held to over 800 persons, in Romanian and English, in-class and remote, including in academic setup.
A good training
- ... should captivate you: I'll keep you alive from minute 1 to the end with questions, brainstorming, animations, demos, videos, jokes and tests with prizes
- ... should help you understand the core concepts: The driving purpose, the "WHY", the underlying phylosophy?
- ... should show most of the story: I'll tell you a story with lots of examples and exercises; no dull APIs or values to memorize
- ... should explain the tricky parts: I used intuitive animations or easy-to-remember diagrams for most of them. You'll love it! (at least the feedback tells me so:). Also, each module includes best practices and pitfalls.
A good training
- ... should captivate you: I'll keep you alive from minute 1 to the end with questions, brainstorming, animations, demos, videos, jokes and tests with prizes
- ... should help you understand the core concepts: The driving purpose, the "WHY", the underlying phylosophy?
- ... should show most of the story: I'll tell you a story with lots of examples and exercises; no dull APIs or values to memorize
- ... should explain the tricky parts: I used intuitive animations or easy-to-remember diagrams for most of them. You'll love it! (at least the feedback tells me so:). Also, each module includes best practices and pitfalls.
I've personally created the training materials for these modules, investing hundreds of hours of hard work in distilling the 1-2 most distinguished books (plus other sources) about each subject topic until the it met the above criteria.
Throughout the presentations, I've placed several key slides which can become the starting point of interactive digressions about related concepts, in case the trainees want us to go there. And they usually do.
A lot of hands-on practice
For the exercises you will get a virtual machine with the development environment already set up, that will allow you to both resolve the exercises again after the training, as well as to explore the solution. For certain modules, such as OO Design Patterns, I even strongly recommend you to re-work the exercises after several days, when the concepts have settled down.
For certain modules, you will also get a printable summary that you can keep next to your workspace as a handy cheat-sheet.
Every course is unique
Each classroom has its own interests or needs specific skills, so the course agenda is always personalized. Perhaps you aren't sure yet what topics to choose. I can help you with that. We could sit together for a general discussion and explore what you may be looking for. Then, we could choose several modules, customize them or even add completely new ones.
Each module is designed to take at most 2-hour long, including any demo, exercises or contests. In a regular day, 3 regular modules can be covered, plus a little extra practice or discussions. Trying to cover more than that usually just exhausts the participants with no (or even less) benefit.
Industry-driven, Certified proficiency
I have practical experience with all the technologies I teach, except with the newer JavaEE6&7. I've used them all to design, develop and deliver enterprise applications for demanding corporate clients like world-leading flavors&fragrances company, Belgium Post, or BNPParibas Bank. In each project, I was always the one who explored the boundary cases of the techonologies, those places where what you wanted was not readily available out-of-the-box. I started doing that right from the first year of my career. In each case, I always strived to provide the simplest solution to each specific need, while following the phylosophy of each technology.
To be sure I covered all the corners of the Java EE specifications, I also obtained a long series of certifications.
Questions are what I want
I am always expecting questions any time during the trainings or breaks. The more questions I get from you, the more I manage to explain you. Honestly, there is no greater satisfaction for me but to answer your questions - it's only then that I'm sure I'm really helping you. The questions need not even be directly related to the topics we were talking about: I would be equally glad to be able to help you in any issues of your daily programmer life.
I always say: for the sake of a classroom, the dumbest question is the best question. It makes everybody clarify their understanding, it rapidly involves everybody and opens up communication bridges. So- just ask! The best trainings happen when we manage to have a collaborative brainstorming-like athmosphere in class. So- let's have a chat!
Quality Guarantee
From the very first training I delivered I started asking anonymous feedback. The global results (from 297 feedback forms) is summarized in the chart bellow. Upon request, I can show you the feedback forms (~2kg:), or per-module statistics, where available.
Recommendations from senior developers that attended my trainings are also availabe.
Finally, the training contract will include a restitution clause in case of negative final feedback.
Object-Oriented Design Patterns
2 parts x 2 hoursThis is the star-training of my portfolio. Delivered more than 10 times in various formats and setups, I also held it for the last two years as part of the "Java" faculty course of the Automatics & Computers Department of Politehnica University of Bucharest.
This 2-part presentation will cover the most used Object-Oriented Design Patterns from the reference Gang-of-Four book. Although the material covers all the GoF patterns, I would recommend instead to focus and analyze in more depth those patterns that are most used to day, and omit the grayed-out patterns in the agenda. This way we might gain enough time to talk about related concepts such as Aspect-Oriented-Programming, dynamic Java Proxies, and more.
The presentation is very dynamic, with a lot of real-life examples to help you deeply understand the concepts and remember them forever.
The extensive application part of this module however, is the one that will definetly shed light to all the quirks of the patterns. When your own hands will write the solutions to the exercises, you will have no choice but to fully understand the design patterns.
The target audience includes any Object-Oriented programmers, on Java or .NET.
Part 1
1:30' talk, 30' practice
- What are design patterns? Pros/cons...
- 3 Principles of a Good OO Design
- The SOLID principles
- Creational Patterns:
- Singleton
- Builder
- Factory
- Factory Method
- Prototype
- Structural Patterns:
- Adapter
- Proxy
- Decorator
- Composite
- Facade
- Bridge
- Flyweight
Part 2
40-50' talk, 30' practice, 20' test with prises+explanation, 10' anti-patterns
- Behavioral Patterns:
- Observer
- Iterator
- Strategy
- Template Method
- Command
- Visitor
- Chain of responsibility
- Mediator
- Memento
- State
- OO Antipatterns
- It was a very interesting and interactive course! Thank you for it!!
- The practical examples provided are very easy to remember and I really think I'll remember these concepts for a long time
- The exemplification of the pattern's idea on practical real world situations was very suggestive and really helped me understand the concepts deeply.
- The application part was very interesting!
- Not being so familiar with the subject, I found all very interesting, especially the Design Patterns which are often used in Java.
- It was all very interesting
- You have nothing to improve!!!
- The examples were the most important, and they really helped us understand a lot better the concepts presented (and I'm referring here to several of us who didn't knew almost anything about design patterns).
- All the topics were interesting, but especially the Anti-Patterns!
- To me, the entire course was important.
- Every notion was important to me and helped me understand better what I have to do and how.
- I personally liked how you managed to keep me alert. I wasn't bored for a second and I got a lot of necessary and important informations
- All the parts were important!
- What to improve? Nothing!
- I think it was especially interesting the live changes of the code together with their explanations
- Taking into account that I haven't used design patterns until now, the examples helped me a lot
- I consider very important the principles and concepts presented
- The application of the described concepts was of great value!
- The entire course was very exciting!
- The high-level general part was very interesting
- The test and the application enable a deep understanding of these patterns on the long term
- Impeccable, very clear and suggestive
- The application part was essential, along with the evaluation of the acquired understanding and the excellent graphical representation of the concepts and their correlation (for differential learning)
JavaEE Design Patterns
2 hoursDeveloping Enterprise applications is hard. No one can argue that.
But why? Is it because of their overly-complex business logic, their NFRs, the heterogenous teams, the business-IT gap, or maybe a combination of it all? Whatever the cause, enterprise applications tend to be very large, with a considerable proportion of similar functionality. The perfect place for a pattern.
Enterprise application strive for order. They simply can't stand a chaotic unorganized approach that will render their maintainance HELL and eventually lead to the dreaded REWRITE.
This module covers the major design patterns used in the development of typical enterprise Java applications. The patterns are studied on layers, paying special attention to the Client and the Business Layer, the places where the actual creativity usually resides. The participants will learn the principles of a good JavaEE design and solutions to various recurrent problems.
With one of the largest bibliography of all my modules, this course is based on a considerable part of the Oracle Certified JavaEE6 Architect agenda. Even if the patterns are implemented using the Java EE5+ standard, most of these patterns can be used in any major middleware framework, like Spring.
This module is probably the most difficuly one in my portfolio, so it is dedicated to those with certain experience in JavaEE/Spring, but also to those who love challenges.
Throughout the talk, we will stop on certain patterns to see how they look in code and to finalize certain incomplete implementations. However, the application part is rather scarce compared to my other modules due to the very abstract nature of the covered topics.
NOTE: In case you want us to dissect a real-world example of an Java Enterprise application, I have such an example prepared that will take 1 more hour.
1:30 talk, 25' demo, 5' recap test,
[optional] 1h inpection of real-world Java Enterprise Application
- Introduction: pro/cons, pitfalls
- Several acronyms & principles: DRY, KISS, SRP, ...
- Layered Application Architecture
- Presentation Tier Patterns
- MVC
- Model2
- Rich Internet Applications
- Model-View-Whatever: M-V-P, M-V-VM
- Comet/Server Push
- Business Tier Patterns
- Facade
- Service
- Method Object
- Entity
- Domain-Driven-Design
- Integration Tier Patterns
- DAO
- DTO
- Infrastructural Patterns & Utilities
- Service Activator
- Asynchronous Call
- Singleton
- Service Locator
- Context Holder
- Mapper
- Antipatterns
- You managed to capture the essence of the subject and transmit the informations in an interesting and interactive manner! Congratulations!
- Excellent time management
- Very intuitive animations in slides
- You managed to capture the actual approaches to EE Design Patterns and to explain very well the structures
- You had a very clear and concise presentation style
- Very intersting the infrastructural patterns
- There is nothing to improve to this course
- The entire course was very interesting!
- Very interesting the presentation of the layers of an application - the overview
The Art of Clean Code
2 parts x 2 hours (or shorter)The primary value of software is to be flexible. The secondary value of software is to do what business wants it to do.
Sounds insane? Just think a bit: what's the difference between IT and regular engineering? What propulsated IT that much? The ability to evolve, to adapt to new business needs. And we all know how difficult it is to adapt and strech old, dirty, rigid code.
Financially, the fact that 80% of the costs of a software project are in maintenance may not concern you, the developer, directly. But the fact that you read 10x times more time than you write code should make it clear to you: do your very best to write clean, beautiful code that is easy to maintain. This module explains how write such art.
Besides the bare act of writing code, the module also tackles the problematic of team work, code responsibility and cooperation necessary to any professional software engineer.
The module covers the most important practical aspects from the reference book 'Clean Code' by Robert C. Martin, along with many other sources. The training material was reviewed and discussed with numerous seniors to reach a wider consensus regarding the ideas and their nuances.
This is the module which is most likely to have the deepest impact on your day-to-day work, changing the way you exercise your profession. That's why I allways recommend to add this module to any training.
Part 1
1h talk, 1h practice: cooperative cleaning up of Martin Fowler's Video Store refactoring example
- What is Clean Code
- Names
- Express intent
- Parts of speech
- Functions
- Function Size
- Extracting Method Objects
- Function Signature
- Side Effects & Temporal Coupling
- Command/Query separation
Part 2
1h talk, 1h practice
- Classes
- Basic Shape
- True Encapsulation
- Data Structures vs. True Objects
- Switch+Data Structures vs. Polymorphic Objects
- 'Tell, Don't Ask' Principle
- Feature Envy
- The Plugin Model: Dependency Inversion
- Code Formatting
- Comments are failures
- TO COPY
Enterprise Java Beans
2 hoursIt's Black Friday, 600 AM. From the 1.000.000 users logged in on the emag.ro site, 1.000 submit their purchase each second. The online store application must resists such pressure while ensuring that all transactions are correctly processed. Furthermore, just realize that the online shopping system is not alone - it relies on quite a series of 3rd party services such as banks, courier services, suppliers and distributor chains, etc...
Now, imagine building such a system from scratch, without any libraries in Java SE. By the way, did you thought about distributed transactions and 2PC?
I think you now begin to understand the problematic addressed by the EJB standard and the entire Java EE suite altogether. Now, obviously, besides the challenges of the infrastructural requirements, the business logic of this application is extremely difficult to manage by itself. So why not leave EJBs to handle most of these infrastructural requirements?
How does the EJB standard simplify the development of such demanding applications? What services does Java EE5+ offers us to overcome these callenges? How does it promote quality code?
1:15 talk, 15' test with prizes, 30' demo applications
- Introduction: what EJB gives you
- Stateless Session Beans
- Stateful Session Beans
- Declarative Transaction Management
- Interceptors
- Timers
- New stuff in EJB 3.1Introduction
- Explanations were very clear.
- Very useful explanations!
- The topic about transactions was very useful
- Good idea with the test!
- A very good presentation and exemplary explanation of examples
- Very interesting topics: transactions, stateless beans, interceptors and declarative security
- The exercises applied on the theory were very usefulEverything was very important
What's new in Java EE6. CDI.
2 hoursThis module explains the major additions of the version 6 of the Java EE uber-standard.
Particular emphasis is given to the brand new revolutionary CDI Beans (Context and Dependency Injection standard). You will be amazed by the power of the CDI beans, their simplicity and their extensibility. CDI events will also surprise you with an unprecedented extremely loose coupled way of doing message-passing in Enteprise applications.
It is recommended for the participants to either have basic knowledge of Java EE5 or to have attended to the EJB module.
1:30 talk, 30' demo of CDI beans
- EJB 3.1
- @Singleton
- no-interface view
- async calls
- packaging
- Context and Dependency Injection
- @Inject
- Events
- scopes
- Servlet 3.0: async. processing of HTTP requests
- Bean Validation
- You were very well prepared.
- The application was very suggestive.
- The entire course was very interesting
What's new in Java EE7. WebSockets.
2 hours2013 brought WebSockets in the Servlets' API, that is, true bi-directional browser-server communication.
This, and the most interesting other APIs and simplifications in JavaEE7 are explained in detail. This module doesn't cover the batch support, however.
It is recommended for the participants to either have basic knowledge of Java EE5/6 or for this module to be preceeded by the respective modules.
1:10 talk, 50' demo (including websockets)
- JAX-RS 2.0
- Client-side API
- Async on server- and client-side
- Interceptors
- JMS 2.0
- Web Sockets API
- JSONP
- Concurrency UtilitiesEJB 3.1
Java Persistence API
2+ hoursImagine a project with no more SQL. No more FK, sequences, weird column names, PreparedStatements and Result Sets. No more database schema diagram on your desktop, next to your Java domain model. No more lightLoad/fullLoad, no more storing IDs of other entities in fields. It's all just Java now. The database remains just a detail.
We will also discuss the scenarios in which JPA is appropriate or not, and what to do in case you really need some database-specific feature (e.g. CONNECT BY, or /*-hints).
This module introduces your to this marvellous standard, teaching you how to design your Java Object-to-Relational Database Mapping (ORM), explaining the common best practices and pitfalls.
The second half of the module explains in details how the EntityManager
actually works, including tricky stuff like lazy loading, cascading and detach/reattach entities.
The trainees should have some experience with SQL and Java. Ideally, they would also know the basic concepts of declarative transaction management in EJB or Spring (but this is not mandatory).
1:20 talk, 10' test with prizes, 30' demo pitfalls
- Introduction
- Mapping Java Objects to Database Tables
- Mapping basic fields
- Mapping relationships (1:1, 1:n, n:n)
- Mapping inheritance
- EntityManager: Principles and Concepts
- Entity lifecycle
- Java Persistence Query Language (JPQL)
- Everything was very important
- The hands-on application was very useful
- The in-class ORM exercise was an excellent idea. I really managed to master the concepts there.
- Very clear explanations
- The contents could easily span 3 hours, please extend it a bit, to have time to discuss everything in depth.
RESTful Web Services
2 hoursIn 2000, Fielding's Doctoral thesis has shaken the world of web services, introducing a series of design principles using which the development of web services could become childs play. Apparently.
Let's dive together in the world of REpresentational State Transfer, and understand its principles, how they differ from SOAP-based web services, their pros/cons, and then see them in action in Java.
This modules covers both the theory backing the REST web services as well as their implementation in Java (JAX-RS). It remains up to the trainees if we either sweep rapidly over the architectural principles, either go into details about the more advanced topics of the subject.
1h talk, 1h hands-on: simple REST endpoint using JAX-RS
- Basic REST Concepts:
- Resources, URIs
- Principles of Resource-Oriented Architecture
- Versioning, Content Negotiation
- Designing a REST WS: steps, common pitfalls
- JAX-RS: walk though code examples, RESTEasy
- Testing Tools
- The application was very useful. I really got it now!
Web Services (.wsdl)
2-3 parts x 2 hoursThis course is under construction, and it will be finalized upon your request.
Spring Framework
5 parts x 2 hoursTODO.
Full fledged example - upon request +1h
Part 1: Spring Core Basics1:10 talk, 50' hands-on
- What is Spring? Why Spring?
- Defining and Wiring Beans: XML and @nnotation
- Bean Lifecycles: scopes
- Setting up Spring
1:10 talk, 20' demo AOP, 30' exercise
- Spring AOP
- Externalizing Configuration; SpEL
- Advanced Topics: @Inject, Extensions, ...
- Testing Support
1:10 talk, 50' hands-on
- Spring DB access Philosophy
- Working with JDBC: JDBCTemplate
- Working with JPA
- Declarative Transactions
- Concepts & Principles
- Transaction Propagation
- Transaction Isolation
1h talk, 1h hands-on
- Introduction
- Annotation-driven Controllers
- Securing Spring Applications
- Publishing and Consuming JAX-WS web services
- Publishing and Consuming RESTful web services
1h talk, 1h hands-on
This part is under construction, and it will be finalized upon your request.
Experience: I have built an application on Spring Batch.
JUnit Testing. Mocking.
2 hoursThis course is under construction, and it will be finalized upon your request.
Test-Driven Development
2 hoursMeet the next level of software development.
What if instead of writing some tests after writing the actual development, you would begin developing a new feature by first writing a unit test for it. The test will fail!, you would say. It's meaningless!!
Not at all!
Because as soon as you'll see the test passing, that feature is secured from then on. If you do it correctly, you will get 100% real test coverage!.
And what does that mean? It means that you will not fear your own code anymore. You will be able to refactor it as you like, without the terror that you'll break some feature. And as soon as you will refactor it freely, the code will stay alive, it will be able to follow the business requirements closely and cleanly.
Besides the TDD phylosophy and implementation, this module also provides a remarkable series of guidelines for writing good unit tests.
Basic knowledge of unit testing and Java test mocking frameworks (EasyMock, jMock, Mockito,...) is recommended. The JUnit Testing module can bridge that gap for you.
1h talk, 1h hands-on (Bowling game kata)
- Definition
- The 3 Rules of TDD
- TDD Mantra: Red-Green-Refactor
- Advanced Unit Testing
- What does a Unit Test tell you ?
- Fragile Tests vs. Clean Tests
- Fluent Builders at their most
- Testing Persistence
- TDD Pros & Cons
- Behavior-Driven Design: an introduction
UML Modelling
2 parts x 1,5 hoursA diagram is the most efficient way to communicate, understand and reason about a software design. That’s why any professional application developer should talk UML fluently. This training covers the UML diagrams most frequently used in the daily practice of a software developer, with particular emphasis on Class, Sequence and Activity Diagrams. Other less common design-time diagrams are also presented, although without going into unnecessary details.
For each exercise, the classroom will be split in teams of 2-3 members, and each team will ellaborate a diagram for each exercise. After the time elapses, each team in turn will explain their solution to the entire classroom to provide a starting point for discussions. Alternative modeling options and various design assumptions will be analyzed.
Part 11h talk, 30' in-class brainstorming: 2 class diagrams
- Introduction
- Structural UML Diagrams
- Class Diagrams (in detail)
- Object Diagrams
- Package Diagrams
- Component Diagrams
1h talk, 30' hands-on: 2 sequence and 1 activity diagram
- Behavioral UML Diagrams
- Sequence Diagrams (in detail)
- Collaboration Diagrams
- Activity Diagrams (in detail)
- State Machine Diagrams
- Best Practices for drawing diagrams
Requirements
1 hourIn the beginning, there were the Requirements.
What are those? What kind of requirements are there and where should we search for them? What are those “non-functional requirements”, after all, and why should I care about them? This short module tries to answer those questions from the practical viewpoint of a software developer/architect.
1h talk & discussions
- Source of Requirements
- Requirements, Qualities and Constraints
- SMART Requirements
- Functional Requirements
- Non-Functional RequirementsIntroduction
Enterprise Integration Patterns
1+ hourWe will study the classic Enterprise Integration Patterns as described by Gregor Hope in his reference book, walking them right of his website, explaining and discussing each in turn.
For the application, we will solve together in class an enterprise integration problem using a little Spring Integration-based application.
40' talk & discussions, 20+' Hands-on with Spring Integration
- Introduction
- Integration Styles
- Messaging Systems
- Messaging Channels
- Message Construction
- Message Routing
- Message Transformation
- Messaging Endpoints
- Utils
If necessary, we can ellaborate more on each pattern and expand the application part such that to spend 2 hours on this module, in order to deeply understand each of the patterns.
Web Security
1 hourThe course covers the Top 10 Web Security Attacks in 2013, as reported by OWASP. Each attack is explained, exemplified and then one or more solutions are proposed to them.
Anyone can participate, although some minimum Knowledge of the web technologies is recommended (JavaScript, HTTP, HTML).
1h talk & discussions
- Injection
- Broken Authentication and Session Management
- XSS
- Insecure Direct Object References
- Security Misconfiguration
- Sensitive Data Exposure
- Missing Function Level Access Control
- CSRF
- Using known vulnerabilities
- Unvalidated Redirect and Forwards
myBatis Data Mapper
1 hourOk, so you have this huge project written with plain old JDBC code (PreparedStatement ps =...
, ResultSet rs =...
, } finally {
and so on. You dream of migrating the data access layer to a newer, cleaner, more maintainable technology. After a bit of research you realized JPA was to much for this jump. What option are you left with then? Spring's JdbcTemplate
, you may say. Yes indeed.
But couldn't you have more? Couldn't you get rid of the rs.getLong(24)
call and have instead a declarative Java object - result set column mapping ?
What about those search queries with variable number of criteria, for which you concatenate SQL bits and hope to not mess up the order of the prepared statement's parameters? Couldn't you get rid of those if (hasCriteriaX) { sql += " AND criteriaX = ?"; psArgs.add(criteriaX); }
code ? Wouldn't it be nice to compose dynamic queries in a more declarative way?
Meet MyBatis, the framework that you were looking for. This workshop covers all the features of the MyBatis data mapper, starting from the most trivial scenarios and diving into the more advanced topics as linked result maps, N+1 query problem and dynamic queries. Special emphasis is placed on how to migrate legacy SQL queries to MyBatis. The contents roughly follows the online tutorial.
Some minimum Knowledge of SQL is recommended.
1h examples and hands-on
- Mapping result set columns to bean fields
- Mapping input data to query parameters
- Reusing result maps
- An elegant solution to the N+1 fetch problem
- Polymorphyc result sets
- Dynamic queries (e.g. for search forms)
XML Schema & JAXB
2 hoursXML is everywhere.
But do you know how to define the structure of such an XML? And then, how do you work with XMLs from Java?
This module explains the common structures of the XML Schema Definition. Although the XSD specification is remarkably complex, it is so in order to be as flexible as possible. For the vanilla enterprise applications however, this module covers more than enough of the XSD specification.
Ok, so you defined your XML structure (.xsd), what then? How do you read/write such XMLs? Do you struggle with SAX events or you cross your fingers and load the whole DOM in memory?  All of these three standards have their purposes, but for regular enterprise applications, you would probably like to work with JAXB objects resebling your Java Model than with Nodes, Attributes or Events. Let's see how this JAXB works and perhaps how can we customize it a bit.
1:10 lecture, 40' hands-on XSD, 10' JAXB demo
- XSD
- What is it?
- Fundamentals
- Simple & Complex Types
- Elements
- JAXB
- What is it?
- Generating Java classes out of XSDs (and vice-versa)
- Marshalling and Unmarshalling Java<->XML->
- Super!
- The application was very interesting
- We are waiting for more modules. Congratulations!
- It was very interesting the application for JAXB and XSD
- Very useful the part regarding the import of XSDs
About Me
Curriculum Vitae
CV Victor Rentea (EN)
A more detailed assignment history is available upon request, together with accompanying explanations.
PFA
I am an authorized physical person (P.F.A.), so that the business we do together can be financially legal.
CUI: 34835235
Nr RC: F40/3035/30.07.2015
Client Portfolio
I gained the majority of my training experience inside IBM, holding internal trainings to fellow employees. However, recently I've began holding trainings independently to interested companies. Their references are available upon request.
Contact


SICKBAY ANALYTICS
: Top 100 Most Popular Health Services Cost Visualization
About
Filter State
Choose your option
Option 1
Option 2
Option 3
Filter Cost Bubbles
Total Cost
Medicare Coverage
Max Medicare Coverage
Filter Service Graph
Choose your option
Option 1
Option 2
Option 3


salmon Cookies
Home
sales
store
contact us
locations with addresses
Seattel
Tokyo
Dubai
Paris
Lima
open hour
6am
7am
8am
9am
10am
11am
12am
1pm
2pm
3pm
4pm
5pm
6pm
7pm
Salmon Pictuer


{% extends "base.html" %}
{% load i18n %}
{% block breadcrumb %}
{% endblock breadcrumb %}
{% block content %}
Gold Layaway Example
1 oz. X {{ gold_price }} per oz. (acquisition cost) = {{ extend_price }} Total Layaway Value
(1 oz. max for 1st layaway)
{{ setup_fee }} Set-up Fee (Paid at initiation of new layaway)
{{ monthly_price }} Monthly electronic funds transfer (EFT) from your Bank or Credit Union account.
Example timeline:
- You complete your layaway on January 5th.
- Your 12 month layaway begins billing on Feb. 5th.
- You realize in June and October, you need to skip your payments ({{ skip_fee }} payment delay fee).
- After the layaway is fully paid, you can choose to have us ship you the gold or buy it from you.
| Jan 5 |
Feb 5 |
Mar 5 |
Apr 5 |
May 5 |
Jun 5 |
Jul 5 |
Aug 5 |
Sep 5 |
Oct 5 |
Nov 5 |
Dec 5 |
| {{ setup_fee }} |
{{ monthly_price }} |
{{ monthly_price }} |
{{ monthly_price }} |
{{ monthly_price }} |
{{ skip_fee }} |
{{ monthly_price }} |
{{ monthly_price }} |
{{ monthly_price }} |
{{ skip_fee }} |
{{ monthly_price }} |
{{ monthly_price }} |
Layaway Plan
| Jan 5 |
Feb 5 |
Mar 5 |
|
|
|
|
|
|
|
|
|
| {{ monthly_price }} |
{{ monthly_price }} |
{{ monthly_price }} |
|
|
|
|
|
|
|
|
|
{% endblock %}


Ping Foundation formerly known as Crazy Amigos is an open source community lead by a bunch of tech enthusiasts focusing on open source product development and free training. A team of tech professionals, students and aficionados with the mission to make the world a better place by driving the youth to excellence. Be part of PING FOUNDATION to get motivated and explore open source in all it's beauty...
Next-generation technologies are increasingly developed and refined in open source projects. Be part of our open source product development which will eventually offers a plethora of benefits...
Ping Foundation with the support of experts from various technical field, have come up with free training programs to help students become professionals.
Workshops and conferences will helps in gaining expert knowledge, networking with others and renewing motivation and confidence. Be part of our workshops and grab the opportunity to get acquainted with technical skills.
Want to hear about trending technologies ? Be with us to get updated with latest technology from industry experts..
We organize meetups and brainstorming sessions where experts will share innovations on different sectors. Join and be part of awesome community.
Looking to raise funds for your startup ??? Join with us to get connected with investors and get funded.
Are you an entrepreneur struggling with your product? We are here to provide you with all product related solutions. All you have to do is to approach us...
Do you have a great startup idea ? We are ready to provide needed incubation support. We help you to transform your idea into product...
Yeng is the next generation mobile app which leverages bleeding edge technology to better enhance your alma mater experience through participation from fellow students, faculties and the general public. Experience and streamline your University life like never before using Yeng.
PING FOUNDATION is launching Kerala Blockchain Hub in order to collaborate all the Blockchain related activities.
We have numerous event sponsors in the main cities of India, extending all the resources necessary while holding the idea pitching events, products launching event so on and so forth. We are also happy to take free sessions in colleges and companies on supporting us necessary space and resources.
Right from the beginning, PING FOUNDATION have had great technical support from Big-name companies in the industry. And we are continually receiving many more as well. Apart from the goodwill, sponsors get worthy visibility that benefits them in future as well.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/implicit.20variables.html ---
Recently Mario told me the algorithm for which variables should be implicit. So how come
partial_order.le_antisymm : ∀ {α : Type u_1} [c : partial_order α] (a b : α), a ≤ b → b ≤ a → a = b
? Shouldn't a
and b
be implicit here because you can read them off from e.g. a ≤ b
?
I'd make them implicit too
They are explicit because lean has a bug which makes structure projections not actually work with implicit args
They could also be semi-implicit {{a b: A}}
, but implicit is just inviting confusion when it doesn't work
If the axiom is restated it can be implicit as normal
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


{{#unless ../post_tips_flag}} {{#unless ../post_tips}}
{{_ 'Candidates are having a tough time finding your job.'}}
{{{_ 'Promote posts are strategically placed and stand out when applicants search for jobs.'}}}
{{{_ 'Enable Application Tracking System'}}}
{{{_ ' Enable Interview Scheduler!'}}}
{{{_ 'Get immediate updates on potential talent!'}}}
{{_ "It's nice to know there are new applicants on the way!"}}
{{{_ 'By clicking yes, this post will be removed from searches and your profile.'}}}


Nyzo version 516 (commit on GitHub) further improves performance of the verifier and drastically reduces the time required to resynchronize with the blockchain after a verifier outage. In testing, a verifier shut down for 100 blocks would consistently reinitialize and resynchronize within 60 seconds on a t3.small AWS instance.
This version affects the verifier only. The sentinel uses a different process to track the blockchain.
In BlockVoteManager, the vote maps have been changed to concurrent versions to improve thread safety. The numberOfVotesRequested counter has been eliminated, and lastVoteRequestTimestamp has been renamed to lastFrozenBlockRequestTimestamp to reflect the new recovery process. Also, frozenBlockRequestHeight has been added to support cycling through heights between iterations of the recovery process.
Synchronization is not needed and has been removed from the votesForHeight() method.
The accessor method for numberOfVotesRequested has also been removed, and the requestMissingVotes() method has been renamed to requestMissingFrozenBlocks() to more appropriately describe the new process.
The basic logic that determines whether this verifier has fallen behind is unchanged. There is still a minimum interval between requests, and the 50% threshold still determines whether a request is made. However, where the previous logic was a simple yes/no decision about requesting information about the height just past the frozen edge, the new logic determines a maximum height to request.
The maximum height to request is one behind the maximum height for which 50% or more of the votes are available. The fallback has not been necessary for quite some time, as block votes are periodically rebroadcast if a block is not frozen.
Up to 10 blocks are requested in each iteration. If more than 10 are required, the frozenBlockRequestHeight field is used to ensure the entire range is queried over multiple iterations. There is some room to reduce the overhead of this method by making a single request for a block range, but testing has revealed intermittent issues with such requests failing due to invalid signatures, and that issue has yet to be investigated and resolved.
Missing block votes are no longer requested. The messages remain in the system for compatibility with older verifiers, but they will be removed in a future version.
In UnfrozenBlockManager, the attemptToFreezeBlock() method now returns a value indicating whether a block was frozen.
A new method, attemptToFreezeChain(), has been added. This method will freeze an entire section of the blockchain between the frozen edge and the closest block for which the 75% voting threshold has been exceeded both for itself and for the next block in the chain. This method is the core of the new recovery process.
To support attemptToFreezeChain(), the unverifiedBlockAtHeight() method has been added. Some refactoring has been done to avoid code duplication.
In the Verifier class, total wait time for bootstrap responses has been reduced from 20 seconds to 5 seconds. Even with generous allowances for round-trip latency, 5 seconds is sufficient for all good responses to return and be processed. If one of the trusted entry points is not responsive at the time of initialization, this change will reduce initialization time by approximately 15 seconds.
If a block cannot be frozen using the standard mechanism, the chain mechanism is now attempted. The return value was added to the standard-mechanism method to ensure that it is given first chance to operate, across multiple iterations, on an entire chain of waiting blocks with sufficient votes for freezing.
The updated method name for the revised recovery process is now used.
Visibility of requestBlockWithVotes() has been reduced back to private, as this method is no longer used by BlockVoteManager.
In BlockWithVotesResponse, blocks are now provided when available, even if votes for the block are no longer available. This was initially implemented to assist with the recovery process. While the recovery process no longer uses this message, the modifications were left in place because this is more reasonable than the previous behavior.
In the status response, the number of votes requested is no longer included. This was a significant source of traffic before version 515, but verifiers no longer attempt to get votes for older blocks in the recovery process.


| S | stats toolbox needed | I | interactive (user input required) |
| B | bioinformatics toolbox needed | M | matlab needed (will not work in octave) |
| O | optimization toolbox needed | W | windows needed (will not work in linux) |
| X | currently broken | * | slow (two stars indicates very slow) |
| FILE | DESCRIPTION | TAGS |
|---|---|---|
| mrfCreate | Create a markov random field | |
| mrfInferNodes | Return all node beliefs (single marginals) | |
| mrfInferQuery | Compute sum_H p(Q, H | V) for each Q in queries | |
| mrfMap | Find the mode, (map assignment) | |
| mrfTrain | Train an mrf with partially observed data via EM | |
| sub\Matrixlayout | Create a specialized layout to display a grid in matlab matrix order | |
| sub\mrfToMrf2 | Convert a Markov random field to a pairwise MRF | |
| sub\mrfTrainEm | Train an mrf with partially observed data via EM |


4.5. Exchange Materialization
Presto allows exchange materialization to support memory intensive queries. This mechanism brings MapReduce-style execution to Presto’s MPP architecture runtime, and can be applied together with Spill to Disk.
Introduction
As with other MPP databases, Presto leverages RPC shuffle to achieve efficient and low-latency query execution for join and aggregation. However, RPC shuffle also requires all the producers and consumers to be executed concurrently until the query is finished.
To illustrates this, consider the aggregation query:
SELECT custkey, SUM(totalprice)
FROM orders
GROUP BY custkey
The following figure demonstrates how this query executes in Presto classic mode:
With exchange materialization, the intermediate shuffle data is written to disk (currently, it is always a temporary Hive bucketed table). This opens the opportunity for flexible scheduling policies on the aggregation side, as only a subset of aggregation data needs to be held in memory at the same time – this execution strategy is called “grouped execution” in Presto.
Using Exchange Materialization
Exchange materialization can be enabled on per-query basis by setting the following 3 session properties:
exchange_materialization_strategy
, partitioning_provider_catalog
and hash_partition_count
:
SET SESSION exchange_materialization_strategy='ALL';
-- Set partitioning_provider_catalog to the Hive connector catalog
SET SESSION partitioning_provider_catalog='hive';
-- We recommend setting hash_partition_count to be at least 5X-10X about the cluster size
-- when exchange materialization is enabled.
SET SESSION hash_partition_count = 4096;
To make it easy for user to use exchange materialization, the admin can leverage Session Property Managers
to set the session properties automatically based on client tags. The example in Session Property Managers
demonstrates how to automatically enable exchange materialization for queries with high_mem_etl
tag.


Home
sales
store
conect us
salmon cookie
Hi thank you to visit our website you can find our store in:
Seattle: in street 2th
Tokyo: in street 4hy
Dubai: in nahian street
Paris: in 6tr street
lima : in 7hj street
we are open every day from 6am to 7pm


These fans slam Cristiano Ronaldo for ‘stealing’ teammate’s goal for Portugal
by Jaikuran RandhawaSome football fans have slammed Juventus forward Cristiano Ronaldo for ‘stealing’ teammate Diogo Jota’s goal for Portugal in today’s clash against Luxembourg.
Manchester City ace Bernardo Silva played a pinpoint cross into Jota’s path and the Wolves attacker bundled the ball towards the goal with an acrobatic effort.
Cristiano Ronaldo poked the goal-bound effort over the line to get his 99th international goal.
Take a look at the goal that’s sparked controversy here.
Despite the strike it seems as though the superstar will have to wait until the next international break to get his landmark 100th goal.
Here’s how some fans reacted to the five-time Ballon d’Or winner’s antics:
Perhaps Ronaldo’s decision is a bit harsh considering that this would’ve given Jota his first goal for his country in the international break that he made his debut.
On the other hand, some of the criticism aimed towards Ronaldo could be considered unfair as there could have been a chance that the ball was cleared off the line by Luxembourg’s goalkeeper or defender.


Package contains high-level functions for retrieving molecular interaction data from most public databases using PSICQUIC service (http://www.ebi.ac.uk/Tools/webservices/psicquic/view/main.xhtml) and manipulating that data. Useful features include: retrieve full interactome of a given species, retrieve all interactions between two taxonomy groups (taxonomy structure-aware search), query molecular interaction databases using MIQL, subset interaction data by list of protein/gene identifiers, interaction detection method, publication (PMIDs). Depends on PSICQUIC, data.table.
# Install R PItools package
install.packages("BiocManager") # for installing BioConductor dependencies
BiocManager::install("Biostrings", "remotes") # dependency for PSICQUIC & for installing from github
BiocManager::install("vitkl/PItools", dependencies = T)
Load all interactions between human proteins in IntAct database.
Follow this example for more details.
# load package
library(PItools)
# load all interactions from IntAct FTP storage (https://www.ebi.ac.uk/intact/downloads)
human = fullInteractome(taxid = 9606, database = "IntActFTP",
format = "tab27",
clean = TRUE, # parse into usable format (takes 5-10 minutes)
protein_only = TRUE, # filter protein interactions
directory = NULL) # keep data files inside R library,
# or specify your directory
# protein interactions lack directionality & are detected in multiple studies
# so find the number of unique interactions
uniqueNinteractions(human)
uniqueNinteractors(human)
# subset by a list of proteins
mediator_complex_proteins = fread("https://www.uniprot.org/uniprot/?query=GO:0016592%20AND%20taxonomy:9606&format=tab&columns=id")
mediator_complex = subsetMITABbyID(human, ID_seed = mediator_complex_proteins$Entry,
within_seed = T, only_seed2nonseed = F)
uniqueNinteractions(mediator_complex)
uniqueNinteractors(mediator_complex)
Load interactions for one protein identified with a specific method.
# Query for interactions of bacterial RNA polymerase sigma factor SigA
# identified using two-hybrid methods inall imex databases
# (result identical to IntActFTP but only requested interactions are downloaded)
inter = queryPSICQUICrlib(query = "id:P74565 AND detmethod:\"MI:0018\"",
format = "tab25",
database = "imex",
directory = "./data_files/")
# The data returned by queryPSICQUICrlib constains auxillary information
# that is not necessary for most analysis. Let's clean the data.
inter = cleanMITAB(inter)
inter$data[1:5]
Beware of study bias (ascertainment bias): in aggregated data better studied proteins have more interactions (not a problem for unbiased proteome-wide interaction screens).


TeamCity REST API authorization
REST API login:
REST API password:
Feature toggle
Trigger copy function (REST API authorization required)
Inline screenshots for failed tests
Save


| Interface | Description |
|---|---|
| ServerListInterface |
The interface for the server list tabs.
|
| Class | Description |
|---|---|
| ButtonTabComponent |
Component to be used as tabComponent;
Contains a JLabel to show the text and
a JButton to close the tab it belongs to
|
| ChivServer |
Represents a Chivalry: Medieval Warfare server.
|
| DocumentInputFilter |
This class will check for any invalid input and present
a Dialog Message to user, for entering appropriate input.
|
| FiltersPanel |
The common server filter panel for all of the server list tabs.
|
| FriendQuery |
Queries the Steam Community servers for information about the user's Steam friends.
|
| FriendsTab |
The tab that contains the Steam friends list.
|
| GamepadKeybindDialog |
The dialog that pops up for editing the gamepad button binds.
|
| GamepadKeybindTab |
Tab that can view and change gamepad button bindings for Chivalry: Medieval Warfare.
|
| GamepadSensitivityDialog |
The dialog for editing the gamepad's look sensitivity which is bound to the
right thumbstick.
|
| Keybinds |
A data structure class containing the names of all of the gamepad buttons
and the names of all of the commands as used by the UDKSystemSettings.ini.
|
| Location |
Super class of the location classes.
|
| LocationARIN |
Gets the location information of a server via its IP address from the
ARIN WHOIS services.
|
| LocationRIPE |
Gets the location information of a server via its IP address from the
RIPE WHOIS services.
|
| MainWindow |
The main class that creates the frame and all other components.
|
| MasterServerQuery |
Superclass for the low level server refreshing.
|
| MasterServerQueryBeta |
Controls the low level refreshing for beta servers.
|
| MasterServerQueryFav |
Controls the low level refreshing for favorite servers.
|
| MasterServerQueryHistory |
Controls the low level refreshing for recently joined (history) servers.
|
| MasterServerQueryNormal |
Controls the low level refreshing for normal servers.
|
| PlayerComparator |
Comparator used in the server list tables for sorting the Players
column.
|
| QueryServerCondenser |
Queries an individual Chivalry server.
|
| QueryWorker |
The thread responsible for querying a specific server to get its data and location.
|
| QueryWorkerSynch |
Synchronization object for
QueryWorker threads. |
| Refresher |
Superclass for high level server refreshing.
|
| RefresherBeta |
Controls the high level refreshing for beta servers.
|
| RefresherFav |
Controls the high level refreshing for favorite servers.
|
| RefresherHistory |
Controls the high level refreshing for server history.
|
| RefresherNormal |
Controls the high level refreshing for normal servers.
|
| ServerFilters |
A data structure class that holds all of the server filters for a
ServerListInterface . |
| ServerListBetaTab |
The server list tab for beta Chivalry: Medieval Warfare servers.
|
| ServerListFavTab |
The server list tab for favorite Chivalry: Medieval Warfare servers.
|
| ServerListHistoryTab |
The server list tab for recently joined (history) Chivalry: Medieval Warfare servers.
|
| ServerListNormalTab |
The server list tab for normal Chivalry: Medieval Warfare servers.
|
| ServerListTab |
Superclass for the server list tabs.
|
| ServerQuery |
Queries a single Chivalry: Medieval Warfare server for its information,
game rules, or players.
|
| ServerTab |
The tab created for an individual server to show more details about that server.
|
| ServerTable |
The
JTable wrapped in a JScrollPane that displays the servers queried
on each server list tab. |
| SettingsTab |
The settings tab where the user can change settings of the application
and video settings of Chivalry Medieval Warfare.
|
| SteamProfile |
A data structure class containing information about a specific Steam profile.
|
| XMLData2 |
This class provides basic functionality to parse XML data
|


Contents
- import libraries and their dependencies
- parameters you should modify
- load data and masks
- configure inner cross validation loop
- configure region selection loop
- Evaluate overall model performance
- plot best region
- test on new data
- apply model performance estimator to new data
- Additional comments
- utility functions
% this script identifies the most predictive region, and estimates its % performance for a single dataset % The model is then tested on a second dataset % % We use MSE as our performance metric throughout, but given how noisy fMRI % data is at the between subject level, this may not be the best choice. % Look in the scorers folder of ooFmriDataPredictML for other options and % examples of how you might go about designing your own. I kind of suspect % a random slope, random intercept mixed model likelihood function would be % best, however it would be much slower to evaluate. close all; clear all;
import libraries and their dependencies
addpath('/projects/bope9760/spm12'); % canlabCore dep addpath(genpath('/projects/bope9760/software/canlab/CanlabCore')); % canlab_single_trails* and ooFmriDataObjML dep addpath(genpath('/projects/bope9760/software/canlab/Neuroimaging_Pattern_Masks')); % canlab_single_trails* and ooFmriDataObjML dep addpath(genpath('/projects/bope9760/software/canlab/MasksPrivate')); % canlab_single_trails* and ooFmriDataObjML dep addpath(genpath('/projects/bope9760/software/canlab/CanlabPrivate')); % canlab_single_trails* and ooFmriDataObjML dep addpath(genpath('/work/ics/data/projects/wagerlab/labdata/projects/canlab_single_trials_for_git_repo/')); % canlab_single_trials dep addpath(genpath('/projects/bope9760/software/canlab/canlab_single_trials')); % data repo addpath(genpath('/projects/bope9760/software/canlab/canlab_single_trials_private')); % data repo addpath('/projects/bope9760/software/combat/ComBatHarmonization/Matlab/scripts'); % ooFmriDataObjML dep addpath(genpath('/projects/bope9760/software/canlab/ooFmriDataObjML')); % an MVPA modeling framework if ~isempty(gcp('nocreate')) delete(gcp('nocreate')); end
parameters you should modify
update this to match whatever your parallel pool is. Don't count hyperthreads, only physical cores.
parpool(8)
Starting parallel pool (parpool) using the 'local' profile ... connected to 8 workers. ans = Pool with properties: Connected: true NumWorkers: 8 Cluster: local AttachedFiles: {} AutoAddClientPath: true IdleTimeout: 360 minutes (360 minutes remaining) SpmdEnabled: true
load data and masks
nsf = load_image_set('nsf'); nsfStim = avgByStimLvl2(nsf, double(categorical(nsf.metadata_table.subject_id)), nsf.metadata_table.T); % not the same as single trial predictions, but faster so good for a demo nsfStim = nsfStim.apply_mask(fmri_mask_image(which('gray_matter_mask.img'))); buckner = load_atlas('buckner'); buckner.probability_maps = []; % these break resample space right now, so let's drop them buckner = buckner.resample_space(nsf); % this will allow for a speed up in fmri2VxlFeatTransformer buckner = buckner.apply_mask(fmri_mask_image(which('gray_matter_mask.img'))); nsfStim = nsfStim.apply_mask(buckner); % this will drop subcortical and cerebellar regions that buckner doesn't have
Loading: /work/ics/data/projects/wagerlab/labdata/projects/canlab_single_trials_for_git_repo/nsf_data.mat Number of unique values in dataset: 136162681 Bit rate: 27.02 bits Number of unique values in dataset: 329041 Bit rate: 18.33 bits Number of unique values in dataset: 329041 Bit rate: 18.33 bits Source: NSF data aggregated from Tor Wager's single trials Google Drive ____________________________________________________________________________________________________________________________________________ Wager, et al. (2013) New England Journal of Medicine Atlas, et al. (2014) Pain ____________________________________________________________________________________________________________________________________________ Summary of dataset ______________________________________________________ Images: 1149 Nonempty: 1149 Complete: 1149 Voxels: 329694 Nonempty: 329694 Complete: 328249 Unique data values: 136162680 Min: -1312.863 Max: 888.306 Mean: -0.351 Std: 21.183 Percentiles Values ___________ __________ 0.1 -134.41 0.5 -81.216 1 -63.577 5 -31.933 25 -8.2459 50 3.1861e-06 75 8.286 95 29.963 99 56.493 99.5 70.713 99.9 112.42 Pain ratings in image_obj.Y Additional metadata in image_obj.additional_info struct Loaded images:
configure inner cross validation loop
this estimates the performance of a region we will use PLS with Bayesian Optimization of dimensions. Other algorithms are available, and gridSearchCV is also available for hyperparam selection. It's usage will be demonstrated subsequently.
alg = plsRegressor(); inner_cv = @(X,Y) cvpartition2(length(Y), 'GroupKFold', 5, 'Group', X.metadata); % this is modeled after the native matlab cvpartition object. % notice that inner_cv is a function, not a cvpartition2 object. Calling % inner_cv on some data will return a appropriately constructed % cvpartition2 object. This is important because crossValidator objects % need instructions on how to generate these things, not specific instances % of them. % next two lines are basically the same as if you were invoking the % bayesopt native matlab function. Notice however that we're only % evaluating 15 points. Default is 30, and typically I wouldn't assume 15 % is enough. We also restrict the dimensionality to 30 dims though under % the assumption that PLS will find a solution in the lower dimensions, so % it may be sufficient here. Either way, this is only a demo so it hardly % matters. dims = optimizableVariable('numcomponents',[1,30], 'Type', 'integer', 'Transform', 'log'); bayesOptOpts = {dims, 'AcquisitionFunctionName', 'expected-improvement-plus', ... 'MaxObjectiveEvaluations', 15, 'UseParallel' true, 'verbose', 0, 'PlotFcn', {}}; bo_alg = bayesOptCV(alg, inner_cv, @get_mse, bayesOptOpts); % test algorithm dat = features(nsfStim.dat', nsfStim.metadata_table.subject_id); % this is an "extended double" that is just a double with metadata in the dat.metadata field bo_alg.fit(dat, nsfStim.metadata_table.T); % note handle invocation doesn't use assignment operator.
configure region selection loop
this selects a best region. Here we will use gridSearchCV to test all regions exhaustively, and we will demonstrate the use of a pipeline for the first time.
mid_cv = @(X,Y) cvpartition2(length(Y), 'GroupKFold', 5, 'Group', X.metadata_table.subject_id); % similar to inner_cv but with different metadata field because input is type fmri_data now, not features % this is a transformer with an 'atlasRegion' hyper parameter % mask2Region.transform(fmri_data) will return an fmri_data object that has % been masked to the region from mask2Region.atlas that matches the named % in 'atlasRegion'. mask2Region.atlas is set in the constructor, and we set % it here to canlab2018 mask2Region = getAtlasRegion(buckner, 'verbose', false); % mask2Region may take fmri_data objects as input, but our bayes optimized % PLS does not, so we also need a transformer that takes fmri_data objects % as inputs and returns a features object.  The invocation here is % trivial, but when you have multiple items you need in your features % metadata (e.g. subject_ids and study_ids), it can be helpful to insert a % table constructor object in there instead so that your data is labeled. fmriDat2Feat = fmri2VxlFeatTransformer('metadataConstructor_funhan', @(X) X.metadata_table.subject_id); % the next line creates a meta algorithm that combines mask2Region and % bayes optimized PLS into a single pipeline. The syntax is pretty similar % to scikit learn's here, although I think scikit-learn might not % interleave names and elements but, rather sort them sequentially instead. bo_alg_region = pipeline({{'mask', mask2Region}, {'fmriDat2Feat', fmriDat2Feat}, {'bayesOptPLS', bo_alg}}); % we now define our hyperparameter search space, but our grid search % algorithm needs to know which component of the pipeline a hyperparameter % belongs to, so the syntax also indicates this by prefixing the pipeline % elements name with the double underscore. This follows the scikit-learn % convention. % optimizers should throw an error when initialized if these variables are % misnamed. gridPoints = table(buckner.labels', 'VariableNames', {'mask__atlasRegion'}); % parallellizing here is often helpful. Normally parallelizing at the top % level is most efficient, but the top level will only have 5 threads for % 5-fold CV, while the gridSearch will have as many threads as there are % candidate atlas regions, often many, so you can get many more parallel % jobs running if you parallelize here. In this case we're using a very % basic atlas that only has 7 regions, so parallelization is still more % efficient at the next level down where we have 15 loops. You can control % parallelization with the n_parallel argument though. Just bear in mind % that you can't parallelize at more than one level. gs_alg = gridSearchCV(bo_alg_region, gridPoints, mid_cv, @get_mse, 'verbose', true, 'n_parallel', 1); % we don't need to run this here, but this is a helpful test that the code % thus far works as intended. This is also the function who's performance % we want to ultimately estimate, so we'd need to fit it later to test on % bmrk3pain anyway. gs_alg.fit(nsfStim, nsfStim.metadata_table.T) % check which region was best fprintf('best region: %s\n', gs_alg.estimator.transformers{1}.atlasRegion{1});
mask__atlasRegion | Loss | 'Visual' [8.8590] 'Somatomotor' [6.2587] 'dAttention' [7.8906] 'vAttention' [6.5006] 'Limbic' [7.8037] 'Frontoparietal' [8.8330] 'Default' [7.4855] ans = gridSearchCV with properties: estimator: [1×1 pipeline] cv: [function_handle] scorer: @get_mse verbose: 1 n_parallel: 1 gridPoints: [7×1 table] group_id: [] isFitted: 1 fitTime: 338.8566 best region: Somatomotor
Evaluate overall model performance
outer_cv = @(X,Y) cvpartition2(length(Y), 'GroupKFold', 5, 'Group', X.metadata_table.subject_id); cv = crossValScore(gs_alg, outer_cv, @get_mse, 'verbose', true); cv.do(nsfStim,nsfStim.metadata_table.T) cv.do_null(); % this tests the null performance given our partitioning scheme cv.plot(); % this will only work if outer_cv partitions are non-overlapping.
Evaluating fold 1/5 mask__atlasRegion | Loss | 'Visual' [9.6391] 'Somatomotor' [8.1060] 'dAttention' [7.6492] 'vAttention' [9.1493] 'Limbic' [10.1919] 'Frontoparietal' [11.6275] 'Default' [7.5171] Evaluating fold 2/5 mask__atlasRegion | Loss | 'Visual' [8.4125] 'Somatomotor' [6.9943] 'dAttention' [7.7065] 'vAttention' [7.6386] 'Limbic' [9.7326] 'Frontoparietal' [9.5646] 'Default' [8.1155] Evaluating fold 3/5 mask__atlasRegion | Loss | 'Visual' [9.4139] 'Somatomotor' [7.8796] 'dAttention' [6.8374] 'vAttention' [6.8757] 'Limbic' [8.8621] 'Frontoparietal' [7.1591] 'Default' [8.6208] Evaluating fold 4/5 mask__atlasRegion | Loss | 'Visual' [8.8925] 'Somatomotor' [4.7373] 'dAttention' [5.2810] 'vAttention' [6.9254] 'Limbic' [6.1984] 'Frontoparietal' [7.3140] 'Default' [6.2748] Evaluating fold 5/5 mask__atlasRegion | Loss | 'Visual' [9.4190] 'Somatomotor' [7.8616] 'dAttention' [8.5115] 'vAttention' [8.4604] 'Limbic' [9.7653] 'Frontoparietal' [12.6825] 'Default' [7.6837] ans = crossValScore with properties: cvpart: [1×1 cvpartition2] scorer: @get_mse scores: [5×1 double] scores_null: [] evalTimeScorer: 0.0043 evalTimeFits: 1.5977e+03 yfit: {1×5 cell} yfit_raw: {1×5 cell} yfit_null: [] Y: {1×5 cell} repartOnFit: 0 cv: [function_handle] n_parallel: 1 estimator: [1×1 gridSearchCV] foldEstimator: {5×1 cell} verbose: 1 evalTime: 1.5977e+03 is_done: 1 fold_lbls: [104×1 double] classLabels: {1×5 cell}
plot best region
figure; brain = gs_alg.estimator.transformers{2}.brainModel; brain.dat = gs_alg.getBaseEstimator.B(:); brain.montage();
Setting up fmridisplay objects sagittal montage: 318 voxels displayed, 19062 not displayed on these slices sagittal montage: 305 voxels displayed, 19075 not displayed on these slices sagittal montage: 157 voxels displayed, 19223 not displayed on these slices axial montage: 1941 voxels displayed, 17439 not displayed on these slices axial montage: 2095 voxels displayed, 17285 not displayed on these slices
test on new data
since we've already run gs_alg.fit() all that's left is to run gs_alg.predict();
test_dat = load_image_set('bmrk3pain'); test_dat = avgByStimLvl2(test_dat, double(categorical(test_dat.metadata_table.subject_id)), test_dat.metadata_table.T); yfit = gs_alg.predict(test_dat); subjid = double(categorical(test_dat.metadata_table.subject_id)); % ensures type 'double' figure; subplot(1,2,1); line_plot_multisubject(test_dat.Y, yfit, 'subjid', subjid); title('BMRK3 Pain Best ROI PLS Predictions'); ylabel('Predicted'); xlabel('Observed'); subplot(1,2,2); line_plot_multisubject(test_dat.Y, yfit, 'subjid', subjid, 'center'); title('BMRK3 Pain Best ROI PLS Predictions (Centered)'); ylabel('Predicted'); xlabel('Observed'); set(gcf,'Position', [1000,814,1149,467])
Loading: /work/ics/data/projects/wagerlab/labdata/projects/canlab_single_trials_for_git_repo/bmrk3pain_data.mat Number of unique values in dataset: 135864813 Bit rate: 27.02 bits Number of unique values in dataset: 328117 Bit rate: 18.32 bits Number of unique values in dataset: 328117 Bit rate: 18.32 bits Source: bmrk3pain img data from Tor Wager's single trials Google Drive. Metadata also from wagerlab/labdata/current/BMRK3/ HPC storage ____________________________________________________________________________________________________________________________________________ Wager, et al. (2013) New England Journal of Medicine Woo et al. (2015) PLoS Biology ____________________________________________________________________________________________________________________________________________ Summary of dataset ______________________________________________________ Images: 1699 Nonempty: 1699 Complete: 1699 Voxels: 328798 Nonempty: 328798 Complete: 327472 Unique data values: 135864812 Min: -133.823 Max: 84.093 Mean: -0.006 Std: 0.545 Percentiles Values ___________ ___________ 0.1 -3.469 0.5 -1.9328 1 -1.4777 5 -0.72485 25 -0.20535 50 -0.00043151 75 0.19939 95 0.69711 99 1.3839 99.5 1.7974 99.9 3.2719 Pain ratings in image_obj.Y Additional metadata in image_obj.additional_info struct Loaded images: Warnings: ____________________________________________________________________________________________________________________________________________ X: input cells with low varability: 27 33 Y: input cells with low varability: 9 32 ____________________________________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________________________________ Input data: X scaling: No centering or z-scoring Y scaling: No centering or z-scoring Transformations: No data transformations before plot Correlations: r = 0.31 across all observations, based on untransformed input data Stats on slopes after transformation, subject is random effect: Mean b = 0.00, t( 32) = 2.76, p = 0.009448, num. missing: 0 Average within-person r = 0.48 +- 0.51 (std) Between-person r (across subject means) = 0.12, p = 0.509710 ____________________________________________________________________________________________________________________________________________ Warnings: ____________________________________________________________________________________________________________________________________________ X: input cells with low varability: 27 33 Y: input cells with low varability: 9 32 ____________________________________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________________________________ Input data: X scaling: No centering or z-scoring Y scaling: No centering or z-scoring Transformations: X and Y centered (forced mean-zero) before plot Correlations: r = 0.50 across all observations, removing subject mean (X and Y are centered) Stats on slopes after transformation, subject is random effect: Mean b = 0.00, t( 32) = 2.76, p = 0.009448, num. missing: 0 Average within-person r = 0.48 +- 0.51 (std) * Note that the overall r and average within-person r may be similar because subject mean is removed Between-person r (across subject means) = 0.12, p = 0.509710 ____________________________________________________________________________________________________________________________________________
apply model performance estimator to new data
there were a lot of lines of code to produce the above cross validated performance estimator, but reusing it is simple.
because crossValidators are handles, we have to invoke the copy method to copy by value instead of the default for handles which is copy by reference. We want to copy it so that we don't overwrite the old performance metrics.
cv2 = copy(cv); cv2.do(test_dat, test_dat.metadata_table.T); cv2.do_null() cv2.plot();
Evaluating fold 1/5 mask__atlasRegion | Loss | 'Visual' [3.8085] 'Somatomotor' [2.2128] 'dAttention' [2.6484] 'vAttention' [2.1840] 'Limbic' [2.2833] 'Frontoparietal' [2.0114] 'Default' [1.8529] Evaluating fold 2/5 mask__atlasRegion | Loss | 'Visual' [3.2722] 'Somatomotor' [2.1354] 'dAttention' [2.6467] 'vAttention' [1.9771] 'Limbic' [2.7473] 'Frontoparietal' [3.1128] 'Default' [2.8714] Evaluating fold 3/5 mask__atlasRegion | Loss | 'Visual' [3.4331] 'Somatomotor' [2.5211] 'dAttention' [3.0798] 'vAttention' [2.0920] 'Limbic' [3.5775] 'Frontoparietal' [2.2912] 'Default' [2.8309] Evaluating fold 4/5 mask__atlasRegion | Loss | 'Visual' [3.2877] 'Somatomotor' [2.1860] 'dAttention' [4.5253] 'vAttention' [2.1662] 'Limbic' [2.3981] 'Frontoparietal' [2.5722] 'Default' [2.6325] Evaluating fold 5/5 mask__atlasRegion | Loss | 'Visual' [3.2233] 'Somatomotor' [2.7997] 'dAttention' [3.4289] 'vAttention' [2.3544] 'Limbic' [3.4389] 'Frontoparietal' [2.7438] 'Default' [2.7539] ans = crossValScore with properties: cvpart: [1×1 cvpartition2] scorer: @get_mse scores: [5×1 double] scores_null: [4.3080 2.4942 2.2985 3.4264 2.3668] evalTimeScorer: 0.0058 evalTimeFits: 1.6001e+03 yfit: {1×5 cell} yfit_raw: {1×5 cell} yfit_null: {1×5 cell} Y: {1×5 cell} repartOnFit: 0 cv: [function_handle] n_parallel: 1 estimator: [1×1 gridSearchCV] foldEstimator: {5×1 cell} verbose: 1 evalTime: 1.6001e+03 is_done: 1 fold_lbls: [104×1 double] classLabels: {1×5 cell}
Additional comments
notice that there's a scale problem when applying this data to a new dataset. Data harmonization procedures would be helpful to address this, and might also improve within study performance. That exceeds the scope of this demo, but it would be fairly straightforward to incorporate some additional transformers into the gs_alg pipeline to handle data harmonization. A couple are in the ooFmriDataPredictML/transformers folder already if you would like to use them, or you can write your own that extend baseTransformer.
utility functions
function [dat, study_id] = avgByStimLvl2(dat, study_id)
dat - canlab fmridata_obj sid - subject ids stimLvl - stimulus level indicator variable
function [dat, newsid, newstimLvl] = avgByStimLvl2(dat, sid, stimLvl) Y = stimLvl; [~,~,num_sid] = unique(sid,'stable'); X = dat.dat'; [~, newOrder] = sortrows([num_sid, Y]); [~,origOrder] = sort(newOrder); X = X(newOrder,:); Y = Y(newOrder); num_sid = num_sid(newOrder); [~,exp,grp] = unique([num_sid, Y],'rows','stable'); uniq_grp = unique(grp); % get centering matrix n_grp = length(uniq_grp); cmat = cell(1,n_grp); for i = 1:n_grp this_grp = uniq_grp(i); this_n = sum(this_grp == grp); cmat{i} = eye(this_n) - 1/this_n; end cmat = blkdiag(cmat{:}); X = X - cmat*X; Y = Y - cmat*Y; newsid = num_sid(exp); newstimLvl = Y(exp); dat = dat.get_wh_image(newOrder(exp)); dat.dat = X(exp,:)'; dat.history{end+1} = ['averaged over stimulus level within subject']; dat.source_notes = []; end
Direct calls to spm_defauts are deprecated. Please use spm('Defaults',modality) or spm_get_defaults instead. Loading atlas: buckner_networks_atlas_object.mat


To make it easier to add or reorder new attributes, parameters, etc., a trailing comma should be added after the last:
file { 'foo': ensure => link, target => '/tmp/foo.bar' # Noncompliant } class my_class ( $param1, $param2 # Noncompliant ) { }
file { 'foo': ensure => link, target => '/tmp/foo.bar', } class my_class ( $param1, $param2, ) { }
If a resource expression includes more than one resource body, the trailing comma is not mandatory.
file { 'foo': ensure => link, target => '/tmp/foo',; # Compliant 'bar': ensure => link, target => '/tmp/bar'; # Compliant }


Fashion
...is the second dirtiest industry in the world.
Right next to oil companies.
7 trillion liters of water are consumed on an annual basis in order to meet global textile demands
for more than 7 million people in the US for 1 year.
The dyes used run off into the river and not only
are toxic to the environment,
but to the people who still have to use these rivers for water
132 million tons of coal is consumed from garment factories on an annual basis
The world now consumes about 80 billion new pieces of clothing every year.
This is 400% more than the amount we consumed just two decades ago.
90% of clothes donated to charities actually get sold to developing countries or end up filling up landfills.
Second-hand clothing competes with local businesses and devastates their economies.
\
The average American now generates 82 lbs. of textile waste each year.
It takes 200 years for polyester to break down
Assuming infinite resources in a finite world is not a sustainable model.
ALTERNATIVES
Buy Less
Upcycle
Buy Ethical
As a previous fashion student I got to explore all the aspects of the fashion industry.
I have come to know what it means to be moved by clothing growing up with my grandmother who was a lifelong seamstress.
Discovering the truths about the mass production of fast fashion today is disheartening compared to the craft
of what apparel design is to say the least. I was compelled to express this through the website and hope
to educate the realities of the dying craft and hope to inspire better apparel consumption.


{% extends "base.html" %}
{% block title %}{{ object.name }}{% endblock title %}
{% block main %}
{% include "core/includes/key.html" %}
{{ object.name }}
{% if object.is_private %}
Private
{% endif %}
{% if object.based_near.count %}
{% for place in object.based_near.all %}
{% include 'geonames_place/includes/place.html' with place=place %}{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endif %}
{% include "agents/includes/pages.html" %}
{% include "agents/includes/roles.html" %}
{% include "agents/includes/contributed_to.html" %}
{% include "agents/includes/agents.html" with title='Members' agents=object.members %}
{% if object.resources.count %}


§432:2-705 Severability. If any provision of this article or the application of such provision to any circumstance is held invalid, the remainder of the article or the application of the provision to other circumstances, shall not be affected thereby. [L 1987, c 347, pt of §2]


--- layout: post status: publish published: true title: Receiving Binary Messages in BizTalk author: display_name: Tomas Restrepo login: tomasr email<EMAIL_ADDRESS>url: http://winterdom.com/ author_login: tomasr author_email<EMAIL_ADDRESS>author_url: http://winterdom.com/ wordpress_id: 1023 wordpress_url: http://winterdom.com/2006/11/receivingbinarymessagesinbiztalk date: '2006-12-01 18:41:03 +0000' date_gmt: '2006-12-01 18:41:03 +0000' categories: - BizTalk tags: [] comments: - id: 7328 author: Akhtar Hossain author_email<EMAIL_ADDRESS>author_url: '' date: '2013-01-22 19:10:32 +0000' date_gmt: '2013-01-22 19:10:32 +0000' content: I was able to use your code base to upload binary data to an Oracle BLOB column using a custom .net helper component and calling that component from Orchestration. I am happy with the solution even with performance limitation. My usage scenario worked well - id: 83725 author: Martin Frey author_email<EMAIL_ADDRESS>author_url: '' date: '2014-03-14 09:02:31 +0000' date_gmt: '2014-03-14 09:02:31 +0000' content: Your solution works perfectly for me to pass through a zip file. Thanks a lot! - id: 86278 author: BizTalk + SSIS | - author_email: '' author_url: http://manuelalexis.wordpress.com/2014/03/18/biztalk-ssis/ date: '2014-03-18 15:42:44 +0000' date_gmt: '2014-03-18 15:42:44 +0000' content: "[…] http://winterdom.com/2006/12/receivingbinarymessagesinbiztalk […]" ---
On a recent project, we had to deal with binary messages in BizTalk Server 2004. Specifically, we needed to run a binary message through an orchestration, both receiving it and sending it through messaging ports, as well as passing it to custom .NET components that knew how to manipulate it.
In our case, this was basically a binary compressed (zipped message), which we decided explicitly not to decompress during a pipeline, and instead always keep it in it's original raw form. Handling it wasn't much of a problem for the most part, since you can apply the same trick the RawString class does, but just keeping the contents as a Byte[] instead of a string (implementing it from scratch left as an exercise for the reader).
The only tricky part was getting BizTalk to receive the raw binary message and fire off our orchestration to process it without jumping through too many hoops. Scott Colestock has a great entry on how to receive a RawString on an orchestration, so we obviously turn to that for inspiration. But, even with all the great advice from Scott and both alternatives presented there, it's still quite a bit of work.
Fortunately, working with my friend Gustavo we found out an easier way that didn't involve multipart message types or custom pipelines. It goes like this:
The BizTalk orchestration is setup to receive a message of type XmlDocument, which ensures that the activation subscription for the orchestration does not contain a MessageType-based predicate. Then, we construct a new message declared using our custom .NET class (let's call it BinaryMessage), and initialize it in a Message Assignment shape by calling the new operator to call a constructor, passing the original XmlDocument message as an argument.
Here's were we differ from the other proposed solutions: Our custom constructor takes an XLANGMessage instance as an argument. We figured it wouldn't work at first because the original message in the orchestration was an XmlDocument and not a regular BizTalk message, but it didn't cause a problem. Anyway, since we have the XLANGMessage instance, we could simply get the body part and call RetrieveAs() to get the contents of the message as a Stream and read that into our internal Byte[] array, like this:
public BinaryMessage(XLANGMessage doc)
{
Stream stream = (Stream)doc[0].RetrieveAs(typeof(Stream));
using (stream)
{
MemoryStream tempStream = new MemoryStream();
byte[] buffer = new byte[64*1024];
int bytesRead = 0;
while ( (bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0 )
tempStream.Write(buffer, 0, bytesRead);
Contents = tempStream.ToArray();
}
}
Granted, the solution isn't terribly efficient (since it does involve doing a message copy), but since we're only going to be processing about a couple messages a day, that wasn't a significant concern.