You can find more Astoria Astoria, OR alumni who participated in activities at Classmates.com®. Click here to join Classmates.com® for free and to view AHS profiles.
Choose an activity that students at AHS could particpate during their time in high school in Astoria to view the names of the students who participated in that sport or activity. You can also add yourself to the list.	The main activities at Astoria Astoria, OR that have members on this site were Art Club, Band, Baseball, Basketball, Drama, Football, Music, Soccer, Student Council, Swimming, Track, Volleyball, Wrestling and Yearbook.


text:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Drawing;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Web;
using System.Web.Script.Serialization;

namespace WebClient.Controllers
{
    /*
    public class FileUploadController : ApiController
    {
        private readonly JavaScriptSerializer _js = new JavaScriptSerializer { MaxJsonLength = 41943040 };
        private readonly string _storageRoot = HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["FileUploadPath"]);

        public bool _isReusable { get { return false; } }

        public HttpResponseMessage Delete()
        {
            //var repository = Poligono.Core.NinjectBase.GetTempRepository();
            //var filePath = Path.Combine(repository.BasePath, HttpContext.Current.Request["f"]);

            var filePath = Path.Combine(_storageRoot, HttpContext.Current.Request["f"]);
            if (File.Exists(filePath))
            {
                File.Delete(filePath);
            }
            return ControllerContext.Request.CreateResponse(HttpStatusCode.OK, "");
        }

        public HttpResponseMessage Post()
        {
            return UploadFile(HttpContext.Current);
        }

        public HttpResponseMessage Put()
        {
            return UploadFile(HttpContext.Current);
        }

        private HttpResponseMessage UploadFile(HttpContext context)
        {
            var statuses = new List<FilesStatus>();
            var headers = context.Request.Headers;

            if (string.IsNullOrEmpty(headers["X-File-Name"]))
            {
                UploadWholeFile(context, statuses);
            }
            else
            {
                UploadPartialFile(headers["X-File-Name"], context, statuses);
            }

            return WriteJsonIframeSafe(context, statuses);
        }

        private HttpResponseMessage WriteJsonIframeSafe(HttpContext context, List<FilesStatus> statuses)
        {
            context.Response.AddHeader("Vary", "Accept");

            var json = new
            {
                files = statuses.ToArray()
            };

            var response = new HttpResponseMessage()
            {
                Content = new StringContent(_js.Serialize(json))
            };
            if (context.Request["HTTP_ACCEPT"].Contains("application/json"))
            {
                response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
            }
            else
            {
                response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/plain");
            }
            return response;
        }

        // Upload partial file
        private void UploadPartialFile(string fileName, HttpContext context, List<FilesStatus> statuses)
        {
            if (context.Request.Files.Count != 1) throw new HttpRequestValidationException("Attempt to upload chunked file containing more than one fragment per request");
            var inputStream = context.Request.Files[0].InputStream;
            var fileSplit = fileName.Split('.');
            string ext = null;
            if (fileSplit.Length > 0 && fileSplit[fileSplit.Length - 1].Length <= 4)//have extension
            {
                ext = "." + fileSplit[fileSplit.Length - 1];
            }
            //var repository = Poligono.Core.NinjectBase.GetTempRepository();
            //var newName = repository.WriteFile(inputStream, ext);
            //var fullName = Path.Combine(repository.BasePath, newName);
            //statuses.Add(new FilesStatus(new FileInfo(fullName), fileName));
        }

        // Upload entire file
        private void UploadWholeFile(HttpContext context, List<FilesStatus> statuses)
        {
            //var repository = Poligono.Core.NinjectBase.GetTempRepository();
            for (int i = 0; i < context.Request.Files.Count; i++)
            {
                var file = context.Request.Files[i];
                var inputStream = context.Request.Files[0].InputStream;
                var fileSplit = file.FileName.Split('.');
                string ext = null;
                if (fileSplit.Length > 0 && fileSplit[fileSplit.Length - 1].Length <= 4)//have extension
                {
                    ext = "." + fileSplit[fileSplit.Length - 1];
                }
                //var newName = repository.WriteFile(file.InputStream, ext);
                //var fullName = Path.Combine(repository.BasePath, newName);
                //statuses.Add(new FilesStatus(new FileInfo(fullName), file.FileName));
            }
        }
    }
    */
    #region FileStatus
    public class FilesStatus
    {
        //public const string HandlerPath = "/";

        public string group { get; set; }
        public string name { get; set; }
        public string displayName { get; set; }
        public string type { get; set; }
        public int size { get; set; }
        public string progress { get; set; }
        public string url { get; set; }
        public string thumbnail_url { get; set; }
        public string delete_url { get; set; }
        public string delete_type { get; set; }
        public string error { get; set; }

        public FilesStatus()
        {
        }

        public FilesStatus(FileInfo fileInfo, string displayName = null)
        {
            SetValues(fileInfo.Name, (int)fileInfo.Length, fileInfo.FullName);
            if (displayName != null)
                this.displayName = displayName;
        }

        public FilesStatus(string fileName, int fileLength, string fullPath)
        {
            SetValues(fileName, fileLength, fullPath);
        }

        private void SetValues(string fileName, int fileLength, string fullPath)
        {
            name = fileName;
            type = "image/png";
            size = fileLength;
            progress = "1.0";
            url = "FileUpload?f=" + fileName;
            delete_url = "FileUpload?f=" + fileName;
            delete_type = "DELETE";
            var ext = Path.GetExtension(fullPath);
            var fileSize = ConvertBytesToMegabytes(new FileInfo(fullPath).Length);
            if (fileSize > 3 || !IsImage(ext))
            {
                thumbnail_url = "/Content/img/generalFile.png";
            }
            else
            {
                thumbnail_url = @"data:image/png;base64," + EncodeFile(fullPath);
            }
        }

        private bool IsImage(string ext)
        {
            return ext == ".gif" || ext == ".jpg" || ext == ".png";
        }

        private string EncodeFile(string fileName)
        {
            byte[] bytes;
            using (Image image = Image.FromFile(fileName))
            {
                var ratioX = (double)80 / image.Width;
                var ratioY = (double)80 / image.Height;
                var ratio = Math.Min(ratioX, ratioY);
                var newWidth = (int)(image.Width * ratio);
                var newHeight = (int)(image.Height * ratio);
                var newImage = new Bitmap(newWidth, newHeight);
                Graphics.FromImage(newImage).DrawImage(image, 0, 0, newWidth, newHeight);
                ImageConverter converter = new ImageConverter();
                bytes = (byte[])converter.ConvertTo(newImage, typeof(byte[]));
                newImage.Dispose();
            }
            return Convert.ToBase64String(bytes);
        }

        private static double ConvertBytesToMegabytes(long bytes)
        {
            return (bytes / 1024f) / 1024f;
        }
    }
    #endregion
}

redpajama_set_name: RedPajamaGithub


