text:
BIZCHINA / Organizations
Main responsibilities of the Ministry of Commerce
(mofcom.gov.cn)
1. To formulate development strategies, guidelines and policies of domestic and foreign trade and international economic cooperation, draft laws and regulations governing domestic and foreign trade, economic cooperation and foreign investment, devise implementation rules and regulations. To study and put forward proposals on harmonizing domestic legislations on trade and economic affairs as well as bringing Chinese economic and trade laws into conformity with multilateral and bilateral treaties and agreements.
2. To formulate development plans for domestic trade, study on and put forth proposals on reforming the commercial distribution system, foster and develop urban and rural markets, promote the restructuring of the commercial distribution sector and the improvement of such modern distribution modalities as chain store operation, modern logistics and e-commerce.
3. To research into and formulate policies for regulating the market operation and distribution order, breaking up market monopoly and regional blockage, to set up and improve an integrated, open, competitive and orderly market system. To monitor and analyze market activities and commodity supply and demand, organize the adjustment of market supply of main consumer goods and regulation of the distribution of major means of production.
4. To study on and work out measures for the regulation of import and export commodities and compile a catalogue thereof, organize the implementation of import and export quota plan, decide on quota quantity and issue licenses; to draft and implement import and export commodity quota tendering policies.
5. To formulate and execute policies concerning trade in technology, state import and export control, and policies encouraging the export of technology and complete set of equipment; to push forward the establishment of foreign trade standardization system; to supervise technology import, equipment import, export of domestic technologies subject to state export restriction and re-export of imported technologies, and to issue export licenses pertaining to nuclear non-proliferation.
6. To study on, put forth and implement multilateral and bilateral trade and economic cooperation policies, be responsible for multilateral and bilateral negotiations on trade and economic issues, coordinate domestic positions in negotiating with foreign parties, and to sign the relevant documents and monitor their implementation. To establish multilateral and bilateral intergovernmental liaison mechanisms for economic and trade affairs and organize the related work. To handle major issues in country-specific economic and trade relationships, regulate trade and economic activities with countries without diplomatic relationship with China. In line with the mandate, to handle the relationship with the World Trade Organization on behalf of the Chinese government, undertake such responsibilities under the framework of the WTO as multilateral and bilateral negotiations, trade policy reviews, dispute settlement, and notifications and inquires.
7. To steer the work of the commercial branches of China¡¯s Permanent Mission to the WTO, to the UN and other relevant international organizations, as well as Chinese embassies in foreign countries. To keep in touch with the representative offices of multilateral and international economic and trade organizations in China and the commercial functions of foreign diplomatic missions in China.
(8) To organize and coordinate the work pertaining to antidumping, countervailing, safeguard measures and other issues related to fair trade for import and export. To institute a fair trade early warning mechanism for import and export, and organize industry injury investigations. To guide and coordinate domestic efforts in responding to foreign antidumping, countervailing, and safeguard investigations and other issues concerned.
(9) To give general guidance to nationwide efforts in foreign investment. To analyze and look into China's foreign investment developments and submit information concerning the developments and the corresponding proposals to the State Council on a regular basis. To draw up and enforce foreign investment policies and reform schemes, participate in the formulation of mid-term and long-term planning and development strategies for foreign investment utilization. To examine and approve, according to relevant laws, the establishment and changes thereafter of foreign-invested enterprises with foreign input exceeding the state fixed amount, or engaged in restricted business areas, or in businesses subject to quota and license administration. To verify the contracts and statutes of large-scale projects with foreign investment and their major subsequent changes particularly stipulated in relevant legislations. To supervise the enforcement of laws, regulations, contracts and statutes by foreign-invested enterprises. To guide and oversee nationwide efforts in attracting foreign investment and other business opportunities, as well as the establishment and trade performance of foreign-invested enterprises in China. Comprehensively guide and coordinate the specific work of state-level economic and technological development zones.
(10) To be responsible for China's foreign economic cooperation efforts. To formulate and implement policies and regulations on foreign economic cooperation, guide and monitor the regulation of overseas contract projects, labor cooperation and designing and consulting businesses. To work out administrative measures and specific policies guiding China¡¯s overseas investment. To approve Chinese companies to invest in and set up overseas establishments (excluding financial companies) and supervise their operation.
(11) To be in charge of China's efforts in providing aid to foreign countries and regions. To formulate and implement China's foreign aid policies and plans, and sign the relevant agreements. To compile and execute annual foreign aid programs. To supervise and inspect the implementation of China's foreign aid projects. To manage China's foreign aid fund, concessional loans, special funds and other foreign aid funds of the Chinese government. To facilitate the reform on foreign aid provision modalities.
(12) To formulate and implement economic and trade policies as well as mid-term and long-term trade planning for the Hong Kong Special Administrative Region (HK SAR), Macao Special Administrative Region (Macao SAR) and Taiwan region. To hold economic and trade talks with the competent authorities in charge of trade and economic affairs of HK SAR and Macao SAR as well as authorized non-governmental organizations of Taiwan and sign the relevant documents. To be in charge of the commercial and trade liaison mechanism between the mainland and the HK SAR and Macao SAR. To organize the direct trading activities with Taiwan, and to be responsible for bilateral and multilateral trade issues involving Taiwan.
(13) To be responsible for the training, selection and management of Chinese professionals working in the Permanent Mission of the People's Republic of China To the World Trade Organization, the Economic and Commercial Counselor¡¯s Offices of the Chinese Embassies and missions to other international organizations. To guide the work of the chambers of commerce for import and export and other relevant associations and societies.
(14) To undertake other assignments entrusted by the State Council.
(For more biz stories, please visit Industry Updates)


text:
CD Projekt RED Considered Consoles as 'First-Class Platforms' for Cyberpunk 2077
Mostafa Hossam / Updates / CD Projekt RED, Cyberpunk 2077, PC, Xbox One /
Cyberpunk 2077 really stole the show at E3 2019 with all the new gameplay footage, features, and undoubtedly, the breathtaking Keanu Reeves.
However, console players started getting a little concerned after knowing the PC configurations that ran the Cyberpunk 2077 demo during the convention. CD Projekt RED's Alvin Liu was featured in an interview with WCCFTech, and reassured fans the development team considers console players as their "first class platforms."
A lot of people, after seeing last year's debut gameplay demo and the hardware it was running on, have become a bit wary of how Cyberpunk 2077 could look and run on consoles and low-end PCs. Is that a challenge in terms of optimization for lower-end hardware?
Actually no, we have a very custom engine, the RED Engine. And actually, we're targeting consoles as first class platforms and it looks amazing there. So obviously, if you spent, you know, $2,000 building your PC rig, it's going to look better on that. But the graphics are quite amazing for what you're going to get from Cyberpunk 2077 on consoles and low-end PCs.
Cyberpunk 2077 releases on April 16th next year for PS4, Xbox One, and PC. Recently, the studio talked more on their post-launch plans for the title, and how they plan to handle DLC.
[Source: WCCFTech]

redpajama_set_name: RedPajamaCommonCrawl


text:
Hifazat (Safeguarding) is a 1987 Bollywood drama film directed by Prayag Raj. It stars Anil Kapoor, Madhuri Dixit in pivotal roles. The music of the film was composed by R. D. Burman. Later this movie remade in Telugu as Bobbili Raja.

Plot
After Laxmi has had three still-births, her husband, Satyaprakash and his mother are afraid she will not be able to give any more births, and therefore there will be no one to carry the name of the family forward. So they propose that Satyaprakash gets married for a second time, to which Laxmi consents to and as such he marries Rukmani. After this marriage Laxmi gets pregnant and gives birth to a son, Raj Kumar and shortly thereafter Rukmani too gives birth to a son, Lakhan. Raj Kumar is abducted and disappears from their lives. Thereafter, Satyaprakash is arrested for the murder of a contractor and sentenced to prison. Rukmani and her brother, Buddhiram, take over running the household and inflict abuse on Laxmi. Years later, a young man appears claiming to be the missing son of Laxmi and Satyaprakash, and he attempts to bring some sense and honor for poor Laxmi. But this does not last for long, when Satyaprakash is released from prison, he recognizes the young man, as his fellow prison inmate, and much to the shock and dismay of Laxmi, asks him to leave the house, little knowing that he has now thrown open the door for Buddhiram to kill him and Laxmi.

Cast

Ashok Kumar as Kailashnath
Nutan as Laxmi
Anil Kapoor as Raj Kumar / Ram
Madhuri Dixit as Janki
Lalita Pawar
Pran as Thakur Satyaprakash
Bindu as Rukmini
Kader Khan	as Buddhiram
Shakti Kapoor as Lakhan
Gulshan Grover as Gullu
Sharat Saxena as Shambhu Dada
Shubha Khote as Ganga
Bharat Bhushan as Special Appearance In Song "Ram Ki Baaten Ram Hi Jaane"

Music
The songs were written by Anand Bakshi and music was given R. D. Burman.

External links

1987 films
1980s Hindi-language films
1987 drama films
Films scored by R. D. Burman
Indian drama films
Hindi-language drama films

redpajama_set_name: RedPajamaWikipedia


