text:
Facebook Instagram YouTube Blog
Fort Wayne, IN	Our Telephone Number (260) 207-2277
The SweetCars Difference
Consign Your Vehicle
General Product Reviews
Nanoskin AutoScrub Wash Mitt
December 15th, 2013 | by Mike Cardenas
Article by:
Mike Cardenas
Mike Cardenas has spent his entire career making cars look amazing. Mike has been recognized by duPont REGISTRY as one of the top 20 detailers in North America. Mike is a factory-trained XPEL installer, Griot's Garage certified trainer, certified detailer through SONAX USA, Meguiar's, and Ceramic Pro, and was the first student of the highly distinguished Esoteric Elite Detailer Academy. Mike contributes to several detailing blogs and websites, conducts workshops and clinics to help educate on both a local and an international stage at events such as the SEMA Show, and he has been featured in magazines, interviews, videos and the television show Competition Ready on the Velocity Channel. Mike is an avid car enthusiast and serves as a technical car care consultant for various car clubs, including Ferrari, Porsche, and Lamborghini and others. He is trained and certified by the Porsche Club of America as Concours Judge. He also enjoys playing the guitar, recording music, and is a die-hard soccer fan.
4 Essential Items for Your Vehicle this Winter
Winter tends to bring its own unique set of complications and things to keep in mind when caring for your car. Suddenly, we go from quickly jumping in our car and cruising to our destination — to tirelessly scraping snow and ice off our windows before we can even think about putting the car into...
By Jared Griffiths on December 8th, 2020
Custom Vossen Wheels and More on this Stunning Audi R8
As a car enthusiast, you want to stand out in the crowd. You know that cars are more than just transportation; they're artistic representations of engineering marvel. When you buy a unique car like the Audi R8, you're not just buying into the name — you're buying into generations of passion, experience, and dreams. When...
By Nate Corwin on September 28th, 2020
From the Shop: Maintaining Your Ceramic Coated Vehicle
With more and more vehicles coming into SweetCars for ceramic coating services, sometimes called 'glass coating' services, we thought it would be beneficial to elaborate more on the topic. Ceramic coatings such as Ceramic Pro, the product we use, are designed to make maintaining the appearance of your vehicle simple and straight forward. Following a...
By Guy Septer on June 23rd, 2020
Request a Vehicle
Showroom/Retail Shop
Monday, Tuesday, Thursday:9AM—7PM
Wednesday, Friday:9AM—6PM
Saturday:9AM—4PM
Service/Detailing
Monday–Friday:8AM—5PM
Saturday & Sunday:Closed
Share Your Ride, Get Featured on Our Site!
© 2021 SweetCars, LLC. All rights reserved. | 2404 W Jefferson Blvd, Fort Wayne, IN 46802
Please read our Terms of Use and Privacy Policy.
SweetCars is an independent car dealer. SweetCars purchases automobiles from third parties for resale, and is in no way affiliated with, sponsored by or related to the original car manufacturer of the cars it sells.
If you have any questions, please call us at (260) 207-2277.
SweetCars is proud to be a member of the Sweet Family of Companies.
SweetFamilyofCompanies.com


Made from quality willow with PU leather straps and cotton linen lining, this sensational 4 person picnic basket is designed for outdoor family and friends picnic fun. Putting away the devices, grab some picnic food and physically reconnect. With a built-in thermally-insulated cooler bag, the basket will keep the food and drinks cooler for a longer time. 4 sets of cutlery are included for 4 people to enjoy an afternoon of outdoor fun. The package also includes a large colour matching blanket. This 4 person picnic basket is perfect for the races, harvest picnics, grape grazing events, Christmas and summer gatherings! You'll be surprised how often it will be used.


HEC has provided an opportunity for all VU Students including ones who have earned a laptop under the PM's National Laptop Scheme (Phase IV & V), Staff and Faculty to get MOS training and enhance their skills in Microsoft Office as Specialist to work with this suite with full professional proficiency. In addition to this, it is a chance to get Certified for globally renowned Microsoft Office Certification (MOS) worth $96 for FREE.
STEP I: Visit Learning Material and download both Guide booklet and Offline Content (Learning Plan, Syllabus, Course Contents, Slides, Test Assessments, etc.) for self-study and practice.
STEP II: Register as a Test Candidate at Certiport as per guide booklet for Microsoft Office Specialist (MOS) certification exam.
The mode of exam is online and the candidates must appear at authorized VU's Certiport Testing Centres on scheduled dates assigned by the campus management only.
Last Date 24th December, 2018. Therefore, these candidates are further advised to take their exam before mentioned date.


We offer accommodation for both private and business guests in 15 pleasant locations. Great get-aways, tasteful gourmet stays, relaxing mini breaks and simple nights.
Indoor and outdoor spa with pool / sauna / hot tub, etc.
Indoors- and outdoors spa with pool/sauna/hot tub etc.
Lots of sports and activities, pool, sauna etc.


This new model solid Classic-Style Barber Chair is heavy duty and has a classic Barber Shop design. This chair offers sleek styling without sacrificing functionality. The hydraulic lift chair offers a reclining back with an extendable headrest that can be removed entirely. The self-rising footrest offers comfort to your clients as you work.
The extra wide seat offers comfort to the largest of your clients while providing a stable base for your cutting.
Reclining backrest has discreetly placed recline lever for your convenience.
Hydraulic Adjustable Height: 22" to 27"


text:
Q: Iteration through Parent-child with endpoint call Scenario: Request consist of multiple orders with details. Send order details to back-end service and get a new Row number that after I should used like one of param with create details
Request looks:
<OrderList>
        <Order>
            <target>MySQL</target>
            <Sales>
                <email>p@gmail.com</email>
            </Sales>

                <Item><qty>1</qty>PR9</Item>
                <Item><qty>2</qty>PR8</Item>
                <Item><qty>3</qty>PR7</Item>

        </Order>
        <Order>
            <target>MySQL</target>
            <Sales>
                <email>j@gmail.com</email>
            </Sales>

                <Item><qty>4</qty>PR6</Item>
                <Item><qty>5</qty>PR5</Item>
                <Item><qty>6</qty>PR4</Item>

        </Order>
        .......
   </OrderList>

