text:
TikTok Versus the World
The app, owned by ByteDance, is losing global market share.
Anna Vod
Jul. 15, 2020 14:55
After losing nearly 120 million active users in India, TikTok came under fire in the United States.
The Trump administration is now considering banning the massively popular app of the year, according to statements from Secretary of State Mike Pompeo and the president himself. However, the move goes against Trump's populist modus operandi. Plus, he needs to capture as much of the youth vote he possibly can, an already weak demographic for his political camp. Taking away their Chinese short-video sharing app from their phones isn't the way to win over more young voters. Time magazine wrote Friday that thousands of TikTok fans have attacked the Official Trump 2020 campaign app leaving bitter reviews on the Apple App Store.
ByteDance-owned TikTok has recently lost its largest market – India – in a government ban on 59 mobile apps including a slew of Chinese social and shopping platforms. New Delhi cited national security concerns, the same rationale given by anti-China advocates in Washington that had Huawei Technologies blacklisted in the United States.
TikTok has responded to the India ban by saying it was in the process of complying with New Delhi's order and has been diligent with data privacy regulations. It also said it has not shared user info with the Chinese government.
Governments, add Australia to the list, are not alone on their move to ban TikTok. Companies are trepidatious about TikTok as well. Amazon (Nasdaq: AMZN) told its employees on Friday to remove the app from their phones "due to security risks." By the end of the day, however, it had reversed its decision, leaving the public to speculate as to why. In a statement, an Amazon spokesperson said the email urging employees to immediately remove the short-video app from their devices was sent "in error."
Then, on Monday, Wells Fargo forced its staff to remove the app from company devices, telling CNN, "Due to concerns about TikTok's privacy and security controls and practices, and because corporate-owned devices should be used for company business only."
Washington had long scrutinized the social media sphere, especially when it comes to a perceived interest of the Chinese government in user data.
Grindr, the largest dating app for gay men, was recently forced to transfer ownership from Beijing Kunlun Tech to a U.S. firm for fears that China can access users' personal data. As of early June, Grindr is owned by San Vicente Acquisition, which earlier this month made news as its top two investors, Jeff Bonforte and Rick Marini, proclaimed themselves "straight" in an interview to LA Times.
However, whether San Vicente will be able to retain its ownership of the $610 million gay app may come under question. Reuters has found that two partners from a fund related to Kunlun are now part of San Vicente. If Grindr's link to Kunlun is traced, the app may face penalties, the medium said.
The Trump administration's clash with TikTok dates even further back. In November 2019, it had launched a national security review of the app and its acquisition of U.S. app Musical.ly. In addition to concerns over shared user data, TikTok was criticized for its Communist Party-centric censorship, as in the case with a 17-year-old New Jersey user whose commentary on China's treatment of Uighurs allegedly caused her to be locked out of the app.
TikTok has previously argued that it does not censor content, and the app's departure from the Hong Kong market might be proof of that. Last week, TikTok left Hong Kong in response to China passing its controversial new national security law. Specifically, the law requires internet service providers to assist police with national security requests, a requirement TikTok apparently wouldn't comply with. The app's Chinese version, Douyin, still can be used in the trouble-ridden city, while the departure of its international counterpart further stresses the dent in Hong Kong's autonomy.
According to SensorTower, TikTok has been downloaded more than 2 billion times worldwide. As of July, Wallaroo Media estimated the app had about 70 million users in the United States. It also said an average user opens the TikTok app eight times a day and spends, on average, 52 minutes per day watching 15-second videos uploaded by video sharers around the world. According to The Information, the app is estimated to generate revenue of $500 million this year in the U.S. alone.
While it is impossible to ban all social apps from one's phone (they all more or less pull user info), the ties to China significantly lessen the chances of an app grabbing and maintaining the global market share.


There are reports of "significant tailbacks"
Motorists heading into Gloucestershire had delays after two vehicles were involved in a crash this morning.
The eastbound carriageway of the A40 was blocked after the smash at about 11.50am, before the junction with the M50.
The crash took place near to the KFC between Wilton and Ross on Wye.
Motorists reported "significant tailbacks" affecting traffic heading out of Wales. They added an air ambulance had landed nearby.
Cemlyn Davies said on twitter: "Collision at Ross-on-Wye roundabout causing significant tailbacks on A40 affecting traffic heading out of Wales. Air ambulance has landed nearby."
There are also reports of another crash at Bridstow involving multiple vehicles between the A49 and the M50.
The road has now cleared following the A40 crash near KFC.
To see how the incident unfolded look below.
Wales Online reporter Ruth Mosalski has provided this video from the scene.
She is currently stuck in traffic trying to get away for Christmas.
Congestion stetches to the Wilton Roundabout, with the road still blocked.


text:
US, British 'Clean House' to Delete Syria Terror Links
2 comments | by Finian Cunnigham
US President Barack Obama has just given the Pentagon orders to assassinate commanders of the Al Nusra terror network in Syria. American media reports over the weekend say the new urgency arises from US intelligence fears that al Qaeda-affiliated groups are preparing to mount terror attacks against Western targets from strongholds in Syria.
The purported US «kill list» will be acted on through drone strikes and «intelligence assets». The latter refers, presumably, to US Special Forces that are already operating in northern Syria alongside Turkish military.
Last week, a similar announcement was carried in the British press, which reported that elite British SAS troops had received orders to kill up to 200 jihadi volunteers from Britain who are suspected to be active in Syria (and Iraq). Again, the same rationale was invoked as in the latest American plan. That the assassination program was to pre-empt terror attacks rebounding on Western states.
A British defense official was quoted as saying that the mission could be the most important ever undertaken by the SAS in its entire 75-year history. «The hunt is on», said the official, «to take out some very bad people».
Significantly, too, the British SAS kill operations in Syria are reportedly being carried out as part of a «multinational effort». That suggests that the Pentagon's initiative reported this weekend in being coordinated with the British.
However, there is something decidedly odd about this sudden determination by the Americans and British to eliminate terrorists in Syria.
Since the outbreak of the Syrian war in 2011, US, British and other NATO forces have shown meagre success in delivering on official claims of combating al Qaeda-linked terror groups, such as Islamic State (IS, ISIS or Daesh) and Jabhat al Nusra (also known as Jabhat al Fatal al Sham).
A straightforward explanation for this apparent anomaly is that the US and its NATO allies are in reality covertly working with these terror networks as proxies for regime change against the Assad government – a longtime ally of Russia and Iran. What Washington refers to as «moderate rebels» whom it supports are in reality serving as conduits for arms and funds to the known terror groups. In this context, the terror groups have been Western assets in the regime-change war. Therefore, there has been no incentive to liquidate these assets – until now that is. Why now is the telling question.
The recent ceasefire debacles in the battleground northern city of Aleppo have demonstrated a systematic Western terror link. The failure by Washington to deliver on its commitment to separate so-called moderates from extremists is clear evidence that the alleged dichotomy is a hoax. The plain fact is that the US-backed «rebels» are fully integrated with the terror groups. That is, the US and its allies are sponsors of terrorism in Syria.
This has led to the reasonable charge by the Russian government that the US is supporting al Nusra, despite the latter being an internationally proscribed terrorist organization at the heart of the so-called American «war on terror». That charge has been corroborated by claims made by Nusra commanders who say that they have been receiving covert weapons supplies from the Americans. It is also substantiated by recent finds of US weaponry among terrorist dens that have been over-run by the Syrian Arab Army.
So, the question is: what is this latest urgency from the Pentagon to wipe out Nusra's leadership in Syria really about?
First, let's note that the implied precision of terrorist «kill lists» that the Americans and British are suddenly working on seems incongruous given that these NATO powers have up to now apparently been unable to furnish Russia with coordinates for extremist bases in Syria.
The Russian Ministry of Defense disclosed last week that the Americans have not provided a single scrap of information on the location of terrorist groups in Syria. The US was obliged to share intelligence on extremist positions as part of the ceasefire plans resolved in September by Secretary of State John Kerry and Russia's Foreign Minister Sergei Lavrov.
That then marks a seeming curious shift. From not being able to provide any intelligence on terror groups, now we are told in a different context that the US and its British counterpart are urgently moving ahead to carry out decapitation strikes on Nusra and ISIS commanders.
On the British side, reports said that a kill list of hundreds of British jihadis had been drawn up by the intelligence services of MI5, MI6 and GCHQ. Why wasn't this information shared before with Russia, as part of the Kerry-Lavrov accord?
Timing is also another telling factor. Obama's announced order to the Pentagon to ramp up assassination of Nusra leaders comes in the wake of the shock presidential election victory for Donald Trump. Trump's election last week was an outcome that completely blindsided the White House and the Washington establishment, who thought that Democrat rival Hillary Clinton was a safe bet.
The abrupt US impetus to neutralize Nusra cadres also comes as the Russian navy flotilla takes up position in the Mediterranean off Syria. The flotilla is led by the aircraft carrier, Admiral Kuznetsov, along with destroyers equipped with Kalibr cruise missiles. The naval formation has been described as the biggest Russian deployment since the end of the Cold War 25 years ago. It will greatly enhance Russia's air power which already has over the past year transformed the Syrian war into an eminent defeat for the Western-backed insurgents.
Now that nearly three weeks of Russia's unilateral cessation in air strikes on terror targets in Syria has elapsed to no avail for a surrender by the insurgents, it is anticipated that Russian air power and Syrian forces on the ground are readying for a final, decisive offensive to vanquish the Western-backed proxy war.
President-elect Trump has stated on several occasions his approval of Russian and Syrian anti-terror efforts, unlike the Obama administration, which has sought to hamper them by accusing Moscow and Damascus of «war crimes» against civilians. Russia has rejected those claims as false. It points to recent initiatives to set up humanitarian corridors in Aleppo as evidence that it is trying to minimize civilian casualties. It is the US-backed militants who have sabotaged the humanitarian efforts.
In any case, Trump's accession to the White House can be expected to give Russia a freer hand to bring the Syrian war to a close. And as noted, increased Russian military forces appear to be poised for this final push.
This is perhaps where the real significance of the latest Pentagon and British terrorist kill program is evinced. If we accept the plausible and proven premise that the Americans and their NATO allies have been covertly funding, arming and directing jihadi terror proxies, then one can expect that there is plenty of evidence within the terrorist ranks of such state-sponsoring criminal connections.
As Russian and Syrian forces eradicate the terrorist remnants one can anticipate that a trove of highly indicting information will be uncovered that grievously imputes Washington, London, Paris and others in Syria's dirty war. Among the finds too will be hundreds of Nusra and other terrorist operatives who may be willing to testify as to who their handlers were. A huge can of worms awaits to be prized open.
To pre-empt such devastating evidence of Western culpability in waging a covert criminal war in Syria, the Pentagon and its British partner appear to be dispatching their elite troops to perform a little bit of «house cleaning». That cleaning may involve whacking jihadis who know too much.
No wonder the British official said it could the most important mission for the SAS in its 75-year history. Washington and London's neck is on the line.