There is absolutely no way I can recall everything that went on in JavaOne but I will try to do my best. I arrived sick and on pretty strong medication for my sinuses so my recollection might be a bit hazy, I did meet great people and had loads of fun.
Before JavaOne started I had a meeting with Arno of the XMLVM project, I was hoping to get more facetime with him and to maybe actually code something together but he was on his way for the rest of the week due to other duties. We discussed some of the issues with XMLVM and the potential of forking vs. merging our changes with the main XMLVM code base. The way things look it seems that we will have to take over XMLVM or at least the iOS/Windows Phone ports.
Later in the conference I had a meeting with Niklas Therning of RoboVM , who like Arno is a great and interesting fellow.
I've been giving a lot of thoughts to XMLVM and RoboVM over the past few months, both have done a lot of work and each has its advantages/disadvantages. I've asked Steve Hannah to run his benchmarks for me on devices with some settings I asked for. Initially it seemed that RoboVM smoked XMLVM but when running on the devices the differences became far less pronounced.
We can debug it (although its inconvenient).
We can maintain it, I'm sure we can maintain RoboVM too if Niklas decides to quit but we already know we can maintain XMLVM.
If Apple changes something (e.g. new architecture like the 64 bit they just announced) we can support it instantly since we just use xcode.
So currently we will stick with XMLVM but there are no final decisions here since we could potentially offer both backends as we move forward.
JavaOne started with a great NetBeans party on Saturday night, I met a lot of great people at that party doing some interesting stuff (although its all hazy with the medication and the beer). I met Joonas Lehtinen at that party he is the founder and CEO of vaadin (who now have a great new NetBeans plugin ), which is a name that I saw popup every now and again. I'm a heavy GWT user and love it but it has its limitations, I guess I didn't pay enough attention (too busy with mobile) to notice that vaadin is really a hybrid solution that tries to merge the stuff I liked about Echo2 with the stuff I like about GWT. Very cool! One of the great things about their booth is that they literally had a pile of vaadin books as the giveaway, finally a show giveaway that is actually useful!
Kudos on that one, we should definitely do something like that as well. It also gave me a chance to read something on takeoff and landing (3 connections on the way home) so I was able to finish that pretty hefty book (honestly I skimmed some parts such as installation).
Another cool thing about vaadin is that they are an open source startup that has ±70 employees, really encouraging stuff on a personal level.
On NetBeans day itself I was on my way to Moscone (if you are a long time alumni this alone should provide you the reason to attend NB day, its at Moscone), when I ran into Geertjan . We both walked to the first session of the day entered the room and there sitting and working bright and early is Dr. James Gosling. Alone.
People reading this blog can probably imagine my feeling at that moment, but I'm an entrepreneur first and human being second… I instantly descended on him like locust pitching Codename One and giving him the birds eye view pitch.
He was great and expressed interest, at the end of the day I asked that he would join our advisory board and I have his email so I can continue begging thru that medium! So that alone was a huge thing for me on a personal and professional level.
Gosling demoed his cool robots to the crowd, being a mobile/embedded guy (and having worked on robots as a kid) I really appreciate a lot of the stuff they are doing at liquid robotics . They have amazing visualization tools for controlling these robots which I'm sure will really benefit from Codename One… I promised him that if he accepts my invitation I will personally port everything to Codename One and give him a great tablet UI to play with the robots.
Gosling told the story of the NetBeans acquisition, having worked at Sun I can pretty much attest to the mindset behind it. The gist of the story is that Sun at some point decided they want a "big play" on development tools and didn't have anything good (because they kept killing internal projects so as not to compete with Borland et. al.). So they were looking for a billion dollar acquisition and came across Forte which was making mainframe tools (totally unrelated), Gosling tried to convince management to buy NetBeans but they decided that the price was too low so its not a "big play". Eventually the compromise was to buy both (he put it as: the price for NetBeans was a rounding error on the Forte deal).
Years later Forte is effectively nothing and NetBeans has 1.4m active users.
There were a lot of other great talks that day but frankly I was all jagged up on Gosling and I don't remember anything. I vaguely remember my talk on that day too although from feedback I got it was apparently given. I think I also had a sugar rush from all the great cupcakes Tinu ordered for the event celebrating 15 years of NetBeans (Google is also 15 years old this week, coincidence???).
Nathan Howard wrote a great blog post highlighting the NetBeans plugins that were presented that day.
In the middle of the NetBeans day we left for the keynote (in Moscone again which was cool), there were quite a few technical glitches in the keynote which is pretty shocking. I remember working on keynote presentations when at Sun, the level of work and rehearsal is astounding and having tech issues in that setting is really surprising.
The keynote talked about what a great year this was for Java, I understand the need to get people enthusiastic and excited in a keynote (and be positive) but ignoring the security issues and NSA warnings etc. (within the keynote) is a bit much.
The thing is Oracle actually has a security track in JavaOne now and is doing a lot of things to fix the problems we saw this year, I'd much rather hear "we had a tough year on this front but here is how we are fixing it". The keynote was mostly anemic talking a lot about the embedded effort which is very interesting (the internet of "things"), but there was very little content there that was interesting to me personally as a mobile developer that isn't a mobile HTML developer or an embedded developer.
The day ended with a BoF about contribution to the JDK narrated by Daniel Sachse and Helio Frota, I came because of the description of the BoF which was pretty in line with Daniel's presentation. However, it seems the committee that approved the BoF unified two separate and unrelated talks into one causing some frustration in the audience most of whom came for the description which was taken from Daniels talk.
The next day started with a session of notify your mobile clients by Jay Balunas and Matthias Wessendorf of the JBoss team at RedHat, they talked about sending push messages from the server. The talk was good, geeky and coherent. I think they made the problem seem a bit easier than it really is in the real world, they have an open source project called AeroGear which I will be sure to check out the next time I look at our push code.
Next on Richard and Jasper gave their annual what's new in JavaFX talk which was pretty interesting. To me the biggest announcement by far: one thread!
Up until now if you wanted to touch JavaFX from Swing you had to mix the threads since both have their own EDT. This is pretty similar to Codename One only imagine having 2 EDT's and keeping track of both while you have your own code running. That isn't horrible for simple use cases but in the case of our webkit and graphics implementation this is something that is REALLY hard to get right. They added an experimental flag that effectively unifies both threads into one thread, this should make migrating code way easier. They announced a lot of other stuff from 3d to embedding Swing in FX (up until now you could only embed in the opposite direction).
I grabbed Richard for a chat, we have known each other online for quite a while mostly thru the work I did for SwingX's open source project and in my properties work later on (and now thru Codename One). We ended up going to lunch with Richard, Jasper and Steve Northover. Apparently they now work very closely with Daniel Blaukopf who is a great friend from the Sun Microsystems WTK team days and one of the smartest people I know. We had some lunch and chatted a bit about FX and Codename One. It was a very interesting conversation but there is no point of going into details at this point in time.
I missed a session and arrived at a session on Clojure, I didn't like Clojure when it was called Lisp and that feeling remains the same. Trying to push a language like Clojure is like trying to get us all to use superior keyboard layout (e.g. Dvorak), probably won't happen. These things are rooted too deep, but maybe I'm old (strike that, I am old who knows?).
I ran into a friend so I was late to the multi-device session by David Campelo . I think I met David years ago when working for Sun, Chen and him know each other from our work on GingaJ which effectively put LWUIT on TV screens in Brazil. He gave an interesting demo about connecting tablets to the currently playing content on a TV, that is indeed an interesting direction to explore. I understand that the level of engagement in such experiences is tremendous and this is probably the future for such tools.
I then went on the Matthew 's GIT on NetBeans Hands On Lab. I am not a fan of Hand On Labs and rarely take them (I never liked sitting in classrooms), I went simply because I was so impressed by Matthew following his JavaZone talk and wanted to see more. Matthew is indeed as great a teacher as he is a speaker, he was very interactive and I feel I understand GIT better now. If you happen to see his name at a conference you are attending I highly recommend you check it out, I think its always a good policy to just go to sessions with good speakers. Even if the subject isn't interesting to you right now you can learn so much.
In the past we had a lot of issues with GIT especially for Chen who is using Windows where the GIT GUI support isn't as good as the SVN integration. I'm assuming some of this got fixed and it also seems we used GIT somewhat like Teamware (the gradfather of GIT) which I always loved and Chen really hates with a vengeance. Maybe its time to switch back to github, I love their UI and a lot of the things about it. I wonder how easy it would be to migrate a Google code project (probably should have asked Matthew).
I then rushed to the JCP party on the roof of the Hilton, it had nice food and some interesting people but I couldn't stay and ran off to a BoF on Swing & JavaFX. On my way to the BoF room I ran into Tinuola Awopetu who does the marketing for the NetBeans team, we started chatting and it turns out she had her own panel BoF starting just then titled: "So You Want to Be a Published Technical Author?".
A friend from Sun and one of the best technical writers I know Jonathan K nudsen (who also wrote one of the first LWUIT tutorials) used to describe book authoring as torture. So I don't want to write a book.
However, I had fun talking with Tinu and thought I might as well check out the BoF. I'm glad that I did.
Arun Gupta - needs no introductions but in this case he came as an author .
David Heffelfinger - an established author of several books .
This was a very interesting/fun panel, I hadn't thought about the option of writing a Codename One book before this panel but I am now entertaining the thought. Just goes to show that you should always be open at Java One.
The next day started by touring the exhibition floor, I was on a tight schedule running around to very specific booths of interest. Last year I was so busy I didn't get to see the pavilion even once, so I was very careful and methodological this year. There were many interesting booths from IBM, RedHat, ARM etc. but the startups were more bold. CloudBees literally dressed all their personnel as bees, including head of marketing and (male) CEO. Amusing, but I think I'm too dry to do something like that.
"Practical Pros and Cons of Replacing Swing with JavaFX in Existing Applications" was the title of a surprisingly interesting session. I added it to my list because it was lead by Geertjan but pretty much everyone on the panel had an interesting story. It focused on developers using the NetBeans platform (platform not just the IDE) for their development who incorporated JavaFX in various ways to reap the benefits of improved UI visualizations.
Sean Phillips presented the app he has been working on for NASA (later on he showed it in the community keynote , I think he got a dukes choice award for it), it is a NetBeans platform/FX based visualization of spacecraft motion in formation. This includes amazing visualizations for NASA scientists, I suggest checking out a small portion of his demo in the community keynote, very compelling. What doesn't really show in the keynote is how excitable, enthusiastic and passionate he is about this technology.
Timon Veenstra presented a pretty cool NetBeans platform app that enables crop management for farmers interesting stuff. They won a Duke's choice award. Its pretty cool.
Rob Terpilowski presented the work that he has been doing at Lynden which is a major shipping company. They are using FX to make the UI's of their rather elaborate tables more visually appealing and usable.
I then went to watch "Play Framework Versus Grails Smackdown" which was delivered by two brilliant speakers: James Ward & Matt Raible . The talk was great however they gave a member of the audience in the front seat a really loud bell (or gong) and whenever one of them "delivered a smackdown" he rang the bell really loudly. I was in the back and had a headache 20 minutes into the talk. Left to the speaker room next door where the bell was also heard only softly.
There are two reasons I went to the BoF "Teaching Java with Minecraft, Greenfoot, and Scratch", Daniel Green & Arun Gupta . My daughter is still a bit too young for programming I'll probably have to start next year when she is 4. The session was fun and engaging, but the real kicker came later... All thru the session Arun dropped references to teaching his son to work on the Minecraft source code. In the general session his son (Aditya) got on stage and stole the entire JavaOne show, he launched Eclipse and went into a compelling demo (and anyone who ever demoed source code modification on stage knows this is HARD and BORING). The kid had the audience eating out of the palm of his keyboard, it was one of the best demos I saw on the JavaOne stage and the audience was totally with him as he complained about Eclipse or lamented on a method needing to be overriden "not sure why". James Gosling followed him noting that now he wants to become a minecraft hacker!
Wednesday started with a session by Nuvos who are launching a WORA mobile solution in Java using a build cloud (sounds familiar?). They had a booth at the pavilion so I got a chance to talk to them and figure them out a bit. Kevin is the founder/CEO of the company, they effectively started as a consulting project that grew into a solution for mobile.
Kevin is a great guy, we spent quite a while talking before and after his session. It might surprise some readers but we do wish them the best of luck, a rising tide raises all boats and our shared success would mean the success of Java & WORA for mobile as a whole.
The ridiculous part is that it works and works well including debugging and decent IDE environment pretty shocking stuff. Unfortunately it doesn't support threading (and no WebWorkers aren't threads). The session itself was great and surprisingly even the Chuck Norris jokes were funny, both Anton and Jaroslav have a great sense of humor coupled with the technical chops to make this session one of the better sessions I attended at Java One.
I tried to talk to them after the session but it was a bit too busy and I started talking with Yusuke Yamamoto who I thought I didn't know. Turns out he wrote an article about us last year and also apparently a presentation . He is also a former Twitter employee and the author of Twitter4J a very cool Twitter API allowing Java developers to work with the Twitter webservice easily. It would be great to port that to Codename One.
After the community general session I ran into Jaroslav & Anton hacking their way in the hall. I naturally descended on them and went into a long discussion with Jaroslav on thread support for Bck2Brwsr so we can add Codename One support for in browser apps. He is pretty adamant against this saying that it would impact performance considerably (he is right, this would require state transferal which is pretty tough), he pointed me at Doppio which is doing something similar but I can't see a community working on this so I'm unsure of where they stand.
Regardless you should check out the Bck2Brwsr JVM, its pretty amazing.
The last J1 session I attended was the RoboVM session, Niklas was great although he needs to seriously simplify his message to the audience some of whom didn't really understand what LLVM meant. He had great attendance considering the fact that this session was announced just before J1 started so most people wouldn't have seen it in their schedule builder tool (even moreso considering the fact that some people already left as the conference was winding down they literally started folding up the room around us).
I would describe RoboVM as a Xamarin for Java based on LLVM. Its an LLVM front end for Java that allows using the toolchain to build native iOS apps with native iOS API's. Unlike Codename One which aims for WORA, RoboVM is targeted at avoiding Objective-C and giving a Java facelift to iOS development. Niklas did an amazing job in terms of tooling and the underlying technology and we are keeping a keen eye on this project, we spent a great deal of time talking about making a living from open source projects. I do hope that Niklas will find the model that works for him with RoboVM and is able to keep the amazing rate of progress he has shown so far.
JavaOne ended with the usual party at Moscone, however this year they merged it with the Open World party which was too big and sucked as a result. I miss the old garden party which was crowded yet intimate, where you actually knew some of the people in attendance.
Regardless, it was a fun JavaOne for me on a personal note. Hopefully next year will be as good or even better.


text:
Q: How to make function argument container independent I'm writing a utility function which will take a vector of elements (could be string, int, double, char) and concatenate into a single string and return it. It looks like this:
template<typename T>
std::string convert2Str(std::vector<T> const& vec)
{
   std::ostringstream sStream;
   for (size_t k=0; k<vec.size(); ++k) {
      sStream << vec[k] << " ";
   }
   return sStream.str();
}