sequence:
                <inSequence>

            <iterate expression="//Order" preservePayload="true">
                <target>
                        <enrich>
                            <source clone="true" xpath="//Order"/>
                            <target property="OrderBackup" type="property"/>
                        </enrich>
                    <sequence>
                        <property expression="//target" name="SalesTarget" scope="default" type="STRING"/>
                        <property expression="//Sales/email" name="email" scope="default" type="STRING"/>
                        <filter regex="MySQL" source="$ctx:SalesTarget">
                            <then>

                                <payloadFactory media-type="xml">
                                    <format>
                                        <soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                                            <soapenv:Header/>
                                            <soapenv:Body>
                                                <dat:addSalesOrder>
                                                    <dat:email>$1</dat:email>
                                                </dat:addSalesOrder>
                                            </soapenv:Body>
                                        </soapenv:Envelope>
                                    </format>
                                    <args>
                                        <arg evaluator="xml" expression="$ctx:email"/>
                                    </args>
                                </payloadFactory>
                                <call blocking="true">
                                    <endpoint key="SalesOrderEP"/>
                                </call>
                                **<enrich>
                                    <source clone="true" type="body"/>
                                    <target property="newRowID" type="property"/>
                                </enrich>**

                                <property expression="$ctx:newRowID > 0 " name="isCorrectResponse" scope="default" type="BOOLEAN"/>
                                <filter regex="true" source="$ctx:isCorrectResponse">
                                    <then>
                                       <enrich>
                                        <source clone="true" property="OrderBackup" type="property"/>
                                        <target type="body"/>
                                    </enrich>
                                        <iterate expression="//Details">
                                            <target>
                                                <sequence>
                                                    <property expression="//qty" name="qty" scope="default" type="STRING"/>
                                                    <property expression="//code" name="code" scope="default" type="STRING"/>
                                                    <log level="custom">
                                                        <property expression="fn:concat('params:Code: ' ,$ctx:code, ' ;Qty: ',$ctx:qty)" name="info"/>
                                                    </log>
                                                    <payloadFactory media-type="xml">
                                                        <format>
                                                            <soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                                                                <soapenv:Header/>
                                                                <soapenv:Body>
                                                                    <dat:addSalesDetails>
                                                                        <dat:salesId>$1</dat:salesId>
                                                                        <dat:qty>$2</dat:qty>
                                                                        <dat:code>$3</dat:code>
                                                                    </dat:addSalesDetails>
                                                                </soapenv:Body>
                                                            </soapenv:Envelope>
                                                        </format>
                                                        <args>
                                                            <arg evaluator="xml" expression="$ctx:newRowID"/>
                                                            <arg evaluator="xml" expression="$ctx:qty"/>
                                                            <arg evaluator="xml" expression="$ctx:code"/>
                                                        </args>
                                                    </payloadFactory>
                                                    <call blocking="true">
                                                        <endpoint key="SalesDetailsEP"/>
                                                    </call>

                                                    <aggregate>
                                                        <completeCondition>
                                                            <messageCount max="-1" min="-1"/>
                                                        </completeCondition>
                                                        <onComplete expression="//m0:UpdatedRowCount/Value" xmlns:m0="http://ws.wso2.org/dataservice">
                                                            <log level="full"/>
                                                            <drop/>
                                                        </onComplete>
                                                    </aggregate>
                                                </sequence>
                                            </target>
                                        </iterate>
                                    </then>
                                    <else/>
                                </filter>
                            </then>
                            <else/>
                        </filter>
                    </sequence>
                </target>
            </iterate>
        </inSequence>

I have a problem with first call response ... I used
<enrich>
      <source clone="true" type="body"/>
       <target property="newRowID" type="property"/>
</enrich>

to save newly created row Id in property and I'm getting it correctly in line
> <log level="custom">
> <property expression="fn:concat('NewRowID = ' ,$ctx:newRowID)" name="info"/>
> </log>

BUT when I want to use it  in second payload  it looks it cannot resolve it ?!!?
error:

DS Fault Message: Error in 'CallQuery.extractParams', cannot find
  parameter with type:query-param name:salesId DS Code:
  INCOMPATIBLE_PARAMETERS_ERROR

I figure out that in payload the $ctx:newRowID is reolved as
  <GeneratedKeys> xmlns="http://ws.wso2.org/dataservice"><Entry><ID>93</ID></Entry></GeneratedKeys>

and not simply as 93
I'm guessing this is because in enrich I used source as "body" .. but when I tried to get xpath of response like xpath = "//Entry/ID" I got nothing
what is wrong?

A: Problem was that enrich mediator need namespace so
<enrich>
   <source clone="true" xmlns:n0="http://ws.wso2.org/dataservice" xpath="$body/n0:GeneratedKeys/n0:Entry/n0:ID"/>
   <target property="newRowID" type="property"/>
</enrich>

did the magic ... So ALWAYS put a namespace lesson learned

redpajama_set_name: RedPajamaStackExchange


However, at the end of the month of April, the flu H1N1 hit our country; all the schools closed for two weeks and children's day was cancelled until further notice. But this was a blessing in disguise, as it gave us extra time to make phone calls to different companies looking for sponsors. The event finally came together in August.
One of our objectives was to offer interactive activities centered on cleanliness and hygiene, so we approached a company which agreed to sponsor shampoo and conditioner to give to the children.
We had the opportunity to talk to the parents and to evaluate their needs – offering them advice and solutions for teaching moral values and enhancing communication within their families. Some of the parents have asked us to prepare subjects for their teenagers that touch on the topics of pregnancy and drug prevention. Our goal is to continue offering these practical discussions with the parents and teachers in this area that will benefit over 50 families.
Presently, we are working on improving the standard of their elementary school by seeking sponsorship to finish the construction of the classroom and restrooms. Our goal is to help these children to develop their abilities and human potential and thus to achieve better quality of life. We hope to reach this goal through vocational training and seminars for both parents and children.
Thank you, Activated Ministries, for the children's books that you donated to our project. These books greatly enhanced our classes and each child was able to go home with his or her own copy.


Welcome back to routine everyone! It seems the two weeks around Christmas are a bit chaotic and our routines go out the window. For many of you this week will be a fresh start and a great way to start off 2019! We are starting a new cycle this week- STAMINA. Stamina and mental toughness work hand in hand- we must strengthen our minds to get comfortable with being uncomfortable. We must chose to keep going when we want to stop and continuously move the needle towards our true potential.
A very warm welcome to Meghan Dobie as an official member to CFPC! Meghan and Bryan are getting serious and she seems to be putting up with him! Pumped to have you around Meg!!