redpajama_set_name: RedPajamaCommonCrawl


Know Eastlake Class of 2004 graduates that are NOT on this List? Help us Update the 2004 Class List by adding missing names.
More 2004 alumni from Eastlake HS Chula Vista, CA have posted profiles on Classmates.com®. Click here to register for free at Classmates.com® and view other 2004 alumni.
Alumni from the Eastlake High School class of 2004 that have been added to this alumni directory are shown on this page. All of the people on this page graduated in '04 from Eastlake . You can register for free to add your name to the EHS alumni directory.


We wanted to help people choose the best lego batman batcave, so we have researched the market and compared hundreds of different lego batman batcave. We have selected options with the lowest price, highest user score, and longest warranty. Many other factors were also taken into consideration. Let us know if you have any ideas about improving our list!
Lego Batman Batcave brands constantly compete with each other for the market. Altogether, they provide hundreds of new models every year. Thus, the variety of choices is enormous. Use the top list (and the extended top 30 list) of the best lego batman batcave if you do not want to waste too much of your time.
Banees drill tank measures over (12cm) long and features spinning drill and dual flick missiles. Features batcave, banees drill tank, batcycle, handcuffs, binoculars and weapons. Batcycle measures over (11cm) long and features dual flick missiles. Batcave measures over (21cm) tall and features elevator function that transforms bruce wayne into batman, holding cell, flick missiles, computer with screens, chair, handcuffs, binoculars and batarangs. Includes minifigures: bruce wayne, batman, robin, poison ivy and bane.
Launch the shuttle from the lego batcave, with a bat-kayak, costume rail and weapon rack with batarangs. Build the bat-space shuttle with triple-booster pack and stud shooters, plus more batman vehicles. 643 pieces space shuttle toy for boys and girls between the ages of 8 and 14; the lego batman movie sets are compatible with all lego construction sets for creative building. Bat shuttle measures over 4 (11cm) high.11 (29cm) long and 7 (20cm) wide; bat-moon buggy measures over 1 (5cm) high.1 (5cm) long and 1 (3cm) wide; batcave measures over 5 (13cm) high.13 (34cm) wide and 6 (16cm) deep; bat-kayak measures over 1 (3cm) high and 4 (12cm) long.
Weapons include batman's batarang, the joker's giant mallet, robin's staff and dynamite. Bat cave features an entrance, jail and phone; batmobile features easy to build car base and flames. Includes 3 minifigures: batman, the joker and robin; features the bat cave, the joker's catapult and the batmobile. Easy to build elements are perfect for developing building skills; includes age-appropriate building instructions. Lego juniors is the perfect introduction to lego brick building; car base measures over 3″ long.1″ wide and under 1″ high.
Accessories include a bata rang, briefcase, fire element and tv and computer screen decorated bricks to act as story starters. Batwing measures over 1″ high.9″ long and 6″ wide bat cave measures over 11″ high.7″ wide and 8″ deep. Includes lego duplo batman and cat woman figures features buildable bat cave, batwing and cannon. Bat cave features an opening window, slide and rope. Watch your child create endless adventures with these iconic dc super hero characters and help them master building skills with this great model. Lego duplo products are specially designed to be fun and safe for younger hands.
Break through the gate with the security van. Includes 8 minifigures: batmantm, robin, the joker, the penguin, poison ivy, dr harleen quinzel, scarecrow and a guard, all with assorted weapons. Features arkham asylum, security gate, gothic d cor, moss, vines and ice elements. Arkham asylum features opening cell doors, special poison ivy cell with transparent doors and mr.
Is Amazone.com a good place to buy a lego batman batcave?
Many people use online shopping every day. It is absolutely safe because you are secured by layers of customer protection programs. You are not risking anything by ordering a lego batman batcave since you can easily return it and receive your money back. We see no reason to worry while ordering goods online — it is a convenient, cheap, quick, and, of course, safe method of shopping.
How long does the warranty lasts for a decent lego batman batcave?
If you do not want to buy a new lego batman batcave or spend your money every time it malfunctions, consider a model with a good warranty period. Otherwise, you will have to waste a lot of resources to repair or replace it.
What did you do to create the TOP list of lego batman batcave?
We compared over a hundred of lego batman batcavefrom various manufacturers. To make our buying guide as honest as it is possible, we took into consideration all the important characteristics, such as price, weight, material, assembly quality, and many more. If you want to find the best lego batman batcave for the least amount of money, our TOP list will be very useful for you.
What should I do if I receive a wrong item instead of my lego batman batcave?
Is not buying lego batman batcaveon the internet is dangerous?
Our site is one of the safest place to buy lego batman batcave. It has detailed descriptions for all available lego batman batcaveand offers a money back guarantee if you get a wrong or broken item. There are no reasons to worry!


452.30 452.30 Association with firm; independent practice.
452.30(1)(a) (a) The licensee is associated with the firm.
452.30(1)(b) (b) The licensee has notified the department that the licensee is associated with the firm.
452.30(2)(a) (a) Providing the notice at the time the licensee first applies for licensure as a broker or salesperson. No separate fee for notifying the department may be required for such a notification under this paragraph.
452.30(2)(b) (b) Notifying the department through the use of a form prescribed by the department and paying the transfer fee specified in s. 440.05 (7).
452.30(3) (3) A licensee who is associated with a firm may notify the department that the licensee has become associated with another firm using the method specified in sub. (2) (b).
452.30(4)(a)(a) A licensee that ceases to be associated with a firm shall, through the use of a form prescribed by the department, send written notice to the department within 10 days after the date on which the licensee ceases to be associated with the firm.
452.30(4)(b) (b) A firm that terminates a licensee from being associated with the firm shall, through the use of a form prescribed by the department, send written notice of that termination to the department within 10 days after the termination.
452.30(5) (5) No licensee may be associated with a firm if the firm's license has been suspended or revoked during the period of suspension or revocation. The licensee may become associated with another firm, provided the licensee is not a party to the activities causing the suspension or revocation of the firm's license. If the licensee becomes associated with another firm, the licensee may not provide brokerage services on behalf of that firm until sub. (1) (b) has been satisfied.
452.30(6)(a)1. 1. Whether the broker engaging in independent practice may engage other licensees to work under the broker.
452.30(6)(a)2. 2. That the broker engaging in independent practice is responsible for the supervision of any licensees associated with the broker.
452.30(6)(b) (b) Before engaging in independent practice as provided in par. (a), a broker shall notify the department of that fact and of the name under which the broker will engage in independent practice. The broker shall notify the department using any form or other method prescribed by the department for that purpose.
452.30(6)(c) (c) A broker that is engaging in independent practice shall not be considered to be associated with a firm that approved the broker engaging in independent practice under par. (a) with respect to the broker's independent practice activities.
452.30(7)(a)(a) A salesperson may be associated with only one firm at a given time.
452.30(7)(b) (b) A salesperson may not engage in independent real estate practice and may engage in real estate practice only when associated with a firm.
452.30 History History: 2015 a. 258 ss. 67, 171, 172.
452.34 452.34 Unlicensed personal assistants.
452.34(1)(1) In this subsection, "unlicensed personal assistant" means an individual, including an individual who is licensed under this chapter, who is employed only to provide services for which a license is not required under this chapter as provided in s. 452.03 (2).
452.34(2) (2) A licensee associated with a firm, prior to retaining an individual to serve as an unlicensed personal assistant, shall enter into a written agreement with the licensee's firm, setting forth the duties of the unlicensed personal assistant, the manner in which the unlicensed personal assistant will be compensated for his or her services, and the responsibilities of the licensee and the firm with respect to supervision of the unlicensed personal assistant's activities.
452.34(3)(a)(a) In this subsection, "open house" means a showing of real estate open to the public for viewing without an individual appointment.
452.34(3)(b) (b) An unlicensed personal assistant may not assist a licensee at an open house for the sale of real estate or a business without the direct, on-premises supervision and presence of a licensee, and may not provide any services at an open house for which a license is required under this chapter.
452.34 History History: 2015 a. 258.
452.38 452.38 Independent contractor relationship.
452.38(1)(a) (a) A written agreement has been entered into with the firm that provides that the licensee shall not be treated as an employee for federal and state tax purposes.
452.38(1)(b) (b) Seventy-five percent or more of the compensation related to sales or other output, as measured on a calendar year basis, paid to the licensee pursuant to the written agreement referenced under par. (a) is directly related to the brokerage services performed by the licensee on behalf of the firm.
452.38(1m) (1m) This section does not apply with respect to ch. 108 or any rules promulgated thereunder.
452.38(2)(a)(a) Subsection (1) applies notwithstanding the requirements and responsibilities of a firm under s. 452.132 and any rules promulgated by the board.
452.38(2)(b) (b) Subsection (1) applies regardless of the licensee's status as a supervising broker under s. 452.132 and any actions taken by the licensee as a supervising broker under s. 452.132.
452.38(3) (3) In the case of an individual who is engaged as both an independent contractor and an employee for the same firm, sub. (1) applies only with respect to activities covered under the written agreement referenced under sub. (1) (a).
452.38 History History: 2015 a. 258.
452.40 452.40 Use of forms; provision of legal advice.
452.40(1)(a) (a) In this subsection, "use a form" means to complete a form by filling in blanks or modifying printed provisions on the form at the instruction of one or more parties with whom a licensee is working or representing in a specific transaction.
452.40(1)(b) (b) A firm and any licensee associated with the firm may use a form approved by the board under s. 452.05 (1) (b) in real estate practice.
452.40(2) (2) A licensee may not provide advice or opinions concerning the legal rights or obligations of parties to a transaction, the legal effect of a specific contract or conveyance, or the state of title to real estate. A licensee may provide a general explanation of the provisions in a form approved by the board under s. 452.05 (1) (b) to the parties to a transaction at the time of completing the form or when delivering an approved form for the seller's or buyer's acceptance. Reviews conducted by a supervising broker under s. 452.132 (4) shall not be considered to be the provision of legal advice or opinion.
452.40 History History: 2015 a. 258.
452.42(1)(1) In this section, "electronic" has the meaning given in s. 137.11 (5).
452.42(2) (2) A licensee shall retain documents or records related to a transaction, as determined by the board, in accordance with any rules promulgated by the board. Records described in this section may be retained in an electronic file format.
452.42 History History: 2015 a. 258.