I would like to make this function more generic:

*

*First use iterators instead of using indices for the vector<T>. I tried this
std::vector<T>::const_iterator it = vec.begin() before the loop and the compiler gave me an error:
: error: expected ; before it
When I change the above defintions to std::vector<std::string>::const_iterator it = vec.begin() the error goes away. So, it looks like I'm not following correct syntax, please let me know what it is

*Second is to make the function more generic by making the first argument container independent. Given any container (vector, list, queue, deque, etc.) I want to do the same thing as above. I tried searching for this in stackoverflow and did not find satisfactory answer.

A: Step 1, as you said, use iterators:
template<typename T>
std::string convert2Str(std::vector<T> const& vec)
{
   typedef std::vector<T> container;
   std::ostringstream sStream;
   for (typename container::const_iterator it = vec.begin(); it != vec.end(); ++it) {
      sStream << *it << " ";
   }
   return sStream.str();
}

Step 2, make the template argument the container type instead of the element type (you can get the element type back with value_type:
template<typename container>
std::string convert2Str(container const& vec)
{
   typedef container::value_type T; // if needed
   std::ostringstream sStream;
   for (typename container::const_iterator it = vec.begin(); it != vec.end(); ++it) {
      sStream << *it << " ";
   }
   return sStream.str();
}

In C++0x, this gets even simpler (and typename is not needed):
template<typename container>
std::string convert2Str(container const& vec)
{
   using std::begin;
   using std::end;
   std::ostringstream sStream;
   for (auto it = begin(vec); it != end(vec); ++it) {
      typedef decltype(*it) T; // if needed
      sStream << *it << " ";
   }
   return sStream.str();
}

Among other advantages, std::begin and std::end work for raw arrays.

A: Following STL practice, I would recommend using two iterators for input parameters, instead of a container (for obvious reason of being able to work with only a part of a container, and generally with any sequence defined by iterators):
template<typename InputIterator>
std::string convert2Str(InputIterator first, InputIterator last)
{
    std::ostringstream sStream;
    for (InputIterator it = first; it != last; ++it) {
       sStream << *it << " ";
    }
    return sStream.str();
}

In case you need the type of contained objects, use
typedef typename std::iterator_traits<InputIterator>::value_type T;

ADDED:
You then can use the function as follows:
std::vector<int> int_vec;
std::list<float> f_list;
std::deque<std::string> str_deq;

     // put something into the containers here

std::cout<< convert2Str(int_vec.begin(), int_vec.end()) <<std::endl;
std::cout<< convert2Str(f_list.begin(), f_list.end()) <<std::endl;
std::cout<< convert2Str(str_deq.begin(), str_deq.end()) <<std::endl;

Note that you cannot iterate over std::queue; but if you really need it, the standard guarantees enough support for a do-it-yourself solution. See more info here: std::queue iteration.

A: It's easiest if you templatize on the container type only; the value type is stored in all standard, Boost and Qt containers as the typedef member value_type. std::copy and ostream_iterator allow you to skip the lengthy iterator declarations.
template <typename Container>
std::string convert2Str(Container const &cont)
{
    std::ostringstream s;
    std::copy(cont.begin(), cont.end(),
              std::ostream_iterator<typename Container::value_type>(s, " "));
    return s.str();
}

The typename is necessary to avoid ambiguity. Recent versions of GCC will warn you when you omit this keyword.

A: Use this. You need the typename part in order to tell the compiler that it should consider T::const_iterator a type while parsing, it can't really know that this is true until you actually call the function passing some T that has a const_iterator member type.
template<typename T>
std::string convert2Str(T const& cont)
{
    std::ostringstream sStream;
    for (typename T::const_iterator it = cont.begin(); it != cont.end(); ++it) {
        sStream << *it << " ";
    }
    return sStream.str();
}

A: I think this should work:
template<typename T>
std::string convert2Str(T const& container)
{
   std::ostringstream sStream;
   for (typename T::const_iterator i= container.begin(); i != container.end(); ++i) {
      sStream << *i << " ";
   }
   return sStream.str();
}

Demo : http://ideone.com/9pUVV

redpajama_set_name: RedPajamaStackExchange


text:
package com.planet_ink.coffee_mud.Abilities.Spells;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.*;

public class Spell_DetectScrying extends Spell
{

	@Override
	public String ID()
	{
		return "Spell_DetectScrying";
	}

	private final static String localizedName = CMLib.lang().L("Detect Scrying");

	@Override
	public String name()
	{
		return localizedName;
	}

	@Override
	public int abstractQuality()
	{
		return Ability.QUALITY_INDIFFERENT;
	}

	@Override
	public int enchantQuality()
	{
		return Ability.QUALITY_BENEFICIAL_SELF;
	}

	@Override
	protected int canTargetCode()
	{
		return CAN_MOBS;
	}

	@Override
	protected int canAffectCode()
	{
		return 0;
	}

	@Override
	public int classificationCode()
	{
		return Ability.ACODE_SPELL|Ability.DOMAIN_DIVINATION;
	}

	@Override
	public int castingQuality(final MOB mob, final Physical target)
	{
		if(mob!=null)
		{
			if(target instanceof MOB)
			{
				if(((MOB)target).isInCombat()||((MOB)target).isMonster())
					return Ability.QUALITY_INDIFFERENT;
			}
		}
		return super.castingQuality(mob,target);
	}

	public Ability foundEffect(final Physical P, final String abilityID)
	{
		if(P == null)
			return null;
		final Ability A=P.fetchEffect(abilityID);
		if(A!=null)
			return A;
		if(P instanceof MOB)
			return foundEffect(((MOB)P).location(), abilityID);
		if(P instanceof Item)
			return foundEffect(CMLib.map().roomLocation(P), abilityID);
		if(P instanceof Room)
			return foundEffect(((Room)P).getArea(), abilityID);
		if(P instanceof Boardable)
			return foundEffect(((Boardable)P).getBoardableItem(), abilityID);
		return null;
	}

	@Override
	public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel)
	{
		final MOB target=getTarget(mob,commands,givenTarget);
		if(target==null)
			return false;

		if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
			return false;

		final boolean success=proficiencyCheck(mob,0,auto);

		if(success)
		{
			final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),auto?"":L("^S<S-NAME> incant(s) softly to <T-NAMESELF>!^?"));
			if(mob.location().okMessage(mob,msg))
			{
				mob.location().send(mob,msg);
				final StringBuffer str=new StringBuffer("");
				final Session tS=target.session();
				if(tS!=null)
				{
					for(final Session S1 : CMLib.sessions().localOnlineIterable())
						if(tS.isBeingSnoopedBy(S1))
							str.append(L("@x1 is snooping on <T-NAME>.  ",S1.mob().name()));
				}
				Ability A=foundEffect(target, "Spell_Scry");
				if((A!=null)&&(A.invoker()!=null))
					str.append(L("@x1 is scrying on <T-NAME>.",A.invoker().name()));
				A=foundEffect(target, "Spell_Claireaudience");
				if((A!=null)&&(A.invoker()!=null))
					str.append(L("@x1 is listening to <T-NAME>.",A.invoker().name()));
				A=foundEffect(target, "Spell_GreaterClaireaudience");
				if((A!=null)&&(A.invoker()!=null))
					str.append(L("@x1 is listening to everyone around <T-NAME>.",A.invoker().name()));
				A=foundEffect(target, "Spell_Clairevoyance");
				if((A!=null)&&(A.invoker()!=null))
					str.append(L("@x1 is watching <T-NAME>.",A.invoker().name()));
				A=foundEffect(target, "Spell_GreaterClairevoyance");
				if((A!=null)&&(A.invoker()!=null))
					str.append(L("@x1 is watching everyone around <T-NAME>.",A.invoker().name()));
				if(str.length()==0)
					str.append(L("There doesn't seem to be anyone scrying on <T-NAME>."));
				CMLib.commands().postSay(mob,target,str.toString(),false,false);
			}
		}
		else
			beneficialVisualFizzle(mob,target,L("<S-NAME> incant(s) to <T-NAMESELF>, but the spell fizzles."));

		return success;
	}
}


The Renegade difference is truly in the care we take to build the most current and innovative technology into our gloves. Goalkeepers are meticulous in their routines, this mentality has carried over into the art that is our glove design and specs. There is no single aspect that we've overlooked, no critic greater than ourselves, and no shortcuts in our process.
The key to getting the most out of your new pair of Renegade gloves truly comes down to selecting the right glove for your needs. Below we have outlined some of the excellent features that define the Renegade standard of excellence. We develop gloves that pack more value into your hands than the strike of any attacker. That's being a Renegade!
A choice of professionals and one of the finest palms available in terms of grip, cushioning, and hold. A latex palm which, due to its special composition, offers pure grip and maximum hold during impact. Its microporous structure makes this latex extremely elastic and soft. Use this type of latex in a variety of climates or conditions and it will preserve its outstanding qualities. When using Giga latex we suggest you clean the palm material regularly to maximize its grip by removing dirt particles with warm water.
A new development and major breakthrough in latex see the launch of our German NB Hyper Grip latex foam. This remarkable latex offers 20% greater impact absorption from lower density latex palms and has increased durability in all weather conditions. This is a phenomenal all-around latex that stands up to abuse but performs under pressure.
An all-around rough profile glove that performs best on hard grounds and tough environments. This turf ready glove delivers both the flexibility and grip you'd expect in a high-end product but delivers durability that is unmatched with most latex options. This would be a suitable option for players who predominantly find themselves training and playing matches on turf; or for parents of young keepers who want to avoid purchasing gloves regularly.
A superb value featuring 3mm-3.5mm of Contact foam with Polyurethane backing for ultimate control, the choice of Professionals. Contact Ultra Grip contains improved shocks absorption, without sacrificing grip. High-quality, extremely soft latex foam with excellent properties that stand up to use in various weather conditions.


With 2-layer non-stick coating and glass lid.
Adjustable thermostat up to 240°C.
Suitable for shallow frying, baking, boiling and grilling.
Low wattage means it is energy saving and has fewer running costs.
Rapid cooling to increase safety and avoids accidents whilst in use.