This years' preseason is in the books for the Chicago Blackhawks. All in all, the Hawks went 2-4-0 in their exhibition matchups. To quote Patrick Kane.
I think the biggest thing was coming in and having a good camp and I feel like we've done that even though our record isn't that great in preseason. I feel like we've really had a productive camp, some good practices, some good trial runs in the scrimmages and things like that, so I think to kind of put an exclamation on that it'd be nice to have a good game tonight and feel good going into next week, feel good about practices and get a win under our belt here at home.
This past week was a busy one, as the Hawks hosted three final preseason games at the United Center. Their final tilt Saturday resulted in a 4-1 win over the Columbus Blue Jackets, giving them a reason to feel good, as Kane referenced above. Numerous personnel moves were made throughout the week, and the opening night roster is finally in place. Let's take a look at what's transpired, and what we have to look forward to when the Hawks take on the Ottawa Senators this coming Thursday.
Defenseman Brandon Davidson signed a one-year contract worth $650,000.
After all these moves, the current roster consists of 13 forwards, nine defensemen, and three goaltenders. But, defensemen Connor Murphy (back injury) and Gustav Forsling (wrist surgery) will start the season on injured reserve. Netminder Corey Crawford is also expected to start the season on that list. He has not yet been cleared to play after dealing with concussion issues last season.
This leaves 13 forwards, seven defensemen, and two goalies for a 22-man roster. A final roster may consist of 23 players, but head coach Joel Quenneville indicated from the start of the preseason he wanted to go with seven defensemen. This is a smart move, as rotating eight defenseman caused much frustration and lack of cohesiveness in an unsuccessful 2017-18 campaign.
Utilizing 13 forwards instead of the usual 14 makes a lot of sense as well. With so many young players in Chicago, as well as in Rockford, this gives the Hawks the opportunity for everyone to play instead of sitting in the press box for an extended amount of time. There will only be one healthy scratch every night instead of two, according to this set up. The odd man out will presumably rotate depending on performance and matchup issues with opponents.
Saturday night's game against the Blue Jackets was a good determiner of the opening night lineup. Here's what was deployed, and what we will probably see for the first game on Oct. 4.
Let's break down the lineup even further based on what we've seen in the preseason.
Toews' production has seen a steady decline over the past three seasons — even having Saad back on his line last season didn't do the trick. But who better to help a resurgence than the team's top goal-scorer from last season, the young DeBrincat? Toews and DeBrincat have been together on the top line since the start of the preseason. They play off each other well, and DeBrincat has already provided the helpers for two of Toews' three preseason goals.
The third member of this trio comes as a bit of a surprise. Kahun started as a dark horse to make the team, but dominant performances have made him not only a lock, but a contributor on the top line. In his first two preseason games, Kahun impressed by notching a goal and two assists. For the final three exhibition tilts, he's been on the top line and looks like he belongs. He added another goal against Detroit this past Tuesday, assisted by Toews and Keith.
Has Saad Found His Spot?
Saad started, as well as ended, his preseason time on the second line with Schmaltz and Kane. But for the fourth and fifth exhibition games, Coach Q experimented with a line of Schmaltz-Anisimov-Kane instead. While this line didn't look all that bad, Saad struggled in the third line role he had been relegated to. Unfortunately, it's quite obvious he doesn't have the capacity to carry a line on his own and that he needs more skilled teammates to lead the way. Coach Q realized this and adjusted accordingly.
Brandon Saad will skate with Schmaltz and Kane tonight vs. Columbus.
Q: "We tried him on another line to see if there's more balance that way. … But playing with Kaner and Schmaltzy, there's a lot of speed, lot of possession. It puts him in a way better spot to be productive."
Saad made his case even stronger to stay on the second line by notching a goal (assisted by Schmaltz) and creating a few other chances in this spot during Saturday's win against Columbus.
Related – Can Toews, Saad, & Keith Bounce Back?
Remember last season when Hayden, Lance Bouma, and Tommy Wingels bonded and formed the "energy line"?! Well it looks like Hayden has found some new buddies to help him get the job done this year, namely Kruger and Martinsen.
Kruger returns for his second stint with the Hawks. He's picking up right where he left off by taking on defensive zone responsibilities and being consistent in the faceoff circle. Martinsen is doing his best to be hard to play against. In three games played, he's recorded 14 hits. Even though it's not particularly their job to score goals, all three players have found the back of the net in the preseason.
It's no secret headed into the regular season that this line could be a problem. While the other three lines are working together and making things happen, this line has seen a rotating cast of characters that haven't found any cohesiveness. Obviously, Saad didn't work out. Other players on this line have included Kunitz, Anisimov, Kampf, and Johnson.
Anisimov, Kampf, and Johnson are all centers, so there are options down the middle. Expect a lot of experimentation here in the first few weeks of the season. And, of course, don't be surprised if players are pulled off other lines and tried in this role to see if anything gels.
Two players that could be helpful down the road in this capacity are Victor Ejdsell and Dylan Sikura. Both were sent down to Rockford, but have the skill and potential to help this team upon further development. It will be fun to keep an eye on their progress. I expect both of them to make an impact at some point with the big club.
Referencing the defensive pairings above, Davidson slotted into the third pairing this past Saturday. Although Rutta played on the third pairing with Gustafsson against Ottawa in Thursday's preseason game. He probably slots in ahead of Davidson on the depth chart.
Davidson also has the flexibility to play on both the left and right side, and his possession numbers were strong throughout the preseason. I wouldn't expect him to be sitting on the bench on a regular basis. Even with just seven defensemen, there should be a healthy rotation on the blue line.
Keith and Jokiharju should be a fun pairing to watch. Jokiharju seems confident and willing to learn as much as possible from his veteran partner. But keep in mind that Jokiharju is young and could encounter some growing pains.
Seabrook looks rejuvenated and ready to head into the grind of another season. Gustafsson has shown his offensive upside, and Manning has looked both hot and cold. While the third line might be the weak link on the offensive side, there's been concern about the Blackhawks' defense all last year and the entire offseason. All we can do is wait and see how it pans out.
Crawford has been making some great strides while working with goaltender coach Jimmy Waite before the teams' morning skates. He even took some shots from teammates in his last two sessions. Coach Q indicated on Saturday that Crawford could possibly join his teammates as soon as Monday, or early this week. This is a very positive sign, but there is still no timetable for when he will be available to play in a game, or how good he will be after such a long and traumatic injury.
In the meantime, the veteran Ward is expected to fill in until Crow is ready. Ward had a horrific outing last Tuesday again Detroit. He gave up six goals on 17 shots, with the first one going in just 16 seconds into the game. He was pulled at the end of the second period, and ended his night with a dismal .647 save percentage.
Ward took the net again on Saturday against Columbus. He fared much better in that game, although he didn't see much action. All in all, he stopped 16 of 17 shots for a .941 save percentage. Let's hope this is the Ward we see moving forward.
Forsberg is expected to be Ward's backup. He suited up for half of the first two preseason tilts, the third period of Ward's bad outing, and the entire game against Ottawa this past Thursday. His combined .866 save percentage doesn't provide much optimism. He allowed seven goals altogether.
A very busy and exciting preseason has led us to this point. Fans, coaches, and players alike are now looking forward to the real deal, which starts with a matchup against the Ottawa Senators this Thursday. Only time will tell how the season unfolds, but the Chicago Blackhawks are ready!


text:
package org.cipres.treebase.web.controllers;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;

import org.cipres.treebase.domain.study.StudyService;
import org.cipres.treebase.web.Constants;
import org.cipres.treebase.web.model.LabelValue;
import org.cipres.treebase.web.model.SearchCommand;
import org.cipres.treebase.web.model.SearchCriteriaCommand;

/**
 * SearchFormController.java
 *
 * Created on June 16, 2006
 *
 * @author lcchan
 *
 */
public class SearchFormController extends BaseFormController {
	private static final Logger LOGGER = Logger.getLogger(SearchFormController.class);