text:
Q: Login in Android app from web server and save registrationId of the device I am very new in android and web services. I am trying to login into my android app where the data is coming from web service and at the same time I want to register the Id of android device using GCM in web server database. Until now I have done so far. If possible please give me your time to assets me.
Config.Java
 public class Config {

static final String SERVER_URL = "http://example/stich/wsTest/?c=profile&func=login";

static final String GOOGLE_SENDER_ID = "499319758496";

static final String TAG = "GCM";

static final String DISPLAY_MESSAGE_ACTION = "com.google.android.gcm.demo.app.DISPLAY_MESSAGE";

static final String EXTRA_MESSAGE = "message";
}

Controller.java
public class Controller extends Application {
private final int MAX_ATTEMPTS = 5;
private final int BACKOFF_MILLI_SECONDS = 2000;
private final Random random = new Random();

/**
 * Creating post request and store GCM RegistrationID, email and password in
 * database on our web server for later use.
 *
 * @param context
 * @param email
 * @param password
 * @param RegistrationID
 */
void register(final Context context, String email, String password,
        final String RegistrationID) {

    Log.i(Config.TAG, "registering device (RegistrationID = "
            + RegistrationID + ")");

    String serverUrl = Config.SERVER_URL;

    Map<String, String> params = new HashMap<String, String>();
    params.put("androidToken", RegistrationID);
    params.put("email", email);
    params.put("password", password);

    long backoff = BACKOFF_MILLI_SECONDS + random.nextInt(1000);

    // Once GCM returns a RegistrationID, we need to register on our server.
    // As the server might be down, we will retry it a couple of times.

    for (int i = 1; i <= MAX_ATTEMPTS; i++) {
        Log.d(Config.TAG, "Attempt #" + i + "to register");

        try {
            // Send Broadcast to Show message on screen
            displayMessageOnScreen(context, context.getString(
                    R.string.server_registering, i, MAX_ATTEMPTS));

            // Post registration values to web server
            post(serverUrl, params);

            GCMRegistrar.setRegisteredOnServer(context, true);

            // Send Broadcast to Show message on screen
            String message = context.getString(R.string.server_registered);
            displayMessageOnScreen(context, message);

            return;

        } catch (IOException e) {

            // Here we are simplifying and retrying on any error; in a real
            // application, it should retry only on unrecoverable errors
            // (like HTTP error code 503).

            Log.e(Config.TAG, "Failed to register on attempt " + i + ":"
                    + e);

            if (i == MAX_ATTEMPTS) {
                break;
            }
            try {

                Log.d(Config.TAG, "Sleeping for " + backoff
                        + " ms before retry");
                Thread.sleep(backoff);

            } catch (InterruptedException e1) {
                // Activity finished before we complete - exit.
                Log.d(Config.TAG,
                        "Thread interrupted: abort remaining retries!");
                Thread.currentThread().interrupt();
                return;
            }

            // increase backoff exponentially
            backoff *= 2;
        }

    }
    String message = context.getString(R.string.server_register_error,
            MAX_ATTEMPTS);

    // Send Broadcast to show message on screen
    displayMessageOnScreen(context, message);
}

/**
 * Unregister device from GCM server and also creating a post request on
 * server to delete stored RegistrationID from database on our web server.
 *
 * @param context
 * @param RegistrationID
 */
void unregister(final Context context, final String RegistrationID) {
    Log.i(Config.TAG, "unregistering device (regId =" + RegistrationID
            + ")");

    String serverUrl = Config.CLIPME_SERVER_URL + "/unregister";
    Map<String, String> params = new HashMap<String, String>();
    params.put("regId", RegistrationID);

    try {
        post(serverUrl, params);
        GCMRegistrar.setRegisteredOnServer(context, false);
        String message = context.getString(R.string.server_unregistered);
        displayMessageOnScreen(context, message);
    } catch (IOException e) {
        // At this point the device is unregistered from GCM, but still
        // registered in the our server.
        // We could try to unregister again, but it is not necessary:
        // if the server tries to send a message to the device, it will get
        // a "NotRegistered" error message and should unregister the device.

        String message = context.getString(
                R.string.server_unregister_error, e.getMessage());
        displayMessageOnScreen(context, message);
    }
}

/**
 * Create HTTP Post request to server, requested url is defined in
 * Config.java.
 *
 * @param endpoint
 * @param params
 * @throws IOException
 */
private void post(String endpoint, Map<String, String> params) throws IOException {
    URL url;
    try {
        url = new URL(endpoint);
    } catch (MalformedURLException e) {
        throw new IllegalArgumentException("Invalid url: " + endpoint);
    }
    StringBuilder bodyBuilder = new StringBuilder();
    Iterator<Entry<String, String>> iterator = params.entrySet().iterator();

    // constructs the POST body using the parameters
    while (iterator.hasNext()) {
        Entry<String, String> param = iterator.next();
        bodyBuilder.append(param.getKey()).append('=')
                .append(param.getValue());
        if(iterator.hasNext()){
            bodyBuilder.append('&');
        }
    }
    String body = bodyBuilder.toString();
    Log.v(Config.TAG, "Posting'" +body + "'to"+url);
    byte[] bytes = body.getBytes();
    HttpURLConnection conn = null;

    try{
        Log.e("URL",">" + url);

        conn = (HttpURLConnection) url.openConnection();
        conn.setDoOutput(true);
        conn.setUseCaches(false);
        conn.setFixedLengthStreamingMode(bytes.length);
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");

        //Post the request
        OutputStream out = conn.getOutputStream();
        out.write(bytes);
        out.close();

        //handle the response
        int status = conn.getResponseCode();

        //If response is not success
        if(status != 200){
            throw new IOException("Get failed with error code" + status);

        }
    }finally{
        if (conn != null){
            conn.disconnect();
        }
    }
}

/**
 * Checks internet connectivity.
 * @return false
 */
public boolean isConnectingToInternet(){

    ConnectivityManager connectivity = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);

    if(connectivity != null){
        NetworkInfo[] info = connectivity.getAllNetworkInfo();
        if(info != null){
            for(int i = 0; i < info.length; i++)
                if(info[i].getState() == NetworkInfo.State.CONNECTED);
            {
                return true;
            }
        }
    }
    return false;

}

/**
 * Send broadcast to show message on activity, broadcast receiver mHandleMessageReceiver
 * defined in Login.java.
 * @param context
 * @param message
 */
void displayMessageOnScreen(Context context, String message) {

    Intent intent = new Intent(Config.DISPLAY_MESSAGE_ACTION);
    intent.putExtra(Config.EXTRA_MESSAGE, message);

     // Send Broadcast to Broadcast receiver with message
    context.sendBroadcast(intent);

}

/**
 * It displays the simple Alert dialog
 * @param context
 * @param title
 * @param message
 * @param status
 */
@SuppressWarnings("deprecation")
public void showAlertDialog(Context context, String title, String message,
        Boolean status) {

    AlertDialog alertDialog = new AlertDialog.Builder(context).create();

    //Set Dialog Title
    alertDialog.setTitle(title);

    //Set Dialog Message
    alertDialog.setMessage(message);

    if(status != null)
        //set alert dialog icon
        alertDialog.setIcon((status) ? R.drawable
                .ic_launcher : R.drawable.ic_launcher);

    //Set OK button
    alertDialog.setButton("OK", new DialogInterface.OnClickListener() {

        @Override
        public void onClick(final DialogInterface dialog, final int which) {

        }
    });
    alertDialog.show();

}

private PowerManager.WakeLock wakeLock;

/**
 * Device wakeup when any push notification reveived.
 * @param context
 */
@SuppressWarnings("deprecation")
@SuppressLint("Wakelock")
public void acquireWakeLock (Context context){
    if (wakeLock != null) wakeLock.release();

    PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
    wakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK |
            PowerManager.ACQUIRE_CAUSES_WAKEUP |
            PowerManager.ON_AFTER_RELEASE, "WakeLock");

    wakeLock.acquire();
}
public void releaseWakeLock(){
    if (wakeLock != null) wakeLock.release();
    wakeLock =null;
}
 }

LoginActivity.java
public class LoginActivity extends Activity {

EditText inputEmail;
EditText inputPassword;
Button loginBtn;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    final Controller controller = (Controller) getApplicationContext();

    // Check if the internet coneection is present
    if (!controller.isConnectingToInternet()) {

        // Internet connection is not present
        controller.showAlertDialog(LoginActivity.this,
                "Internet Connection Error!!", "Please connect your"
                        + "device to internet.", false);

        // Stop executing code by return
        return;
    }

    // Check if GCM configuration is set
    if (Config.SERVER_URL == null || Config.GOOGLE_SENDER_ID == null
            || Config.SERVER_URL.length() == 0
            || Config.GOOGLE_SENDER_ID.length() == 0) {

        // GCM sender id / server url is missing
        controller.showAlertDialog(LoginActivity.this,
                "Configuration Error!",
                "Please set your Server URL and GCM Sender Id", false);

        // Stop executing code by return
        return;
    }

    inputEmail = (EditText) findViewById(R.id.email);
    inputPassword = (EditText) findViewById(R.id.password);

    loginBtn = (Button) findViewById(R.id.btnLogin);
    loginBtn.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            // Get data from EditText
            String email = inputEmail.getText().toString();
            String password = inputPassword.getText().toString();

            // Check if the user filled the form

            if (email.trim().length() > 0 && password.trim().length() > 0) {
                // Launch MainActivity
                Intent i = new Intent(getApplicationContext(), MainActivity.class);
                // Registering user to our server
                // Sending registration details to MainActivity
                i.putExtra("email", email);
                startActivity(i);
                finish();
            } else {
                // User don´t filled that data
                controller.showAlertDialog(LoginActivity.this,
                        "Login Error",
                        "Please enter your full details", false);
            }

        }

    });
}
 }