text:
Q: PHP Equivalent to C# GetBytesFromUTF8 I am trying to create a php function thats will allow me access to a dotnet single sign on system and I am hung up on finding a php equivalent to GetBytesFromUTF8, I have tried ord and mb_string to no avail. Any ideas for a php equivalent to the C# GetBytesFromUTF8?
//Function to Create the SSO function SSO($key,$uid){ $lenth=32; $aZ09 = array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9)); $randphrase ='';

        for($c=0;$c < $lenth;$c++) {
           $randphrase .= $aZ09[mt_rand(0,count($aZ09)-1)];
        }
        //Append key onto phrase end
        $randkey=$randphrase.$key;
        //Number of Bytes is string  (THIS IS THE PROBLEM, ITS JUST ADDING THE STRING LENGTH)
        $bytevalue=mb_strlen($randkey, 'latin1');
        // SHA512 Hash
        //$toencode= utf8_encode($bytevalue);
        $output = hash("sha512", $bytevalue);
        //base 64 encode the hash
        $sso = base64_encode($output);
        $length = mb_strlen($sso);
        $characters = 2;
        $start = $length - $characters;
        $last2 = substr($sso , $start ,$characters);
        //$startitup = APIClient::Create('http://my.staging.dosespot.com/LoginSingleSignOn.aspx','SingleSignOnCode=$ssocode');
        // Yes, Strip the extra ==
        if($last2 == "=="){$ssocode = substr($sso,0,-2);}
        // No, just pass the value to the next step
        else{$ssocode=$sso;}

        //Use first 22 charecters of random.
        $shortphrase=substr($randphrase,0,22);
        //Append uid & key onto shortened phrase end
        $uidv=$uid.$shortphrase.$key;
        //Number of Bytes is string
        $idbytevalue=mb_strlen($uidv, 'latin1');
        //$idbytevalue= strBytes(utf8_encode($uidv));
        // SHA512 Hash
        $idencode= utf8_encode($idbytevalue);
        $idoutput = hash("sha512", $idencode);
        // Base64 Encode of hash
        $idssoe = base64_encode($idoutput);
        //Determine if we need to strip the zeros
        $idlength = mb_strlen($idssoe);
        $idcharacters = 2;
        $idstart = $idlength - $idcharacters;
        $idlast2 = substr($idssoe , $idstart ,$idcharacters);
        if($idlast2 == "=="){$ssouidv = substr($idssoe,0,-2);}
        // No, just pass the value to the next step
        else{$ssouidv=$idssoe;}
        return array($ssocode, $ssouidv);
        }

I am trying to replicate this c#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DoseSpot.EncryptionLibrary
{
    public class EncodingUtility
    {
        public enum encodingOptions : int
        {
            ASCII = 0,
            UTF7,
            UTF8,
            UTF32,
            Unicode,
            Base64String
        }
    public static string GetString(byte[] data, encodingOptions eo)
    {
        switch (eo)
        {
            case encodingOptions.ASCII:
                return ToASCII(data);
            case encodingOptions.Unicode:
                return ToUnicode(data);
            case encodingOptions.Base64String:
                return ToBase64String(data);
            case encodingOptions.UTF7:
                return ToUTF7(data);
            case encodingOptions.UTF32:
                return ToUTF32(data);
            case encodingOptions.UTF8:
            default:
                return ToUTF8(data);
        }
    }
    public static byte[] GetBytes(string message, encodingOptions eo)
    {
        switch (eo)
        {
            case encodingOptions.ASCII:
                return FromASCII(message);
            case encodingOptions.Unicode:
                return FromUnicode(message);
            case encodingOptions.Base64String:
                return FromBase64String(message);
            case encodingOptions.UTF7:
                return FromUTF7(message);
            case encodingOptions.UTF32:
                return FromUTF32(message);
            case encodingOptions.UTF8:
            default:
                return FromUTF8(message);
        }
    }
    protected static string ToBase64String(byte[] data)
    {
        return Convert.ToBase64String(data);
    }
    protected static string ToUnicode(byte[] data)
    {
        return unicode.GetString(data);
    }
    protected static string ToASCII(byte[] data)
    {
        return ascii.GetString(data);
    }
    protected static string ToUTF7(byte[] data)
    {
        return utf7.GetString(data);
    }
    protected static string ToUTF8(byte[] data)
    {
        return utf8.GetString(data);
    }
    protected static string ToUTF32(byte[] data)
    {
        return utf32.GetString(data);
    }
    protected static byte[] FromBase64String(string originalString)
    {
        return Convert.FromBase64String(originalString);
    }
    protected static byte[] FromUnicode(string originalString)
    {
        return unicode.GetBytes(originalString);
    }
    protected static byte[] FromASCII(string originalString)
    {
        return ascii.GetBytes(originalString);
    }
    protected static byte[] FromUTF7(string originalString)
    {
        return utf7.GetBytes(originalString);
    }
    protected static byte[] FromUTF8(string originalString)
    {
        return utf8.GetBytes(originalString);
    }
    protected static byte[] FromUTF32(string originalString)
    {
        return utf32.GetBytes(originalString);
    }
    public static Encoding getEncoding(encodingOptions eo)
    {
        switch (eo)
        {
            case encodingOptions.ASCII:
                return ascii;
            case encodingOptions.UTF7:
                return utf7;
            case encodingOptions.UTF8:
                return utf8;
            case encodingOptions.UTF32:
                return utf32;
            case encodingOptions.Unicode:
            default:
                return unicode;
        }
    }
    private static ASCIIEncoding ascii = new ASCIIEncoding();
       private static UTF8Encoding utf8 = new UTF8Encoding();
       private static UTF7Encoding utf7 = new UTF7Encoding();
       private static UTF32Encoding utf32 = new UTF32Encoding();
        private static UnicodeEncoding unicode = new UnicodeEncoding();
    }

}
    public static class EncryptionCommon
{
    public static int KeyLength = 32;
    public static int PhraseLength = 32;
    public static string CreatePhrase()
    {
        return Randomizer.RandomNumberOfLettersAll(PhraseLength);
    }
    public static string CreateKey()
    {
        return Randomizer.RandomNumberOfLetters(KeyLength);
    }
    public static string Encrypt(string Phrase, string MyKey)
    {
        byte[] data = EncodingUtility.GetBytes(Phrase + MyKey, EncodingUtility.encodingOptions.UTF8);
        byte[] result = new SHA512Managed().ComputeHash(data);
        string tempString = EncodingUtility.GetString(result, EncodingUtility.encodingOptions.Base64String);
        if (tempString.Substring(tempString.Length - 2).ToString().Equals("=="))
            tempString = tempString.Substring(0, tempString.Length - 2);
        return tempString;
    }
    public static string EncryptUserId(string Phrase, int UserId, string MyKey)
    {
        string UserPhrase = UserId.ToString();
        if (Phrase.Length > 22)
            UserPhrase += Phrase.Substring(0, 22);
        else
            UserPhrase += Phrase;
        return Encrypt(UserPhrase, MyKey);
    }
    public static bool VerifyKey(string key, string combinedPhraseAndEncryptedString)
    {
        Dictionary<string, string> myDict = SplitStringIntoPhraseAndHash(combinedPhraseAndEncryptedString);
        string phrase = myDict["phrase"];
        string providedEncryptedPhrase = myDict["encryptedString"];
        string testEncryptedPhrase = Encrypt(phrase, key);
        if (providedEncryptedPhrase.Equals(testEncryptedPhrase))
            return true;
        else
            return false;
    }

    public static Dictionary<string, string> SplitStringIntoPhraseAndHash(string stringToSplit)
    {
        Dictionary<string, string> myResult = new Dictionary<string, string>();
        if (stringToSplit != null && stringToSplit.Trim().Length >= PhraseLength)
        {
            string phraseFound = stringToSplit.Substring(0, PhraseLength);
            string encryptedString = stringToSplit.Substring(PhraseLength);
            myResult.Add("phrase", phraseFound);
            myResult.Add("encryptedString", encryptedString);
        }
        return myResult;
    }

    public static string CreatePhraseEncryptedCombinedString(string phrase, string key)
    {
        string toReturn = phrase;
        toReturn += Encrypt(phrase, key);
        return toReturn;
    }
}

I am trying to replicate this C# process in PHP to no avail.
HOW TO CREATE THE CORRECT SINGLESIGNONCODE:
1. You have been provided a key (in UTF-8)
2. Create a random phrase 32 characters long in UTF-8
a. Create32CharPhrase
3. Append the key to the phrase
   a. Create32CharPhrase + Key
4. Get the value in Bytes from UTF-8 String
   a. GetBytesFromUTF8(Create32CharPhrase + Key)
5. Use SHA512 to hash the byte value you just received
SHA512Hash(GetBytesFromUTF8(Create32CharPhrase + Key))
6. Get a Base64String out of the hash that you created
GetBase64String(SHA512Hash(GetBytesFromUTF8(Create32CharPhrase + Key)))
7. If there are two = signs at the end, then remove them.
RemoveExtraEqualsSigns(GetBase64String(SHA512Hash(GetBytesFromUTF8(Create32CharPhrase
+ Key))))
The Second part of the function...
HOW TO CREATE THE CORRECT SINGLESIGNONUSERIDVERIFY:
1. Grab the first 22 characters of the phrase from step 1
2. Append to the UserId string the 22 characters grabbed from step one
3. (UserId) + (first 22 characters of phrase)
4. Append the key to the string created in 2b
(UserId) +(first 22 characters of phrase) + key
5. Get the Byte value of the string
GetBytesFromUTF8((UserId) + (first 22 characters of phrase) + key)
6. Use SHA512 to hash the byte value you just received
SHA512Hash(GetBytesFromUTF8((UserId) + (first 22 characters of phrase) + key))
7. Get a Base64String out of the hash that you created
8. GetBase64String(SHA512Hash(GetBytesFromUTF8((UserId) + (first 22 characters of phrase) +
key)))
9. If there are two = signs at the end, then remove them.
RemoveExtraEqualsSigns(GetBase64String(SHA512Hash(GetBytesFromUTF8((UserId) + (first 22
characters of phrase) + key))))

A:
Taken out of an edit to the original post

PHP SSO for ASP service
function SSO($key,$uid){
$lenth=32;
$aZ09 = array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9));
$randphrase ='';
        for($c=0;$c < $lenth;$c++) {
           $randphrase .= $aZ09[mt_rand(0,count($aZ09)-1)];
        }
        //echo "Key: ".$key."
";
        //echo "Phrase: ".$randphrase."