	private StudyService mStudyService;

	/**
	 * Return the StudyService field.
	 *
	 * @return StudyService mStudyService
	 */
	public StudyService getStudyService() {
		return mStudyService;
	}

	/**
	 * Set the StudyService field.
	 */
	public void setStudyService(StudyService pNewStudyService) {
		mStudyService = pNewStudyService;
	}

	/**
	 * SEARCH_AUTHOR Data for drop down lists
	 *
	 * @see org.springframework.web.servlet.mvc.SimpleFormController#referenceData(javax.servlet.http.HttpServletRequest)
	 */
	@Override
	protected Map referenceData(HttpServletRequest request) {

		Map criteriaMap = new HashMap();

		List categories = new ArrayList();
		categories.add(new LabelValue(Constants.SEARCH_STUDY, Constants.SEARCH_STUDY));
		categories.add(new LabelValue(Constants.SEARCH_MATRIX, Constants.SEARCH_MATRIX));
		categories.add(new LabelValue(Constants.SEARCH_TREE, Constants.SEARCH_TREE));
		criteriaMap.put("categories", categories);

		List attributes = new ArrayList();
		attributes.add(new LabelValue(Constants.SEARCH_AUTHOR, Constants.SEARCH_AUTHOR));
		attributes.add(new LabelValue(
			Constants.SEARCH_CITATION_TITLE,
			Constants.SEARCH_CITATION_TITLE));
		attributes.add(new LabelValue(Constants.SEARCH_SOFTWARE, Constants.SEARCH_SOFTWARE));
		attributes.add(new LabelValue(Constants.SEARCH_ALGORITHM, Constants.SEARCH_ALGORITHM));
		Collections.sort(attributes, LabelValue.CASE_INSENSITIVE_ORDER);
		criteriaMap.put("attributes", attributes);

		List matches = new ArrayList();
		matches.add(new LabelValue("Equals", "Equals"));
		matches.add(new LabelValue("Contains", "Contains"));
		criteriaMap.put("matches", matches);

		return criteriaMap;
	}

	/**
	 * It's not a real submit unless "Submit" is entered (javascript triggered submit())
	 *
	 * Creation date: June 5, 2006 12:25:28 PM
	 */
	@Override
	public boolean isFormChangeRequest(HttpServletRequest request) {
		/*
		 * The following are the real "Submit" name on the buttons
		 *
		 */
		request.getSession().removeAttribute(Constants.SEARCH_COMMAND);

		return ((request.getParameter("And") == null) && (request.getParameter("OR") == null)
			&& (request.getParameter(ACTION_DELETE) == null) && (request
			.getParameter("Build Query") == null));
	}

	/**
	 *
	 *
	 * @see org.springframework.web.servlet.mvc.SimpleFormController#onSubmit(javax.servlet.http.HttpServletRequest,
	 *      javax.servlet.http.HttpServletResponse, java.lang.Object,
	 *      org.springframework.validation.BindException)
	 */
	@Override
	public ModelAndView onSubmit(
		HttpServletRequest request,
		HttpServletResponse response,
		Object command,
		BindException errors) throws Exception {

		LOGGER.debug("onSubmit is called");

		SearchCommand searchCommand = (SearchCommand) command;
		List<SearchCriteriaCommand> criterias = searchCommand.getCriterias();

		if (request.getParameter("And") != null) {
			addCriterias(request, searchCommand, Constants.AND_OPERATOR);
		} else if (request.getParameter("OR") != null) {
			addCriterias(request, searchCommand, Constants.OR_OPERATOR);
		} else if (request.getParameter(ACTION_DELETE) != null) {
			if (searchCommand.getCriterias().size() > 0) {
				String[] deleteConditions = request.getParameterValues("deleteCondition");
				for (int i = 0; deleteConditions != null && i < deleteConditions.length; i++) {
					criterias.set(i, null);
				}// end for
				for (int i = 0; i <= criterias.size(); i++) {
					criterias.remove(null);
				}
			}
		} else if (request.getParameter("Build Query") != null) {
			// send this to session so next page can access the data
			addCriterias(request, searchCommand, null); // do not add operator
			return new ModelAndView(new RedirectView("study-query.html"));
		}
		// send data to request
		request.setAttribute(Constants.SEARCH_COMMAND, searchCommand);
		return showForm(request, response, errors);
	}

	/*
	 * add a search criteria to memory
	 */
	private void addCriterias(
		HttpServletRequest request,
		SearchCommand searchCommand,
		String operator) {

		LOGGER.debug("addCriterias() is called");

		if (request.getParameter("newValue").length() > 0) {
			if (searchCommand.getCriterias() == null) {
				searchCommand.setCriterias(new ArrayList<SearchCriteriaCommand>());
			}
			String value = request.getParameter("newValue");
			String match = request.getParameter("newMatch");
			String attribute = request.getParameter("newAttribute");

			boolean added = isAdded(searchCommand, attribute, match, value);
			if (!added)
				searchCommand.getCriterias().add(
					new SearchCriteriaCommand(attribute, match, value, operator));
		}
		request.getSession().setAttribute(Constants.SEARCH_COMMAND, searchCommand);
	}

	/*
	 *
	 */
	private boolean isAdded(
		SearchCommand searchCommand,
		String attribute,
		String match,
		String value) {

		LOGGER.debug("isAdded() is called");

		List<SearchCriteriaCommand> criterias = searchCommand.getCriterias();
		boolean returnValue = false;
		for (SearchCriteriaCommand command : criterias) {
			if (command.getAttribute().equalsIgnoreCase(attribute)
				&& command.getMatch().equalsIgnoreCase(match)
				&& command.getValue().equalsIgnoreCase(value)) returnValue = true;
		}
		return returnValue;
	}

	/**
	 *
	 *
	 * @see org.springframework.web.servlet.mvc.AbstractFormController#formBackingObject(javax.servlet.http.HttpServletRequest)
	 */
	protected Object formBackingObject(HttpServletRequest request) throws ServletException {

		LOGGER.debug("formBackingObject() is called");
		// retrieve SearchCommand object from request scope
		SearchCommand searchCommand = (SearchCommand) request.getSession().getAttribute(
			Constants.SEARCH_COMMAND);
		if (searchCommand == null) {
			searchCommand = new SearchCommand();
		}
		return searchCommand;
	}
}

redpajama_set_name: RedPajamaGithub


The developers of SeoQuake and SeoDigger have developed a new tool called SEMRush. This new tool is in beta testing and offers a variety of services.
With this new tool you can check the rankings of a website in Google and check on your competitor's. The tool will show you potential ad buyers and sellers and will even calculate the adwords costs of competitor's. There is a glossary that is available making it very informative for people who do not know about the different terms used in internet marketing.
What you simply do is type in a url (domain) or any keyword into the search box at the top of the site and it will pull back a lot of information about the cost per click for adwords, the competitons cpc, the average number of searches and the trends of the search.
This tool will help gather information for those who are doing search engine optimization and internet marketing.
With the tool still in beta things are sure to be getting better as the developers continue to better the system. To learn more about this new tool and to see what it has to offer you can go to SEMRush.