GCMIntentService.java
public class GCMIntentService extends GCMBaseIntentService {

private static final String TAG = "GCMIntentService";

private Controller controller = null;

public GCMIntentService() {
    // Call extended class Constructor GCMBaseIntentService
    super(Config.GOOGLE_SENDER_ID);
}

/**
 * Method called on Error
 **/
@Override
protected void onError(Context context, String errorId) {
    if(controller == null)
        controller = (Controller) getApplicationContext();

    Log.i(TAG, "Received error: " + errorId);
    controller.displayMessageOnScreen(context,
                               getString(R.string.gcm_error, errorId));

}

/**
 * Method called on Receiving a new message from GCM server
 **/

@Override
protected void onMessage(Context context, Intent intent) {
    if(controller == null)
        controller = (Controller) getApplicationContext();

    Log.i(TAG, "Received message");
    String message = intent.getExtras().getString("price");

    controller.displayMessageOnScreen(context, message);
    // notifies user
    generateNotification(context, message);

}

@Override
protected boolean onRecoverableError(Context context, String errorId) {

    if(controller == null)
        controller = (Controller) getApplicationContext();

    // log message
    Log.i(TAG, "Received recoverable error: " + errorId);
    controller.displayMessageOnScreen(context,
                    getString(R.string.gcm_recoverable_error,
                    errorId));
    return super.onRecoverableError(context, errorId);
}

/**
 * Create a notification to inform the user that server has sent a message.
 */
@SuppressWarnings("deprecation")
private void generateNotification(Context context, String message) {
     int icon = R.drawable.ic_launcher;
        long when = System.currentTimeMillis();

        NotificationManager notificationManager = (NotificationManager)
                context.getSystemService(Context.NOTIFICATION_SERVICE);
        Notification notification = new Notification(icon, message, when);

        String title = context.getString(R.string.app_name);

        Intent notificationIntent = new Intent(context, MainActivity.class);
        // set intent so it does not start a new activity
        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |
                Intent.FLAG_ACTIVITY_SINGLE_TOP);
        PendingIntent intent =
                PendingIntent.getActivity(context, 0, notificationIntent, 0);
        notification.setLatestEventInfo(context, title, message, intent);
        //notification.flags |= Notification.FLAG_AUTO_CANCEL;

        // Play default notification sound
    //    notification.defaults |= Notification.DEFAULT_SOUND;

        //notification.sound = Uri.parse(
                            //   "android.resource://"
                             //  + context.getPackageName()
                              // + "your_sound_file_name.mp3");

        // Vibrate if vibrate is enabled
        notification.defaults |= Notification.DEFAULT_VIBRATE;
        notificationManager.notify(0, notification);

}

/**
 * Method called on device registered
 **/

@Override
protected void onRegistered(Context context, String RegistrationID) {
    // Get Global Controller Class object (see application tag in
    // AndroidManifest.xml)
    if (controller == null)
        controller = (Controller) getApplicationContext();

    Log.i(TAG, "Device registered: regId = " + RegistrationID);
    controller.displayMessageOnScreen(context,
            "Your device registred with GCM");
    Log.d("NAME", MainActivity.email);
    controller.register(context, MainActivity.password, MainActivity.email,
            RegistrationID);

}

/**
 * Method called on device unregistred
 **/

@Override
protected void onUnregistered(Context context, String RegistrationID) {
    if (controller == null)
        controller = (Controller) getApplicationContext();
    Log.i(TAG, "Device unregistered");
    controller.displayMessageOnScreen(context,
            getString(R.string.gcm_unregistered));
    controller.unregister(context, RegistrationID);
}

    }

MainActivity.java
public class MainActivity extends Activity {

// label to display gcm message
TextView lblMessage;
Controller controller;

// Asyntask
AsyncTask<Void, Void, Void> mRegisterTask;

static String email;
static String password;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_activity);

    controller = (Controller) getApplicationContext();

    // Check if Internet present
    if (!controller.isConnectingToInternet()) {

        // Internet Connection is not present
        controller.showAlertDialog(MainActivity.this,
                "Internet Connection Error",
                "Please connect to Internet connection", false);
        // stop executing code by return
        return;
    }

    // Getting email from intent
    Intent i = getIntent();

    email = i.getStringExtra("email");
    password = i.getStringExtra("password");

    // Make sure the device has the proper dependencies.
    GCMRegistrar.checkDevice(this);

    // Make sure the manifest permissions was properly set
    GCMRegistrar.checkManifest(this);

    lblMessage = (TextView) findViewById(R.id.lblMessage);

    // Register custom Broadcast receiver to show messages on activity
    registerReceiver(mHandleMessageReceiver, new IntentFilter(
            Config.DISPLAY_MESSAGE_ACTION));

    // Get GCM registration id
    final String regId = GCMRegistrar.getRegistrationId(this);

    // Check if regid already presents
    if (regId.equals("")) {

        // Register with GCM
        GCMRegistrar.register(this, Config.GOOGLE_SENDER_ID);

    } else {

        // Device is already registered on GCM Server
        if (GCMRegistrar.isRegisteredOnServer(this)) {

            // Skips registration.
            Toast.makeText(getApplicationContext(),
                    "Already registered with GCM Server", Toast.LENGTH_LONG)
                    .show();

        } else {

            // Try to register again, but not in the UI thread.
            // It's also necessary to cancel the thread onDestroy(),
            // hence the use of AsyncTask instead of a raw thread.

            final Context context = this;
            mRegisterTask = new AsyncTask<Void, Void, Void>() {

                @Override
                protected Void doInBackground(Void... params) {

                    // Register on our server
                    // On server creates a new user
                    controller.register(context, email, regId, regId);

                    return null;
                }

                @Override
                protected void onPostExecute(Void result) {
                    mRegisterTask = null;
                }

            };
            // execute AsyncTask
            mRegisterTask.execute(null, null, null);
        }
    }

}

private BroadcastReceiver mHandleMessageReceiver = new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {

        String newMessage = intent.getExtras().getString(
                Config.EXTRA_MESSAGE);

        // Waking up mobile if it is sleeping
        controller.acquireWakeLock(getApplicationContext());

        // Display message on the screen
        lblMessage.append(newMessage + "");

        Toast.makeText(getApplicationContext(),
                "Got Message: " + newMessage, Toast.LENGTH_LONG).show();

        // Releasing wake lock
        controller.releaseWakeLock();
    }

};

@Override
protected void onDestroy() {
    // Cancel AsyncTask
    if (mRegisterTask != null) {
        mRegisterTask.cancel(true);
    }
    try {
        // Unregister Broadcast Receiver
        unregisterReceiver(mHandleMessageReceiver);

        // Clear internal resources.
        GCMRegistrar.onDestroy(this);

    } catch (Exception e) {
        Log.e("UnRegister Receiver Error", "> " + e.getMessage());
    }
    super.onDestroy();
}
   }

Manifest file:
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.appname"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="19" />

<!-- GCM connects to Internet Services. -->
<uses-permission android:name="android.permission.INTERNET" />

<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />

<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />

<!--
 Creates a custom permission so only this app can receive its messages.

 NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
       where PACKAGE is the application's package name.
-->
<permission
    android:name="com.example.appname.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.example.appname.permission.C2D_MESSAGE" />

<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<!-- Network State Permissions to detect Internet status -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />

<application
    android:name ="com.example.appname.Controller"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.appname.LoginActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.DELETE" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:scheme="com.idrivecare.familypro" />
        </intent-filter>
    </activity>
    <activity android:name="com.example.appname.MainActivity" />

    <!--
      BroadcastReceiver that will receive intents from GCM
      services and handle them to the custom IntentService.

      The com.google.android.c2dm.permission.SEND permission is necessary
      so only GCM services can send data messages for the app.
    -->
    <receiver
        android:name="com.google.android.gcm.GCMBroadcastReceiver"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>

            <!-- Receives the actual messages. -->
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <!-- Receives the registration id. -->
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

           <!-- <category android:name="com.google.android.gcm.demo.app" /> -->
           <category android:name="com.example.appname" />
        </intent-filter>
    </receiver>

    <service android:name="com.example.appname.gcm.GCMIntentService" />
</application>

After I login  I get this in LogCat;
05-03 12:02:06.386: D/GCMRegistrar(20407): resetting backoff for com.example.appname
05-03 12:02:06.386: V/GCMRegistrar(20407): Registering app com.example.appname of senders 499319758496
05-03 12:02:06.456: V/GCMBroadcastReceiver(20407): onReceive: com.google.android.c2dm.intent.REGISTRATION
05-03 12:02:06.456: V/GCMBroadcastReceiver(20407): GCM IntentService class: com.example.appname.GCMIntentService
05-03 12:02:06.456: V/GCMBaseIntentService(20407): Acquiring wakelock

Help me if you find any problems in the code.

A: You are using the old way of registering to GCM, which is deprecated. The new way of registering simply requires calling GoogleCloudMessaing.register method, which is blocking, and therefore you don't have to get the result in the intent service.
You can follow the official GCM demo app if you wish to use the new way.
If you wish to stick with the old way, it can still work, but you'll have to make some fixes :
If your app's package name is com.example.appname, the manifest should use it consistently. Therefore, instead of :
<permission
    android:name="com.example.clipme.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.example.appname.permission.C2D_MESSAGE" />

you should have
<permission
    android:name="com.example.appname.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.example.appname.permission.C2D_MESSAGE" />

In addition, your intent service class com.example.appname.gcm.GCMIntentService is in the package com.example.appname.gcm, but the broadcast receiver you are using  - com.google.android.gcm.GCMBroadcastReceiver - looks for it by default in the main package (com.example.appname.GCMIntentService). Therefore it doesn't find it. You shuold either move the service class to the main package or override the broadcast receiver class to change where it expects to find the intent service class.

redpajama_set_name: RedPajamaStackExchange