text:
শীর্ষ সংবাদ English
NEW CAMPAIGN LAUNCHED URGING PREGNANT WOMEN TO GET BOOSTED NOW
January 14, 2022 Editor	0 Comments
Bangla Sanglap Desk:
●	Pregnant women are being urged to Get Boosted Now in a New Year advertising drive
●	New social media and radio assets highlight the risks of catching the virus and benefits of the vaccines to both mothers and their babies
●	Almost all pregnant women who were hospitalised or admitted to intensive care with COVID-19 were unvaccinated
Pregnant women who have not yet had their first, second, third or booster dose of a COVID-19 vaccine are being urged to get their jab as soon as possible, as the government launches a new advertising campaign for the New Year.
The new campaign joins forces with the experts at the Royal College of Obstetricians and Gynaecologists (RCOG) and the Royal College of Midwives (RCM) to highlight the serious risks of catching COVID-19 and the benefits the vaccines bring to protecting both mothers and their babies.
Testimonies of pregnant women who have had the jab to keep themselves safe will be played out in adverts across social media and radio stations across the country.
The new campaign urges pregnant women 'don't wait to take the vaccine' and highlights the risks of COVID-19 to mother and baby, and the benefits of vaccination.
The latest data from the UK Health Security Agency (UKHSA) shows COVID-19 vaccinations provide strong protection for pregnant women against the virus. It also shows the vaccines are safe for pregnant women, with similar birth outcomes for those who had the vaccine and those who had not.
DHSC Chief Scientific Adviser and Honorary Consultant Obstetrician Professor Lucy Chappell said:
"Getting a COVID-19 vaccine is one of the most important things a pregnant woman can do this year to keep herself and her baby as safe from this virus as possible.
"We have extensive evidence now to show that the vaccines are safe and that the risks posed by COVID-19 are far greater.
"If you haven't had your COVID-19 vaccine, I would urge you to speak to your clinician or midwife if you have any questions or concerns, and book in your vaccine as soon as you can."
Data from the UK Obstetric Surveillance System shows 96.3% of pregnant women admitted to hospital with COVID-19 symptoms between May and October 2021 were unvaccinated, a third of which (33%) requiring respiratory support. Around 1 in 5 women who are hospitalised with the virus need to be delivered preterm to help them recover and 1 in 5 of their babies need care in the neonatal unit.
The COVID-19 vaccines are safe for pregnant women and have no impact on fertility, which has been made extremely clear by the government, its senior clinicians and a range of independent experts from stakeholder groups such as RCOG the Royal College of Midwives (RCM) and the British Fertility Society.
Since April 2021, around 84,000 pregnant women have received one dose and over 80,000 have received two doses of the COVID-19 vaccine. In August 2021, only 22% of women who gave birth were vaccinated.
Dr Edward Morris, President of the Royal College of Obstetricians and Gynaecologists, said:
"We welcome this national campaign as an important way of amplifying the very clear message to pregnant women that vaccination provides the best protection for both them and their babies from COVID-19. We urge all pregnant women to get vaccinated as soon as possible, and to get boosted 3 months after the second dose.
"We are very concerned that many pregnant women have not yet been vaccinated against COVID-19 and we hope this campaign will help reassure them that vaccination is safe and effective. Pregnant women are more vulnerable of becoming seriously ill from COVID-19 infection, and this can lead to an increased risk of giving birth prematurely, and stillbirth."
Gill Walton, Chief Executive and General Secretary of the Royal College of Midwives (RCM), said:
"There is overwhelming evidence that the COVID vaccine is safe for pregnant women and for their babies – and that it's the best way to keep them safe from harm. Sadly, there are too many pregnant women being admitted to hospital with COVID, and 96.3% of them haven't been vaccinated.
"The consequences of COVID when you are pregnant are clear and potentially devastated, from increased possibility of premature birth and admission to intensive care to a heightened risk of stillbirth.
"We know that pregnant women want to do everything they can to protect their baby, which is why midwives want to reassure them that vaccination is the best thing they can do."
Geetanjali Singh, an optician, who has recently given birth to her second baby and has been fully vaccinated said:
"I gave birth to a healthy baby boy just before Christmas. I am so grateful that the guidance on pregnancy and the Covid-19 vaccine changed last year. Plus my husband contracted Covid whilst I was pregnant, so being vaccinated gave me peace of mind that I and my baby had some protection. My advice to any pregnant people unsure about having the vaccine is speak to your midwife or health professional and make an informed choice."
← প্রধানমন্ত্রী তাঁর অবস্থান নিয়ে গভীরভাবে চিন্তিত হতে পারেন – ক্যামেরনের সাবেক উপদেষ্টা
প্রাক্তন কোভিড টাস্কফোর্স বস বিধিনিষেধ চলাকালীন মন্ত্রিসভা অফিসে মদ্যপ পার্টির জন্য 'দুঃখিত' →
স্যার ডেভিড অ্যামেস এমপিকে হত্যা ছিল সন্ত্রাসবাদ, বলছে পুলিশ
October 16, 2021 October 16, 2021 Editor	0
ব্রেক্সিট চুক্তিতে ইউকে ও ইইউ পরের সপ্তাহে একমত হতে পারে
Isis bride Shamima Begum to have British citizenship revoked
February 19, 2019 Editor	0

redpajama_set_name: RedPajamaCommonCrawl


The range of features in Fedora 16, which is scheduled to be released at the end of October, is becoming clearer now that the deadline for submitting new features has passed. Late submissions are accepted on rare occasions, but the "feature freeze" is planned for next Tuesday – by then, all major advancements on the Linux distribution's feature list are planned to be largely complete and ready for testing. The first and only alpha version is to be released three weeks later – on 16 August.
The feature list contains 40 items, including GNOME 3.2 and KDE Plasma Workspaces 4.7. The developers are planning to switch to using Grub2 for the boot loader. Having switched to systemd, as an alternative to sysvinit and upstart, in Fedora 15, the project plans to replace further sysv init scripts with systemd units in version 16. Furthermore, Fedora is to offer everything that's required for Xen virtualisation, as version 3.0 of the Linux kernel, which is now expected to be released on Friday, will include all the necessary components.
However, the Fedora project may well discard some of the features, or postpone their inclusion until Fedora 17, if they prove to be not mature enough. This could potentially happen with the planned use of Btrfs as the distribution's standard file system, which the Fedora project had decided on in early June. One of the stipulated criteria for switching from Ext4 to Btrfs was the availability of a decent program for checking and repairing Btrfs file systems – such a program was expected to become available in May, but has yet to be released.


Double walled vascular catheters will allow extremely gentle penetration of the catheter through the vessel at a substantially reduced risk of inadvertent penetration outside the lumen or tear calcified atheroma plaque.
Drain for draining blood or other effusions in healing of various wounds, bearing gently rounded efferent windows that will be supplied in a wide size range.
Perforated double-walled small diameter drain to be connected to vacuum systems as "Redon"
The double-walled chest tube to drain fluid from the chest cavity during hydrothorax.
The double-walled chest tube to drain fluid from the abdominal cavity during ascites.


← Live Your Life Like a Butterfly!
There are many ways to brighten our lives with butterflies. Some communities have beautiful butterfly murals that do just that.
This lovely mural is located in South Norfolk, Virginia, (all murals in this article are located in the USA) and was painted by artist Chip Wilkinson.
You can find these Monarch butterflies on the side of Toni's Market in the Phillips neighborhood of southside Minneapolis.
"Monarch Magic" depicts the Monarch butterflies that overwinter in a strand of eucalyptus trees on South Vandenberg Air Force Base. You can see it on a stroll through Old Town Lompoc, California.
This beautiful mural is located at Candlelight Ranch near Austin, Texas. Candlelight Ranch provides therapeutic and educational nature-based experiences to enrich the lives of at-risk youth and children with disabilities.
Sometimes murals have a story. "The Butterfly Effect: Dreams Take Flight," depicts life in Joplin, Missouri both before and after the devastating tornados of 2011. It was inspired by the stories of young survivors who said that they saw butterfly people who protected them from the storm.
A mural can also be political such as this one, which is intended as a show of support of the Standing Rock Sioux Tribe's campaign to protect their water and sacred grounds from the Dakota Access Pipeline. In addition to the threat to people, water and sacred places, the Dakota Access Pipeline could also kill the Dakota Skipper (Hesperia dacotae) a rare prairie butterfly protected under the Endangered Species Act.
Some murals carry a message of love and hope such as this beautiful artwork in Newark, New Jersey.
The Monarch butterfly in this mural, located at the Cecil Williams Glide Community House in San Francisco is a symbol of hope for homeless families and individuals, and people recovering from addiction, where they receive support services.


text:
Lone Star Politics
Austin360
Hookem.com
512tech
City Council says yes to $1.2 billion convention center expansion
Elizabeth Findell @efindell
May 23, 2019 at 6:23 PM May 24, 2019 at 10:59 AM
The Austin City Council unanimously signed on Thursday to a $1.2 billion plan to expand the convention center, granting sweeping, unexpected consensus to an idea that has been a political hot potato for years.
The approved declaration directs staff members to move forward in assessing the financing tied to an expansion and came as part of a broad resolution that addressed several projects in southeastern downtown.
The move represented a policy swing for Council Member Kathie Tovo, who sponsored the resolution after previously expressing skepticism about Mayor Steve Adler's push to expand the convention center. Tovo said Monday that a University of Texas architectural study completed this year showed her how the center could be rebuilt to allow better pedestrian access through its six-block footprint and to better interact with nearby Waller Creek. Seeing that, Tovo said, persuaded her to back the mayor's idea.
"It's a big thing that the council wants to move forward on the convention center," Adler said Thursday. "It's a big deal on many levels."
PREVIOUS: With Tovo's backing, support builds for convention center expansion
The expansion proposal that the resolution supports is the most expensive of the options UT studied. It would expand the convention center to the west before demolishing and rebuilding a portion of the facility within its existing footprint. The resolution also calls for preserving the nearby historic Palm School, which Travis County owns. The goal would be to tie those efforts into creating a park adjacent to Waller Creek and making infrastructure improvements along Rainey Street.
"This is an area (of Austin) that has had enormous growth and change and has more ahead of it," Tovo said. "It'll be just a dynamite area of town, and I hope, if we do our job well, it provides for new needs but also begins with a recognition and respect for the history and the culture of Austinites."
The convention center expansion ties into a 2017 "Downtown Puzzle" plan, proposed by Adler, that hinges on expanding the convention center in exchange for hoteliers agreeing to increase hotel taxes on their guests within a new tourism taxing district. Those new taxes could help pay for downtown projects, including homeless assistance, Adler said.
Hotel taxes also would mostly finance the expansion, but the details remain unclear. The resolution asks staff members to study and recommend financing options.
RELATED: UT report outlines convention center expansion pros, cons
The council's approval came after a flurry of edits to the smaller details of the resolution. Community members representing arts and service industries turned out to support the measure, saying they believe an expanded convention center will bring in more money for cultural arts funding and more tourists to pay the salaries of housekeepers and bartenders.
"What happens when musicians can no longer live in the live music capital of the world?" said musician Nakia Reynoso. "I urge the council to show their support for Austin musicians by adopting the recommendations. The (hotel tax) funds would increase to directly impact programs and platforms that support Austin's commercial sector."
The only stringent opposition to the expansion came from local activist Bill Bunch, who argued the move would hurt, not help, local musicians and artists. He argued that council members should be putting hotel taxes — some 70% of which go to the convention center — into other tourism venues, instead of committing to use future hotel tax money to expand the facility.
"With expanding the convention center and adding 2 cents (in hotel tax), that imbalance will almost certainly get worse," he said. "It's time for us to re-prioritize our spending to match what tourists are coming for and what we're losing."
Council Member Natasha Harper-Madison emphasized the tear-down and rebuilding of the convention center is vital to making the downtown grid more walkable and the overall area friendlier to visitors and local residents alike with access to new parks.
"I know a lot of people are looking at this as a convention center expansion, but I think of it as an improvement," she said. "I'm super excited there's so much agreement on this dais."
StatesmanLive App
Careers at Statesman
Austin American-Statesman ~ 305 S Congress Ave, Austin, TX 78704 ~ Do Not Sell My Personal Information ~ Cookie Policy ~ Do Not Sell My Personal Information ~ Privacy Policy ~ Terms Of Service ~ Your California Privacy Rights / Privacy Policy
City Council VoteTracker
Flash Briefing
Austin History
Uplifting News
Season For Caring
Financial Services Help
Tech Money
Lakeway/Bee Cave
A&M Aggies
HS Schedules & Scores
F1 & Racing
Area Pro Teams
Two Views