text:
Hotel San Cristóbal, part of the Tres Santos project.
Lawyer claims arrest linked to Tres Santos
Opponent of controversial development charged with 'fabricated' evidence
Published on Thursday, June 15, 2017
A classic David and Goliath battle has been playing out for some time in the sleepy Pacific coast town of Todos Santos, Baja California Sur, but for the time being at least, a key player on the David side — lawyer and activist John Moreno — will have to continue the fight from behind bars.
On one side are the developers of a massive residential project called Tres Santos which, when completed, will turn a tranquil stretch of the coastline into two touristic communities with almost 4,500 luxury homes, two hotels and a restaurant.
The project is being developed by Mexico City-based MIRA Companies, a subsidiary of the Black Creek Group of Denver, Colorado, and seemingly has the backing of state Governor Carlos Mendoza Davis, who pledged his support for it while visiting the site last month with MIRA CEO Javier Barrios.
On the other side is a group of fishermen called the Punta Lobos Fishing Cooperative, which has opposed the development because of its encroachment on their fishing grounds and the damage they believe it is causing and will continue to cause to the coastal environment, placing their livelihoods at risk.
Local residents have also expressed opposition to the development, fearing that it is unsustainable for a town of its size and would place excessive pressure on an already limited water supply.
Developer attempts to assuage the concerns of both fishermen and other local residents, such as building a workspace for fishermen and a water desalination plant, have largely been rejected.
For the past two years, John Moreno has acted as a legal representative and spokesman for fishermen and residents, providing his services on a pro-bono basis.
However, his work for the group came to an abrupt halt on May 19 when he was arrested in Todos Santos and transported to the state capital La Paz where he remains in custody.
Moreno was arrested on a charge of aggravated property theft but Moreno's lawyer, Arturo Rubio Ruíz, says that both the charge and the documents in the case file are fabricated.
One of Moreno's former clients, Joella Corado, was also arrested the same day on the same charge, considered by some as collateral damage.
Rubio Ruíz, civil organizations and citizens of the state argue that the real reason Moreno has been detained is because he has been outspoken about the Tres Santos development and authorities want "to silence public protest."
There have been protests and petitions calling for the release of the two detainees, and protestors have questioned the influence of the Tres Santos developers in the arrests.
Moreno had apparently suspected he could be arrested for his activism and legal work after finding out that state Attorney General Erasmo Palemón Alamilla had met with Javier Barrios, allegedly with the intention of discussing what they could do to silence the outspoken critic.
He outlined the details of the alleged meeting in a March interview with Baja TV, which was uploaded to Facebook.
In February this year Moreno and well-known environmental lawyer Alberto Szekely filed an accusation before the federal environment agency Profepa on behalf of a citizens' group against the developers of the Tres Santos project for environmental damage and non-compliance with environmental and zoning laws.
Moreno expressed his fear of being arrested shortly after that process was completed.
While Profepa has not yet announced a ruling on the case it did send inspectors to assess the site in April.
Residents are requesting that construction cease while authorities revise the legality of the permits issued for the construction project. For its part, Tres Santos says it already has all the required permits but they have not been made available to the public.
Economic Development, Environment and Natural Resources Secretary Rodrigo Guerrero Rivas says the state government is not aware of any environmental damage caused by the Tres Santos activity.
Tres Santos had previously taken legal action against Moreno and other activists who publicly opposed the development, accusing them of trespassing but none of the cases went ahead due to lack of evidence.
In this latest case, Moreno's lawyer and supporters believe that a previous unrelated file that Moreno worked on has been illegally manipulated to facilitate the arrest and detainment of the environmental lawyer.
In that case from 2014, Moreno represented Joella Corado in an ultimately successful case to evict an illegal occupant of a building owned by Corado.
However, with alleged manipulation, Moreno and Corado are now being accused of aggravated property theft by the person who had been evicted.
In a video uploaded to Facebook Rubio Ruíz claims that the state has used the Attorney General's office (PGJE) to pursue his client and that their acts amount to the creation of a "state of terrorism."
The lawyer also alleges that the PGJE has altered documents and forged signatures in order to bring charges against Moreno. An expert opinion from a graphologist backs up his accusation.
Humberto Franco Merlos, an expert in criminology, graphology and dactylography who is working with Moreno's defense team, is certain that the documents are not authentic.
"For me no doubt exists that the document is a falsification . . . [but] even if the falsification is proven, it's not taken into account and the public ministry is given priority as an untouchable institution. In this case, I ask myself what would happen tomorrow if someone we care for, or love, or a family member or oneself came to fall into the same situation and they falsified proof. In my 30 years as an expert I've never seen anything like this."
However, when Moreno's case was presented before Judge Rosalía Cota Domínguez she didn't take the evidence into account and issued a warrant for his arrest.
Moreno is said to have signed a document notifying him of his changed status in the aggravated property theft accusation but his defense claims that it's a forgery.
In the Facebook video, Rubio Ruíz claims that the judge said "even if the proof is false, it doesn't matter, because the public ministry acts in good faith."
Efforts to gain access to a copy of Moreno's file have so far been fruitless.
The Baja California Sur government denies that there is any political motivation for Moreno's arrest.
Source: SDP Noticias (sp), The Ecologist (en), El Independiente (sp), The New York Times (en)
One year on, ex-governor's murder remains unsolved
A year after Jalisco ex-governor Jorge Aristóteles Sandoval's murder in Puerto Vallarta, a motive has been established but no arrests made.
Citizens protest residential project in protected area of Quintana Roo
A conservation area in the Bacalar region is under threat by a 950-home residential development, claim local citizens.

redpajama_set_name: RedPajamaCommonCrawl