text:
EPA To Change Diesel Tests To Thwart VW-Like Cheating
Filed Under:Diesel, diesel emissions, Environmental Protection Agency, EPA, Gas Emissions, U.S. Environmental Protection Agency, Volkswagen, VW
(credit: JOHN MACDOUGALL/AFP/Getty Images)
Follow CBSDFW.COM: Facebook | Twitter
DETROIT (AP) — The U.S. Environmental Protection Agency plans sweeping changes to the way it tests for diesel emissions after getting duped by clandestine software in Volkswagen cars for seven years.
READ MORE: One And Done: Cowboys 4th Quarter Rally Comes Up Short, Fall To 49ers 23-17
Chris Grundler, head of the EPA's office of transportation and air quality, indicated the agency would add on-road testing to its regimen. VW's sophisticated software allowed its cars to pass tests in the lab and then spew pollution into the atmosphere while on the highway.
The revelations meant unwanted scrutiny for the EPA. Its testing procedures have been criticized for being predictable and outdated, making it relatively easy for VW to cheat. What's more, the EPA did not initially uncover the problem; researchers at West Virginia University did, using on-road testing.
Grundler says the changes are designed to detect software and other methods automakers might use to rig a test.
The EPA and the California Air Resources Board have engineers who are "developing clever ways in which these things can be detected," Grundler says.
He also notes that testing of diesel engines, which make up only 1 percent of the vehicles on U.S. roads, wasn't the top priority for the EPA. The agency did have on-road testing equipment — but it was assigned to monitor automaker gas mileage estimates and heavy-duty diesel trucks, where cheating had been uncovered in the past.
Grundler, who has been with the EPA for more than three decades, says the lack of on-road testing for diesels "might change in the future." An announcement of the changes could come on Friday.
VW has admitted to installing software on Volkswagen and Audi cars with four-cylinder diesel engines that switches on pollution controls when they are being tested. When the software, called a "defeat device," determines that the cars are back on real roads, the controls are turned off. The EPA says about 500,000 U.S. cars including the Jetta, Golf, Beetle, Passat and Audi A3 have the cheating software, and VW says a total of 11 million cars have it worldwide.
VW was able to fool the EPA because the agency only tested the cars on treadmill-like devices called dynamometers and didn't use portable test equipment on real roads. The software in the cars' engine-control computers checked the speed, steering wheel position, air pressure and other factors to determine when dynamometer tests were under way. It then turned on pollution controls that reduced the output of nitrogen oxide, an ingredient in harmful ozone, the EPA has said.
READ MORE: Shooting Leaves 1 Dead, Multiple Injured In Fort Worth
VW started the scheme with the 2009 model year, and may not have been caught without testing performed at West Virginia University on behalf of the International Council on Clean Transportation, a nonprofit group that advises governments on regulations. EPA and California regulators confronted VW with those findings to VW in May 2014. The automaker eventually did a recall late last year, without much improvement, the EPA says.
Only when the EPA and CARB refused to approve VW's 2016 diesel models for sale did the company admit what it had done.
The EPA announced the violations a week ago and said VW could face billions in fines. The agency said the cars are safe to drive but VW will have to pay to recall and fix them. The agency also is going to test diesels from other manufacturers to make sure they don't have similar devices.
Sen. Bill Nelson of Florida is frustrated that regulatory agencies such as the EPA are failing to protect the public. "Seven years is way too long a time that the EPA has been asleep at the switch," he says.
He says the VW case has similarities to those involving General Motors ' defective ignition switches and Takata Corp.'s exploding air bag inflators, where it also took years before those problems were disclosed to consumers.
"When there is this kind of deception, we've got to get these agencies to be able to cut through it and catch it," Nelson says.
It's not the first time the EPA has had to change testing to make sure automakers are playing by the rules. Earlier this year the agency updated gas mileage tests after some automakers were caught with inflated window sticker estimates.
Grundler disputes the notion that EPA would never have caught VW without the outside help. European regulators were looking into VW's on-road diesel emissions as far back as 2012, and since diesels make up half the cars there, the EPA decided to let Europe take the lead, he says.
"I don't think it's fair to say that this would never have been uncovered," he says. "Do I wish we had uncovered it sooner? Absolutely."
MORE NEWS: 'It Was Really Terrifying' Congregation Beth Israel Members React To Hostage Situation
(© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)


Intention is a very powerful force in nature.
Want to Work & Live Powerfully? Learn to Be Intentional.
Sign up to receive event updates and other important Be Intentional news!
Our goal is to provide training and tools that improve our clients' lives and businesses. We value your input - let us know what you want, what you think, what you need!


text:
Q: Add attribute to caption shortcode from custom attachment field I want to add class to caption shortcode, pulled from custom attachment field. I add the field via:
function add_img_class( $form_fields, $post ) {
    $form_fields['img_class_field'] = array(
        'label' => __( 'Image class', 'text-domain' ),
        'input' => 'text',
        'value' => get_post_meta( $post->ID, 'img_class_field', true )
    );
    return $form_fields;
}

add_filter( 'attachment_fields_to_edit', 'add_img_class', 10, 2 );

function save_img_class( $post, $attachment ) {
    if( isset( $attachment['img_class_field'] ) )
        update_post_meta( $post['ID'], 'img_class_field', $attachment['img_class_field']);
    return $post;
}

add_filter( 'attachment_fields_to_save', 'save_img_class', 10, 2 );

How do I dynamically add "class" attribute with the field value to caption shortcode now?
[caption ... class="img_class_field"][/caption]

A: My idea behind this would be to actually use a custom field call within the shortcode itself, then add a filter shortcode_atts_{$shortcode} to process said custom field and add it to class to return it.
{shortcode} in this case would be caption since that's what we're building off.
add_filter( 'shortcode_atts_caption', 'caption_custom_field_class' );

function caption_custom_field_class( $out, $pairs, $atts, $shortcode ) {
    if ( !empty( $atts['custom_field'] ) && get_post_meta( sanitize_text( $atts['custom_field'] ), $atts['id'], true ) ) {
             $out['class'] .= ( !empty( $out['class'] ) ? ' ' : '' ) . get_post_meta( sanitize_text( $atts['custom_field'] ), $atts['id'], true );
        }
    }
    return $out;
}

So, what we're doing is utilizing another variable field called 'custom_field' to pass our custom field name.
[caption custom_field="mycustomfieldname"][/caption]

The function checks if custom_field shortcode attribute is empty or not, and checks if you can retrieve any post meta based on the passed ID.  If those are both true, then adds it to the $out['class'] with a space depending on whether or not $out['class'] is empty.
I may need to update this answer, because I started writing here, and I'm going to try it in a live environment.

A: Here's a solution that leverages the shortcode_atts_{shortcode} filter, where caption is the shortcode in this case.
This works by pulling the attachment id from $out['id'] then getting the value of the class via get_post_meta( $attachment_id, 'img_class_field', true ).
With this approach, it is not necessary to modify the output of the caption shortcode in the editor. The adding of the custom class is handled behind the scenes. It also still works if a user has manually added a class attribute to the caption shortcode.
/**
 * Adds class to caption shortcode output via img_class_field attachment meta.
 *
 * @param array  $out       The output array of shortcode attributes.
 * @param array  $pairs     The supported attributes and their defaults.
 * @param array  $atts      The user defined shortcode attributes.
 * @param string $shortcode The shortcode name.
 */
add_filter( 'shortcode_atts_caption', 'wpse_shortcode_atts_caption', 10, 4 );
function wpse_shortcode_atts_caption( $out, $pairs, $atts, $shortcode ) {
    // Get the attachment id. It should be available via $out['id'], but
    // it will be in the format 'attachment_xxxx' where xxxx is the id.
    // We'll try to get the id portion and we'll bail if this doesn't work.
    $attachment_id = isset( $out['id'] ) && ( $out['id'] ) ? $out['id'] : false;
    $attachment_id = (int) preg_replace( '/^attachment_/', '', $attachment_id );
    if ( ! $attachment_id ) {
        return $out;
    }

    // Get the custom image class and add it to the existing classes
    $extra_image_class = get_post_meta( $attachment_id, 'img_class_field', true );
    if ( $extra_image_class ) {
        $spacer = isset( $out['class'] ) && ( $out['class'] ) ? ' ' : '';
        $out['class'] .= esc_attr( $spacer . $extra_image_class );
    }

    return $out;
}

Usage
Custom classes added to attachment meta data (I used 2 for good measure):
some-class another-class

Example of unmodified caption shortcode added via media modal:
[caption id="attachment_2397" align="alignnone" width="480"] This is the caption![/caption]

Example output 1: (theme supports HTML5 for captions):

This is the caption!

Example output 2: (theme does not support HTML5 for captions):

This is the caption!


text:
layout: post
authors: ["Anelda van der Walt"]
title: "Weekly Update: Jan 31 - Feb 06, 2015"
date: 2015-02-09
time: "08:00:00"
tags: ["Community"]
---

    Highlights:
    SWF gets 2 new affiliates (iPlant and Lab for Data Intensive Biology at UC Davis) and a new partner (University of Washington).

    Conversations:
    "...what matters most in teaching is the act itself - the verb": some observations on teaching and a book recommendation.

    Scientific coding and software engineering: what's the difference? A post by Daisie Huang: please add your comments.

    Rewarding Software Sharing by Mapping Scientific Software A post by Chris Bogart: please share your ideas.

    Events:
    SWC instructor training and Intro to Web Programming at Lawrence Berkeley Lab: March 2015

    rOpenSci Unconference: March 2015

    Software Sustainability Institute's Collaborations Workshop: March 2015

    Other News:
    Eight new instructors

Details

    The first meeting of the new SCF Steering Committee took place.

    Juan Nunez-Iglesias, Harriet Dashnow, and Stefan van der Walt are looking for code nominations to be used in their book Elegant SciPy: please get in touch.

    Sheldon McKay and Greg Wilson hosted a second post-workshop instructor debriefing attended by 10 instructors.

    Neil Davis summarised their experience and innovations introduced at the second SWC workshop held at University of Illinois. Their suggestions include getting feedback at each break and introducing the idea that knowledge gained at SWC workshops can be applied tomorrow or on Monday as opposed to in future. He also questioned how well SWC advertisements represent what participants can expect in a workshop.

    Online instructor training started this week.

    Workshops were run at the
    University of Manchester and
    the University of Toronto.

    New workshops were announced at
    Michigan State University and
    UC Irvine,
    and through NeSI at
    Canterbury
    and Auckland
    in New Zealand.

redpajama_set_name: RedPajamaGithub