";
        //Append key onto phrase end
        $randkey=$randphrase.$key;
        // SHA512 Hash
        $toencode= utf8_encode($randkey);
        // Pass 3rd, optional parameter as TRUE to output raw binary data
        $output = hash("sha512", $toencode, true);
        //base 64 encode the hash binary data
        $sso = base64_encode($output);
        $length = mb_strlen($sso);
        $characters = 2;
        $start = $length - $characters;
        $last2 = substr($sso , $start ,$characters);
        // Yes, Strip the extra ==
        if($last2 == "==")
                        {$ssocode = substr($sso,0,-2);}
        // No, just pass the value to the next step
        else{$ssocode=$sso;}
        // Prepend the random phrase to the encrypted code.
        $ssocode = $randphrase.$ssocode;
        //echo "SSO: ".$ssocode."
";

        //Use first 22 charecters of random.
        $shortphrase=substr($randphrase,0,22);
        //Append uid & key onto shortened phrase end
        $uidv=$uid.$shortphrase.$key;
        // SHA512 Hash
        $idencode= utf8_encode($uidv);
        // Pass 3rd, optional parameter as TRUE to output raw binary data
        $idoutput = hash("sha512", $idencode, true);
        // Base64 Encode of hash binary data
        $idssoe = base64_encode($idoutput);
        //Determine if we need to strip the zeros
        $idlength = mb_strlen($idssoe);
        $idcharacters = 2;
        $idstart = $idlength - $idcharacters;
        $idlast2 = substr($idssoe , $idstart ,$idcharacters);
        if($idlast2 == "==")
                        {$ssouidv = substr($idssoe,0,-2);}
        // No, just pass the value to the next step
        else{$ssouidv=$idssoe;}
        //echo "SSOID: ".$ssouidv;

        return array($ssocode, $ssouidv);
}

redpajama_set_name: RedPajamaStackExchange


text:
---
id: graphql-mutations
title: GraphQL Mutations
slug: /guided-tour/updating-data/graphql-mutations/
description: Relay guide to GraphQl mutations
keywords:
- mutation
---

import DocsRating from '@site/src/core/DocsRating';
import {OssOnly, FbInternalOnly} from 'internaldocs-fb-helpers';