text:
asteiner@pace.edu
Aaron Steiner
@Pleasantville
Dyson Hall 221
PhD, University of Pennsylvania School of Medicine, Philadelphia, PA, 2006
BS, Brandeis University, Waltham, MA, 2000
Dynamic gene expression by putative hair-cell progenitors during regeneration in the zebrafish lateral line
Steiner, A. B., Kim, T., Cabot, V. & Hudspeth, A. (2014, March). Proceedings of the National Academy of Sciences. Vol 111 (Issue 14) , pages E1393–E1401. http://www.pnas.org/content/111/14/E1393.long
Dr. Steiner's research focuses on the regeneration of sensory systems, with emphasis on sensory hair cells. These cells transduce mechanical forces in the inner ear into electrical signals that can be received and interpreted by the brain, and are responsible for our senses of hearing and balance. Hair cells are delicate and can be damaged or destroyed by loud noises and certain medicinal drugs. In humans and other mammals these cells are not naturally regenerated, leading to hearing loss. Fishes and other non-mammalian vertebrates, however, naturally regenerate hair cells throughout life. Dr. Steiner uses the zebrafish as a model system to understand the cellular and molecular processes that enable hair-cell regeneration in such animals, with the goal of identifying new routes to inducing hair-cell recovery in the human ear. His group utilizes the tools of molecular biology, advanced microscopic imaging, and large-scale gene expression analysis to reveal and characterize genes that regulate regeneration.
Grants, Sponsored Research and Contracts
MRI: Acquisition of high-throughput fluorescence imaging system for undergraduate research and teaching at Pace University
Marik, S. A., Kazakov, S. V., Krucher, N. A. & Steiner, A. B. 2019.NSF,Federal,$370,000.00.Funded.
Society for Developmental Biology
June Chisholm
Gina Scutelnicu-Todoran
Roger Sayre
Anthony Mancini
Eugene Richie
English - NYC
Walter Morris
Economics, History, and Political Science
Mohsen Shiri-Garakani
Marilyn Weigold
Lisa Farber
Michael Tursi
Richard Schlesinger
Ramón Emilio Fernandez
Shamita Dutta Gupta
Mathematics - NYC


Apparently, if you want optimal choices, you have to buy toddler halloween costumes in July. Not knowing this, I went at the end of September and thought I was doing good. Instead, I found only two left in my daughter's size: An adorable dog and a skeleton.
Although I couldn't pinpoint why, I was disturbed by the notion of putting my 17-month old in a skeleton costume. So I made an easy choice and got the dog.
A few weeks later, we found ourselves at Boo at the Zoo. As part of the zoo's halloween decorations, they had skeletons displayed in the center of the carousel.
As we rode the carousel, I found myself unable to look at the skeletons. About half way through our ride, my husband leaned over to me and commented how uncomfortable he felt around the skeletons after our time in Rwanda.
You see, we've seen skeletons in real life.
We've been to the genocide memorials in Rwanda – not just to the somewhat sanitized memorial in Kigali - but to the church memorials. The ones where you walk into a sanctuary, and 22 years later, still smell death.
In those church memorials, you see the clothes of the people who fled there, seeking sanctuary, as they had done during previous, smaller genocides. Only this time, the churches offered no safety.
Grenades were hurled into the sanctuary. Guns were fired at the men, women, and children who sat there. You can still see the bullet and grenade holes in the sanctuary walls... They make for a strange juxtaposition with the baptismal font that still stands in the front of the sanctuary.
At that memorial, you also walk into an underground crypt.
Not the kind we use to decorate for Halloween, but real-life skeletons.
Skeletons that used to support living, breathing people until they were brutally murdered during the 1994 genocide.
Their skeletons tell the stories of their horrific deaths. You can see skulls that were bashed in from beatings; Others that were severed by machetes; Some bodies that were impaled.
I've taken a deep breath before then walking in and out of another church memorial. In this one, you walk through Sunday school rooms with walls stained with blood from hurling babies at them in order to kill them.
I've walked hand in hand with high school students through another sanctuary, this one filled with the skeletons of those who were killed there.
I've walked those church memorials in tears, horrified by what one people group can do to another as the world stands by and watches.
I've stood outside those church memorials with high school teens, helping them to catch their breath, reassuring them it's okay to throw up if they need to.
I've gotten back into a bus and sat in silence with normally boisterous missions' teams whose experience at the memorials has left them speechless.
I've processed those memorials with missions' teams, helping them to understand why we go to them to learn and remember; why we hope that such memorials will actually make this a world in which genocide stops happening.
Having seen the skeletons of real people, I can't bring myself to dress my daughter in such a costume for Halloween; I don't think I'll ever display a toy skeleton on my front porch as a Halloween decoration.
Such things might seem amusing here.
But there are so many places around the world where skeletons aren't merely decorations.
They're remembrances of real-life death, horror, and grief.


After reviewing the "Top 100 Tools for learning", compiled by Jane Hart I was surprised to learn that I already use so many of them. I don't think of myself as a techie at all but this proved to me how much technology has become a part of my everyday life. Though I use many of these tools personally I am only beginning to explore which ones I'd want to use as a teacher and how I could integrate them to enhance student learning. I also learned of a few tools that I was not aware of and I'm looking forward to trying an audio recording/editing tool called Audacity. I feel that it's a good idea to stay current on lists like these each year to know what tools are considered the best for learning.
I like You Tube as a source for enjoyment and learning both personally and professionally. Here I posted one of my favorite songs performed live by Bob Marley.
Web 2.0 offers the world of education an opportunity to become more student-centered. It provides the learner with connectivity, sharing and collaborating between users on the web. With more access to technology and its applications, teachers and students are creatively changing the way we learn. E-learning has become a large industry, therefore more tools will be continually developed and applied to education. We'll need to be adaptable and continually search for new ways to integrate these tools with our curriculum.
I'm all for learning about tools that can help me become more productive with my life. I've used mind mapping sites before to plan units of inquiry however I had found it sometimes confusing to use so I was excited to learn of bubbl.us, a brainstorming tool that's simpler to use and record my ideas. I plan on using it to help organize my thoughts when I write papers and plan for future units when teaching. I also enjoyed the idea of dreaminder. Type a dream to your future self and then select the time you want it to be sent to back to your email. Simple to use but effectively gets me to think about my goals and the time it will take to accomplish them. The thing with productivity tools that's a little tough is the fact that there's so many available a lot of time needs to be invested searching before I find the one that works best for me.
Podcasting is a method for adding audio to a blog. It's convenient so student's can listen anywhere at anytime with a mobile device. A teacher who podcast may reach more student's more often because of the accessibility to information extending beyond the classroom. I could use a podcast to introduce a topic of an upcoming unit, providing student's with background information without taking class time. I could also use it to give feedback on a performance or introduce an assignment. Student's could also podcast and record what they have learned or what further questions they have. They could all then upload and share the podcast in a digital class folder where student's could access and listen to each other at anytime. Convenience, accessibility, increase in auditory and oral presentation skills as well as extending student learning beyond the classroom are all good reasons for me to adapt to the use of podcasting in education.
Tom Horwat is a teacher, coach, and student. He lives in Kirkland, Washington.


text:
#ifndef DOMAIN_REGISTRY_PRIVATE_TRIE_SEARCH_H_
#define DOMAIN_REGISTRY_PRIVATE_TRIE_SEARCH_H_

#include <stdlib.h>

#include "registry_types.h"
#include "trie_node.h"

/*
 * Find a TrieNode under the given parent node with the specified
 * name. If parent is NULL then the search is performed at the root
 * TrieNode.
 */
const struct TrieNode* FindRegistryNode(const char* component,
                                        const struct TrieNode* parent);

/*
 * Find a leaf TrieNode under the given parent node with the specified
 * name. If parent does not have all leaf children (i.e. if
 * HasLeafChildren(parent) returns zero), will assert and return
 * NULL. If parent is NULL then the search is performed at the root
 * TrieNode.
 */