According to the stats, it's been the coldest summer since 1965, the coldest December in 51 years and the coldest and wettest January in 11 years.
Lots has been written about and spoken about the weather here in Oz of late.
For example, check out these links to the ABC and the Wentworth Courier websites.
Queenslanders had to endure bad floods (again) and Sydney has had the worst summer that anyone here can remember – well around my vintage anyway.
Rain, rain and rain, cold temparutes and almost every day has been like four seasons in one day. Not the stock standard summers us Sydneysiders are used to.
But the weather is something you can't change – you just have to deal with it.
Apparently it's all due to El Nino and climate change.
Despite mother nature trying to mess with our heads, there have been some glorious days at Bondi Beach over the last few weeks – it's just that there has been way too much grey sky in between.


there was no urgency to raise interest rates.
Mississippi River flooding on refineries in Louisiana.
foreign supplier to the United States.
strategist at Scotia Capital in Toronto.
positive for Canada," said Sutton.
announcements in July, September, October and December.
C$0.9687 to the U.S. dollar, or $1.0323, at Friday's close.
It was the lowest close since March 29.
with a broadly stronger U.S. dollar, said Sutton.
Economic data on Monday had little impact on the currency.
coming at the end of the week.
that he sees in terms of the medium-term economic outlook,"
their early gains also added to the allure of bonds.
energy issues fell with oil prices.
gained 5 Canadian cents to yield 3.189 percent.


text:
The decision to ban entrance into the occupied Crimea's ports is a powerful signal of comradeship between Ukraine and Turkey, says Volodymyr Groysman following a meeting with Binali Yildirim
posted 14 March 2017 16:09
Law and order Policy Prime Minister International activity
The decision of Turkey to ban any Turkish vessel from entering the occupied Crimea is a powerful signal and a proof of comradeship between Ukraine and the Republic of Turkey. This was stated by Prime Minister of Ukraine Volodymyr Groysman on the results of the meeting with Prime Minister of Turkey Binali Yildirim at a joint press point.
"Today, on the day of the visit we received a note prohibiting any Turkish vessels to visit the occupied Crimea. This is a very powerful signal," he said.
The Head of Ukrainian Government thanked Turkey for the strong support for Ukraine's territorial integrity and independence.
He also emphasized the peculiar role of the Republic of Turkey in supporting Crimean Tatars.
"Your stance in relation to Crimean Tatars is very important for us and your desire to support under such difficult conditions is the evidence of high degree of friendliness between our countries", he stressed.
Prime Minister Binali Yildirim pledged Turkey's support for Ukraine and its territorial integrity, as well as strong condemnation of the illegal annexation of Crimea.
The top official of the Republic of Turkey commended the efforts of the Ukrainian Government aimed at the solution of problems of Crimean Tatar people.
Ukraine and Turkey to intensify work aimed at signing in 2017 of agreements on free trade, avoidance of double taxation and reciprocal protection of investment
Volodymyr Groysman met with Speaker of the Grand National Assembly of Turkey Ismail Kahraman
By themes «Law and order», «Policy», «Prime Minister», «International activity»


Joseph Teti is an experienced speaker and motivator. He has been the keynote speaker for many private and public events. Most recently he was a keynote speaker for "Wildfire Weekend" where he spoke to a crowd of thousands.
Some of Joseph's recent speaking engagements included.
KIMs Game/How to Increase your attention to detail.
Use our form to contact us to learn more about arranging Joseph to speak or appear at your next event.


text:
namespace jni {

	class _Env
	{
		JavaVM* m_vm;
		_Env(): m_vm(NULL) {}
		_Env(const _Env& oth): m_vm(oth.m_vm) {}
		_Env& operator=(const _Env&) { return *this; }
		static _Env& get()
		{
			static _Env env;
			return env;
		}
	public:
		static void setVM(JavaVM* vm) { get().m_vm = vm; }
		static JNIEnv* getCurrent()
		{
		    JNIEnv* env = NULL;

		    if (get().m_vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
		        return NULL;
		    }
		    return env;
		}
	};

	inline JNIEnv* Env() { return _Env::getCurrent(); }

	// This class is for two purposes only:
	// 1. To be thrown at any point, when ExceptionCheck returns non-null
	// 2. To be the base for the Throwable, and therfore catch all throwables
	//    at the JNI border.
	struct Exception
	{
		static void clear(JNIEnv* env) { env->ExceptionClear(); }
		static void clear() { clear(Env()); }
		static bool check(JNIEnv* env, bool _throw = true)
		{
			if (env->ExceptionCheck())
			{
				if (_throw) throw Exception();
				return false;
			}
			return true;
		}
		static bool check(bool _throw = true) { return check(Env(), _throw); }
	};

	// Apart from being actually thrown towards JNI border,
	// this class'es child types also setup actual excpetions
	// in the environment.
	struct Throwable: Exception
	{
	protected:
		Throwable() {};
		Throwable(const char* clazz, const char* msg)
		{
			onThrow(clazz, msg);
		}
		void onThrow(const char* clazz, const char* msg);
	};

#define DECL_EXC(Name, Class) \
	struct Name: jni::Throwable\
	{\
		Name(const char* msg = NULL): jni::Throwable(Class, msg){}\
	}

	template<typename T>
	class scoped_local_ref {
	public:
	    scoped_local_ref(JNIEnv* env, T localRef = NULL)
	    : mEnv(env), mLocalRef(localRef)
	    {
	    }

	    ~scoped_local_ref() {
	        reset();
	    }

	    void reset(T localRef = NULL) {
	        if (mLocalRef != NULL) {
	            mEnv->DeleteLocalRef(mLocalRef);
	        }
            mLocalRef = localRef;
	    }

	    T get() const {
	        return mLocalRef;
	    }

	private:
	    JNIEnv* mEnv;
	    T mLocalRef;

	    // Disallow copy and assignment.
	    scoped_local_ref(const scoped_local_ref&);
	    void operator=(const scoped_local_ref&);
	};