In GraphQL, data in the server is updated using [GraphQL Mutations](https://graphql.org/learn/queries/#mutations). Mutations are *read-write* server operations, which both modify data on the backend, and allow querying for the modified data from the server in the same request.

## Writing Mutations

A GraphQL mutation looks very similar to a query, with the exception that it uses the `mutation` keyword:

```graphql
mutation FeedbackLikeMutation($input: FeedbackLikeData!) {
  feedback_like(data: $input) {
    feedback {
      id
      viewer_does_like
      like_count
    }
  }
}
```

* The mutation above modifies the server data to "like" the specified `Feedback` object. `feedback_like` is a *mutation root field* (or just *mutation field*), which takes specific input and will be processed by the server to update the relevant data on the backend.
* A mutation is handled in two separate steps: first, the update is processed on the server, and then the query is executed. This ensures that you only see data that has already been updated as part of your mutation response.
* The mutation field (in this case, `feedback_like`) returns a specific GraphQL type which exposes the data for which we can query in the mutation response.

<FbInternalOnly>

* The fields you can access on the mutation field are not automatically the same fields you can access in a regular query. [It is a best practice](https://fb.workplace.com/groups/644933736023601/?multi_permalinks=823422684841371) to include the `viewer` object and all updated Ents as part of the mutation response.

</FbInternalOnly>

<OssOnly>

* The fields you can access on the mutation field are not automatically the same fields you can access in a regular query. It is a best practice to include the `viewer` object and all updated entities as part of the mutation response.

</OssOnly>

* In this case, we're querying for the *updated* feedback object, including the updated `like_count` and the updated value for `viewer_does_like`, indicating whether the current viewer likes the feedback object.

<FbInternalOnly>

* Check out the [Hack documentation on writing mutations](https://www.internalfb.com/intern/wiki/Graphql-for-hack-developers/mutation-root-fields/) for information on how to add a mutation field to your backend code.

</FbInternalOnly>

An example of a successful response for the above mutation could look like this:

```json
{
  "feedback_like": {
    "feedback": {
      "id": "feedback-id",
      "viewer_does_like": true,
      "like_count": 1,
    }
  }
}
```

In Relay, we can declare GraphQL mutations using the `graphql` tag too:

```js
const {graphql} = require('react-relay');

const feedbackLikeMutation = graphql`
  mutation FeedbackLikeMutation($input: FeedbackLikeData!) {
    feedback_like(data: $input) {
      feedback {
        id
        viewer_does_like
        like_count
      }
    }
  }
`;
```

* Note that mutations can also reference GraphQL [variables](../../rendering/variables/) in the same way queries or fragments do.

In order to *execute* a mutation against the server in Relay, we can use the `commitMutation` and [useMutation](../../../api-reference/use-mutation) APIs. Let's take a look at an example using the `commitMutation` API:

```js
import type {Environment} from 'react-relay';
import type {FeedbackLikeData, FeedbackLikeMutation} from 'FeedbackLikeMutation.graphql';

const {commitMutation, graphql} = require('react-relay');

function commitFeedbackLikeMutation(
  environment: Environment,
  input: FeedbackLikeData,
) {
  return commitMutation<FeedbackLikeMutation>(environment, {
    mutation: graphql`
      mutation FeedbackLikeMutation($input: FeedbackLikeData!) {
        feedback_like(data: $input) {
          feedback {
            id
            viewer_does_like
            like_count
          }
        }
      }
    `,
    variables: {input},
    onCompleted: response => {} /* Mutation completed */,
    onError: error => {} /* Mutation errored */,
  });
}

module.exports = {commit: commitFeedbackLikeMutation};
```

Let's distill what's happening here:

* `commitMutation` takes an environment, the `graphql` tagged  mutation, and the variables to use for sending the mutation request to the server.
* Note that the `input` for the mutation can be Flow-typed with the autogenerated type available from the *`FeedbackLikeMutation.graphql`* module. In general, the Relay will generate Flow types for mutations at build time, with the following naming format: `*<mutation_name>*.graphql.js`.
* Note that `variables`, `response` in `onCompleted`, and `optimisticResponse` will be typed by providing a single autogenerated type, such as `FeedbackLikeMutation` from the `FeedbackLikeMutation.graphql` module.
* To also strongly type the `optimisticResponse` field, a `@raw_response_type` directive should be added to the mutation query root.
* `commitMutation` also takes `onCompleted` and `onError` callbacks, which will be called when the request completes successfully or when an error occurs, respectively.
* When the mutation response is received, any objects in the mutation response with `id` fields that match records in the local store will *automatically* be updated with the new field values from the response. In this case, it would automatically find the existing `Feedback` object matching the given id in the store, and update the values for its `viewer_does_like` and `like_count` fields.
* Note that any local data updates caused by the mutation will automatically cause components subscribed to the data to be notified of the change and re-render.

## Updating data once a request is complete

There are four ways in which store data is updated when a request is complete:

* If a field is queried from within the mutation field and includes an id field, that record in the local store will automatically be updated with the new values from the response. In the example, because the query includes `feedback` and `id`, Relay will find the existing `Feedback` object that matches the given ID in the store, and update the values for its `viewer_does_like` and `like_count` fields.
    * Note that instead of refetching a fragment after a mutation completes, you can often spread the fragment into the mutation response in order to update the fragment's data as part of the same request.
* If a field is queried from within the mutation field and includes an id field which has the `@deleteRecord` directive, that field will be removed from the store.
* If an edge field is queried from within the mutation field and includes the `@prependEdge` or `@appendEdge` directives, that edge will be prepended or appended to a connection, respectively.
* Lastly, for all updates not covered by the previous three bullet points, updater functions give you full control over how the data in the local store is updated when the request completes.

See the [order of execution section](#order-of-execution-of-updater-functions) for information on what happens when Relay encounters multiple ways to update the data in the store.

## Updater functions

If the updates you wish to perform on the local data are more complex than just updating the values of fields and cannot be handled by the declarative mutation directives, you can provide an `updater` function to `commitMutation` or `useMutation` for full control over how to update the store:

```js
import type {Environment} from 'react-relay';
import type {CommentCreateData, CreateCommentMutation} from 'CreateCommentMutation.graphql';

const {commitMutation, graphql} = require('react-relay');
const {ConnectionHandler} = require('relay-runtime');

function commitCommentCreateMutation(
  environment: Environment,
  feedbackID: string,
  input: CommentCreateData,
) {
  return commitMutation<CreateCommentMutation>(environment, {
    mutation: graphql`
      mutation CreateCommentMutation($input: CommentCreateData!) {
        comment_create(input: $input) {
          comment_edge {
            cursor
            node {
              body {
                text
              }
            }
          }
        }
      }
    `,
    variables: {input},
    onCompleted: () => {},
    onError: error => {},
    updater: store => {
      const feedbackRecord = store.get(feedbackID);

      // Get connection record
      const connectionRecord = ConnectionHandler.getConnection(
        feedbackRecord,
        'CommentsComponent_comments_connection',
      );

      // Get the payload returned from the server
      const payload = store.getRootField('comment_create');

      // Get the edge inside the payload
      const serverEdge = payload.getLinkedRecord('comment_edge');

      // Build edge for adding to the connection
      const newEdge = ConnectionHandler.buildConnectionEdge(
        store,
        connectionRecord,
        serverEdge,
      );

      // Add edge to the end of the connection
      ConnectionHandler.insertEdgeAfter(
        connectionRecord,
        newEdge,
      );
    },
  });
}

module.exports = {commit: commitCommentCreateMutation};
```

Let's distill this example:

* `updater` takes a *`store`* argument, which is an instance of a [`RecordSourceSelectorProxy`](../../../api-reference/store/);  this interface allows you to *imperatively* write and read data directly to and from the Relay store. This means that you have full control over how to update the store in response to the mutation response: you can *create entirely new records*, or *update or delete existing ones*.
    * `updater` takes a second *`payload`* argument, which is the mutation response object. This can be used to retrieve the payload data without interacting with the *`store`*.
* In our specific example, we're adding a new comment to our local store after it has successfully been added on the server. Specifically, we're adding a new item to a connection; for more details on the specifics of how that works, check out our section on [adding and removing items from a connection](../../list-data/updating-connections/).
    * There is no need for an updater in this example — it would be a great place to use the `@appendEdge` directive instead!
* Note that the mutation response is a *root field* record that can be read from the `store`, specifically using the `store.getRootField` API. In our case, we're reading the `comment_create` root field, which is a root field in the mutation response.
* Note that the `root` field of the mutation is different from the `root` of queries, and `store.getRootField` in the mutation updater can only get the record from the mutation response. To get records from the root that's not in the mutation response, use `store.getRoot().getLinkedRecord` instead.
* Note that any local data updates caused by the mutation `updater` will automatically cause components subscribed to the data to be notified of the change and re-render.

## Optimistic updates

Oftentimes, we don't want to wait for the server response to complete before we respond to user interaction. For example, if a user clicks the "Like" button, we don't want to wait until the mutation response comes back before we show them that the post has been liked; ideally, we'd do that instantly.

More generally, in these cases we want to immediately ** update our local data *optimistically,* in order to improve perceived responsiveness; that is, we want to update our local data to immediately reflect what it would look like after the mutation *succeeds*. If the mutation ends up *not* succeeding, we can roll back the change and show an error message, but we're *optimistically* expecting the mutation to succeed most of the time.

In order to do this, Relay provides two APIs to specify an optimistic update when executing a mutation:

### Optimistic Response

When you can predict what the server response for a mutation is going to be, the simplest way to optimistically update the store is by providing an `optimisticResponse` to `commitMutation`:

```js
import type {Environment} from 'react-relay';
import type {FeedbackLikeData, FeedbackLikeMutation} from 'FeedbackLikeMutation.graphql';

const {commitMutation, graphql} = require('react-relay');

function commitFeedbackLikeMutation(
  environment: Environment,
  feedbackID: string,
  input: FeedbackLikeData,
) {
  return commitMutation<FeedbackLikeMutation>(environment, {
    mutation: graphql`
      mutation FeedbackLikeMutation($input: FeedbackLikeData!)
        @raw_response_type {
        feedback_like(data: $input) {
          feedback {
            id
            viewer_does_like
          }
        }
      }
    `,
    variables: {input},
    optimisticResponse: {
      feedback_like: {
        feedback: {
          id: feedbackID,
          viewer_does_like: true,
        },
      },
    },
    onCompleted: () => {} /* Mutation completed */,
    onError: error => {} /* Mutation errored */,
  });
}

module.exports = {commit: commitFeedbackLikeMutation};
```

Let's see what's happening in this example.

* The `optimisticResponse` is an object matching the shape of the mutation response, and it simulates a successful response from the server. When `optimisticResponse`, is provided, Relay will automatically process the response in the same way it would process the response from the server, and update the data accordingly (i.e. update the values of fields for the record with the matching id).
    * In this case, we would immediately set the `viewer_does_like` field to `true` in our `Feedback` object, which would be immediately reflected in our UI.
* If the mutation *succeeds*, *the optimistic update will be rolled back,* and the server response will be applied.
* If the mutation *fails*, *the optimistic update will be rolled back,* and the error will be communicated via the `onError` callback.
* Note that by adding `@raw_response_type` directive,  the type for `optimisticResponse` is generated.

### Optimistic updater

However, in some cases we can't statically predict what the server response will be, or we need to optimistically perform more complex updates, like deleting or creating new records, or [adding and removing items from a connection](../../list-data/updating-connections/). In these cases we can provide an `optimisticUpdater` function to `commitMutation`. For example, in addition to setting `viewer_does_like` to true, we can increment the `like_count` field by using an `optimisticUpdater` instead of an `optimisticResponse`:

```js
import type {Environment} from 'react-relay';
import type {FeedbackLikeData} from 'FeedbackLikeMutation.graphql';

const {commitMutation, graphql} = require('react-relay');

function commitFeedbackLikeMutation(
  environment: Environment,
  feedbackID: string,
  input: FeedbackLikeData,
) {
  return commitMutation(environment, {
    mutation: graphql`
      mutation FeedbackLikeMutation($input: FeedbackLikeData!) {
        feedback_like(data: $input) {
          feedback {
            id
            like_count
            viewer_does_like
          }
        }
      }
    `,
    variables: {input},
    optimisticUpdater: store => {
      // Get the record for the Feedback object
      const feedbackRecord = store.get(feedbackID);

      // Read the current value for the like_count
      const currentLikeCount = feedbackRecord.getValue('like_count');

      // Optimistically increment the like_count by 1
      feedbackRecord.setValue((currentLikeCount ?? 0) + 1, 'like_count');

      // Optimistically set viewer_does_like to true
      feedbackRecord.setValue(true, 'viewer_does_like');
    },
    onCompleted: () => {} /* Mutation completed */,
    onError: error => {} /* Mutation errored */,
  });
}

module.exports = {commit: commitFeedbackLikeMutation};
```

Let's see what's happening here:

* The `optimisticUpdater` has the same signature and behaves the same way as the regular `updater` function, the main difference being that it will be executed immediately, before the mutation response completes.
* If the mutation succeeds, *the optimistic update will be rolled back,* and the server response will be applied.
    * Note that if we used an `optimisticResponse`, we wouldn't able to statically provide a value for `like_count`, since it requires reading the current value from the store first, which we can do with an `optimisticUpdater`.
    * Also note that when mutation completes, the value from the server might differ from the value we optimistically predicted locally. For example, if other "Likes" occurred at the same time, the final `like_count` from the server might've incremented by more than 1.
* If the mutation *fails*, *the optimistic update will be rolled back,* and the error will be communicated via the `onError` callback.
* Note that we're not providing an `updater` function, which is okay. If it's not provided, the default behavior will still be applied when the server response arrives (i.e. merging the new field values for `like_count` and `viewer_does_like` on the `Feedback` object).

:::note
Remember that any updates to local data caused by a mutation will automatically notify and re-render components subscribed to that data.
:::

## Order of execution of updater functions

In general, execution of the `updater` and optimistic updates will occur in the following order:

* If an `optimisticResponse` is provided, Relay will use it to merge the new field values for the records that match the ids in the `optimisticResponse`.
* If an `optimisticUpdater` is provided, Relay will execute it and update the store accordingly.
* If an `optimisticResponse` was provided, the declarative mutation directives `@deleteRecord`, `@appendEdge` and `@prependEdge` will be processed on the optimistic response.
* If the mutation request succeeds:
    * Any optimistic update that was applied will be rolled back.
    * Relay will use the server response to merge the new field values for the records that match the ids in the response.
    * If an `updater` was provided, Relay will execute it and update the store accordingly. The server payload will be available to the `updater` as a root field in the store.
    * Relay will process any `@deleteRecord`, `@appendEdge` and `@prependEdge` declarative mutation directives.
* If the mutation request fails:
    * Any optimistic update was applied will be rolled back.
    * The `onError` callback will be called.

### Full example

This means that in more complicated scenarios you can still provide many options: `optimisticResponse`, `optimisticUpdater` and `updater`. For example, the mutation to add a new comment could like something like the following (for full details on updating connections, check out our [Updating Connections](../../list-data/updating-connections/) guide):

```js
import type {Environment} from 'react-relay';
import type {CommentCreateData, CreateCommentMutation} from 'CreateCommentMutation.graphql';

const {commitMutation, graphql} = require('react-relay');
const {ConnectionHandler} = require('relay-runtime');

function commitCommentCreateMutation(
  environment: Environment,
  feedbackID: string,
  input: CommentCreateData,
) {
  return commitMutation<CreateCommentMutation>(environment, {
    mutation: graphql`
      mutation CreateCommentMutation($input: CommentCreateData!) {
        comment_create(input: $input) {
          feedback {
            id
            viewer_has_commented
          }
          comment_edge {
            cursor
            node {
              body {
                text
              }
            }
          }
        }
      }
    `,
    variables: {input},
    onCompleted: () => {},
    onError: error => {},

    // Optimistically set the value for `viewer_has_commented`
    optimisticResponse: {
      feedback: {
        id: feedbackID,
        viewer_has_commented: true,
      },
    },

    // Optimistically add a new comment to the comments connection
    optimisticUpdater: store => {
      const feedbackRecord = store.get(feedbackID);
      const connectionRecord = ConnectionHandler.getConnection(
        userRecord,
        'CommentsComponent_comments_connection',
      );

      // Create a new local Comment from scratch
      const id = `client:new_comment:${randomID()}`;
      const newCommentRecord = store.create(id, 'Comment');

      // ... update new comment with content

      // Create new edge from scratch
      const newEdge = ConnectionHandler.createEdge(
        store,
        connectionRecord,
        newCommentRecord,
        'CommentEdge' /* GraphQl Type for edge */,
      );

      // Add edge to the end of the connection
      ConnectionHandler.insertEdgeAfter(connectionRecord, newEdge);
    },
    updater: store => {
      const feedbackRecord = store.get(feedbackID);
      const connectionRecord = ConnectionHandler.getConnection(
        userRecord,
        'CommentsComponent_comments_connection',
      );

      // Get the payload returned from the server
      const payload = store.getRootField('comment_create');

      // Get the edge from server payload
      const newEdge = payload.getLinkedRecord('comment_edge');

      // Add edge to the end of the connection
      ConnectionHandler.insertEdgeAfter(connectionRecord, newEdge);
    },
  });
}

module.exports = {commit: commitCommentCreateMutation};
```

Let's distill this example, according to the execution order of the updaters:

* Given that an `optimisticResponse` was provided, it will be executed *first*. This will cause the new value of `viewer_has_commented` to be merged into the existing `Feedback` object, setting it to `true`.
* Given that an `optimisticUpdater` was provided, it will be executed next. Our `optimisticUpdater` will create new comment and edge records from scratch, simulating what the new edge in the server response would look like, and then add the new edge to the connection.
* When the optimistic updates conclude, components subscribed to this data will be notified.
* When the mutation succeeds, all of our optimistic updates will be rolled back.
* The server response will be processed by relay, and this will cause the new value of `viewer_has_commented` to be merged into the existing `Feedback` object, setting it to `true`.
* Finally, the `updater` function we provided will be executed. The `updater` function is very similar to the `optimisticUpdater` function, however, instead of creating the new data from scratch, it reads it from the mutation payload and adds the new edge to the connection.

## Invalidating data during a mutation

The recommended approach when executing a mutation is to request *all* the relevant data that was affected by the mutation back from the server (as part of the mutation body), so that our local Relay store is consistent with the state of the server.

However, often times it can be unfeasible to know and specify all the possible data the possible data that would be affected for mutations that have large rippling effects (e.g. imagine "blocking a user" or "leaving a group").

For these types of mutations, it's often more straightforward to explicitly mark some data as stale (or the whole store), so that Relay knows to refetch it the next time it is rendered. In order to do so, you can use the data invalidation APIs documented in our [Staleness of Data section](../../reusing-cached-data/staleness-of-data/).

<FbInternalOnly>

## Handling errors

GraphQL errors can largely be differentiated as:

1. Operation (query/mutation/subscription) level errors, and
2. Field level errors

### Surfacing mutation level errors

If you're surfacing an error in the mutation (eg the server rejects the entire mutation because it's invalid), as long as the error returned is considered a [`CRITICAL`](https://www.internalfb.com/code/www/[b5a08782893a]/flib/graphql/experimental/core/error/GraphQL2ErrorSeverity.php?lines=11) error, you can make use of the `onError` callback from useMutation to handle that error in whatever way you see fit for your use case.

If you control the server resolver, the question you should ask is whether or not throwing a CRITICAL error is the correct behavior for the client. Note though that throwing a CRITICAL error means that Relay will no longer process the interaction, which may not always be what you want if you can still partially update your UI. For example, it's possible that the mutation errored, but still wrote some data to the database, in which case you might still want Relay to process the updated fields.

In the non-CRITICAL case the mutation may have failed, but some data was successfully returned in the case of partial data and/or the error response if encoded in the schema. Relay will still process this data, update its store, as well as components relying on that data. That is not true for the case where you've returned a CRITICAL error.

### Surfacing field level errors
Field level errors from the server are generally recommended to be at the [`ERROR`](https://www.internalfb.com/code/www/[9120ab8aa8a5]/flib/graphql/experimental/core/error/GraphQL2ErrorSeverity.php?lines=17) level, because your UI should still be able to process the other fields that were successfully returned. If you want to explicitly handle the field level error, then we still recommend [modeling that](../../rendering/error-states/#accessing-errors-in-graphql-responses) in your schema.

</FbInternalOnly>

## Mutation queueing

> TBD: Left to be implemented in user space

<DocsRating />

redpajama_set_name: RedPajamaGithub


SAN FRANCISCO, CA - MAR 25, 2015: Illustrative editorial clip of macro ECU of user moving cursor and clicking on Twitter 'Follow' button. Clip demonstrates ubiquity of social media in everyday life.
4k00:13Wider macro close up with flickerless display as an employer moves a cursor and clicks to post a job on a popular social networking career website.
4k00:17TOKYO, JAPAN - SEPTEMBER 1, 2018: Macro close up as user clicks on Twitter 'follow' button; button changes form to say 'following' afterwards. Social media users usually aim to increase followers.
hd01:05LOS ANGELES, CA - CIRCA MARCH 2016 - Macro ECU user points cursor at Facebook 'Friends' banner and clicks on it, turning it blue. Having many friends is a sign of social media success.
4k00:07Searching for vaccines on the Internet. Typing keyword in www browser on computer, smartphone or tablet. Close view of screen display with pixels.
4k00:07Searching for business on the Internet. Typing keyword in www browser on computer, smartphone or tablet. Close view of screen display with pixels.
4k00:07Searching for music on the Internet. Typing keyword in www browser on computer, smartphone or tablet. Close view of screen display with pixels.
4k00:07Searching for health on the Internet. Typing keyword in www browser on computer, smartphone or tablet. Close view of screen display with pixels.


text:
by Micheal Bowen & r & & r & I Am a Sex Addict & r & The cover photo of this DVD isn't very racy, but someone had turned it toward the wall anyway. Happens all the time, according to the Blockbuster clerk: "Anything provocative, they'll try to cover it up," she said.
Lord, save us from self-righteous censors. Because the people who might learn most from watching I Am a Sex Addict (Not Rated) just might be the ones most in denial about their sexual urges.
Why assume that a movie with a title like this glamorizes sex? Filmmaker Caveh Zahedi, by fictionalizing his own life, uncovers the tawdriness of addiction: nervous dickering with bored prostitutes, quick blowjobs in parking lots. Just to get his orgasmic high, Zahedi degrades himself in all kinds of ways. He's like a crackhead who smokes with his penis.
While narrating his own life on camera, he grins and gapes, as if amazed and amused by the risky stupidities of his life. Zahedi -- rather a homely little putz, you wonder what the wives and girlfriends saw in him -- admits that he's not a very good actor, even when re-enacting events he himself lived through. (At one point, he plays an audiotape of himself crying.) He distances himself from his own life (quirky animation, analysis of his own most embarrassing moments). And yet reality has a way of intruding: The actresses he hires to portray his wives and girlfriends themselves turn out, in real life, to be promiscuous, prudish, addicted -- reflections of himself.
Sex Addict has its flaws, of course. Just because Zahedi is honest about his mistreatment of women doesn't make it right. And the DVD's extras -- three making-of sequences -- are self-indulgent, gratuitous, not worth watching.
The final, hopeful sequence, however -- a Steadicam look at an addict's having (mostly) stifled his problem and (mostly) making something constructive out of his life -- has sentimental impact, even for a guy (like Zahedi himself) who can't cry convincingly.
Addicts, essentially, are optimists: They're sure the next high will be the best yet. Zahedi learns to replace hope for a great fix with hope for a better future, free of compulsions.
I Am a Sex Addict is quite funny in spots, sobering in others, and far from being immoral. People shouldn't turn their backs on it.
Meet the students behind a wave of Spokane protests calling for action to end school shootings
#MeToo... Now What?
By Stephanie Cates
Ami Strahan confronts life on her own after losing her husband to freak accident, then her son at the Freeman High School shooting
By Mitch Ryals
Rendezvous in the Park @ East City Park
More by n/a
Iron Upgrade
Get Out the Vote
Seeing Gay


Nie Yan walked out of the academic examination room and let out a long sigh of relief. The maximum score on this hour-long exam was 720 points. But the questions were so hard he'd be happy with just 500. There were even a bunch of concepts he knew practically nothing about.
"How'd you do?" Zhai Hao asked. He and Xia Ling had been fretting endlessly this whole time.
"I heard the benchmark for an Ace in both command and interstellar travel is 600 points," Xia Ling added.
"Don't worry about it. If I get in, I get in. If not, so be it." Nie Yan laughed off their worries. Getting into the Top Military Academy was good enough for him. Being selected as an Ace was simply too much to hope for. With the Top Military Academy's admission notice in hand, he could already be considered a part of certain powerful influences. Others would have to think twice before making a move against him, because acting against the academy's students would be provoking the Top Military Academy's prestige. Even if major consortiums had some background, they had to tread carefully around the academy. If they went too far, the academy's alumni could easily take them down!
This was the main reason he wanted to join the Top Military Academy. The identity of a student there would be an extra layer of security for him. His status alone would deter his enemies from using underhanded means to rough him up.
Nie Yan immediately informed his parents about his admission into the Top Military Academy. Father and Mother Nie were both ecstatic, especially his father. One of Father Nie's greatest regrets in life was not getting into the Top Military Academy. So, when he heard his son had succeeded where he had not, he almost burst into tears. At long last, he saw this dream of his fulfilled through his son.
Nie Yan could clearly hear his father's voice quivering on the other side of the call. He thought back to when he got rejected in the previous timeline, and the utter disappointment on his father's face at the time. The contrast between the sad memory back then and the now-reversed situation filled Nie Yan with an indescribable emotion.
This time, he had no regrets.
Nie Yan joined his friends for a celebratory meal. They ate, sang, and drank heartily under the restaurant's red lighting. He and Xie Yao were both pushed into drinking more and more until they got more than a little tipsy.
After the meal, Nie Yan stared at Xie Yao. The alcohol flushed her skin, giving her cheeks an additional redness that only added to her charm. She didn't have an overcoat on, only a white wool jumper that perfectly accentuated her curves. She was like an enchantress who drew men's eyes wherever she went.
Including Tang Yao, there were nine of them there. Tang Yao had to leave early, but the rest of them kept having fun until around one in the afternoon. That was when four more people left, leaving only Nie Yan, Xie Yao, Zhai Hao, and Xia Ling. With just the four of them, the atmosphere suddenly became a lot more intimate.
Zhai Hao and Xia Ling quickly made themselves scarce.
Nie Yan looked at Xie Yao, who lowered her head in embarrassment and nervously pushed her hair behind her shoulder. The red light bounced off her face, creating a charming halo around her head. As Nie Yan looked at Xie Yao, he thought she couldn't be any less beautiful than the goddess Aphrodite.
"I'll send you home," Nie Yan offered with a courteous bow to his lady.
"Yes," Xie Yao answered, a little too quickly. She could feel Nie Yan's heated gaze on her as she became increasingly aware that the two of them were alone in a fairly small private room. How could she not be nervous?
Nie Yan looked once more at Xie Yao in the dim light, his thoughts clouded by alcohol. His mind suddenly conjured a picture of that night with Yao Yao in the secret chamber under Fenarte. That exquisitely charming figure! Her beautiful jade-white body! Yao Yao's silhouette overlapped with Xie Yao's as he drunkenly entertained the possibility that the two were one and the same. His blood began to boil and an intense heat arose in his lower abdomen. The physical sensation abruptly snapped him back into the present.
"Xie Yao," Nie Yan whispered gently. He quietly slid one arm around her slender waist, holding her within his embrace. He could feel her body instinctively tense, lightly struggling against his touch.
A familiar feeling overwhelmed Nie Yan's drunken senses. It felt so distant, yet so close.
Perhaps it was the wine, but Nie Yan's mind became foggy with nothing but a loud buzzing noise. He hugged Xie Yao even more tightly and pressed her down against the couch. He leaned in toward her and pushed his lips on hers. Instantly, the buzzing fog was replaced with an overload of silky softness.
Nie Yan could think of nothing but that night as a primal desire filled his body.
Xie Yao hadn't known Nie Yan's feelings for her were so strong, and had no way to know how deeply rooted they were.
Everything happened too quickly. Xie Yao hastily tried to shove Nie Yan away with both hands, but she couldn't budge him at all. Nie Yan was far stronger than her in the first place, and her body had become soft and powerless the moment his arm circled around her.
Nie Yan's hand roamed her body, from her tall, perky chest to her thin, taekwondo-trained legs before slipping beneath her jumper and continuing to explore.
Xie Yao could feel Nie Yan's large hand exploring her every curve, but she still jumped when it made contact with her belly. As his hand continued to inch upwards, she began squirming in protest, but it was just a token resistance.
With no idea how far Nie Yan was going to take this, Xie Yao felt her heart race as her emotions bubbled turbulently within her.
The moment Nie Yan reached behind her smooth shoulder and touched the clasp of her bra, Xie Yao's struggles suddenly gained strength. Although her heart already belonged solely to Nie Yan, she wasn't quite ready to take the next step yet. It was just too soon.
The frenzied protest snapped Nie Yan out of his drunken haze. He instantly realized he had gone too far. Sitting up, he shook his head to try and clear it. Still somewhat dizzy, he looked at Xie Yao. Her clothes were a mess and her snow-white belly was still exposed.
Xie Yao hurriedly sat up as well and hastily straightened out her clothes. She felt extremely shy about what just happened. When she thought further to what might have been, she was too embarrassed to even look in Nie Yan's direction.
"...I'm sorry," Nie Yan sincerely apologized. The thought that Yao Yao and Xie Yao might be the same person really had too big of an impact on him. If today's events offended Xie Yao and caused her to have a bad impression of him, he would never forgive his own stupidity!
With her face burning red, Xie Yao looked at him mutely for a bit before quietly saying, "Drive me home, please." She had been rather upset by Nie Yan's audacity, but she couldn't stay angry at him after seeing the sincere look on his face. Her discontent vanished completely after hearing his heartfelt apology.
"Okay." Nie Yan stood up.
Xie Yao fussed with her clothes one last time before standing up as well. As she stood, she felt a sudden weakness in her knees and almost collapsed back onto the couch.
Nie Yan immediately put his arm behind her to keep her from falling.
"I think I drank a little too much," Xie Yao said awkwardly. She couldn't muster up even an ounce of strength.
"Don't worry. I'll carry you to my car. I keep sobriety pills in the glove compartment," Nie Yan said. Once they took sobriety pills, the alcohol's effect would be gone in no time.
"No!" Xie Yao vehemently shook her head. It was the middle of the day, so there were bound to be people out and about. A strong guy carrying a drunk girl to his car in broad daylight would surely cause a large commotion.
Nie Yan twisted his neck to look at her swaying figure. After a moment, he smiled brightly at her before turning around to lift her into a piggyback ride.
Xie Yao let out a startled yelp when she felt herself rising into the air. Her heart raced in panic before quickly settling down again. For some reason, being supported by Nie Yan's sturdy back made her feel safe.
Nie Yan carried Xie Yao to his car. After both of them took a sobriety pill, they felt much better.
The two of them sat wordlessly in the car, creating a tranquil silence as they tried to avoid thinking about the embarrassing events inside the restaurant.
"Let's go," Xie Yao said softly. Even now, she had no idea how she could face Nie Yan ever again.
Cloudwater District? Nie Yan jumped in his seat. Wasn't that where he lived? However, it made sense. Built around the lake with excellent view and refreshing air, Cloudwater was ranked the number one neighbourhood in Huahai. It had the largest concentration of wealthy elites in all of the city. Given Xie Yao's background, it was no surprise her family lived there.
However, Cloudwater was huge. Since Nie Yan had never bumped into her in the previous timeline, he figured she probably didn't live very close to him; otherwise, he would have definitely seen her at one point or another.
The congregation of wealthy families was the main reason Father Nie decided to settle in the Cloudwater District. He subscribed to the famous saying, "Live near wealth, be near wealth." In fact, Cloudwater residents would often hold events exclusively for their neighbours. Being invited to these banquets was an incredible opportunity for the Nie Family because it opened the door to influential connections and wealthy contacts.
"Really?" Xie Yao asked in surprise.
As Nie Yan and Xie Yao continued to chat, the car sped toward the address Xie Yao provided. It was just as Nie Yan had thought: she lived pretty far away from him. They lived on different sides of the lake, and even used different entrances to the neighborhood. Since one family used the South Gate and the other used the West Gate, it was no wonder they never came across each other.
Nie Yan stopped the car in front of Xie Yao's house and watched her enter the front door before finally heading home.
When Nie Yan got home, he walked into his surprise party. His parents had invited friends and family for this grand occasion. They watched happily as everyone praised their son, proudly basking in his glory.
The lively festivities continued for two hours before the guests left.
Father Nie, still exuberant about Nie Yan's acceptance, began talking about company matters with his son. As the Tuoba Family and Century Financial Group fought each other and both sides took hit after hit, he took the opportunity to use a large amount of capital to buy as many of Tuoba Hongye's shares as he could. By now, Father Nie's total capital was staggeringly massive, almost enough to be alarming.
Nie Yan thought it over. His father's actions against Tuoba Hongye would also indirectly help Tuoba Time. It seemed as if the Tuoba Family's problems were far from over.
"Say, son, what do you think we should do next?" Father Nie looked at Nie Yan and asked. He wanted to see if his son had any thoughts about the situation.
Father Nie thought about it for a while before slowly nodding in agreement. Nie Yan's words made sense, but the specifics still required careful research and planning.


text:
S&P booked a line of credit for a Discount Store out of…
http://sandplending.com/wp-content/uploads/2023/02/Discount-Store-SP-deal-card-020123.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2023-02-01 22:34:422023-02-08 22:37:07Discount Store
S&P booked a line of credit for a property management company…
http://sandplending.com/wp-content/uploads/2023/02/Property-Management-card-SP-013123.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2023-01-31 22:12:572023-02-08 22:14:35Property Management
Audio Equipment Company
S&P booked a line of credit for an audio equipment company…
http://sandplending.com/wp-content/uploads/2023/02/Audio-Equipment-Company-SP-card-011523-.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2023-01-15 22:24:002023-02-08 22:26:39Audio Equipment Company
Real Estate Investor
S&P booked a line of credit for a real estate investor out…
http://sandplending.com/wp-content/uploads/2023/02/Real-Estate-Investor-SP-010823.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2023-01-08 22:14:472023-02-08 22:18:20Real Estate Investor
Property Management Co
http://sandplending.com/wp-content/uploads/2023/01/Property-Manager-Company-SP-123022.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2022-12-30 22:29:002023-01-12 22:33:43Property Management Co
Restaurant Consulting Firm
S&P booked a line of credit for a restaurant consulting…
http://sandplending.com/wp-content/uploads/2023/01/Restaurant-Consulting-Firm-SP-122222.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2022-12-22 21:54:002023-01-12 21:58:05Restaurant Consulting Firm
S&P booked a cash-out refinance for a single-family investment…
Healthcare Company
S&P booked a line of credit for a healthcare company out…
http://sandplending.com/wp-content/uploads/2023/01/Healthcare-Company-SP-121722.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2022-12-17 21:42:002023-01-12 21:45:53Healthcare Company
S&P booked an unsecured line of credit for a food truck…
http://sandplending.com/wp-content/uploads/2022/12/Food-Truck-SP-110522.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2022-12-12 21:45:462022-12-12 21:45:47Food Truck
Marketing Company
S&P booked an unsecured line of credit for a marketing company…
http://sandplending.com/wp-content/uploads/2023/01/Marketing-Company-SP-card-011223.png 800 800 S & P Lending http://sandplending.com/wp-content/uploads/2017/04/sp-logo.png S & P Lending2022-12-08 21:07:002023-01-12 21:10:05Marketing Company
Proud to serve Tennessee
Success Stories Archives
© Copyright - Southern & Pacific Lending Group Site Designed by UrVoyce - powered by Enfold WordPress Theme


Light winds again on the second racing day of the Audi MedCup Circuit's Marseille Trophy.
The 52 Series fleet raced on Marseille's two main race arenas: the first the Rade Nord in a light and fitful sub 10 knot sou'easterly breeze and the second on the Rade Sud in a 9-13 knot southerly.
Quantum Racing rode the rollercoaster today after a win in the first race they plummeted to eighth in the second thanks to a late start off the line and picking the wrong side of the course on the first crucial beat. Synergy sit one point behind the Americans with a seventh and a second for the day, while RAN was most consistent with a second and a fourth.
Quantum's strong start was key to winning the first race, where they dominated from the first beat. RAN's pin end start and prudent tactics in the best pressure allowed them to stay well clear of Audi Azzurra Sailing Team. There was drama further back when Audi All4ONE blew their kite at the final hoist while Synergy copped two penalty turns for fouling Gladiator at the windward mark.
In the second race on the Rade Sud course the breeze built offshore, to the right and All4ONE took advantage. For the next two legs the Franco-German crew lead by Jochen Schuemann looked the goods for their first win here, but the late afternoon breeze had other ideas and dropped on the right of the run. Chris Main, Gladiator's tactician made the early call to work offshore and the British crew were rewarded with steady gains, able to finally gybe inside Synergy to win their first race on the Audi MedCup Circuit, on only their second day racing.


Direct Numerical Simulation (DNS) and Large Eddy Simulation (LES) are performed of a round fluid jet entering a high-pressure chamber. The chemical compositions and temperatures of the jet and that of the fluid in the chamber are initially prescribed. The governing equations consist of the conservation equations for mass, momentum, species and energy, and are complemented by a real-gas equation of state. The fluxes of species and heat are written in the framework of fluctuation-dissipation theory and include Soret and Dufour effects. For more than two species, the full mass diffusion and thermal diffusion matrices are computed using high-pressure mixing rules which utilize as building blocks the corresponding binary diffusion coefficients. The mixture viscosity and thermal conductivity are computed using standard mixing rules and corresponding states theory. To evaluate the physical model and numerical method, LES is employed first to simulate a supercritical N_2 jet injected into N_2. Time averaged results show reasonable agreement with the experimental data. Then, DNS is conducted to study the spatial evolution of a supercritical N_2 jet injected into CO_2. Time averaged results are used to compute the length of the potential core and the species diffusion characteristics. Spectral analysis is then applied on a time series data obtained at several axial locations and a dominant frequency is observed inside the potential core.
© 2017 The Authors. Published under licence by IOP Publishing Ltd. Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. This study was conducted at the California Institute of Technology under the sponsorship of the Department of Energy (DoE), Basic Energy Sciences with Drs. Wade Sisk and Mark Pederson as Program Managers and by the Army Research Office with Dr. Ralph Anthenien as Program Manager. Computational time was provided by the NASA Ames Supercomputing Center under the Transformational Tools and Technologies (T3) Project directed by Dr. Michael Rogers and by NERSC under DoE sponsorship.


text:
Home › Home Goods › Raven Story Stamp Signature Sheets
Raven Story Stamp Signature Sheets
Sheet Only - $ 23.00 USD Framed - $ 23.00 USD
On July 30, 2021 the United States Postal Service issued the Raven Story stamp designed by Rico Worl, founder of Trickster Company!
Sold as a full sheet of 20 stamps with Rico's signature on the bottom right. Order framed or sheet only.
The outside dimension of the frame is approximately 12-3/8" wide X 11-3/8" tall with clear acrylic cover. The frame has a flat profile face that is 1 ¼" wide. It's made from a North American hardwood (Poplar) that's finger-jointed and finished with a decorative wood pattern wrap.
Artist signature sheets available exclusively at Trickster Company!
Merging traditional artwork with modern design touches, this stamp depicts one of many stories about Raven, a figure of great significance to the Indigenous people of the northern Northwest Coast, part of the area that ranges from Southeast Alaska through coastal British Columbia and south into Washington state.
Inspired by the traditional story of Raven setting free the sun, the moon, and the stars, Tlingit/Athabascan artist Rico Worl depicts Raven just as he escapes from his human family and begins to transform back into his bird form.
Among the cultures of the region—which include the Tlingit, the Tsimshian, the Haida, the Kwakwaka'wakw, and others—the raven plays an essential role in many traditional tales, including stories about the creation of the world. The different peoples of the northern Northwest Coast each have their own culturally specific versions of the raven story, which often convey customs, ethics, and cultural inheritances that help communities preserve or affirm their identities.
Antonio Alcalá served as art director for this stamp.
The Raven Story stamp is being issued as a Forever® stamp. This Forever stamp is always equal in value to the current First-Class Mail® one-ounce price.


text:
Der Getreidekapuziner (Rhyzopertha dominica, Syn.: Rhizopertha dominica)  ist ein Käfer aus der Familie der Bohrkäfer (Bostrichidae). Seinen deutschsprachigen Namen verdankt er der Tatsache, dass sein Halsschild den Kopf kapuzenartig überdeckt und sowohl die adulten Tiere als auch die Larven an Getreide fressen. In Getreidespeichern und Mühlen kann der Käfer große Schäden verursachen.

Merkmale
Der Getreidekapuziner wird 2 bis 3 Millimeter lang. Er ist oberseits meist kastanienbraun bis dunkelbraun gefärbt, die Färbung kann auch ganz dunkel bis schwarz sein. Die Beine und die Bauchseite sind hellbraun. Sein gewölbter Halsschild, unter dem sich der Kopf verbirgt, ist so breit wie der Körper, was dem Käfer insgesamt eine walzenförmige Gestalt verleiht. Die Deckflügel sind nur schwach behaart, aber mit Längsreihen eingesenkter grober Punkte versehen, die nach hinten zu feiner werden. Solche Einsenkungen gibt es auch auf dem Halsschild, dort sind die einzelnen Punkte jedoch meist zu Furchen verschmolzen. Am Hinterende sind die Deckflügel gerundet. Dies ist eines der wichtigsten Unterscheidungsmerkmale zum Großen Kornbohrer (Prostephanus truncatus), der abgestutzte, nahezu rechteckig geformte Enden an den Flügeldecken aufweist. Die letzten drei Glieder der zehngliedrigen Antennen sind beim Getreidekapuziner ebenso wie beim Großen Kornbohrer keulenförmig und deutlich größer als die restlichen.

Verbreitung
Der Getreidekapuziner stammt ursprünglich aus Südostasien. Im tropischen und subtropischen Klima findet er die besten Bedingungen für eine rasche Vermehrung. In den Ländern dieser Region kann sich eine Population in jedem Monat um das Zwanzigfache vergrößern und erhebliche Schäden an gelagertem Getreide, vor allem an ungeschältem Reis, aber auch an anderen Lebensmittelvorräten anrichten. Mit den Nahrungsmitteltransporten konnte sich der Käfer weltweit verbreiten. Er lebt heute als Neozoon in allen wärmeren Gebieten Asiens, in ganz Australien, in Europa einschließlich weiter Teile Nordeuropas, in Afrika und in Süd- und Nordamerika bis in den Süden Kanadas. In den USA wurde der Getreidekapuziner, der im Englischen Lesser Grain Borer genannt wird, während des Ersten Weltkrieges mit Getreidelieferungen aus Australien eingeschleppt.

Lebensweise
Neben verschiedenen Getreidesorten wie Reis, Mais und Weizen kann der Getreidekapuziner auch andere Nahrungsquellen nutzen, darunter verschiedene Nüsse, Kakaobohnen, Hülsenfrüchte, Sonnenblumenkerne und sogar getrockneten Fisch. Er kann mit Hilfe seiner starken Mundwerkzeuge auch in Verpackungen aus Papier, Pappe oder Kunststofffolie eindringen. Neben den Schäden an den Getreidekörnern werden die Lebensmittel auch durch die Ausscheidungen der Larven und Käfer beeinträchtigt, die Geruchs- und Geschmacksbeeinträchtigungen mit sich bringen.

Bei der Aufspaltung der pflanzlichen Nahrung helfen den Käfern Endosymbionten, die in zwei Mycetomen beherbergt werden, die beiderseits des Darmtrakts der Käfer liegen. Die Anlagen für diese Mycetome werden schon embryonal gebildet und die Mikroorganismen über die Ovarien bereits im Eistadium auf die Nachkommen übertragen.

Der Getreidekapuziner ist jedoch in seiner Lebensweise nicht allein auf die Vorratshaltung des Menschen angewiesen. Die Käfer können weite Wanderungsflüge unternehmen, dabei können sie in ein bis zwei Tagen einen Kilometer zurücklegen. In gemäßigten Breiten kommt es vor allem im Frühjahr und im Herbst zu solchen Flügen, wie Studien in Kansas (USA) gezeigt haben. Die Wanderungen führen die Käfer im Herbst nicht in die Nähe von Feldern und Vorratsschuppen, sondern in die Wälder, wo sie wie ihre holzbohrenden Verwandten aus der Familie der Bohrkäfer überwintern. Die Verbreitung der Käfer aus den Wäldern zurück in die Vorratslager im folgenden Frühjahr macht eine Bekämpfung der Getreidekäfer schwierig.

Entwicklung
Der Entwicklungszyklus des Getreidekapuziners dauert unter optimalen Bedingungen nur rund 25 Tage. Dafür sind eine Temperatur von mehr als 30 °C und eine relative Luftfeuchtigkeit von 70 Prozent erforderlich. Diese Werte sind nur in den Tropen zu erreichen, der Getreidekapuziner kann aber auch unter wesentlich ungünstigeren Bedingungen bei rund 20 °C und mindestens 30 Prozent Luftfeuchtigkeit überleben und sich fortpflanzen. Bei einer Temperatur von 25 °C dauert sein Entwicklungszyklus rund zwei Monate. Die Feuchtigkeit des Getreides darf nicht dauerhaft unter 9 Prozent fallen.

Die Weibchen legen die länglichen, durchscheinend weißen Eier einzeln oder in Gruppen bis zu 20 Stück zwischen die Getreidekörner. Ein Weibchen kann unter optimalen Bedingungen innerhalb der fruchtbaren Phase von rund sechs Monaten 500 Eier legen. Ältere Eier sind leicht rosa gefärbt, die Eihülle besteht aus zwei Schichten. Nach 6 bis 14 Tagen schlüpfen die Larven. Sie sind weiß bis cremefarben und bohren sich meist sofort in die Getreidekörner, können dies aber nur an Stellen bewerkstelligen, an denen das Korn schon verletzt ist. Spätestens im dritten Larvenstadium haben sich aber alle Larven in die Körner gebohrt. Sie ernähren sich dort hauptsächlich von den Eiweißen und weniger von der Stärke, die als Mehl durch die Löcher in der Schale des Getreidekorns nach außen transportiert wird. Von diesem Mehl können sich die Larven ernähren, die sich noch nicht in ein Korn gebohrt haben, ihre Entwicklung verlangsamt sich jedoch durch diese Lebensweise beträchtlich.

Die Larven werden von Häutung zu Häutung immer weniger agil und entwickeln sich von der Madenform immer mehr in Richtung einer c-förmigen Käferlarve. Nach dem vierten Larvenstadium erfolgt die
Verpuppung ebenfalls innerhalb des Getreidekorns, das zuvor durch die Larve ausgehöhlt wurde. Die Dauer des Puppenstadiums beträgt fünf bis sechs Tage bei einer Temperatur von 28 °C und acht Tage bei 25 °C. Nach dem Verlassen der Puppenhülle kann der Käfer noch einige Tage im Schutz des Getreidekorns verbringen, bis der Chitinpanzer ausgehärtet ist. Wenige Tage später beginnt der nächste Generationszyklus.

Taxonomie
Die Gattung Rhyzopertha wird oft fälschlicherweise als Rhizopertha wiedergegeben, nach einem Synonym, das von Agassiz und Erichson 1845 eingeführt wurde, aber gegenüber der Bezeichnung Rhyzopertha von Stephens 1830 keine Priorität besitzt. Daher liest man in der Literatur vielfach den wissenschaftliche Namen Rhizopertha dominica, der jedoch nicht gültig ist.

Quellen

Literatur
 Michael Chinery: Pareys Buch der Insekten. Ein Feldführer der europäischen Insekten. Verlag Paul Parey, Hamburg und Berlin, 1993 ISBN 3-490-23118-X

Einzelnachweise

Weblinks

 Rhyzoperta dominica im Crop Protection Compendium
 Bild in höherer Auflösung im Atlas of Beetles of Russia

Käfer
Vorratsschädling


Matt transferred to Horwath HTL's Jakarta office in October 2013 from the Singapore office where he began work in September 2004. Whilst at Horwath HTL, Matt has been involved in many projects including market and financial feasibility studies for hotels, resorts, serviced apartments and golf courses across Asia; including Indonesia, China, Thailand, Vietnam, Malaysia, Philippines, Maldives, South Korea and Singapore. Matt has also represented hotel owners in the management company selection process; carried out hotel valuations; and undertaken hotel operations' reviews. Prior to joining HHTL, Matt worked on and off for over ten years in the hospitality industry gaining experience in various areas of hotel and F&B operations in Australia, Canada and the UK. Matt also worked for five years as a solicitor, in both commercial litigation and industrial relations at Freehills (Perth, Australia) and in-house at London Transport (London, UK).


I do hereby declare that the present work is my own and every effort has been made to remain within the norms of the topic, with reference in the literature.
It has been observed in the history that the industry of construction has been witnessing the delays and is a common incidence. Delay and disruption to construction contracts invariably involve either the Contractor, Employer or both with financial losses and considerable inconvenience. Delay and disruption are also the main challenges faced within the current construction projects. This delay and disruption in the construction projects are the subject matter that are the purpose of this dissertation following the potential risks that derive to look into the social, technical, economical, financial, legal and resource for construction. These typical delays in a project are due to some of the vulnerable conditions and some contractual errors that can be the main fault in the delay. This lead to the lack of professionalism within the industry and bad reputation for the contractors as many clients tend to follow the path of hiring foreign contractors due to the commitment and dedication towards the work. The aim of the paper is evaluate the time consequences to a construction project as a result of changes made to the main JCT & NEC contracts. This dissertation focuses on the impact of the management of the issues of delay and disruption upon the fulfilment of construction contracts within the remit of the law (Keane & Caletka, 2015).
The considered study is descriptive and will focus on the views from different consulting firms, construction firms, clients in regard to the delay in their construction projects. Purposive and responding sampling method will be used in this paper as sampling techniques in which the literature review will play a major part with respect t the questionnaire and interview that are used to collect the data.
Findings will disclose that the main reason for the delay and disruption are linked to the construction contracts (JTC and NEC), poor management, time overrun and costs. The study shall also provide a background on the case study of Carillion Construction Ltd v Woods Bagot Europe Ltd & Ors (2016), which relates to the two main issues; time extension and supplement agreement.
It is therefore recommended that time provisions and effect in relation to the contracts needs to be avoided in order to delay the possible completion of the construction projects.


text:
\section{Convolution Neural Network Architecture }
Fig. 1 shows the architecture of the proposed convNet which consists of 6 layers. The first layer C1 is a convolution layer with 6 feature maps and a 5×5 kernel for each feature map. The second layer S1 is a subsampling layer with 6 feature maps and a 2×2 kernel for each feature map. The third layer C3 is convolution layer with 16 feature maps and a 6×6 kernel for each feature map. The fourth layer S4 is a subsampling layer with 16 feature maps and a 2×2 kernel for each feature map. The fifth layer C5 a convolution layer with 120 feature maps and a 6×6 kernel for each feature map. The sixth layer f7 is a fully connected layer.

In this experimental study the MNIST dataset is trained with the above mentioned ConvNet architecture, using 2000 training samples and 1000 testing samples. The number of training iterations is set to 20.  The learning rate used in the Backpropagation algorithm is 0.0001.

\begin{figure}
\centering
\includegraphics[width=5in,height=2in]{lenet5.jpg}
\caption{Convolution Neural Network Architecture for Handwritten Digits Classification}
\label{fig:image1}
\end{figure}

\section{Results of Demo and Discussion}

Experimental results are available publicly \footnote{\url{http://sites.google.com/site/convnetexp/}}. From the results of this experimental study, it is obvious that as the number of training iterations increases, the accuracy rate increases and error rate decreases. For example, after 20 iterations the accuracy rate converges to 96.5\%  and error rate converges to 3.4\%. (Starting the first training iteration with accuracy rate of about 90.9\% and error rate of 9\%).

Also from the detailed results, it is noticed that among the 10 digits/classes (0-9), the digit "1" achieved the highest accuracy rate 99.2\% and lowest error rate 0.79\%. Perhaps this is because the digit "1" usually has a fixed figure or image and don't have a weird or unusual figure as the other digits.

The following sections discuss tuning different configuration parameters used in the experimental study. Also more extra experiments have been tested to show the effect of changing these parameters on the error and accuracy rates.

\subsection{Tuning learning rate (ETA)}
Trying to test the effect of changing the learning rate (ETA) input on the results, the learning rate used with different values other than the original one used in this experiment (0.0001).

\emph{\textbf{Test Case ETA = 0.01: }}
Increasing the learning rate to 0.01 with 20 iterations, it is noticed that the error rate and accuracy rate stopped improving after the 3rd or 4th iteration. Moreover, the results became worse as the error rate increased and the accuracy rate was decreasing after the 4th iteration till the 6th iteration. Starting from the 7th iteration till 20th iteration, the learning process was saturated as error rate stopped at 90\% and the accuracy rate stopped at 10\%.

\emph{\textbf{Test Case ETA = 0.00001: }}
Decreasing the learning rate to 0.00001, it is noticed that the speed of learning became slower. After 20 iterations the error rate was around 4.6\% and the accuracy rate was around 95\%. To test the effect of increasing the number of iterations with this decreased learning rate value, the following case is tested, in this case the number of training iterations increased to be 50 instead of 20.

\emph{\textbf{Test Case ETA = 0.00001 with 50 iterations:}}
Increasing the number of training iterations to 50, and after about 32 iterations the rates became fixed to the following values: error rate around 4.5\% and the accuracy rate around 95.5\%.

As a conclusion, the learning rate value has a great effect on the speed of the learning process and the accuracy of the final results. The larger the learning rate, the larger the weight changes on each iteration, and the quicker the network learns. However, the size of the learning rate can also influence whether the network achieves a stable solution. If the learning rate gets too large, then the weight changes no longer approximate a gradient descent procedure. Selection of appropriate or optimal learning rate is important. One of the suggestions is to use adaptive learning rate value. Authors in \cite{imagenet} followed a heuristic which is dividing the learning rate by 10 when error rate stops improving with the current learning rate.

\subsection{Type of Non-linearity}

In these experiments, the tanh function is used, which is a saturating non-linearity. In terms of training time with gradient descent, this nonlinearity is much slower than the non-saturating nonlinearity function "max(0,x)" as suggested by \cite{imagenet,boltzmann}. Since, this function is not implemented in the current eblearn library, it is of my future work interest to implement it in eblearn and to test the effect of using it instead of using tanh function.

Meanwhile, another function is tested which is abs (absolute value of input). The following are the test results:
High error rate of around 89\% and accuracy rate of 10.7\% (poor results).

Another test case is using standard sigmoid function (stdsig). The following are the test results:
error rate of around 4.5\% and accuracy rate of 95.6\%, which is almost the same accuracy rate as using tanh, but with higher error rate.

\subsection{Momentum and Decay time}

In this experiment, the momentum (inertia variable) and decay time (anneal period variable) of the Backpropagation learning algorithm are not used. In the following test case, I set the momentum to 0.9 and decay time to 0.0005 to test the effect, following are the results:   Error rate = 2.7\%, Accuracy rate = 97.3\% (Better results)

If we compared those values with the first mentioned in this report (error rate = 3.4\% and accuracy = 95.5\%), It will be clear that adding momentum and weight decay values for the training algorithm, reduce the error rate and improves the results.

\subsection{Regularization}
Regularization is a process of adding more information in order to prevent overfitting. Setting regularization parameter to 0.00001 or 0.0001 or 0.001 in the original configuration file, did not improve the results for perhaps due to the limited number of input samples and number of iterations as the overfitting problem occurs due to the large number of parameters.

\subsection{Classification Test}
As a part of this experimental study, the trained convNet can be used to classify a single input handwritten digit image. In the configuration, input classification is activated by setting parameter runtype to "detect", feeding the network with the weight file of the 20th iteration, and calling detect program.

\section{Conclusion }
In this experimental study, after running many experiments and tuning some parameters, the best results (error rate = 2.7\%, accuracy rate = 97.3\%) have been achieved using the following input parameters (For time sake, demo uses only 2000 training samples, 1000 test samples, and limited to 20 training iterations): Learning rate: = 0.0001, Momentum: = 0.9, and decay time: = 0.0005. Detailed results are available at \url{http://sites.google.com/site/convnetexp/}

\bibliographystyle{splncs}

redpajama_set_name: RedPajamaArXiv