const char* FindRegistryLeafNode(const char* component,
                                 const struct TrieNode* parent);

/* Get the hostname part for the given string table offset. */
const char* GetHostnamePart(size_t offset);

/* Does the given node have all leaf children? */
int HasLeafChildren(const struct TrieNode* node);

/*
 * Initialize the registry tables. Called at system startup by
 * InitializeDomainRegistry().
 */
void SetRegistryTables(const char* string_table,
                       const struct TrieNode* node_table,
                       size_t num_root_children,
                       const REGISTRY_U16* leaf_node_table,
                       size_t leaf_node_table_offset);

#endif  /* DOMAIN_REGISTRY_PRIVATE_TRIE_SEARCH_H_ */


text:
Q: Scalable delayed task execution with Redis I need to design a Redis-driven scalable task scheduling system.
Requirements:

*

*Multiple worker processes.

*Many tasks, but long periods of idleness are possible.

*Reasonable timing precision.

*Minimal resource waste when idle.

*Should use synchronous Redis API.

*Should work for Redis 2.4 (i.e. no features from upcoming 2.6).

*Should not use other means of RPC than Redis.

Pseudo-API: schedule_task(timestamp, task_data). Timestamp is in integer seconds.
Basic idea:

*

*Listen for upcoming tasks on list.

*Put tasks to buckets per timestamp.

*Sleep until the closest timestamp.

*If a new task appears with timestamp less than closest one, wake up.

*Process all upcoming tasks with timestamp ≤ now, in batches (assuming
that task execution is fast).

*Make sure that concurrent worker wouldn't process same tasks. At the same time, make sure that no tasks are lost if we crash while processing them.

So far I can't figure out how to fit this in Redis primitives...
Any clues?
Note that there is a similar old question: Delayed execution / scheduling with Redis? In this new question I introduce more details (most importantly, many workers). So far I was not able to figure out how to apply old answers here — thus, a new question.

A: You didn't specify the language you're using. You have at least 3 alternatives of doing this without writing a single line of code in Python at least.

*

*Celery has an optional redis broker.
http://celeryproject.org/

*resque is an extremely popular redis task queue using redis.
https://github.com/defunkt/resque

*RQ is a simple and small redis based queue that aims to "take the good stuff from celery and resque" and be much simpler to work with.
http://python-rq.org/
You can at least look at their design if you can't use them.
But to answer your question - what you want can be done with redis. I've actually written more or less that in the past.
EDIT:
As for modeling what you want on redis, this is what I would do:

*

*queuing a task with a timestamp will be done directly by the client - you put the task in a sorted set with the timestamp as the score and the task as the value (see ZADD).

*A central dispatcher wakes every N seconds, checks out the first timestamps on this set, and if there are tasks ready for execution, it pushes the task to a "to be executed NOW" list. This can be done with ZREVRANGEBYSCORE on the "waiting" sorted set, getting all items with timestamp<=now, so you get all the ready items at once. pushing is done by RPUSH.

*workers use BLPOP on the "to be executed NOW" list, wake when there is something to work on, and do their thing. This is safe since redis is single threaded, and no 2 workers will ever take the same task.

*once finished, the workers put the result back in a response queue, which is checked by the dispatcher or another thread. You can add a "pending" bucket to avoid failures or something like that.
so the code will look something like this (this is just pseudo code):
client:
ZADD "new_tasks" <TIMESTAMP> <TASK_INFO>

dispatcher:
while working:
   tasks = ZREVRANGEBYSCORE "new_tasks" <NOW> 0 #this will only take tasks with timestamp lower/equal than now
   for task in tasks:

       #do the delete and queue as a transaction
       MULTI
       RPUSH "to_be_executed" task
       ZREM "new_tasks" task
       EXEC

   sleep(1)

I didn't add the response queue handling, but it's more or less like the worker:
worker:
while working:
   task = BLPOP "to_be_executed" <TIMEOUT>
   if task:
      response = work_on_task(task)
      RPUSH "results" response

EDit: stateless atomic dispatcher :
while working:

   MULTI
   ZREVRANGE "new_tasks" 0 1
   ZREMRANGEBYRANK "new_tasks" 0 1
   task = EXEC

   #this is the only risky place - you can solve it by using Lua internall in 2.6
   SADD "tmp" task

   if task.timestamp <= now:
       MULTI
       RPUSH "to_be_executed" task
       SREM "tmp" task
       EXEC
   else:

       MULTI
       ZADD "new_tasks" task.timestamp task
       SREM "tmp" task
       EXEC

   sleep(RESOLUTION)

A: If you're looking for ready solution on Java. Redisson is right for you. It allows to schedule and execute tasks (with cron-expression support) in distributed way on Redisson nodes using familiar ScheduledExecutorService api and based on Redis queue.
Here is an example. First define a task using java.lang.Runnable interface. Each task can access to Redis instance via injected RedissonClient object.
public class RunnableTask implements Runnable {

    @RInject
    private RedissonClient redissonClient;

    @Override
    public void run() throws Exception {
        RMap<String, Integer> map = redissonClient.getMap("myMap");
        Long result = 0;
        for (Integer value : map.values()) {
            result += value;
        }
        redissonClient.getTopic("myMapTopic").publish(result);
    }

}

Now it's ready to sumbit it into ScheduledExecutorService:
RScheduledExecutorService executorService = redisson.getExecutorService("myExecutor");
ScheduledFuture<?> future = executorService.schedule(new CallableTask(), 10, 20, TimeUnit.MINUTES);

future.get();
// or cancel it
future.cancel(true);

Examples with cron expressions:
executorService.schedule(new RunnableTask(), CronSchedule.of("10 0/5 * * * ?"));

executorService.schedule(new RunnableTask(), CronSchedule.dailyAtHourAndMinute(10, 5));

executorService.schedule(new RunnableTask(), CronSchedule.weeklyOnDayAndHourAndMinute(12, 4, Calendar.MONDAY, Calendar.FRIDAY));

All tasks are executed on Redisson node.

A: Here's another solution that builds on a couple of others [1]. It uses the redis WATCH command to remove the race condition without using lua in redis 2.6.
The basic scheme is:

*

*Use a redis zset for scheduled tasks and redis queues for ready to run tasks.

*Have a dispatcher poll the zset and move tasks that are ready to run into the redis queues. You may want more than 1 dispatcher for redundancy but you probably don't need or want many.

*Have as many workers as you want which do blocking pops on the redis queues.

I haven't tested it :-)
The foo job creator would do:
def schedule_task(queue, data, delay_secs):
    # This calculation for run_at isn't great- it won't deal well with daylight
    # savings changes, leap seconds, and other time anomalies. Improvements
    # welcome :-)
    run_at = time.time() + delay_secs

    # If you're using redis-py's Redis class and not StrictRedis, swap run_at &
    # the dict.
    redis.zadd(SCHEDULED_ZSET_KEY, run_at, {'queue': queue, 'data': data})