	template <typename T> class TypeInfo;
#define TYPEINFO(TYPE, SIG, NAME) \
	template <> class TypeInfo<TYPE> \
	{ \
	public: \
		static const char* sig() { return SIG; } \
		static TYPE get(JNIEnv* env, jobject _this, jfieldID field) { return env->Get##NAME##Field(_this, field); } \
		static TYPE getStatic(JNIEnv* env, jclass klass, jfieldID field) { return env->GetStatic##NAME##Field(klass, field); } \
		typedef TYPE (*call_t)(JNIEnv*, jobject, jmethodID, ...); \
		typedef TYPE (*static_call_t)(JNIEnv*, jclass, jmethodID, ...); \
		static call_t get_function(JNIEnv* env) { return env->functions->Call##NAME##Method; } \
		static static_call_t get_static_function(JNIEnv* env) { return env->functions->CallStatic##NAME##Method; } \
	}

	TYPEINFO(jboolean, "Z", Boolean);
	TYPEINFO(jbyte, "B", Byte);
	TYPEINFO(jchar, "C", Char);
	TYPEINFO(jshort, "S", Short);
	TYPEINFO(jint, "I", Int);
	TYPEINFO(jlong, "J", Long);
	TYPEINFO(jfloat, "F", Float);
	TYPEINFO(jdouble, "D", Double);

	template <> class TypeInfo<void>
	{
	public:
		static const char* sig() { return "V"; }
		static void get(JNIEnv*, jobject, jfieldID) {}
		static void getStatic(JNIEnv* env, jclass klass, jfieldID field) { }
		typedef void (*call_t)(JNIEnv*, jobject, jmethodID, ...);
		typedef void (*static_call_t)(JNIEnv*, jclass, jmethodID, ...);
		static call_t get_function(JNIEnv* env) { return env->functions->CallVoidMethod; }
		static static_call_t get_static_function(JNIEnv* env) { return env->functions->CallStaticVoidMethod; }
	};

	template <> class TypeInfo<jbyteArray>
	{
	public:
		static const char* sig() { return "[B"; }
	};

	template <> class TypeInfo<jstring>
	{
	public:
		static const char* sig() { return "Ljava/lang/String;"; }
	};

	template <> class TypeInfo<jintArray>
	{
	public:
		static const char* sig() { return "[I"; }
	};

	template <typename Final>
	class Class
	{
	public:
		Class(): m_class(0) {}

	protected:
		jclass m_class;

		void init()
		{
			JNIEnv* env = Env();
			m_class = env->FindClass(Final::classPathName());
			Exception::check(env);
			m_class = (jclass)env->NewGlobalRef(m_class);
			Exception::check(env);
		};

		template <int len>
		int registerNatives(const JNINativeMethod (&gMethods)[len])
		{
			return _Env::getCurrent()->RegisterNatives(m_class, gMethods, len);
		}

	public:
		bool instanceOf(jobject obj) { return _Env::getCurrent()->IsInstanceOf(obj, m_class); }
	};
#define DECLARE_JAVA_CLASS(Class) \
		static const char* classPathName() { return Class; } \
		static const char* argClassPathName() { return "L" Class ";"; }

	template <typename Final>
	class Object
	{
	protected:
		jobject m_this;

		Object(jobject _this): m_this(_this) {}
	public:
		static int init() { return Final::getClass().inited(); }
		bool inited() { return Final::getClass().inited() == 0; }
		bool instanceOf() { return Final::getClass().instanceOf(m_this); }
		operator jobject () { return m_this; }
		jobject _this() const { return m_this; }
	};

#define JAVA_CLASS() \
	public: class Class; \
	protected: static Class& getClass() \
	{ \
		static Class clazz; \
		static bool inited = false; \
		if (!inited) \
		{ \
			inited = true; \
			clazz.init(); \
		} \
		return clazz; \
	} \
	public: \
	class Class: public jni::Class<Class>

#define DECLARE_GETCLASS() \
	public: class Class; \
	protected: inline static Class& getClass(); \
	public: \

#define DEFINE_GETCLASS(type) \
	type::Class& type::getClass() \
	{ \
		static Class clazz; \
		static bool inited = false; \
		if (!inited) \
		{ \
			inited = true; \
			clazz.init(); \
		} \
		return clazz; \
	}

	template <typename Final> struct TypeInfo_Object
	{
		typedef typename Final object_t;
		typedef typename Final::Class class_t;

		static const char* sig() { return class_t::argClassPathName(); }

		static object_t get(JNIEnv* env, jobject _this, jfieldID field)
		{
			jobject _ret = env->GetObjectField(_this, field);
			Exception::check(env);
			return object_t(_ret);
		}

		static object_t getStatic(JNIEnv* env, jclass klass, jfieldID field)
		{
			jobject _ret = env->GetStaticObjectField(klass, field);
			Exception::check(env);
			return object_t(_ret);
		}

		typedef object_t (*call_t)(JNIEnv*, jobject, jmethodID, ...);
		static object_t call(JNIEnv* env, jobject _this, jmethodID meth, ...)
		{
			va_list vl;
			va_start(vl, meth);
			jobject o = env->CallObjectMethodV(_this, meth, vl);
			va_end(vl);
			Exception::check(env);
			return object_t(o);
		}
		static call_t get_function(JNIEnv* env) { return call; }

		typedef object_t (*static_t)(JNIEnv*, jclass, jmethodID, ...);
		static object_t static_call(JNIEnv* env, jclass klass, jmethodID meth, ...)
		{
			va_list vl;
			va_start(vl, meth);
			jobject o = env->CallStaticObjectMethodV(klass, meth, vl);
			va_end(vl);
			Exception::check(env);
			return object_t(o);
		}
		static static_t get_static_function(JNIEnv* env) { return static_call; }
	};

	template <typename T>
	class Field
	{
		jfieldID m_field;
		const char* m_name;
	public:
		Field(const char* name): m_field(0), m_name(name) {}

		T operator()(jclass clazz, jobject _this)
		{
			JNIEnv* env = Env();
			if (!m_field)
			{
				m_field = env->GetFieldID(clazz, m_name, TypeInfo<T>::sig());
				Exception::check(env);
			}
			T _ret = TypeInfo<T>::get(Env(), _this, m_field);
			Exception::check(env);
			return _ret;
		}
	};

	template <>
	class Field<jobject>
	{
		jfieldID m_field;
		const char* m_name;
		const char* m_sig;
	public:
		Field(const char* name, const char* sig): m_field(0), m_name(name), m_sig(sig) {}

		jobject operator()(jclass clazz, jobject _this)
		{
			JNIEnv* env = Env();
			if (!m_field)
			{
				m_field = env->GetFieldID(clazz, m_name, m_sig);
				Exception::check(env);
			}
			jobject _ret = env->GetObjectField(_this, m_field);
			Exception::check(env);
			return _ret;
		}
	};

	template <typename T>
	class StaticField
	{
		jfieldID m_field;
		const char* m_name;
	public:
		StaticField(const char* name): m_field(0), m_name(name) {}

		T operator()(jclass clazz)
		{
			JNIEnv* env = Env();
			if (!m_field)
			{
				m_field = env->GetStaticFieldID(clazz, m_name, TypeInfo<T>::sig());
				Exception::check(env);
			}
			T _ret = TypeInfo<T>::getStatic(env, clazz, m_field);
			Exception::check(env);
			return _ret;
		}
	};

	template <>
	class StaticField<jobject>
	{
		jfieldID m_field;
		const char* m_name;
		const char* m_sig;
	public:
		StaticField(const char* name, const char* sig): m_field(0), m_name(name), m_sig(sig) {}

		jobject operator()(jclass clazz)
		{
			JNIEnv* env = Env();
			if (!m_field)
			{
				m_field = env->GetStaticFieldID(clazz, m_name, m_sig);
				Exception::check(env);
			}
			jobject _ret = env->GetStaticObjectField(clazz, m_field);
			Exception::check(env);
			return _ret;
		}
	};

	template <typename T>
	T JNIconv(T arg) { return arg; }
	template <class T>
	jobject JNIconv(Object<T> obj) { return (jobject)obj; }
} //jni

#define DECL_BUILTIN_EXC(Name) DECL_EXC(Name, "java/lang/" #Name)
namespace java {
	namespace lang {
		DECL_BUILTIN_EXC(NullPointerException);
		DECL_BUILTIN_EXC(ArrayIndexOutOfBoundsException);
		DECL_BUILTIN_EXC(RuntimeException);
		DECL_BUILTIN_EXC(IllegalArgumentException);
		DECL_BUILTIN_EXC(IllegalStateException);
		DECL_BUILTIN_EXC(OutOfMemoryError);
	} // java::lang

	namespace io {
		struct IOException: jni::Throwable
		{
			IOException(const char* msg = NULL)
					: jni::Throwable("java/io/IOException", msg)
			{}
			IOException(int errnum);
		};
	} // java::io
} // java

#endif //__JINI_BASE_HPP__


text:
About Artipoppe
The Artipoppe Podcast
Zeitgeist Baby Carrier
Baby Wraps and Ring Slings
EPISODE 8: SAMIRA RAFAELA
Samira Rafaela is a Dutch Member of the European Parliament for the social-liberal political party D66. She made great strides so far to change things for the better. Ever since her appointment, she helped to launch the Renew Europe Group, advocating for a strong, social and secure Europe. She also came up with the Women on Boards campaign, which aims to have at least 40% of non-executive director positions in listed companies held by women. This year, she won the Harper's Bazaar International Women of the Year 2020 Award for pursuing a more diverse political discourse. In this episode, she talks about one of her biggest role models: her own mother. Samira grew up just north of Amsterdam. She believes that it's her culturally rich background – being the daughter of a Jewish Curaçaoan-Dutch mother and a Ghanaian-Nigerian Muslim father – that has given her this open-minded world view. The EU's official motto to be 'United in Diversity' is what she stands for. In our interview, Samira touches on racial justice and how to implement anti-racism in children's classes early on in life. Apart from that, she openly shares how she has dealt with personal attacks because of her public persona and standpoints. She speaks on gender-based discrimination and why we can't have any setbacks if we want to move into a more fair and sustainable future.
Samira Rafaela, member of the European Parliament
© European Union 2020 – Source : EP
"My mindset really helped me say to myself: you have the right to be there, you have the right to have your opinion. But you also need people in your direct environment who can help and support you in the moment."
"To cope with possible backlash in this digital society, you need to have a very strong mind and need to be convinced of your own mission."
"You need a diverse group of people raising the right questions. If they don't participate in the decision-making process, how can you guarantee that legislation or new policies will work for people that have not been part of the decision-making process?"
"When speaking about the topic of diversity and representation, everyone can be there, but I believe it cannot be only or mainly a group of people that look like each other, for example when it comes to men; that they decide for the rest of society. There needs to be a balance."
"We have to make sure you have men, women, young people, people of color, people with disabilities, people from the LGTBI+ community are sitting at the table. Then you're making sure that a lot is covered, especially when it comes to the experiences that marginalized groups in our society have. And then, you get quality."
"We need to have more female role models who can show that even though you are a mother or not, women also deserve to be there."
"We should make it way easier for women with all kinds of identities and all kinds of roles in society."
"We have enough talented women, but really, we need to break through this old boys network."
"It's very important that women have the right to have their own identity. Whether they become a mother or not, they all need to be supported in their career, in the dreams that they have."
"Children at a certain age are becoming sensitive to thoughts and opinions that are being shared at home and in school and are very vulnerable to polarized opinions. That's something we need to take care of as adults."
"Parental leave needs to be more flexible, much more flexible. Also for fathers, so they can help more, and spend more time with their children so that mothers can start to go to work earlier if they want to."
"I see a new generation growing up now, that are having a different view on things in life and I have hope that we will break through some barriers and that in a matter of time women just can follow their dreams and women are safe in the world."
episode preview
Pilot episode: The power of feminine energy and what it means to Artipoppe, explained by Anna van den Bogert
Episode 1: Danielle Duboise on food as medicine and motherhood
Episode 2: Building a wiser and kinder world with Holiday Phillips
Episode 3: Linda Tol on miscarriage, overcoming infertility and being in an interracial relationship
Episode 4: Ella Mills about changing the global food culture
Episode 5: Mama Medicine on motherhood from a spiritual point of view
Episode 6: What we can learn from indigenous communities with Nina Gualinga
Episode 7: Carson Meyer about changing the status quo when it comes to birthing
Episode 8: Samira Rafaela about true diversity and more women in leadership positions
Episode 9: Jeanne de Kroon about a sustainable and socially fair future for all
© artipoppe


text:
Home Immigration Law Illinois Fayette County
Fayette County, Illinois Immigration Lawyers
Find Fayette County, Illinois Immigration Attorneys by City
Shobonier
Hagarstown
Jason Spangehl
Champaign County, IL Immigration Law Lawyer with 9 years experience
(217) 552-6114	302 West Hill Street
Free ConsultationImmigration and Education
Jason Spangehl is the Principal Attorney at the Law Office of Jason Spangehl in Urbana-Champaign, Illinois. For nine years this practice has exclusively addressed immigration law in one of the fastest growing immigrant academic communities in the United States.
Jason brings nineteen years of experience in education at every level from elementary through post-secondary to his practice, including broad experience as an instructor at the elementary, secondary, and post-secondary levels, as a college administrator. He also works as executive consultant to senior administrators and governing boards at Universities across the country through his separate consulting practice, Spangehl Higher Education Associates.
The Law...
Lauren Ann Anaya
Champaign County, IL Immigration Law Attorney with 27 years experience
(217) 693-2952	101 West Tomaras Avenue
Free ConsultationImmigration, Criminal Defense, Divorce and Family
Attorney Lauren A. Anaya has over 20 years' experience in the practice of law and is ready to put her experience to work for you. Dr. Anaya began her legal career with the United States Department of Justice after being hired pursuant to the Attorney General's Honors Program, the largest and most prestigious federal entry-level attorney hiring program of its kind. She served with the Executive Office for Immigration Review and subsequently went to work for the Immigration and Naturalization Service (INS) in the Office of the General Counsel. She knows immigration law and can assist...
Jackson E Donley
Sangamon County, IL Immigration Law Attorney with 38 years experience
(217) 801-5959	975 S. Durkin Drive, Suite 101
Immigration, Estate Planning, Family and Probate
Diane M. Speir
Jackson County, IL Immigration Law Lawyer with 27 years experience
Ext. 136	Milwood Executive Suites
1400 North Wood Road
Immigration, Divorce and Family
Mr. Jeffrey Hays
Champaign County, IL Immigration Law Lawyer with 27 years experience
411 W. University
Immigration, Business and Real Estate
University of Illinois - Urbana-Champaign
Mrs. Ana M. Mencini
DuPage County, IL Immigration Law Lawyer with 19 years experience
(630) 875-1700	550 E. Devon Avenue
Immigration, Criminal Defense, DUI & DWI and Real Estate
Attorney Ana Mendez Mencini is an experienced and knowledgeable immigration attorney with a history of strong advocacy in service to her clients. Herself the daughter of a Colombian immigrant, Ms. Mencini understands the many challenges immigrants face while dealing with immigration matters. She has the knowledge and experience needed to guide clients through the often-difficult immigration process.
Ms. Mencini began her legal career working for the legal content provider, Lexis-Nexis. She then joined the firm of A. Traub & Cadiz where, as a staff attorney, she worked on family law, bankruptcy, landlord-tenant, and real estate cases. At the same time, she...
DuPage County, IL Immigration Law Lawyer with 5 years experience
(630) 529-9377	One Lincoln Centre
18W140 Butterfield Road, Floor 15
Immigration, Criminal Defense, DUI & DWI and Employment
The Ohio State University Moritz College of Law
Former State's Attorney, top 40 under 40 Trial Attorney.
DuPage County, IL Immigration Law Attorney with 10 years experience
(630) 797-5505	27474 Ferry Road
Warrenville / Naperville, IL 60555
Free ConsultationImmigration, Bankruptcy, Divorce and Family
Consistently achieving positive results for her clients does not happen by accident. Attorney Tracey A. Hower is a certified Guardian Ad Litem and Mediator which requires intense listening skills, and she is an effective communicator who keeps her clients regularly informed of the case status and strategy. Inquiries are a top firm priority. Simple inquiries like, "when is my next court date" are handled by the staff. Complex inquiries regarding the case are answered immediately by Tracey, if she is available, or promptly at the next available time.
Some attorneys will sugar coat the truth. Although compassion is a priority...
Thomas P. Miller
(630) 403-8441	460 South County Farm Road
Immigration, Divorce, Domestic Violence and Family
Experience, integrity and flexibility form the backbone of my client oriented practice in Cook and DuPage Counties. My twelve years of negotiating, mediating, trials and appeals, inform my opinion of your case, and from our initial consultation onward, you always receive an honest assessment of the likely outcome. I strive for innovative solutions to your issues, minimizing expense and grief, strategizing to let you retain control over the results, while always being ready to "go all the way". Throughout, I will always be accessible to you and bill you fairly, tailoring payment options to your circumstances. About Me: ...
Carla M. Casas
Cook County, IL Immigration Law Attorney with 17 years experience
(312) 971-7221	4660 N Elston Avenue
Carla M. Casas-Torres has been practicing law since 2002 and currently focuses her practice on immigration and nationality law. A native of Peru, she immigrated to the United States in 1980. Having personally experienced the difficulties of the immigration system, she has a unique perspective when handling immigration matters and an intimate understanding of the struggles her clients face. It is because of her own immigrant experience that she chose to focus her practice on immigration law. Carla feels fortunate for the opportunity to pursue her goals in the United States and is passionate about helping...
Sofia Zneimer
Cook County, IL Immigration Law Lawyer with 16 years experience
(773) 516-4100	4141 N Western Ave
Immigration, Legal Malpractice, Products Liability and Workers' Comp
Sofia Zneimer is a lawyer who litigates immigration and injury lawsuits. Sofia Zneimer represents businesses and individuals in need of an immigration benefit, including visa, work permit, permanent residency, or citizenship. Sofia Zneimer also handles immigration, malpractice, and personal injury trials and appeals.
Iskra Panteva
Cook County, IL Immigration Law Lawyer with 6 years experience
(312) 471-0014	444 W Lake Street
Free ConsultationImmigration
Iskra advises multinational companies, executives and individuals in all aspects of employment-based immigration, investment and family immigration. She has assisted companies in best practices and corporate compliance with issues involving foreign workers. In her career, she has worked for a big international law firm and has lead the immigration department in a well-known Chicago firm. She has been recently nominated by the American Institute of Legal Counsel as 10 Best Attorneys for Client Satisfaction in the practice are of Immigration Law. In 2017, she was also recognized as Top 40 Under 40 by the National Advocates. She has given speeches...
Sara N. M. Dady
Winnebago County, IL Immigration Law Lawyer with 14 years experience
(815) 520-0387	421 S. Mulford Rd, Ste 202
William Mitchell College of Law
Sara Dady has been practicing family based immigration including visas for victims of domestic violence and other crimes, citizenship, asylum law as well as deportation defense for over 13 years. She owns Dady Law Group LLC in Rockford, Illinois and is a board member of Justice for Our Neighbors of Northern Illinois (JFON) which provides high quality, free immigration legal services. In 2018 she made an unsuccessful but satisfying bid for Congress. She is a 4-H alumna and actively volunteers with U of I Extension in Winnebago County. Sara graduated with a BA in Classical Studies and Political Science...
Christopher Helt
(888) 739-6794	10 South Riverside Plaza
Christopher Helt, Esq. of The Helt Law Group LLC is a nationally recognized removal defense immigration attorney, providing legal counsel to immigrants, nationwide.
(630) 665-6904	1745 South Naperville Road Suite 200
Immigration, Bankruptcy and Health Care
Oklahoma City University School of Law and DePaul College of Law
43 years experience in Immigration and International Law, Complex Bankruptcy and Health law Visiting Professor of International Law DePaul University College of Law Global Faculty International Law, Faculty of Law ,University of Liverpool School of Law U.K. Advanced law degree (LL.M) DePaul University Dissertation supervisor University of Cumbria U.K. Salford University U.k.
Drew Elesh
(773) 679-8613	5240 W Irving Park Rd
Concentrating on Immigration law since 1996.
Deportation defense and green cards and work permits including work visas and waivers for green cards. U visas and asylum and more. Student visas and
U.S. embassy processing for overseas clients.
Dreamers and DACA and U.S. citizenship.
AILA & Federal Bar Association and Chicago Bar Association trained.
Attend Japan America Society functions
Attended U.S. Embassy in London for attorney tour
Participate in monthly sessions with London and Asia Chapters
of American Immigration Lawyers Association meetings/ phone
conferences/ continuing legal education
Educated at the University of Michigan, Northwestern University, and University of Miami School of Law
Office Manager Alberta Cruz is fluent in...
Raymond Barbosa
(312) 223-9885	123 W. Madison St.
Immigration, Employment, Real Estate and Tax
New York University School of Law and New York University School of Law
I have a law and graduate law degree (Taxation) from New York University School of Law, an M.B.A. (finance) from New York University Stern School of Business, and a B.S. degree (accounting) from Fordham University. I am admitted to practice in New York and in Illinois. I am also admitted to practice before the U.S. Tax Court,the Federal District Courts: Southern and Eastern Districts of New York, and the Northern District of Illinois; and in the Seventh Circuit Court of Appeals. I am a member of the Hispanic Bar Association, the Puerto Rican Bar Association, the Chicago Bar Association,...
Nancy Vizer
Cook County, IL Immigration Law Attorney
(312) 957-1755	223 W Jackson Blvd #725
Nancy M. Vizer founded her law firm in 2001 in Chicago, IL, to provide an outlet for immigration clients to receive personalized service. The firm almost always charges a flat fee, so that clients can know exactly what to expect. Ms. Vizer works directly with each of her clients, rather than delegating work to a team that the client may never meet. The staff remains fully familiar with each of Ms. Vizer's immigration cases, and is able to answer questions when Ms. Vizer is occupied with other matters, but clients always have access to Ms. Vizer for their substantive concerns.
Faraz Nayyar
DuPage County, IL Immigration Law Attorney with 8 years experience
18W140 Butterfield Rd., Floor 15
Immigration, Criminal Defense, Employment and Personal Injury
Former Attorney for the United States Department of Labor and United States Department of Justice. Years of complex litigation experience.
William Gaston McLean III
Cook County, IL Immigration Law Attorney with 8 years experience
(312) 714-5603	401 S LaSalle St.
Ste. #801R
Immigration, Criminal Defense and Family
I am a Chicago and Miami lawyer practicing family- and employment-based immigration law, and removal and deportation defense and appeals. I also work with criminal and family law issues as they arise in the context of immigration cases.
Daniel J. Fisher
(312) 313-3550	180 North LaSalle Street
Immigration and Employment
Barry University Dwayne O. Andreas School of Law
I have nine years of experience as an Immigration Attorney. Additionally, I have a very strong knowledge of employment law and the connection between immigration and Federal and State employment regulations. While I have not counted exactly how many immigration cases I have handled, reviewed, consulted with or been associated with, I estimate that the number is easily in the thousands. Based on this experience there is rarely a situation that I have not seen before. I am AV rated perfect "5.0", Avvo rated "Superb", Avvo Client choice awards 2011, 2012, 2013, "Rising Star" Orlando Style Magazine, Lead Counsel Rated...
Kevin P. O'Flaherty
(708) 894-3030	16557 Oak Park Avenue, Ste. B
Free ConsultationImmigration, Business, Divorce and Family
At O'Flaherty Law, we are your community law firm. we are committed to providing personalized, efficient, and quality legal service. We pride ourselves on our "above-and-beyond" approach to client care, affordable fees, and communication. Please call us today at (630)324-6666 to schedule a free in-person or phone consultation. We are located in Downers Grove, Illinois. Our attorneys are happy to meet with you at our office or any other location convenient to you in order to work to accomplish your legal goals. Our team has expertise in many areas of law including but not limited...
Nestor Vicario
(312) 698-9066	150 S Wacker Drive
Nestor Vicario has been an immigration attorney since 2014. His primary focus is family-based immigration, citizenship, hardship waivers of inadmissibility, Deferred Action for Childhood Arrivals (DACA), and removal defense. Mr. Vicario's professional experience and background give him a unique perspective on the importance of having an immigration attorney who can navigate through the complexities of U.S. immigration laws armed with knowledge and compassion, whether fighting in immigration court to keep families united, assisting Dreamers, or guiding families through hardship waiver applications. Over the years, Mr. Vicario has volunteered at several Chicago nonprofit community organizations serving the immigrant community, including...
Shelley Kalita
(312) 829-2465	910 W. Van Buren St,
Ste 2S
Free ConsultationImmigration, Divorce and Family
Shelley Kalita received her Juris Doctorate with Honors from DePaul College of Law in Chicago, Illinois in June 2000. She graduated in the top 10% of her law class, achieving the honors of the Order of the Coif, and served on the DePaul Law Review. In addition, Shelley has a Master of Science degree from the University of Illinois in Forensic Science. In her previous career, Shelley served as the Laboratory Director of the Illinois Racing Board, directing horse racing's drug testing programs, and also served as the General Counsel for the Illinois Racing Board specializing in horse racing and...
Claimed Lawyer ProfileBlawgsearchSocial MediaResponsive Law
Gerald Cipolla
(773) 687-0549	332 S Michigan Ave
DePaul University and City University of Hong Kong
Cipolla Law Group is a Chicago based immigration law firm. We have 28 years of collective experience representing families, professional workers, businesses, investors and undocumented individuals for their immigration matters.
As the Principal Immigration Lawyer, I've successfully handled over thousands of immigration petitions for clients in Chicago and across the world. I am a frequent speaker on US immigration in varies settings including radio show, media interviews and seminars.
My practice focuses 100% on US Immigration and Nationality law. Helping clients with their immigration matters is what I do day in and day out. Our law firm strives...
Esther Contreras
(312) 245-7500	203 N LaSalle Drive
I provide immigration solutions to corporate clients including foreign investors, domestic businesses hiring foreign workers, and multinational companies transferring foreign employees to the United States. I also represent individual executives, professionals, researchers, scientists and artists regarding their specific immigration-related needs. My practice comprises all aspects of nonimmigrant visas, permanent residence, citizenship and worksite enforcement, including Form I-9, Employment Eligibility Verification, and E-Verify compliance.
I try to anticipate my clients' needs by making every effort to consider cost, timing and longer-term issues at stake, as immigration decisions can have a reverberating impact even decades into the future. By understanding what is important...
Daniel Joseph Conidi
(708) 366-9900	200 E. Randolph, Suite 5100
Suite: 5100
Free ConsultationImmigration and Criminal Defense
MId Atlantic School of Law
I worked as Senior Special Agent Criminal Investigator for the US Department of Homeland Security and the US Department of Justice for over 26 years. As a Special Agent I worked in all aspects of the immigration mission both criminally and administratively. After leaving the US Government I was a founding partner of Alliant Law Group, LLC and currently oversee the business and operation of the firm. At Alliant, we emphasize client service in every matter, including the importance of attorney/staff accessibility, and client understanding regardless of their primary language. With the firm, I strive to provide...
Melissa Jane Chavin
707 Skokie Bl 600-6062
American University Washington College of Law and University of Connecticut School of Law
Now located in Kensington, London, UK. Specializing in consular processing for marriage based immigration (green cards), investment in the US (E-2 and EB-5), multi-national business managers and specialists (L visas), waiver and citizenship applications.
Robert Milla
(312) 924-2862	225 West Washington Street
Milla & Associates, LLC is a full-service immigration law firm, experienced at providing personal and professional legal services for family, employment, federal litigation, and removal defense cases. We can help keep your family united, bring your loved ones here, fight for your rights in court, and pursue employment in the United States. ROBERT C. MILLA has been an immigration attorney since 2006, dedicating his career to helping clients fulfill their family and employment goals in the United States. Mr. Milla's approach has always been to invest the head and heart to provide 100% effort. Mr. Milla's personal background has...
Megan E. Gieseler
(630) 932-9100	https://www.mevorahlaw.com/
900 E. Roosevelt Road
Megan Gieseler has a tremendous amount of experience, knowledge, and vigilance in family law cases. She is well versed and knowledgeable about the applicable statutes and case law. Ms. Gieseler's family law clients often refer to her as their personal "pit bull." She handles contested divorces and post-decree matters involving complicated property divisions, maintenance calculations, and business evaluations. In addition, Ms. Gieseler excels in contested custody cases for paternity and divorce clients. She has the winning combination of empathy and kindness for her clients and assertiveness and intelligence required for the courtroom. Ms. Gieseler fights vigilantly for her immigration...
Beata McCann
5504 S. Brainard Ave.
Peoria County, IL Immigration Law Lawyer with 11 years experience
(309) 740-4033	316 SW Washington St. Suite 1A
Free ConsultationImmigration, Business, Cannabis Law and Real Estate
Marquette University Law School
Licensed to practice since 2008, Thomas Howard has represented numerous financial institutions in litigation to enforce their security interests. Over the past decade, he has assisted community banks in complex commercial workouts involving some of the most sophisticated financial products in the banking industry. He has also litigated in contested contract cases on various legal theories.
After being licensed to practice for ten years, Mr. Howard joined Hall Rustom and Fritz in June of 2018 to expand his legal offerings to business clients to include a higher level of service through his knowledge of technology. To assist downstate...
KiKi Maria Mosley Esq.
(773) 501-2039	208 S LA SALLE ST STE 1400
Farrah Qazi
Kane County, IL Immigration Law Lawyer with 15 years experience
(630) 504-0648	2400 Big Timber Road
Immigration, Business, Estate Planning and International
DePaul College of Law and University College of London
Farrah Qazi is the founding attorney and owner of Qazi Law Offices. She received her Juris Doctorate from DePaul University Law School and her Bachelor of Arts from Loyola University Chicago, where she majored in Political Science, with minors in English Literature and Spanish Language and Literature.
She also attended the University College of London where she studied Global Business and International Law. As an intern and associate at the International Human Rights Institute, Farrah handled cases involving the trafficking of women and children in Latin America, and translated critical court documents from Spanish into English. Farrah is multilingual and...
Kevin L Dixler
(312) 588-0500	542 S. Dearborn St.
Ms. Mary K. Neal
(773) 681-1335	2731 W. Touhy Ave.
Immigration and Elder
Globally aware and community focused, attorney Mary K. Neal has a talent for language and penchant for logical reasoning that makes immigration law a natural fit for her legal practice. The Law Office of Mary K. Neal is dedicated to assisting clients overcome life's obstacles to build a better future for their families here in the United States. The firm is available to serve the legal needs of Rogers Park, West Ridge, and greater Chicago. For immigration matters, the firm accepts clients from all states where such representation is allowed by law. Individuals and families can face many problems as a result...
(312) 338-1808	120 S State St
Free ConsultationImmigration and Bankruptcy
Capable Lawyer, Dependable Service, Sensible Solutions
Julianne (Julie) O'Grady has more than 15 years of experience handling immigration and consumer bankruptcy cases. She has helped countless immigrants achieve their goals of obtaining permanent residency and U.S. citizenship; uniting fiancés and families in the U.S., and keeping families together; defending immigrants' rights in immigration court despite prior immigration violations and criminal offenses; and helping immigrants successfully win their claims of asylum. She has also helped numerous individuals and couples to file Chapter 7 and Chapter 13 bankruptcy petitions, and obtain a fresh financial start. She is committed to helping individuals navigate their...
Will County, IL Immigration Law Attorney with 10 years experience
(815) 727-4500	https://criminal-defense.mevorahlaw.com/
58 N. Chicago Street, Suite 500
Mr. Shore is acutely aware that when an individual contacts Mevorah Law Offices LLC about a legal problem, that for the client it is also a personal problem. In addition to litigating or negotiating settlements in many major cases, Mr. Shore is a skilled listener who is adept at developing and implementing cost effective and winning strategies. Mr. Shore represents divorce and parentage clients in settlement negotiations, pre-trials, hearings, and trials. Mr. Shore is also appointed by the Court to represent minors in custody proceedings. As an appointed guardian for the children (referred to as a Guardian Ad Litem...
Eyad Tabahi
(847) 260-8182	5250 Old Orchard Road
Peter Messersmith
(312) 751-9960	230 E Ohio Street
The Messersmith Law Firm is a full-service law firm, concentrating on immigration law. We have special expertise in work visas, family based visas, visa waivers, green cards through family and employment and asylum. We are well known for our zealous and creative advocacy on behalf of our clients. The Messersmith Law Firm assists large and small companies and institutions nationwide in complying with the complex immigration requirements of the USCIS, DOL and DOS to retain highly skilled workers in such fields as information technology, medical research, computer software, engineering, hospitality, art, martial arts and medicine. Immigration law is federal law which means...
Immigration Attorneys in Nearby Cities
The OneCLE Lawyer Directory contains lawyers who have claimed their profiles and are actively seeking clients. Find more Fayette County, Illinois Immigration Lawyers in the Justia Legal Services and Lawyers Directory which includes profiles of more than one million lawyers licensed to practice in the United States, in addition to profiles of legal aid, pro bono and legal service organizations.


text:
{-# LANGUAGE TemplateHaskell #-}

{-| Regular expression matching as described in the paper "Compact Architecture for High-Throughput Regular Expression Matching on FPGA" -}
module Clash.Regex.RegexCompile (
    Regex(..),
    Matcher(..),
    CompiledRegex(..),
    compileRegex,
    CompiledRegexHW(..),
    regexTH
    ) where

import Prelude
import Clash.Prelude (Vec(..), type (+), type(^),  listToVecTH)
import Language.Haskell.TH
import Data.List

-- | Regex type parameterised by character type
data Regex a
    = Class  [a]
    | Star   (Regex a)
    | Concat (Regex a) (Regex a)
    | Union  (Regex a) (Regex a)
    deriving (Show)

-- | Matching unit responsible for a single character class in the regex
data Matcher a = Matcher {
    chars    :: [a],
    incoming :: [Int]
} deriving (Show)

-- | Result of regex compilation
data CompiledRegex a = CompiledRegex {
    matchers :: [Matcher a],
    size     :: Int,
    outputs  :: [Int]
} deriving (Show)

-- | Compile regex for hardware
compileRegex
    :: Regex a         -- ^ `Regex` to compile
    -> CompiledRegex a -- ^ Compiled `Regex`
compileRegex regex = compileRegex' 0 regex [-1]
    where
    compileRegex' :: Int -> Regex a -> [Int] -> CompiledRegex a
    compileRegex' index (Class chars) incoming = CompiledRegex [Matcher chars incoming] 1 [index]
    compileRegex' index (Star  regex) incoming = CompiledRegex matchers size union
        where
        union                               = incoming ++ outputs
        CompiledRegex matchers size outputs = compileRegex' index regex union
    compileRegex' index (Concat regexX regexY) incoming = CompiledRegex (matchersX ++ matchersY) (sizeX + sizeY) outputsY
        where
        CompiledRegex matchersX sizeX outputsX = compileRegex' index           regexX incoming
        CompiledRegex matchersY sizeY outputsY = compileRegex' (index + sizeX) regexY outputsX
    compileRegex' index (Union regexX regexY) incoming = CompiledRegex (matchersX ++ matchersY) (sizeX + sizeY) (outputsX ++ outputsY)
        where
        CompiledRegex matchersX sizeX outputsX = compileRegex' index           regexX incoming
        CompiledRegex matchersY sizeY outputsY = compileRegex' (index + sizeX) regexY incoming

-- | A compiled regex suitable for hardware
data CompiledRegexHW n nBits = CompiledRegexHW {
    classesHW  :: Vec (2 ^ nBits) (Vec n Bool),
    matchersHW :: Vec n (Vec (n + 1) Bool),
    outputsHW  :: Vec (n + 1) Bool
}

listToVecTH2 :: [ExpQ] -> ExpQ
listToVecTH2 []     = [| Nil |]
listToVecTH2 (x:xs) = [| $(x) :> $(listToVecTH2 xs) |]

-- | Generate a `CompiledRegexHW` at compile time using template haskell
regexTH
    :: (Eq a, Bounded a, Enum a)
    => CompiledRegex a -- ^ Compiled regex
    -> Q Exp           -- ^ Template haskell AST for Regex
regexTH res = [| CompiledRegexHW $(listToVecTH2 $ map listToVecTH cs) $(listToVecTH2 $ map listToVecTH ms) $(listToVecTH os) |]
    where
    cs :: [[Bool]]
    cs =  transpose $ map (\matcher -> map (`elem` chars matcher) [minBound .. maxBound]) (matchers res)

    ms :: [[Bool]]
    ms =  map (\matcher -> map (`elem` incoming matcher) [(-1)..size res - 1]) (matchers res)

    os :: [Bool]
    os =  map (`elem` outputs res) [(-1)..size res - 1]