Home » Industrial » Does your industrial fixture have the right surge protection?
Reliable surge protection is essential in industrial environments. Our linear and round high bay products come with minimum 6kV surge protection standard which means that they withstand over 90 surge hits during testing to the ANSI standard.
LED is much more susceptible to power quality events than traditional technology lighting. This video shows these low cost products undergoing 6kV surge testing as defined by ANSI standards and test procedures. The purpose is to show how vulnerable these typical low cost products are and how quickly they can fail when subjected to surge profiles that can be found in Industrial environments defined by ANSI standards and test procedures.
We've tested some common competitors for the same 6kV surge protection ANSI standard.
Click here to see how they did!
The complete test, which our Industrial fixtures pass, is comprised of over 90 hits, and can take over 2.5 hours. These "China.com" import fixtures failed within minutes. Some of these fixtures even state surge protection is included in their product and still failed the test. This result highlights the risk you are taking when you go with an unknown unprotected LED fixture as a long term solution for your industrial space.


text:
PROF.IMUNGI JASPER K
BSC FOOD SCIENCE AND TECHNOLOGY, MSC, PhD
jasper.imungi@uonbi.ac.ke
Prof. J.K. Imungi
Prof Jasper Kathenya Imungi was born on 20/08/1950. He is married with three children. He holds B.Sc. (Math/Chemistry) from University of Nairobi which was obtained in 1974, M.Sc. (Food Science and Technology) from Swiss federal Institute of Technology-Zurich/University of Nairobi in 1979 and a PhD (Food Science) from Cornell University USA, 1984. He is currently a professor at the Department of Food Science, Nutrition and Technology. The major administrative appointments includebeing chairman, Dept.
PDF Upload:
cv_imungi_complete.pdf
(Last updated: April 14, 2020)
Lore, TA, Imungi JK, Mubuu K. 2013. A Framing Analysis of Newspaper Coverage of Genetically Modified Crops in Kenya. Abstract
There was much public debate in Kenya about genetically modified (GM) crops when the national Biosafety Bill went through the parliamentary process toward enactment into law. This study analyzed how GM crops were framed in three mainstream Kenyan newspapers—the Daily Nation, The Standard, and Taifa Leo—during the period. The agriculture frame was predominant in the Daily Nation and The Standard, while the safety and regulation frames dominated coverage in Taifa Leo. Only 34.7% of articles were neutral in tone. Scientists and government officials, who generally spoke in favor of GM crops, were the most frequently quoted sources. Recommendations to improve the quality of coverage include training of journalists to ensure objective and balanced reporting.
Kunyanga, CN, Imungi JK, Okoth MW, Biesalski HK. 2012. Total phenolic content, antioxidant and antidiabetic properties of methanolic extract of raw and traditionally processed Kenyan indigenous food ingredients. Abstract
Certain indigenous foods commonly consumed by Kenyan vulnerable groups (the malnourished; children under 5 years of age; pregnant and lactating women; malnourished adults in cases of vitamin or mineral deficiencies, TB, diabetes, cancer, AIDS; refugees; orphans the elderly and the disabled) are not yet evaluated for phenolic content and health relevant functionality. The present study was therefore designed to analyze the phenolic content, antioxidant and antidiabetic properties of methanolic extract of raw and traditionally processed food ingredients. The total phenolic contents of the cereals, legumes, oil seeds and vegetables were ranged from 0.41 to 3.00 g/100 g DM. Amaranth grain (Amaranthus cruentus) and drumstick leaves (Moringa oleifera) exhibited significantly higher phenolic content than the other samples. The methanolic extract of the investigated samples showed promising levels of DPPH radical scavenging activity (81–89%); ferric reducing/antioxidant power (FRAP, 44–744 mmolL−1 Fe[II]/g extract DM); α-amylase (10–45%) and α-glucosidase (13–80%) inhibition activities. The food ingredients with high phenolic content exhibited relatively higher antioxidant and antidiabetic activities. The results indicate that soaking + cooking is the mild processing method to preserve the phenolic compounds and their health relevant functionality in the presently investigated cereal, legume and oil grains, while cooking is suitable treatment for vegetables.
MORAA, DRONYANGOCECILIA, K PROFIMUNGIJASPER, ONWONGA DRRICHARDNDEMO. 2012. Effect of Nitrogen Source, Crop Maturity Stage and Storage Conditions on Phenolics and Oxalate Contents in Vegetable Amaranth (Amaranthus hypochondriacus). Journal of Agricultural Science. : Canadian Center of Science and Education Abstract
Twenty variceal banding sessions were performed in eight patients between February 1995 and September 1996. A total of 69 rings were used to band the varices and at each session between two to six rings were used. Two of the eight had active bleeding and both underwent variceal banding to successfully arrest their bleeding as inpatients. Sixteen other variceal banding sessions were performed on an outpatient basis to obliterate their varices. Four of the eight patients had had sclerotherapy before and varices were still present. No acute or long term complications were noted. In one patient, variceal banding could not be performed as he developed stridor upon placement of the overtube. All the patients had advanced varices (Grade III or IV) and extended for more than 15 cms in the oesophagus. Endoscopic variceal obliteration remains the treatment of choice for patients with portal hypertension with variceal bleeding. Variceal banding is associated with a superior outcome when compared with sclerotherapy; the variceal kill time is shorter, infective complications less, rebleeding occurs less commonly and transfusion requirements are lower.
MORAA, DRONYANGOCECILIA, K PROFIMUNGIJASPER, S PROFIGONSANGWASHIBAIRO. 2012. Influence of organic and mineral fertilization on germination, leaf nitrogen, nitrate accumulation and yield of vegetable amaranth. Journal of Plant Nutrition. : Taylor & Francis Abstract
Onyango, CM;, Harbinson J;, Shibairo SI;, Imungi JK. 2011. Effect of organic and in organic fertilisers on yield and quality of amaranth in sub-Saharan Africa. Abstract
This study was designed to evaluate the influence of manure and mineral fertilization on yield, Kjeldahl nitrogen (as protein equivalents), Vitamin C and nitrate accumulation in Amaranthus hypochondriacus. The vegetables were produced in field trials, set up in the University of Nairobi, Kenya, during the long rains period between March and May in 2007 and 2008 using diammonium phosphate (DAP; 20, 40 and 60 kg N ha-1) and manure; 40 kg N kg ha-1,) and the yield, Kjeldahl nitrogen (K-N; a proxy for protein content), vitamin C and nitrate levels were measured. The manure treatment produced little increase in productivity though it increased K-N levels. The DAP treatments produced increases in yield, but these saturated at 40 kg N ha -1. The K-N content of the leaves was high, ranging from 2.5 % to just over 4 %, and, broadly, increased with fertiliser application though the variation between the treatments was lower than that for yields. Nitrate levels, however, also increased with DAP fertilisation, resulting in an increase in the nitrate:K-N at high DAP applications, especially in younger plants. There were no clear correlations between ascorbic acid content and K-N. Nonetheless, the plants grown under different fertilisation regimes can be placed into three broad groups; those characterised with low to moderate K-N contents and low to high ascorbic acid contents, moderate to high K-N and low to high ascorbic acid content, and lastly high K-N and low ascorbic contents. Therefore, the growth environment of amaranth, can have a major impact not only on the productivity of the crop but its nutritional value. In this respect the mineral nutrient supply to the crop is of particular importance.
Onyango, CM;, Harbinson J;, Imungi, J K; Kooten O, Imungi, J K; Kooten O. 2011. Analysis of the molecular diversity of Kenyan sorghum germplasm using microsatellites. Abstract
Vegetable amaranth is a leafy vegetable traditionally grown in sub-Saharan Africa and Asia where it is the most consumed traditional vegetable. It is considered to have high nutritional quality, containing relatively large amounts of vitamins A and C. We have assessed the influence of the maturity of the vegetable and soil nutrition on the visual and nutritional quality of amaranth. We found that leaf ascorbic acid content is strongly influenced by both maturity and soil nutrition, with leaves of seven week old matured plants having the highest content. β-carotene increased with increasing amount of soil nitrogen and with increasing plant age. The loss of both visual and nutritional quality during storage was influenced more by maturity at harvest and the temperature of storage than the soil nutrition.
Muchoki, CN, Lamuka PO, Imungi JK. 2011. Reduction of nitrates, oxalates and phenols in fermented solar-dried stored cowpea (Vigna Unguiculata l.) leaf vegetables. Abstract
This study was conducted to determine the effect of fermentation, solar drying and storage duration on the levels of anti-nutrients: nitrates, oxalates and phenols, in cowpea leaf vegetables. The rationale was reduction of the anti-nutrients. Reduction of nutritional stress factors in plant foods increases bioavailability of nutrients, hence improving their quality as foodstuffs. The cowpea leaves were purchased from the local markets, sorted to remove blemished leaves and foreign materials, washed in running tap water. Then, the vegetables were drained and divided into three batches of 16 kg each. One batch was heat-treated in hot water for 3 minutes and then cooled to ambient temperatures, drained and solar-dried. The second portion was acidified to a pH of 3.8, heat-treated, and solar-dried. The third portion was fermented for 21 days, heat-treated, and solar-dried. The three batches of vegetables were spread at different times on drying trays at the rate of 4 kg/m2 and dried in a solar drier to an approximate moisture content of 10%. The dried vegetables were packaged in either polyethylene bags or Kraft paper bags and stored for three months at 18oC, 22o- 26oC or 32oC. Fermentation, heat-treatment and drying of vegetables led to significant (P < 0.05) reduction in nitrates compared to fresh cowpea leaves, but the reduction in oxalates and phenols was not significant. Storage for three months led to significant (P < 0.05) reduction in nitrates in the fermented sample compared to the other samples. The acidified sample had significantly (P < 0.05) higher levels of phenols after three months of storage than the other samples. Samples stored at 18oC had higher levels of oxalates and phenols but lower levels of nitrates, compared to those stored at higher temperatures. Packaging material had no significant effect on the level of nitrates, oxalates and phenols. Data obtained in this study reveal a novel technique for the reduction of anti-nutrients in cowpea leaf vegetables, namely; fermentation followed by solar drying. The increased acceptability of these fermented-dried vegetables would help rural communities in providing better foodstuff with fewer anti-nutrients, thus alleviating micronutrient malnutrition. This novel long-term storage technology can greatly help to deal with the issue of seasonality and will increase food security, especially during the dry season.
Kunyanga, CN;, Imungi JK. 2010. Quality Characteristics and Acceptability of Bread Produced with Supplementation of Dolichos lab lab Beans. Abstract
The viability of production of good quality and acceptable bread with substitution of wheat flour with Dolichos lab lab (Lab lab purpureus) was investigated. The bread was analyzed for protein, moisture, general bread quality and sensory properties. The protein content of bread was elevated by up to about 20% and the moisture content reduced by about 10% without significant changes in bread taste, odor, volume and general bread quality. Substitution levels of up to 10% produced bread with quality characteristics not significantly different from the control. Sensory evaluation showed no significant differences between the control bread and the Dolichos supplemented breads up to 15% in the sensory attributes of aroma, crumb appearance, texture, crust colour, loaf shape, taste and general acceptability (p < 0.05). The crumb colour changed from creamish white to dull brown and a gradual hardening of crumb texture was observed as the addition of Dolichos lab lab bean flour increased. Above 15% substitution levels, the acceptability declined because of the compact texture of the crumb and the strong beany flavor of the product. Results indicate that acceptable breads can be produced by substitution of up to 15% wheat flour with dolichos bean flour
Wanjekeche, E;, Imungi JK;, Karuri EG. 2010. Effect of Soaking on the Cookability and Nutritional Quality of Mucuna Bean. Abstract
Mucuna (Mucuna pruriens) is a legume with high but unexploited potential for food and soil fertility improvement. Use of the seed as food is limited by the hard-to-cook defect and the presence of several antinutritional factors notably the non-protein amino acid, 3, 4 ...
2010. Consumption patterns, diversity and characteristics. Journal of Applied Biosciences . 32
Gichohi, KE;, Wandayi OM;, Imungi JK;, Okoth M;, Njenga JN. 2009. Seminar on Food Science and Technology special project proposals and research findings.
Oiye, SO, Mwangi AM, Sehmi JJ. 2009. Triple simultaneous stabilizing action of rosemary spice (Rosemarinum officinalis L.) in full-fat soya based flour rich in protein and β-carotene. AbstractWebsite
This study aimed at demonstrating the stabilizing effect of up to 0.4%(wt/wt flour) of rosemary spice (Rosemarinum Officinalis L.) in a flour-based protein-rich product intended for young children. The flour was made of full-fat soya flour, meat (beef) powder, and carrot flour as β ...
K, PROFIMUNGIJASPER. 2008. Onyango, C. M., Shibairo, S. I., Imungi, J. K. and Harbinson, J. 2008. The physico-chemical characteristics and some nutritional value values of vegetable amaranth sold in Nairobi. Ecology of Food and Nutrition 47: 382 . Ecology of Food and Nutrition 47: 382 . : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2008. Cecilia M. Onyango1 and Jasper K. Imungi. 2008. Post harvest handling and characteristics of fresh-cut traditional vegetables sold in Nairobi . Journal of Agricultural Science. : Canadian Center of Science and Education Abstract
Githunguri, CM;, Waithaka K;, Ekanayake IJ;, Imungi JK. 2007. Influence of agro-ecological zones and plant age on the net assimilation, relative and crop growth rates of cassava.. Abstract
Five cassava genotypes were grown at three agro-ecological zones. Plants were sampled for net assimilation, crop growth and relative growth rates at four, six, eight, ten and twelve months after planting. The genotypes were arranged in a randomized complete block design, with four replicates. Cassava at the wetter agro-ecological zones had higher crop and relative growth rates than those at the drier agro-ecological zone. Plant age, agro-ecological zone and genotype effects were not important factors in determining the net assimilation rate of cassava. The lowest yielding genotype had the highest net assimilation rate demonstrating that a high net assimilation rate does not always result into high yields suggesting that net assimilation rate is not a good indicator of growth performance of cassava. The wetter agro-ecological zones had a positive effect on crop and relative growth rates, while the drier agro-ecological zone had a negative effect suggesting that the agro¬ecological zone effect is an important factor in determining them. Cassava crop and relative growth rates were highly positively correlated to root yields. Therefore, breeding and selection for cassava genotypes with the highest crop and relative growth rates and hence yields may be done at the drier agro-ecological zone.
K, PROFIMUNGIJASPER. 2007. Onyango, M. C. and Imungi, J. K. 2007. Post harvest handling and characteristics of fresh-cut traditional vegetables sold in Nairobi-Kenya. Proc. African Crop Science Conference, 27 . African Crop Science Conference, 27 . : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2007. Muchoki, C. N., Imungi, J. K., and Lamuka, P. O. 2007. Changes in beta-carotene, ascorbic acid and sensory properties in fermented, solar-dried and stored cowpea leaf vegetables. African journal of Food, Agriculture, Nutrition and Development (AFJFAND) 7(. African journal of Food, Agriculture, Nutrition and Development (AFJFAND) 7(3): 1-20.. : Canadian Center of Science and Education Abstract
Ngala, S;, Imungi JK. 2006. The Coping Strategies in Kitui and Mwingi Districts During Drought Pg 78-80. Abstract
Objective: To determine the methods of presentation for drought and the coping strategies. Design: A cross-sectional study of Kenya Setting: Kitui and Mwingi districts of Kenya Subjects: The study population consisted of 491 and 485 households with children 6-59 months in the Kitui and Mwingi districts respectively. Multi stage sampling procedure was done. The first stage sampling was purposive sampling of the districts. The second stage was selection of divisions by simple random sampling, the same went for location, sub location and finally clusters (village). Main outcome measures : Preparation for and coping strategies during drought. Results: Stocking of relief food as a method of preparation for drought was the most quoted by most with 38.90% and 40.82% in Kitui and Mwingi districts. The coping strategies quoted by most was cash for work by 39.4% and 36.5% in Kitui and Mwingi districts respectively. Conclusion:The methods of preparation for drought and strategies for coping with drought were inadequate.
K, PROFIMUNGIJASPER. 2006. Imungi, J. K. 2006. Limitations to impact of fortified food . Letter to the Editor. NutriView 2006/2: 8. : Canadian Center of Science and Education Abstract
Oiye, SO;, Imungi JK;, Mwangi AM. 2005. Can Rosemary Spice (ROSMARINUS OFFICINALIS) Stabilize'-a- Carotene in a Protene -a- Carotene -Rich Soybean-Based Product? Abstract
Background: Addition of '-a-carotene-rich foods can be a feasible way to augment vitamin A content in products deficient in vitamin A. However, -a-carotene is highly prone to oxidation and sterioiseomerization that leads to loses. Rosemary spice is locally available and can be used as an antioxidant in organoleptically acceptable levels. Objective: The effects of rosemary spice on the stability of -'acarotene in a flour formulation with dried carrots as a source was investigated. Methodology: A flour-based product containing 64% full-fat soya flour, 7% meat powder and 29% carrot flour were treated with dried and milled rosemary spice at rates of 0%, 0.1% 0.2%, 0.3% and 0.4% on the basis of weight of the flour. They were then stored for a period of 7 week at 35oC and analyzed for '-a-carotene initially and there after at an interval of 2 weeks. Results: At the end of 7 weeks, the sample with no rosemary spice recorded the lowest '-a-carotene content (7.22mg/100 g ± 0.10). This was significantly different from samples having rosemary spice (p<0.05). In increasing order in '-carotene content sample with 0.1%, 0.3%, 0.2% and 0.4% had 10.64 mg ± 0.07, 10.74 mg ± 0.07, 10.87 mg ± 0.00 and 11.05 mg ± 0.10 per 100 grams of the flour respectively after 7 weeks of storage. Conclusion: It is possible, within a storage period of 7 weeks at 35o, to spare significant amount of '-a-carotene in a protein- '- carotene-rich soya-based flour using rosemary spice.
K, PROFIMUNGIJASPER. 2005. Imungi, J. K. 2005. Women entrepreneurship capacity development in Meru South and Kilifi districts of Kenya. Prepared for United Nations Industrial development Organization (UNIDO), Vienna, Austria.. Prepared for United Nations Industrial development Organization (UNIDO), Vienna, Austria.. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2004. Imungi, J. K. 2004. Food Chemical Analysis for Lesotho. Preliminary report on the establishment of a food analysis laboratory for Lesotho. Prepared for FAO, Rome.. Prepared for FAO, Rome.. : Canadian Center of Science and Education Abstract
Kihurani, AW, Shibairo SI, Imungi JK, Carey EE. 2003. Susceptibility of sweetpotato germplasm to rhizopus soft rot caused by Rhizopus stolonifer and Rhizopus oryzae in Kenya. Website
K, PROFIMUNGIJASPER. 2003. Kihurani, A. W. , S. Shibairo, J. K. Imungi, R. D. Narla, and E.E. Cartey, 2003. Susceptability of sweet potato germplasm to Rhizopus soft rot caused by Rhizopus Stolonifer and Rhizopus Oryzae in Kenya. MUARIK Bulletin 6: 30 . MUARIK Bulletin 6: 30 . : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2003. Imungi. J. K. 2003. Regional Program on harmonization of food system in Eastern Africa: Kenya Country report. Prepared for United Nations Industrial Development Organization (UNIDO), Vienna, Austria.. Prepared for United Nations Industrial Development Organization (UNIDO), Vienna, Austria.. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2003. Abuye, C., K. Urga, H. Kinapp, D. Selmar, A. M. Omwega, J. K. Imungi and P. Winterhalter. 2003. A composition study of Moringa stenopetala leaves. East African Medical Journal 80: 247. Prepared for FAO, Rome.. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2002. Imungi, J.K., 2002. The brighter side of phenolic compounds abundance in African leafy vegetables. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2002. Nyariki, D.M., S.L. Wiggins and J.K. Imungi, 2002. Levels and causes of Household Food and Nutrition Insecurity in Dryland Kenya. Ecology of Food and Nutrition 41:155.. MUARIK Bulletin 6: 30 . : Canadian Center of Science and Education Abstract
Mziray, RS, Imungi JK, Karuri EG. 2001. Nutrient and antinutrient in contents of raw and cooked Amaranthus hybridus. Abstract
Amaranthus hybridus was grown as a leafy vegetables in four sites in Dar‐Es‐Salaam, Tanzania. Freshly harvested leaves from each of the growing sites were analyzed for proximate composition of beta‐carotene, reduced ascorbic acid, minerals iron, calcium, phosphorous and the antinutrients oxalates and nitrates. The leaves from the four sites were bulked and cooked by boiling in distilled water in the ratio vegetable to water of 1:4 then drained. The drained vegetables were analyzed for beta‐carotene, reduced ascorbic acid, iron, calcium, phosphorus, oxalate and nitrate. Results indicated that fresh amaranth vegetables from the four sites had comparable high moisture contents ranging between 85.3% to 86.5%, protein of between 28.2% to 31.6%. The level of minerals calcium, iron and phosphorus ranged between 2062 mg/100 g and 2263 mg/100 g, 108 mg/100 g and 128 mg/100 g and 500 mg/100 g and 553 mg/100 g respectively on dry weight basis. The levels of beta‐carotene of between 25.2 mg/100 g to 37.3 mg/100 g, ascorbic acid of between 455 mg/100 g to 535 mg/100 g. Nitrates and oxalates were at levels of between 501 mg/100 g to 560 mg/100 g and 3383 mg/100 g to 4333 mg/100 g respectively on dry matter basis. On cooking, the levels of beta‐carotene did not change significantly but there were significant reductions (P < 0.05) in the levels of ascorbic acid of up to 50.4%, and 41.4% for phosphorus, while the total nitrate was reduced by 39.2%, and the oxalate by 40.2%. The study established that Amaranthus hybridus leaves grown in four sites of Dar‐Es‐Salaam were good sources of nutrients, had low nitrates levels but high oxalate contents. Furthermore the cooking losses of the nutrients were not excessive, while the antinutrients were substantially reduced.
K, PROFIMUNGIJASPER. 2001. Mziray, Rajabu, S., Jasper K. Imungi and Edward G. Karuri, 2001. Nutrient and antinutrient contents of raw and cooked amaranthus hybridus. Ecology of Food and Nutrition. 40: 53.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2001. Ngatia, E. M., Nyanga, P. M., Imungi, J. K., Muita, J. W. and Ogard, B. 2001b. Association between breast/bottle feeding and sucking habits among 3-5 year olds in Nairobi. AJOHS 2(2): 44.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2001. Ngatia, E.M., Nyanga, P.M., Imungi, J.K., Muita, J.W. and Ogarrd, B. 2001a. Artificial sucking habits and malocclusion in 3-5 year-olds in Nairobi. African Journal of Oral Health Sciences (AJOHS 2(2): 27.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
To determine the prevalence of sucking habits and its association with anterior open bite, posterior cross-bite and transverse dimensions of the Jaws In 3-5-year-olds in Nairobi. Design: A cross-sectional study. Setting: Nairobi, Kenya. Subjects: Three hundred and four children aged 3-5 years (155 boys and 149 girls). Results: The prevalence of digit suckers was 15.8%, nd pacifier users 1.0%. Those with anterior open bite constituted 7.6%. The average intercanine archwidth between 53-63 was 3d.8mm and between 73-83 was 25.4mm. A statistically significant correlation (Pearson!)was observed between digit-sucking and anterior open bite (P<0.01). Concluslon: The present study forms a baseline for future trends in sucking habits among children in Nairobi, Kenya. Low prevalence of sucking habits was found. The average difference between the upper and lower intercanine arch widths was relatively high and prevalence of postenor cross-blte was low. A significant correlation was observed between anterior open bite and digit sucking. The need for orthodontic treatment due to sucking habit was low among children in Nairobi.
K, PROFIMUNGIJASPER. 2001. Dietary patterns and dental carries in nursery school children in Nairobi, Kenya. East African Medical Journal.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2000. Okoth, M.W., Kaahwa, A.R. and Imungi, J.K. 2000. The effect of homogenization stabilizer and amylase on cloudiness of passion fruit juice. Food Control II (2000): 305.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2000. Changes in ascorbic acid, beta-carotene and sensory properties in sundried and stored amaranthus hybridus vegetables. Ecology of Food and Nutrition 39: 459.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
K, PROFIMUNGIJASPER. 2000. The effect of homogenization stabilizer and amylase on cloudiness of passion fruit juice. Food Control II (2000): 305.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract
Ngatia, EM, Imungi JK. 1999. Sucking habits, anterior open bite, posterior crossbits and intercanine arch widths in 3-5 year-olds in Nairobi..
1999. Carotenoid contents in fresh, dried and processed sweetpotato products.
K, PROFIMUNGIJASPER. 1999. Maundu, P.M., E.I. Njiro, J.A. Chweya, J.K. Imungi and E.N. Seme. 1999. Traditional green leafy vegetables of Kenya. In Chweya J.A. and Eyzaguirre, P.B. Eds. The Biodiversity of Traditional Leafy Vegetables pp. 51-83. IPGRI, Rome, Italy.. International Plant Genetic Resources Institute Newsletter for Sub-Saharan Africa, Issue 17Rome, Italy. : Canadian Center of Science and Education Abstract


text:
Opinion/Op-Ed
Christianity, grace shouldn't be disputed in political context
By Michael Gerson, Columnist Feb 26, 2015, 7:18pm MST
Share All sharing options for: Christianity, grace shouldn't be disputed in political context
It is simply not the role of a Christian layman to publicly dispute the self-identification of other Christians, especially in a political context. It is a practice that can lead down ugly alleys of sectarianism.
WASHINGTON — When Scott Walker pronounced himself agnostic about President Obama's patriotism and Christian faith, it must have seemed like a clever formulation. "I've never asked him, so I don't know," he said. And about Obama's Christianity: "I've never asked him that."
Walker quickly found his pitch unequal to the presidential big leagues. His argument can't be generalized into a rule. I have never met Billy Graham, for example, but I'm pretty sure what he believes. As political attacks go, this one is particularly heavy-handed — the equivalent of saying: As far as I know, my opponent is not a swindler and a degenerate. A politician who tried this form of passive aggression before also got criticized for it. During the 2008 Democratic primary fight, Hillary Clinton said that Obama is not a Muslim "as far as I know" — sounding more like one of the wackier speakers at a CPAC convention.
For Walker, this is more of a paper cut than a chest wound. But it can't be good for the Republican Party, which some Americans associate with religious exclusivity, for a front-runner to sound religiously exclusive.
Walker's Baptist upbringing — he is the son of a pastor — does put a particular emphasis on the personal acceptance of Christ. It was another Baptist governor, Jimmy Carter, who elevated the idea of being "born again" into the realm of presidential politics. For evangelicals in general, there is no such thing as a birthright Christian. Faith requires a conscious and highly consequential decision — a choice that some do not make.
But here Obama has been as forthright as anyone could be. "I am a Christian, and I am a devout Christian," he said in a 2008 Christianity Today interview. "I believe in the redemptive death and resurrection of Jesus Christ. I believe that that faith gives me a path to be cleansed of sin and have eternal life. But most importantly, I believe in the example that Jesus set by feeding the hungry and healing the sick and always prioritizing the least of these over the powerful. I didn't 'fall out in church' as they say, but there was a very strong awakening in me of the importance of these issues in my life. I didn't want to walk alone on this journey. Accepting Jesus Christ in my life has been a powerful guide for my conduct and my values and my ideals."
Questioning this affirmation involves a serious charge — an accusation of the worst sort of cynicism. And it is simply not the role of a Christian layman to publicly dispute the self-identification of other Christians, especially in a political context. It is a practice that can lead down ugly alleys of sectarianism.
Some, of course, will find the whole idea that human beings can make profoundly consequential religious choices to be foreign. And they may find proselytization — the necessary correlate of religious choice — to be offensive. But here a little patience might be in order. In many cases, adult converts have come through low points of addiction, humiliation or crisis. They believe they have found, past the limits of their own strength, something extraordinary and undeserved, which they can only describe as grace.
You may find such converts to be deluded or annoying, but there is little doubt that they have had a profound experience that defies adequate metaphor. They feel they have been washed by water or refined by fire. They have heard a voice in the night or a melody above the noise. Things previously thought important — status or wealth — appear vanishingly insignificant. They can say, with G.K. Chesterton:
And all these things are less than dust to me
Because my name is Lazarus and I live.
In such cases, people amazed by grace are wont to talk about it. But this motivation is the opposite of self-righteous judgment. It is gratitude. I have known people who, after a single moment of transforming trust, have spent the rest of their lives in astonished and vocal thankfulness.
But this type of faith, by definition, is unlikely to publicly judge the faith of others. It is founded on recognition of personal limits and failure. In the New Testament, grace often moves in stealthy and unexpected ways — lavished on lepers, Samaritans and tax collectors. Perhaps the modern equivalents would be people with HIV/AIDS, illegal immigrants and … tax collectors.
In any case, Christians should not look to the powerful for definitions of orthodoxy — or be proud of an unmerited gift.


There hasn't been a strong theme in the forex markets so far today. European stock markets have mostly declined, as risk aversion picked up in Europe. Investors still found some positives in the Chinese GDP numbers, which slowed as expected but also showed signs of stabilisation in some areas.
Meanwhile, USDJPY is trading moderately softer, though has held within Friday's range so far. An intraday low was printed at 109.47. AUDJPY saw a similar decline, but also remained within its range seen on Friday. It is currently trading at 78.50.
As the Yen weakens amid a risk-back-on theme in global markets, AUDJPY remains for the 3rd consecutive day near the key level at 79.00, recouping nearly 60% of December's losses so far . The overall weakness of the Aussie does not seem to have faded yet, proven by the fact that the asset is below 2-year Support, which has now been converted to Resistance, at 78.50-78.80 area.
However, January has proven beneficiary for the asset, hence in the near future, a break of this strong barrier could attract more bulls, which could lift the asset back into the 81 zone. Oppositely, a crossing below 77.20 level should turn the outlook into a negative one, as this level presents the move below 20-day SMA, latest low fractal and the 50% Fibonacci retracement level.
Daily momentum indicators are mixed, as RSI is struggling to cross above 50 , while MACD continues to accelerate higher. This picture implies poor positive momentum leading to a consolidation in the daily time frame. Intraday Support and Resistance are at 77.20 and 78.70 respectively.
From the fundamental perspective, expectations for the US and China to be more committed to finding resolution to their trade dispute, becomes increasingly evident on both sides of the Pacific. This could burst Yen further.
Next articleHas Tilray's Boom Reached Its End?