schedule_task('foo_queue', foo_data, 60)

The dispatcher(s) would look like:
while working:
    redis.watch(SCHEDULED_ZSET_KEY)
    min_score = 0
    max_score = time.time()
    results = redis.zrangebyscore(
        SCHEDULED_ZSET_KEY, min_score, max_score, start=0, num=1, withscores=False)
    if results is None or len(results) == 0:
        redis.unwatch()
        sleep(1)
    else: # len(results) == 1
        redis.multi()
        redis.rpush(results[0]['queue'], results[0]['data'])
        redis.zrem(SCHEDULED_ZSET_KEY, results[0])
        redis.exec()

The foo worker would look like:
while working:
    task_data = redis.blpop('foo_queue', POP_TIMEOUT)
    if task_data:
        foo(task_data)

[1] This solution is based on not_a_golfer's, one at http://www.saltycrane.com/blog/2011/11/unique-python-redis-based-queue-delay/, and the redis docs for transactions.

A: A combined approach seems plausible:

*

*No new task timestamp may be less than current time (clamp if less). Assuming reliable NTP synch.

*All tasks go to bucket-lists at keys, suffixed with task timestamp.

*Additionally, all task timestamps go to a dedicated zset (key and score — timestamp itself).

*New tasks are accepted from clients via separate Redis list.

*Loop: Fetch oldest N expired timestamps via zrangebyscore ... limit.

*BLPOP with timeout on new tasks list and lists for fetched timestamps.

*If got an old task, process it. If new — add to bucket and zset.

*Check if processed buckets are empty. If so — delete list and entrt from zset. Probably do not check very recently expired buckets, to safeguard against time synchronization issues. End loop.
Critique? Comments? Alternatives?

A: Lua
I made something similar to what's been suggested here, but optimized the sleep duration to be more precise. This solution is good if you have few inserts into the delayed task queue. Here's how I did it with a Lua script:
local laterChannel = KEYS[1]
local nowChannel = KEYS[2]
local currentTime = tonumber(KEYS[3])

local first = redis.call("zrange", laterChannel, 0, 0, "WITHSCORES")

if (#first ~= 2)
then
    return "2147483647"
end

local execTime = tonumber(first[2])
local event = first[1]

if (currentTime >= execTime)
then
    redis.call("zrem", laterChannel, event)
    redis.call("rpush", nowChannel, event)
    return "0"
else
    return tostring(execTime - currentTime)
end

It uses two "channels". laterChannel is a ZSET and nowChannel is a LIST. Whenever it's time to execute a task, the event is moved from the the ZSET to the LIST. The Lua script with respond with how many MS the dispatcher should sleep until the next poll. If the ZSET is empty, sleep forever. If it's time to execute something, do not sleep(i e poll again immediately). Otherwise, sleep until it's time to execute the next task.
So what if something is added while the dispatcher is sleeping?
This solution works in conjunction with key space events. You basically need to subscribe to the key of laterChannel and whenever there is an add event, you wake up all the dispatcher so they can poll again.
Then you have another dispatcher that uses the blocking left pop on nowChannel. This means:

*

*You can have the dispatcher across multiple instances(i e it's scaling)

*The polling is atomic so you won't have any race conditions or double events

*The task is executed by any of the instances that are free

There are ways to optimize this even more. For example, instead of returning "0", you fetch the next item from the zset and return the correct amount of time to sleep directly.
Expiration
If you can not use Lua scripts, you can use key space events on expired documents.
Subscribe to the channel and receive the event when Redis evicts it. Then, grab a lock. The first instance to do so will move it to a list(the "execute now" channel). Then you don't have to worry about sleeps and polling. Redis will tell you when it's time to execute something.
execute_later(timestamp, eventId, event) {
    SET eventId event EXP timestamp
    SET "lock:" + eventId, ""
}

subscribeToEvictions(eventId) {
    var deletedCount = DEL eventId
    if (deletedCount == 1) {
        // move to list
    }
}

This however has it own downsides. For example, if you have many nodes, all of them will receive the event and try to get the lock. But I still think it's overall less requests any anything suggested here.


text:
Tobacco used 9,000 years earlier than previously thought, study finds
The tobacco seeds were found at a camp site on the vast prehistoric lakebed of western Utah. They date from a time when the land would not have been a barren sand-blasted desert it is today, but a humid climate of springs, streams and marshland.
Andrew J. Nelson / October 11, 2021
(Pixabay image via Courthouse News)
(CN) — On an Air Force bombing range in western Utah, a team has found evidence that tobacco may have been enjoyed far earlier than previously thought.
Archeologists at the Utah Test and Training Range found tobacco seeds at what had been a hearth campfire site from approximately 12,300 years ago, 9,000 years earlier than previously identified. They published their findings Monday in the journal Nature Human Behavior.
"We have no evidence for how the tobacco was used," said Daron Duke, principal and COO of Far Western Anthropological Research Group Inc., a private archeological firm that works on the range. "Certainly smoking is always viable. There is no direct evidence of how they did what they did."
Stephen Carmody of Troy State University made a previous finding of earliest known tobacco use in North America north of Mexico, back in 2018. He was excited to hear the news.
"It forces us to rethink our previous narratives about the use of sacred plants in the past, but more importantly, it connects contemporary indigenous communities to their ancestors through practice," he said via email (Carmody was on a flight to Italy to participate in a dig there). "New finds force us to revisit old interpretations and reconsider a different past."
"There was still so much water in the geology of the region," Duke said. "A really bountiful kind of environment."
Now the site is a bone-dry desert. It was found out in the open because of erosion.
"Any bone is going to be blasted away in no time. Artifacts, if they are not heavy enough, will blow away. But right below that surface, just a centimeter, everything is just perfectly intact," he said. "Things are really preserved well until they get blown out and destroyed."
The seeds were found as if they had been thrown into the fire. Duke speculated the users of the tobacco may have consumed it by filling small pouches made of yucca plant fibers with tobacco and placing it in their mouth. They may have thrown them in the fire after.
The Air Force is required to understand the historical artifacts on the range. Duke has been working there for about 20 years, and it was the subject of his Ph.D dissertation. The seeds were identified in the company's botany lab in Davis, California.
"The deeper meaning to me and a lot of other researchers who are working on this is, what explains a deep tie to a plant that has more of a social value?" he said. "There is a human plant symbiosis there."
"People think tobacco was discovered by Columbus but that's only a recent twist," Duke said. "Indigenous people have been refining and using this plant for many thousands of years. What the Spanish explorers saw was merely a result of that."
Follow @@nelson_aj
Report: Access to public records in Virginia courts October 12, 2022
Global pollution kills 9 million people a year, study finds May 17, 2022
New study finds life began earlier than previously thought April 13, 2022
Study: Gas stoves worse for climate than previously thought January 27, 2022