text:
Q: Why $\mathbb E[e^{itX}]$ determine uniquely the law of $X$? Let $(\Omega ,\mathcal F,\mathbb P)$ a probability space and $X$ a random variable. Why $\mathbb E[e^{itX}]$ determine uniquely the law of $X$ ? And what does it mean ? (I'm not sure of the sense of "it determine uniquely the law of $X$).

A: If $f(x)$ is the PDF of a continuous random variable $X$, $$\varphi(t):=\Bbb E\exp itX=\int_{\Bbb R}f(x)\exp itx dx.$$This is one definition of a Fourier transform of $f$. Fourier transforms are invertible, viz. $$f(x)=\frac{1}{2\pi}\int_{\Bbb R}\varphi(t)\exp-itxdt.$$There are some subtleties to a rigorous proof this works for more general distributions, such as expressing PMFs as Dirac combs, but the main point to why the characteristic function specifies a distribution is the above inversion theorem.

A: It mean that if $\mathbb E[e^{itX}]=\mathbb E[e^{itY}]$ for all $t$, then $\mathbb P\{X\leq x\}=\mathbb P\{Y\leq x\}$ for all $x$.
Let $f_X$ the density function of $X$. Then, $\mathbb E[e^{itX}]$ is the (inverse) Fourier transform of $X$. As you perhaps know, if $\hat f_X=\hat f_Y$ then $f_X=f_Y$ a.e. and thus, $$\mathbb P\{X\in A\}=\int_Af_X=\int_A f_Y=\mathbb P\{Y\in A\},$$
i.e. it uniquely define the law of $X$ (in the sense that if two random variable have the same characteristic function, they have the same distribution).
It's a bit more subtly since a r.v. may be not continuous, but the idea is really this.

A: What it means is that for every Borel set $B\subseteq\mathbb R$ we can find the probability $P(X\in B)$ if  the function $\phi_X:\mathbb R\to\mathbb C$  prescribed by $t\mapsto\mathbb Ee^{itX}$ is at our disposal.
That fact can be stated as: the characteristic function $\phi_X$ determines the distribution of $X$.
On the other hand the distribution of $X$ determines the characteristic function $\phi_X$.
So actually there is a one-to-one relation between characteristic functions of random variables and distribution of random variable.
They both contain exactly the same amount of information about $X$.

You ask "why?" Well, it is just a fact and a more appropriate question would be: "how to prove that?".
For that it is actually enough to show that:

*

*the chararacteristics function of every random variable exists.

*the characteristic functions of $2$ random variable having distinct distributions are distinct.

I will not prove it here, but if you want a proof then have a look at wikipedia here.


text:
Q: Applescript call python failed I have developed an AppleScript which needs to call a python file. i.e autorun.py the Autorun.py start with
import msoffcrypto
import pathlib
import os
....

Both the AppleScript and the python file run fine. I even tried to call autorun.py in the terminal and that also runs with no problem. But when the Applescript tried to call the python file:
set myPythonScript to POSIX path of "/Users/zhouyu/Library/Application Scripts/com.apple.mail/autounlock.py"

set myVal to do shell script "python" & space & myPythonScript's quoted form

display dialog myVal

It failed at the first line in the python code when Applescript tried to call it.
error "Traceback (most recent call last):
File "/Users/zhouyu/Library/Application Scripts/com.apple.mail/autounlock.py", line 2, in
import msoffcrypto
ImportError: No module named msoffcrypto" number 1

A: Unlike Terminal.app, do shell script does not read your shell profile so make sure you give it the full path to your python interpreter, e.g.:
do shell script "/usr/local/bin/python3" & space & myPythonScript's quoted form

redpajama_set_name: RedPajamaStackExchange


text:
Q: Is there a way to attach an event handler to a drawer opening and closing? I'm working on a game for my son and I would like the game to pause automatically when the drawer is opened. In order to accomplish that, I want to associate a dispatch() call to the drawer opening event.

A: You can use the lifecycle methods beforeUpdate and update https://alligator.io/vuejs/component-lifecycle/ because you cannot listen to the native rendering cycles of a browser. So you can pause when vue does DOM updates but the browser maybe does more, for instance because of a css-animation.
Another features of the vue- lifecycle is that it works as a queue for update events.


text:
Q: Pandas resample by day and count occurrences to new column So I went through a lot of workarounds about resampling and groupby methods in pandas and could not find the solution of my problem.
I have dataset with time and error type. I would like to count a specific type of error that occurred per day but there is more than one type in one day.
Example of my data:
               time  error
0 2021-10-03 19:18:20   2222
1 2021-10-03 19:39:36   2222
2 2021-10-03 19:48:03   3333
3 2021-10-03 19:48:23   4444
4 2021-10-03 19:48:36   3333

So I am trying the following:
df = df.groupby(['time','error'], as_index=False).size()

And after that resample the data by day and sum the occurrence number.
Unfortunately without any success.
Desired output is:
               time  error  size
0          2021-10-03   2222   2
1          2021-10-03   3333   2
2          2021-10-03   4444   1

And so on for every error type and day.
Thanks for any help!

A: Let's try
df['time'] = pd.to_datetime(df['time'])
out = df.groupby([df['time'].dt.date,'error'], as_index=False).size()

print(out)

         time  error  size
0  2021-10-03   2222     2
1  2021-10-03   3333     2
2  2021-10-03   4444     1

A: You have the time included in the date, so each grouby will be for a unique date and time. So what you need to do is isolate only the date part, then can groupby that date (excluding the time).
import pandas as pd

columns = ['time', 'error']
data = [['2021-10-03 19:18:20',   '2222'],
['2021-10-03 19:39:36',   '2222'],
['2021-10-03 19:48:03',   '3333'],
['2021-10-03 19:48:23',   '4444'],
['2021-10-03 19:48:36',   '3333']]

df = pd.DataFrame(data=data, columns=columns)
df['date'] = pd.to_datetime(df['time']).dt.date

df = df.groupby(['date','error'], as_index=False).size()

Output:
print(df)
         date error  size
0  2021-10-03  2222     2
1  2021-10-03  3333     2
2  2021-10-03  4444     1


text:
Q: Hunchentoot handler changes the definition of another function I wrote some code to manage a postgresql database, and it is working on the console. Now I wish to put it on my internal network via hunchentoot.
I use clsql and packaged the database code as:
(defpackage :my-database
  (:use :common-lisp)
  (:documentation "several lines...")
  (:export almost-all-functions...))

(in-package #:my-database)

(defun new-patient (name gender height weight)
  "adds new patient to the db. all parameters are of type string."
  (let* ((height (parse-integer height))
         (weight (parse-integer weight))
         (corrected-weight (calculate-corrected-weight height weight gender)))
    (clsql:insert-records :into 'patients
                          :attributes '(height weight corrected-weight name gender patient-at-ward)
                      :values (list height weight corrected-weight name gender t))))

I imported the my-database package, and when I use this handler:
(define-easy-handler (debug :uri "/debug")
    (name gender height weight)
  (let ((ad (substitute #\space #\+ (string-trim " " ad))))
    (progn (format nil "Name:~A, Gender:~A, Height:~A, Weight:~A" name gender height weight)
           (redirect "/success"))))

It displays the html just fine. But this handler:
(define-easy-handler (new-patient :uri "/new-patient")
    (name gender height weight)
  (let ((name (substitute #\space #\+ (string-trim " " name))))
    (progn (my-database:new-patient name gender height weight)
           (redirect "/success"))))

throws an error:
Incorrect keyword arguments in ("Frank Sinatra" "male" "150" "55")

I noticed that when I type (my-database:new-patient ) at the REPL, emacs command minibuffer shows (my-database:new-patient &key name gender height weight). The &key part looked suspicious to me. Therefore I switched to my-database file, did slime-eval-last-expression-in-repl, which corrected the emacs command minibuffer display.
But this time, I got the following error:
Too few arguments in call to #<Compiled-function MY-DATABASE:NEW-PATIENT #x15870D76>:
0 arguments provided, at least 4 required.

And re-evaluating the hunchentoot handler caused emacs command minibuffer to show the &key again. Lastly, I changed the handler code to (my-database:new-patient :name name :gender gender :height height :weight weight), which throws this error:
8 arguments were provided, but at most 4 are accepted by the current global
definition of NEW-PATIENT

What may be the reason?

A: The reason is the semantics of define-easy-handler:

The resulting handler will be a Lisp function with the name name and keyword parameters named by the var symbols.

(according to the hunchentoot documentation: http://weitz.de/hunchentoot/), so you should use a different name for the handler, for instance:
(define-easy-handler (do-new-patient :uri "/new-patient")
   (name gender height weight)
(let ((name (substitute #\space #\+ (string-trim " " name))))
  (progn (my-database:new-patient name gender height weight)
         (redirect "/success"))))


text:
Q: Filter array by Object key regex I have an array that looks like
const arr = [
{img2: "assets1.png - Copy.png"},
{img2: "lime.jpg"},
{img2: "ginalee.jpg"}
{img2: "cb.jfif"}
{code: "blob:http://localhost:3000/d2c4641a-8586-4bb8-9a14-21b6712856ff", key: "img2", value: "cb.jfif"}
{code: "blob:http://localhost:3000/b406ceb8-92f4-4bbd-9eef-7db7d103b1e3", key: "img2", value: "lime.jpg"}
{code: "blob:http://localhost:3000/28130041-347f-49d9-b30d-72e26c9a6dda", key: "img2", value: "ginalee.jpg"}
{code: "blob:http://localhost:3000/d0d3e9aa-8791-419d-8585-f6c878b161e6", key: "logo", value: ""}
{code: "blob:http://localhost:3000/187977de-6a8f-4815-b3e2-01bfa818bcb7", key: "logo", value: "OIPYYPYPEVF.jpg"}
{code: "blob:http://localhost:3000/dee69b85-6d13-4f81-ba5b-d8db5708d9c8", key: "logo", value: ""}
{code: "blob:http://localhost:3000/676b0366-f30e-4653-9716-ab0ebf4155a2", key: "logo", value: "image (
5).png"}
]

I need to get rid of the ones that say img2 (or really /img[0-9]/) and just about every variation of
arr.filter((f)=>Object.keys(f).includes(...)) isn't working.
any help would be great.

A: Check if .some of the keys contain img:
arr.filter(obj => Object.keys(obj).some(key => !key.includes('img')))

A: for(let i = 0; i < arr.length; i++) {
  for(let r in arr[i]) {
     if(arr[i][r].match(/(img)[0-9]/ig)) {
        arr[i][r] = arr[i][r].replace(/(img)[0-9]/ig, "");
      }
   }
}
console.log(arr);

A: Something like this could work to ignore all img[0-9]:
arr.filter((val) => Object.keys(val).every((key) => !key.match(/^img[0-9]+$/i)));

This will get all the keys for each individual object and evaluate with every if the key name matches the regex to get the negated value (meaning any value matching the regex will return false causing .every to stop iterating and return false to the .filter function and thus removing those values.


text:
Q: Pass by reference/value overload Trying to figure out why no overloading-ambiguity caused in the following codes:
float foo2(float& i)
{
    cout << "call from reference" << endl;
    return i;
}
float foo2(float i)
{
    cout << "call from non reference"<<endl;
    return i;
}
int main()
{
    cout<<foo2(2); // print "call from non reference"
}

The foo2 whose parameters not passed by reference is called. Why? How to call the foo2 that pass reference parameters?

A:
The foo2 whose parameters not passed by reference is called. Why?

Because you cannot pass a constant or any computed expression by reference to a function that takes a non-constant reference. To pass an expression by reference you need an assignable value - something that can appear on the left-hand side of an assignment expression. Since 2 cannot appear on the left side of an assignment expression, it cannot be used to call a function that expects a reference. When the reference is const, you can pass anything, because C++ will create a temporary variable, assign the expression to it, and pass a reference to function taking const reference.

How to call the foo2 that pass reference parameters?

There is no obvious way of doing that, because the moment you pass a variable or another expression that can become a reference, the compiler will complain that you are making an ambiguous call:
float f;
foo2(f); // <<== This will not compile

There is a way to call it, though: you can make a function pointer that matches only one of the two function signatures, and use it to make your call:
typedef float (*fptr_with_ref)(float&);

int main()
{
    cout<<foo2(2) << endl; // print "call from non reference"
    fptr_with_ref foo2ptr(foo2); // Only one overload matches
    float n = 10;
    cout<<foo2ptr(n) << endl; // Calls foo2(float&)
}

Demo.

A: The 2 you gave as a parameter for foo2 is an rvalue, which cannot be a reference. Thus the function accepting a reference cannot be called with it.

A: Your question is in C++ terms, not in design terms. C++ supports things in a way because it makes sense in terms of design. C++ allows you to do a lot of things, but if you want to make good software with it you cannot stick to mere literal C++ rules, you need to go further. In practice that means you end up making your own rules.
In your case - well, I'd never make the reference variant if I did not actually change the variable in the function.
If you adopt such 'rules' for yourself, then you immediately see why the ref function doesn't bind: what is the point, in the first place, to change a loose constant?
If you make the right rules, you'll see that they are beautifully supported by C++. Like ... function changes an object: pass non-const ref. No change? const ref. Optional? const pointer. Take over mem management? non-const pointer.
Note that that is just the beginning, especially when multi-threading comes into play. You have to add things to the 'contract' of the function. Example for const ref: must the object stay 'alive' after the call? Can the object change during the call? And so forth.


text:
Q: Is it possible to return an array from a MySQL Table? I have 2 basic tables -- a main table containing master ID records and a related table containing a variable number of value references as shown below.
TABLE A: Main (one)
+----+-------------+
| ID | description |
+----+-------------+
| 1  | Arnold      |
+----+-------------+
| 3  | Baker       |
+----+-------------+
| 7  | Charlie     |
+----+-------------+

TABLE B: Related (Many)
+----+-------+
| ID | value |
+----+-------+
| 1  | 1     |
+----+-------+
| 1  | 2     |
+----+-------+
| 3  | 3     |
+----+-------+
| 3  | 2     |
+----+-------+
| 3  | 1     |
+----+-------+
| 7  | 2     |
+----+-------+

After joining Table A with Table B, is it possible to return the columns in such a way that the value column from Table B returns as an array?
I am looking to return something like the result set below (based on example above) where the 2nd column can be handled as an array value rather than a string value:
{
 [0] => 1
 [1] => array(1,2)
}
{
 [0] => 3
 [1] => array(3,2,1)
}
{
 [0] => 7
 [1] => array(2)
}

Here is my Query Statement to get the columns as string values:
SELECT tablea.*, tableb.value
FROM tablea
LEFT JOIN tableb ON tableb.ID = tablea.ID

A: Typically this is done by building up the multi-dimensional array when reading the result set with your application logic.  Here is some pseudo-code:
array = [];
while (row = {some DB row retrieval method}) {
    array[row['id']][] = row['value'];
}

If PHP is your language:
$array = array();
while ($row = {some DB row retrieval method}) {
    $array[$row['id']][] = $row['value'];
}


text:
Q: Узнать количество элементов, возвращаемых функцией через указатель Допустим, у нас есть структура
struct get_query
{
    char name[200];
    char value[200];
};

и функция, возвращаемый тип которой такой же:
struct get_query *get_array(char *str);

Она возвращает несколько элементов get_query, вызываю так:
struct get_query *data = get_array(str);

Вопрос такой: можно ли как то вызвать так
struct get_query data[] = get_array(str);

чтобы можно было узнать количество элементов в data. Если возможно, опишите пожалуйста, как.

A: Сделать
struct get_query *get_array(char *str, int * count);

и передать в count количество элементов. Если C++ - можно использовать ссылку
struct get_query *get_array(char *str, int & count);

A: Массивы не имеют оператора присваивания. И кроме того функции не могут возвращать массивы. В C++ функции могут возвращать ссылки на массив, но тем не менее вы не сможете один массив присвоить другому массиву.
В C++ вы могли бы возвращать объект типа std::pair<get_query *, size_t>, то есть возвращать пару из указателя на первый элемент массива и число элементов в массиве.
В C вы могли бы сами определить такую структуру. Например,
struct Pair
{
    struct get_query *data;
    size_t n;
};

и возвращать эту структуру из функции. Например
 struct Pair get_array(char *str);

Или в C вы можете дополнить массив еще одним элементом, который будет содержать значение NULL. Используя это граничное значение, вы можете подсчитать число элементов в выделенном массиве.
Альтернативный подход в C++ и в C - это изменить объявление функции. Например, вы могли бы передавать в функцию исходный указатель по ссылке, а из функции возвращать число элементов в выделенном массиве. Например,
 size_t get_array(get_query **data, char *str);

В C++ вы могли бы параметр объявить как ссылку. Наример
 size_t get_array(get_query * &data, char *str);


text:
Q: How to detect Nearst available lattitude and Longitude in Android App I have data of associates with their Longitudes and Latitudes. I want to detect the nearest associate to the User Location. user location i will detect with the Android SDK.
My Question how to match the params in such a way that APP can show the best nearest associates. thanks in Advance.

A: Considering your list of associates is non-null array of lats longs.
LatLng GetNearest(LatLng myPos, LatLng[] Associates)
{
    double nearestDistance = distance(myPos.lat, myPos.lng, Associates[0].lat,Associates[0].lng);
    LatLng Nearest = Associates[0];
    for(int i = 1; i < Associates.length(); i ++)
    {
       double _d =  distance(myPos.lat, myPos.lng, Associates[i].lat, Associates[i].lng);
       if(_d < nearestDistance)
      {
           nearestDistance = _d;
           Nearest  = Associates[i];

      }
    }
  return Nearest;
}

/** calculates the distance between two locations in MILES */
private double distance(double lat1, double lng1, double lat2, double lng2) {

    double earthRadius = 3958.75; // in miles, change to 6371 for kilometer output

    double dLat = Math.toRadians(lat2-lat1);
    double dLng = Math.toRadians(lng2-lng1);

    double sindLat = Math.sin(dLat / 2);
    double sindLng = Math.sin(dLng / 2);

    double a = Math.pow(sindLat, 2) + Math.pow(sindLng, 2)
        * Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2));

    double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));

    double dist = earthRadius * c;

    return dist; // output distance, in MILES
}

A: I assume you have a POJO of Associates, in which you have Longitudes and Latitudes for each of your associate, So let's say you have an Array of associates then to find the nearest to user location, use this short and simple logic :
 for (Associates associate : associates) {
        Double associateLatitude = associate.getLatitude();
        Double associateLongitude = associate.getLongitude();

        android.location.Location locationOne = new android.location.Location("");
        locationOne.setLatitude(userLatitude);
        locationOne.setLongitude(userLongitude);

        android.location.Location locationTwo = new android.location.Location("");
        locationTwo.setLongitude(associateLongitude);
        locationTwo.setLatitude(associateLatitude);

        float distance = locationOne.distanceTo(locationTwo);
        if (disTemp == 0.0f) {
            disTemp = distance;
            nearestAssociate = associate;
        } else if (disTemp > distance) {
            disTemp = distance;
            nearestAssociate = associate;
        }
    }


text:
Q: SQL Schema news feed I am creating a newsfeed style app which will create a social network for a company.
When you create a status you have the option to select the audience who the status will be visible to, in this instance it will be different businesses within that company.
For example 'John' from 'Business 1' wants to post a status about their quarterly results but only want's people in his business to see it.
However 'Jane' from 'Business 2' is having a baby and want her post to be seen by the whole company (all businesses).
Initially I was planning to create the 'NewsFeed' table with an audience column which contained an array of each business the post would be visible to. eg: ["Business 1", "Business 5", "Business 7"] and the app would check if the business the user is in is contained in the array, if true then it would show the post.
Im not sure this is the most efficient method to do this and doesn't seem particularly scalable.
I have also considered creating a 'NewsFeed' table for each department and depending on the audience option selected on the status update it would insert it into those tables. However if we end up with a lot of businesses I imagine that could be inefficient also?
What would be the best way to structure the tables in the database in order to most efficiently implement this feature?
thanks

A: Creating 2 / 3 tables will be a better option than having a single table -
Table 1 >> NewsFeed with columns NewsFeedId and NewsFeedText
Table 2>> NewsFeedPublish with columns NewsFeedId and BusinessId
For space efficient design, It's better to have table Business with BuisnessId and BusinessName but if you do not want to create this table, you can directly use BusinessName instead of BuisnessId in Table2.

A: The relationship you're defining is a 1:M relationship. Each status could be visible to 0 or more business.
I would create a NewsFeed table and a Business table, then a table which sits between these two tables - lets say NewsFeedBusiness.
In the NewsFeedBusiness table, you have the NewsFeedID as a foreign key that references NewsFeed and you have the BusinessID as a foreign key to the Business table. I would also add a unique key on NewsFeedID + BusinessID to prevent a NewsFeed record from being in the same business twice.


text:
Q: ReactJs redux form: initial values passed down to form not displaying This is how my project looks:
class ParentOfForm extends Component{
  constructor(){this.state={initVals: null};}
  componentDidMount(){
    asyncCall.then((values) =>
      setState({
        initVals: {
          initval1: valFromAsync,
          ..
        }
      })
    );
  }
  render(){
    const {initVals} = this.state;
    {!initVals && <Form/>}
    {!!initVals && <Form initialValues={initVals}/>}
  }
}

----------------

class Form extends Component{
  constructor(props){
    super(props);
    this.state = {
      initval1: "",
      ..
    }
  }

  render(){
    return(
      <form..>
        ..
      </form>
    );
  }
}

Form = reduxForm({
  form: "Form",
  validate,
  enableReinitialize: true
})(Form);

export default Form;

So as you can see, I'm trying to use values from an async function as initialValues to initialize the input fields of my form. When I define initialValues inside Form = reduxForm({...}) they get displayed correctly. However when I try to set them dynamically using the async call I can see the values being changed but they all seem to be undefined eventhough I can see them being filled in with console.log(). What am doing wrong?
Obvious alternatives I can't use because reasons: defaultValue, const Form = ().., no parent

A: welcome to SO.
So what is happening is since its an async call the initValues don't show up immediately in the form.Even in the console log it'll show up once the call completes. So there is a time gap between the page loading with a blank form and then the init call completing with the values.
There are 2 ways to handle this :

*

*Show a loading symbol on the form and wait for the async call to complete and fill the init values [UX recommended] see here

*Show an empty form with default values till the initValues are fetched, and show them when the call completes. [bad UX practice]


text:
Q: how to decrease back button wdth
I want to remove extra white space. I have tried all the links provided but there is no luck. Can anybody help me please.

A: Without adding BarButtonItem you can not modify back button because that is  default when you push a ViewController.


text:
Q: Are HTML based password reset templates reliably rendered? I notice that salesforce seems to simply append the username and password at the end of the template, as far as anyone is aware are the resulting documents always well formed and reliably rendered across all email clients?

A: Yes, we have tested Text and HTML with Letterhead extensively and they all render fine in various email clients. If you were to create a raw html template or a visualforce template, I believe that the username/password is placed outside of your markup which can cause some unintended layout issues. Stick to Text or HTML with Letterhead and you should be fine.


text:
Q: remove rows at certain intervals in the data frame I have a data frame like following
 structure(list(c1 = c(1, 2, 3, 1, 2, 3, 1, 2, 3, 3, 2, 1, 3,
2, 1, 3, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1), c2 = structure(c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("a", "b",
"c"), class = "factor")), .Names = c("c1", "c2"), row.names = c(NA,
-27L), class = "data.frame")

   c1 c2
1   1  a
2   2  a
3   3  a
4   1  a
5   2  a
6   3  a
7   1  a
8   2  a
9   3  a
10  3  b
11  2  b
12  1  b
13  3  b
14  2  b
15  1  b
16  3  b
17  2  b
18  1  b
19  2  c
20  3  c
21  1  c
22  2  c
23  3  c
24  1  c
25  2  c
26  3  c
27  1  c

In the above data frame there are 3 groups of (1,2,3) for a, 3 groups of (3,2,1) for b and 3 groups of (2,3,1) for c. What I want to do is to keep say 2 groups only for each of a, b and c. Is there any one line solution for this?
The output will look like following
    c1 c2
1   1  a
2   2  a
3   3  a
4   1  a
5   2  a
6   3  a
7   3  b
8   2  b
9   1  b
10  3  b
11  2  b
12  1  b
13  2  c
14  3  c
15  1  c
16  2  c
17  3  c
18  1  c

NOTE: The initial number of groups for each category of c2 can be anything (which is 3 here) and can't be known in advance , so the solution has to be independent of this initial number of groups.

A: Here's an option that uses data.table. Assume df to be your original data.
library(data.table)
setDT(df)
df[sort(df[, .I[1:2], by = .(c1, c2)]$V1)]

The number of groups we want to keep is given by 1:2 (the first two).  So if you wanted more or less, you would change the 2 to however many groups you want to keep. The above code  gives
    c1 c2
 1:  1  a
 2:  2  a
 3:  3  a
 4:  1  a
 5:  2  a
 6:  3  a
 7:  3  b
 8:  2  b
 9:  1  b
10:  3  b
11:  2  b
12:  1  b
13:  2  c
14:  3  c
15:  1  c
16:  2  c
17:  3  c
18:  1  c


text:
Q: Check if the values in a column are unique, if they are unique add to end of the row if not unique add not unique to end of row I have a DataFrame that looks like:
   c1   c2   c3
0  10  100  200
1  11  110  233
2  12  120  444
3  33  100  776

I need to go through each row of the DataFrame and check if the value in c2 is unique to just c2 (i.e. there is only one of that value in the entire c2 of that df). If not unique add "not unique" to the end of the row if unique then add unique to then end of the row.  Expected output:
   c1   c2   c3     c4
0  10  100  200  not unique
1  11  110  233  unique
2  12  120  444  unique
3  33  100  776  not unique

I have tried a few things so far and have not been able to get the results that i want:
for x in dfs:
    if x["c2"].unique(): #i also tried x[x['c2']]
        dfs["duplicated"] = "unique"
    else:
        dfs["duplicated"] = "not_unique"

or
dfs["Duplicates"] = np.where(dfs.c2.duplicated(), "not_unique", "unique")

A: Use numpy.where with Series.duplicated:
In [318]: import numpy as np

In [319]: df['c4'] = np.where(df['c2'].duplicated(keep=False), 'not unique', 'unique')

In [320]: df
Out[320]:
   c1   c2   c3          c4
0  10  100  200  not unique
1  11  110  233      unique
2  12  120  444      unique
3  33  100  776  not unique

A: You can use pandas.Series.duplicated with keep=False:
df['c4'] = df['c2'].duplicated(keep=False).map({True:'not unique', False:'unique'})

Output:
>>> df
   c1   c2   c3          c4
0  10  100  200  not unique
1  11  110  233      unique
2  12  120  444      unique
3  33  100  776  not unique

A: Use duplicated:
df['c4'] = np.where(df['c2'].duplicated(keep=False), 'not unique', 'unique')
print(df)

# Output
   c1   c2   c3          c4
0  10  100  200  not unique
1  11  110  233      unique
2  12  120  444      unique
3  33  100  776  not unique


text:
Q: ffi-napi How to accept a struct containing a char array as the return type? I am passing a callback to a function in C++. This callback must accept a struct defined in the C++ code that contains a char array.
I looked at Call C++ dll with struct containing char array from Node.js, which discusses how to pass a struct containing a char array to a foreign C++ function. However, I am struggling to accept a struct of the same nature from a foreign C++ function.
The struct is defined as:
struct Info {
  long ID;
  char chName[128];
};

And here is my JavaScript code:
var StructType = require('ref-struct-napi');
var ArrayType = require('ref-array-napi');

var Info = StructType({
    'ID' : 'long',
    'chName' : ArrayType('char', 128)
});

var ffi = require('ffi-napi');

var lib = ffi.DynamicLibrary('lib.so', ffi.DynamicLibrary.FLAGS.RTLD_LAZY);

var SetCallback = ffi.ForeignFunction(
  lib.get('SetCallback'),
  'void',
  ['pointer']
);

var callback = ffi.Callback('void', [Info], (info) => {
    console.log(`ID: ${info.ID}`);
    console.log(`name: ${JSON.stringify(info.chName)}`);
});

SetCallback(callback);

When the callback is triggered, info.ID is correct, but info.chName is either an array of all 0's (and I know for sure this is not correct), or a seg fault occurs.
I feel I may be misunderstanding how C++ works here and would appreciate any help.


text:
Q: Issue with combo box within Access form I'm playing around with the form builder in Access, and I'm running into some issues when it comes to filtering a query based on the combo box selection. Right now I'm just trying to do something simple, where I choose a list of names from the combo box, hit the command button, and receive results based on what selected in the combo box. Unfortunately, every time I select an option from the list and hit the command button, it returns no results. I've followed countless tutorials, and I've yet to get this to work, so obviously I'm missing something simple. I've tried to outline what my setup looks like down below. If additional information is needed just let me know.

*

*The drop down combo box is connected to my Client_List table in order to get the list of clients(This is working fine).

*Combo box itself is named clientDropDown.

*The Command Button is named Command3 and it's connected to an event macro that runs Query test

*The form is saved as Test1
Query test looks like this:
SELECT Client_List.Client_Name, Client_List.End_of_Bill_Date, Client_List.Data_Availability_Date
    FROM Client_List
         WHERE (((Client_List.Client_Name)=[Forms]![Test1]![clientDropDown]));

Is there something I'm missing, another step I need to follow? Like I mentioned before, if I left out any key bits of information, just let me know and I'll provide it.


text:
Q: Installing linux mint on pc with hybrid drive, ssd is read only (no dual boot) I'm attempting to install linux mint on my pc with a hybrid drive system (SSD and disk); not dual boot.
I'm booting linux mint from a usb and install is erroring on grub install, but says the installation is successful. Additionally, the pc won't boot into linux. I believe this is partially due to the SSD disk (used for startup).
I've formatted the hard disk, but the SSD is read only and I've attempted sudo chown to the mounted SSD partition, but am getting:
chown: changing ownership of '/media/mint/Windows': Read-only file system
I've also attempted various things in gparted and gnome disk management.
I have no access to windows, as the boot manager was corrupt and I've deleted the files on the primary disk.
How can I reformat/remove the partitions from the SSD and change it to read/write?

A: Hmmm, that's a bit of an odd issue.
In order to format the drive / edit partitions, you'll need to have those partitions unmounted first - otherwise it won't work. You also need to be running your partition editor with sudo privileges (or as root) otherwise that will also prevent it from working.
Does the drive have a physical read-only switch you may have flipped? Other than that... the fact your SSD is coming up as read-only (and corrupted the Windows boot manager) strongly suggests (to me anyway) the possibility you may just have a dead drive on your hands. I've seen that failure mode a couple times across a couple different SSDs - they do die sometimes, sadly. It's possible low-level drive commands might be able to stop it acting as a read-only drive for a bit (they often do that once they've reached their wear limits, but sometimes the manufacturer will allow you to bypass the restriction) - although unfortunately I can't remember for the life of me what those commands actually are, and in any case you wouldn't want to run your OS off a drive in that state since data corruption would likely become a major issue very quickly.


text:
Q: Can VC++ programs built with platform toolset "Visual Studio 2012 (v110)" run on Windows Server 2003/2008? Can programs build in VS2012 with platform toolset "Visual Studio 2012 (v110)" run on Windows Server 2003/2008?
I'm keen to take advantage of all the new C++11 goodness but need to target machines running VS2008.
If it won't run by default what configuration changes should I make to be able to target this platform and still benefit from all the compiler's new features?

A: I have given this a test and can answer that yes they will run provided that the VC++11 re-distributable DLLs are available on the path i.e. msvcp110.dll, msvcr110.dll etc..

A: To run VS2012 compiled C++ apps on Windows Server 2003, you should use a "v110_xp" platform toolset which is included in Visuasl Studio 2012 Update 1. According to MSDN:

The Visual Studio 2012 - Windows XP (v110_xp) platform toolset that's included in Visual Studio 2012 Update 1 is a version of the Windows 7 SDK that was included in Visual Studio 2010, but it uses the Visual Studio 2012 C++ compiler. It also configures project properties to appropriate default values—for example, the specification of a compatible linker for down-level targeting. Only apps that are created by using the vs110_xp toolset support Windows XP and Windows Server 2003, but those apps can also supportWindows Vista, Windows 7, Windows Server 2008, Windows 8, and Windows Server 2012.


text:
Q: Getting the contents of an XML element using XDoc in C# I'm using the xignite API to get real time currency exchange data. When I use my query string:
http://globalcurrencies.xignite.com/xGlobalCurrencies.xml/GetRealTimeRate?Symbol=GBPEUR&_token=[mytoken]

I get the following:
<Rate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns="http://www.xignite.com/services/">
    <Outcome>Success</Outcome>
    <Identity>Request</Identity>
    <Delay>0.0218855</Delay>
    <BaseCurrency>USD</BaseCurrency>
    <QuoteCurrency>EUR</QuoteCurrency>
    <Symbol>USDEUR</Symbol>
    <Date>08/24/2016</Date>
    <Time>3:23:34 PM</Time>
    <QuoteType>Calculated</QuoteType>
    <Bid>0.889126</Bid>
    <Mid>0.88915</Mid>
    <Ask>0.889173</Ask>
    <Spread>4.74352E-05</Spread>
    <Text>
        1 United States dollar = 0.88915 European Union euro
    </Text>
    <Source>Rate calculated from EUR:USD</Source>
</Rate>

I'm trying to access the contents of the Mid element and so far I'm doing this
var xDoc = XDocument.Load(
    "http://globalcurrencies.xignite.com/xGlobalCurrencies.xml/GetRealTimeRate?Symbol="
    + "GBP" + "EUR" + "&_token=[MyToken]");
string s = (string)xDoc.Root.Element("Mid");
output.Text = s;

The xDoc variable returns with the XML that I showed previously, but when I try to get the contents of the Mid element, string s is null. How do I access the contents of the element Mid using XDoc?

A: I use Linq to XML, here is an example
XNamespace ns = "http://www.xignite.com/services/";
XDocument xdoc = XDocument.Load(xmlPath);
var rateMids = (from obj in xdoc.Descendants(ns + "Rate")
                 select new Rate
                 (
                      obj.Attribute("Outcome").Value,
                      obj.Attribute("Identity").Value,
                      (decimal)obj.Attribute("Delay").Value,
                      obj.Attribute("BaseCurrency").Value,
                      obj.Attribute("QuoteCurrency").Value,
                      obj.Attribute("Symbol").Value,
                      DateTime.Parse(obj.Attribute("Date").Value),
                      obj.Attribute("Time").Value.ToString("hh:mm:ss tt", CultureInfo.CurrentCulture),
                      obj.Attribute("QuoteType").Value,
                      (decimal)obj.Attribute("Bid").Value,
                      (decimal)obj.Attribute("Mid").Value,
                      (decimal)obj.Attribute("Ask").Value,
                      Convert.ToInt32(obj.Attribute("Spread").Value),
                      Convert.ToInt32(obj.Attribute("Text").Value)
                 )
                ).ToArray();

myObjects will contain an array of MyObjects from the XML file.
Edit: since you updated your question with the XML, I think you are only missing the namespace on the query (the ns on my query), please take a look on Charles Mager answer
My answer is a different approach.. you save the Rate object and the use it without the need to read the XML again (you would need to define the Rate in a class)
Be careful with the value conversions I did, you would need to match yourclass :)

A: A qualified name in XML is made up of two parts: a namespace and a local name. In your XML, your local name is Mid, but your namespace is not empty: it's http://www.xignite.com/services/, as denoted by the default namespace declaration xmlns="..." in the root element.
If you take this into account, you will get a result:
XNamespace ns = "http://www.xignite.com/services/";
var mid = (decimal)xDoc.Root.Element(ns + "Mid");


text:
Q: Even with ASP.NET 3.5, I am getting "Validation of viewstate MAC failed" error I found a lost of posts to solve this error: "Validation of viewstate MAC failed". I read that it is a ASP.NET 2.0 error which is also a bug. But I am using VS 2008 with ASP.NET 3.5 SP1. Why this error is coming in this version also?
I am using ASP TextBox controls. Some posts have mentioned that ASP TextBoxes generate this error, so I have set AutoPostBack of each TextBox to False.
How to get rid of this mess?
 Code Added Below **
* Default.aspx *
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="FlexStock._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <link rel="Stylesheet" type="text/css" href="~/Styles/main.css" />
    <title>FlexStock@.NET - Gamma Edition</title>

    <form id="loginForm" runat="server" class="loginForm" action="./Forms/selectCompany.aspx" >

            <asp:Label ID="lblUserName" runat="server" CssClass="LabelControls" AssociatedControlID="txtUserName">User Name: </asp:Label>

            <asp:TextBox ID="txtUserName" runat="server" CssClass="TxtStyle" Width="199px" AutoPostBack="false"></asp:TextBox>

            <asp:Label ID="lblPassword" runat="server" CssClass="LabelControls" AssociatedControlID="txtPassword">Password: </asp:Label>

            <asp:TextBox ID="txtPassword" runat="server" CssClass="TxtStyle" TextMode="Password" Width="199px" AutoPostBack="false"></asp:TextBox>

            <asp:Label ID="lblCaptcha" runat="server" Text="Security Check"></asp:Label>

            <asp:Label ID="lblEnterCaptcha" runat="server" Text="Enter Value"></asp:Label>

            <asp:TextBox ID="txtCaptcha" runat="server" CssClass="TxtStyle" Width="199px" AutoPostBack="false"></asp:TextBox>

            <asp:Button ID="btnLogin" runat="server" Width="60" Text="Login" CssClass="BtnStyle"/>

    </form>

 selectCompany.aspx **
<%@ Page Title="" Language="C#" MasterPageFile="~/master1.Master" AutoEventWireup="true" CodeBehind="~/Forms/selectCompany.aspx.cs" Inherits="FlexStock.Forms.selectCompany" EnableViewStateMac="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../Styles/selectCompany.css" />
    <link rel="Stylesheet" type="text/css" href="../Styles/main.css" />

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

   <form id="frmSelectCompany" enableviewstate="false">

            <asp:Label ID="lblSelectCompany" runat="server" Text="Select Company or Create New"></asp:Label>

            <asp:Button ID="btnCreateNew" runat="server" Text="Create New" CssClass="BtnStyle" />

    </form>

</asp:Content>

A: This is a pretty common error to see. It's a security feature in ASP.NET that prevents someone from injecting additional controls onto the page after it has rendered, and posting those controls back to the server. It makes your website harder to hack.
Are you creating any input controls through javascript? If so, don't. Create the controls normally inside the web form and wrap them in a
 and display them when you need them.
Are you creating any controls dynamically within C#? - If you are, you must create them inside Page_Init, not Page_Load, otherwise ASP.NET won't recognise them as valid.
You can disable this security measure by setting EnableViewStateMac=False at the top of the aspx page, but I strongly advise against it.


text:
Q: How to check if a field (multiple occurrence in XML) is having a value from the predefined set of values using Xpath I have an XML where I am trying to check following conditions -

*

*If Count of E1KNVVM segments > 0 then do the following, else set false.

*If KTOKD = Z002|Z004 - Set false. No need to check VKORG. else check the following

*If there is atleast one E1KNVVM segment with VKORG = 1000|1010|1140|1150|1060 - set true.

*if all the VKORG = 1140 and KTOKD = Z012|Z013, set false. if all the VKORG = 1140 and KTOKD != Z012|Z013, set true

*if all the VKORG = 1060 and KTOKD = Z012|Z013, set false. if all the VKORG = 1060 and KTOKD != Z012|Z013, set true

*If KTOKD = Z012|Z013 and there is at least one VKORG = 1000|1010|1150 - set true.
Example data -
```
<?xml version="1.0" encoding="UTF-8"?>
<ZOMI034_DEBMAS07>
    <IDOC BEGIN="1">

        <E1KNA1M SEGMENT="1">
            <MSGFN>005</MSGFN>
            <KUNNR>0010015829</KUNNR>
            <BBBNR>0000000</BBBNR>
            <BBSNR>00000</BBSNR>
            <BUBKZ>0</BUBKZ>
            <KTOKD>Z012</KTOKD>
            <LAND1>CA</LAND1>
            <NAME1>Decoration Sherbrooke Inc</NAME1>
            <NAME3>Decoration Sherbrooke Inc</NAME3>
            <ORT01>Sherbrooke</ORT01>
            <PSTLZ>J1J 4L9</PSTLZ>
            <REGIO>QC</REGIO>
            <SORTL>DECORATION</SORTL>
            <SPRAS>E</SPRAS>
            <STRAS>739 rue Paul-Desruisseaux</STRAS>
            <TELF1>819-566-5585</TELF1>
            <TELFX>819-565-0855</TELFX>
            <LZONE>J1J</LZONE>
            <UMJAH>0000</UMJAH>
            <JMZAH>000000</JMZAH>
            <JMJAH>0000</JMJAH>
            <KATR1>TP</KATR1>
            <KATR2>DL</KATR2>
            <KATR3>SF</KATR3>
            <KATR4>OS</KATR4>
            <KATR5>SW</KATR5>
            <KATR9>001</KATR9>
            <KATR10>074</KATR10>
            <UMSA1>0</UMSA1>
            <HZUOR>00</HZUOR>
            <CIVVE>X</CIVVE>
            <SPRAS_ISO>EN</SPRAS_ISO>
            <KDKG1>S</KDKG>
            <E1KNVVM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <VKORG>11409</VKORG>
                <VTWEG>01</VTWEG>
                <SPART>00</SPART>
                <VERSG>1</VERSG>
                <AUFSD>01</AUFSD>
                <KALKS>1</KALKS>
                <KDGRP>N</KDGRP>
                <BZIRK>SOM014</BZIRK>
                <KONDA>ID</KONDA>
                <PLTYP>22</PLTYP>
                <AWAHR>100</AWAHR>
                <INCO1>PPD</INCO1>
                <INCO2>Mississauga</INCO2>
                <ANTLF>9</ANTLF>
                <LPRIO>03</LPRIO>
                <VSBED>01</VSBED>
                <FAKSD>25</FAKSD>
                <WAERS>CAD</WAERS>
                <KTGRD>01</KTGRD>
                <ZTERM>H013</ZTERM>
                <VKGRP>BC1</VKGRP>
                <VKBUR>WT</VKBUR>
                <KVGR1>ID</KVGR1>
                <KVGR2>05</KVGR2>
                <KVGR4>FAB</KVGR4>
                <KVGR5>NE</KVGR5>
                <BOKRE>X</BOKRE>
                <PRFRE>X</PRFRE>
                <KABSS>ZCCP</KABSS>
                <UEBTO>10.0</UEBTO>
                <UNTTO>15.0</UNTTO>
                <PODTG>         0</PODTG>
                <INCO2_L>Mississauga</INCO2_L>
                <KALKS_NEW>1</KALKS_NEW>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YG</PARVW>
                    <KUNN2>0000600419</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YD</PARVW>
                    <KUNN2>0000600257</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>WE</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>AG</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>RG</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>RE</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YR</PARVW>
                    <KUNN2>0000600323</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Z4</PARVW>
                    <KUNN2>0000165083</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Y1</PARVW>
                    <KUNN2>0000107886</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Z6</PARVW>
                    <KUNN2>0000165083</KUNN2>
                    <KNREF>50166531</KNREF>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Z8</PARVW>
                    <KUNN2>0000165083</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>US</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>CA</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>MX</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
            </E1KNVVM>
            <E1KNVVM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <VKORG>1140</VKORG>
                <VTWEG>01</VTWEG>
                <SPART>00</SPART>
                <VERSG>1</VERSG>
                <AUFSD>01</AUFSD>
                <KALKS>1</KALKS>
                <KDGRP>N</KDGRP>
                <BZIRK>T00376</BZIRK>
                <KONDA>ID</KONDA>
                <PLTYP>03</PLTYP>
                <AWAHR>100</AWAHR>
                <INCO1>PPD</INCO1>
                <INCO2>MISSISSAUGA</INCO2>
                <ANTLF>9</ANTLF>
                <LPRIO>03</LPRIO>
                <VSBED>01</VSBED>
                <FAKSD>25</FAKSD>
                <WAERS>CAD</WAERS>
                <KTGRD>01</KTGRD>
                <ZTERM>H013</ZTERM>
                <VKGRP>Q1</VKGRP>
                <VKBUR>QC</VKBUR>
                <KVGR1>ID</KVGR1>
                <KVGR2>OT</KVGR2>
                <KVGR4>FAB</KVGR4>
                <KVGR5>NE</KVGR5>
                <BOKRE>X</BOKRE>
                <PRFRE>X</PRFRE>
                <KABSS>ZCCP</KABSS>
                <UEBTO>10.0</UEBTO>
                <UNTTO>15.0</UNTTO>
                <PODTG>         0</PODTG>
                <INCO2_L>MISSISSAUGA</INCO2_L>
                <KALKS_NEW>1</KALKS_NEW>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YG</PARVW>
                    <KUNN2>0000600311</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YR</PARVW>
                    <KUNN2>0000600320</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YD</PARVW>
                    <KUNN2>0000600256</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>WE</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>AG</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>RG</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>RE</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Z4</PARVW>
                    <KUNN2>0000165083</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Y1</PARVW>
                    <KUNN2>0000107887</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Z8</PARVW>
                    <KUNN2>0000165083</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>US</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>CA</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>MX</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVVH SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <TDOBJECT>KNVV</TDOBJECT>
                    <TDNAME>001001582910100100</TDNAME>
                    <TDID>0001</TDID>
                    <TDSPRAS>E</TDSPRAS>
                    <TDSPRASISO>EN</TDSPRASISO>
                    <E1KNVVL SEGMENT="1">
                        <MSGFN>005</MSGFN>
                        <TDFORMAT>*</TDFORMAT>
                        <TDLINE>TAKE NO ORDERS FROM BRIGETTE LAGACE</TDLINE>
                    </E1KNVVL>
                </E1KNVVH>
            </E1KNVVM>
            <E1KNVVM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <VKORG>1192</VKORG>
                <VTWEG>01</VTWEG>
                <SPART>00</SPART>
                <VERSG>1</VERSG>
                <AUFSD>01</AUFSD>
                <KALKS>1</KALKS>
                <KDGRP>N</KDGRP>
                <BZIRK>T00376</BZIRK>
                <KONDA>ID</KONDA>
                <PLTYP>03</PLTYP>
                <AWAHR>100</AWAHR>
                <INCO1>PPD</INCO1>
                <INCO2>MISSISSAUGA</INCO2>
                <ANTLF>9</ANTLF>
                <LPRIO>03</LPRIO>
                <VSBED>01</VSBED>
                <FAKSD>25</FAKSD>
                <WAERS>CAD</WAERS>
                <KTGRD>01</KTGRD>
                <ZTERM>H013</ZTERM>
                <VKGRP>Q1</VKGRP>
                <VKBUR>QC</VKBUR>
                <KVGR1>ID</KVGR1>
                <KVGR2>OT</KVGR2>
                <KVGR4>FAB</KVGR4>
                <KVGR5>NE</KVGR5>
                <BOKRE>X</BOKRE>
                <PRFRE>X</PRFRE>
                <KABSS>ZCCP</KABSS>
                <UEBTO>10.0</UEBTO>
                <UNTTO>15.0</UNTTO>
                <PODTG>         0</PODTG>
                <INCO2_L>MISSISSAUGA</INCO2_L>
                <KALKS_NEW>1</KALKS_NEW>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YG</PARVW>
                    <KUNN2>0000600311</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YR</PARVW>
                    <KUNN2>0000600320</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>YD</PARVW>
                    <KUNN2>0000600256</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>WE</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>AG</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>RG</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>RE</PARVW>
                    <KUNN2>0010015829</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Z4</PARVW>
                    <KUNN2>0000165083</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Y1</PARVW>
                    <KUNN2>0000107887</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVPM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <PARVW>Z8</PARVW>
                    <KUNN2>0000165083</KUNN2>
                    <PARZA>000</PARZA>
                </E1KNVPM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>US</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>CA</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVIM SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <ALAND>MX</ALAND>
                    <TATYP>ZITD</TATYP>
                    <TAXKD>1</TAXKD>
                </E1KNVIM>
                <E1KNVVH SEGMENT="1">
                    <MSGFN>005</MSGFN>
                    <TDOBJECT>KNVV</TDOBJECT>
                    <TDNAME>001001582910100100</TDNAME>
                    <TDID>0001</TDID>
                    <TDSPRAS>E</TDSPRAS>
                    <TDSPRASISO>EN</TDSPRASISO>
                    <E1KNVVL SEGMENT="1">
                        <MSGFN>005</MSGFN>
                        <TDFORMAT>*</TDFORMAT>
                        <TDLINE>TAKE NO ORDERS FROM BRIGETTE LAGACE</TDLINE>
                    </E1KNVVL>
                </E1KNVVH>
            </E1KNVVM>
            <E1KNB1M SEGMENT="1">
                <MSGFN>005</MSGFN>
                <BUKRS>1222</BUKRS>
                <BUSAB>EM</BUSAB>
                <AKONT>0000121000</AKONT>
                <ZWELS>YZX</ZWELS>
                <ZTERM>H013</ZTERM>
                <ZINDT>20091201</ZINDT>
                <ZINRT>01</ZINRT>
                <ZSABE>MIREILLE</ZSABE>
                <VLIBB>0</VLIBB>
                <VRSZL>0</VRSZL>
                <VRSPR>0</VRSPR>
                <VERDT>00000000</VERDT>
                <XAUSZ>1</XAUSZ>
                <WEBTR>0</WEBTR>
                <DATLZ>19000101</DATLZ>
                <XZVER>X</XZVER>
                <KULTG>0</KULTG>
                <PERNR>00000000</PERNR>
                <INTAD>leblancmir@gmail.com</INTAD>
            </E1KNB1M>
            <E1KNB1M SEGMENT="1">
                <MSGFN>005</MSGFN>
                <BUKRS>1227</BUKRS>
                <BUSAB>EM</BUSAB>
                <AKONT>0000121000</AKONT>
                <ZWELS>YZX</ZWELS>
                <ZTERM>H013</ZTERM>
                <ZINDT>19000101</ZINDT>
                <ZINRT>01</ZINRT>
                <ZSABE>Mireille L.</ZSABE>
                <VLIBB>0</VLIBB>
                <VRSZL>0</VRSZL>
                <VRSPR>0</VRSPR>
                <VERDT>00000000</VERDT>
                <XAUSZ>2</XAUSZ>
                <WEBTR>0</WEBTR>
                <DATLZ>19000101</DATLZ>
                <XZVER>X</XZVER>
                <KULTG>0</KULTG>
                <PERNR>00000000</PERNR>
                <INTAD>leblancmir@gmail.com</INTAD>
            </E1KNB1M>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000107886</PARNR>
                <NAME1>Invoice Recipient 1</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000107887</PARNR>
                <NAME1>Invoice Recipient 1</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000107888</PARNR>
                <NAME1>Invoice Recipient 1</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000107889</PARNR>
                <NAME1>Invoice Recipient 1</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000165083</PARNR>
                <NAMEV>General</NAMEV>
                <NAME1>Confirmation</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000165084</PARNR>
                <NAMEV>General</NAMEV>
                <NAME1>Confirmation</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000055761</PARNR>
                <NAME1>ACKNOWLEDGMENT</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000055765</PARNR>
                <NAME1>ASN</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000055769</PARNR>
                <NAME1>INVOICE</NAME1>
                <UEPAR>0000000000</UEPAR>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000055773</PARNR>
                <NAMEV>JOANIE</NAMEV>
                <NAME1>A/P</NAME1>
                <UEPAR>0000000000</UEPAR>
                <TELF1>819 566 5585</TELF1>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1KNVKM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <PARNR>0000055778</PARNR>
                <NAMEV>LEBLANC</NAMEV>
                <NAME1>MIREILLE</NAME1>
                <UEPAR>0000000000</UEPAR>
                <TELF1>8195665585</TELF1>
                <PARLA>E</PARLA>
                <GBDAT>00000000</GBDAT>
                <VRTNR>0000000000</VRTNR>
                <MOAB1>000000</MOAB1>
                <MOBI1>000000</MOBI1>
                <MOAB2>000000</MOAB2>
                <MOBI2>000000</MOBI2>
                <DIAB1>000000</DIAB1>
                <DIBI1>000000</DIBI1>
                <DIAB2>000000</DIAB2>
                <DIBI2>000000</DIBI2>
                <MIAB1>000000</MIAB1>
                <MIBI1>000000</MIBI1>
                <MIAB2>000000</MIAB2>
                <MIBI2>000000</MIBI2>
                <DOAB1>000000</DOAB1>
                <DOBI1>000000</DOBI1>
                <DOAB2>000000</DOAB2>
                <DOBI2>000000</DOBI2>
                <FRAB1>000000</FRAB1>
                <FRBI1>000000</FRBI1>
                <FRAB2>000000</FRAB2>
                <FRBI2>000000</FRBI2>
                <SAAB1>000000</SAAB1>
                <SABI1>000000</SABI1>
                <SAAB2>000000</SAAB2>
                <SABI2>000000</SABI2>
                <SOAB1>000000</SOAB1>
                <SOBI1>000000</SOBI1>
                <SOAB2>000000</SOAB2>
                <SOBI2>000000</SOBI2>
                <PARLA_ISO>EN</PARLA_ISO>
            </E1KNVKM>
            <E1VCKUN SEGMENT="1">
                <MSGFN>005</MSGFN>
                <CCINS>VISA</CCINS>
                <CCNUM>-E803-8027-B7SFF4A0PF716H</CCNUM>
                <CCDEF>X</CCDEF>
                <CCNAME>Decoration Sherbrooke</CCNAME>
                <DATAB>20200131</DATAB>
                <DATBI>20231031</DATBI>
                <CCTYP>01</CCTYP>
            </E1VCKUN>
        </E1KNA1M>
    </IDOC>
</ZOMI034_DEBMAS07>

I have used the follwoing Xpath -

    ```boolean(//*:VKORG[.=('1000','1010','1140','1150','1060')]) and boolean(not(//KTOKD= 'Z002') and not(//KTOKD ='Z004')) and boolean(count(//E1KNVVM)>0) and boolean((count(//E1KNVVM[VKORG = '1140']) != count(//E1KNVVM)) and (//KTOKD != 'Z012' or //KTOKD != 'Z013')) and boolean((count(//E1KNVVM[VKORG = '1060']) != count(//E1KNVVM)) and (//KTOKD != 'Z012' or //KTOKD != 'Z013'))```

but it is returning true. Actually, it sohuld return false as the VKORG 11409 and 1192 are not in the set -('1000','1010','1140','1150','1060')

Any help is much appriciated .

Thanks
Sugata

A: Thanks for clarifying your question!
It's hard to give a proper answer if you don't provide a well-formed XML document as sample input. Nevertheless I'm going to attempt to provide an answer, but bear in mind that because I didn't have a sample input, I wasn't able to actually test any suggestions we provide, so it may well contain errors.
I'm also still not entirely clear on the logic of combining the criteria numbered 3 to 6 in your list. The fact that the XML element names are so cryptic means I've got no real clues from that quarter, and although you say "check the following", it's not clear to me if you need all those following criteria need to be true (i.e. that the clauses should be joined with a logical and operator) or if it's enough for only one of them to be true (in which case they can be combined with an or operator). So you may need to join these things like:
A and B and C and D and E and F

... or maybe you want:
A and B and (C or D or E or F)

... or something else ... I'm not sure. So I'm just going to translate the 6 criteria to XPath expressions and leave you to join them together:

If Count of E1KNVVM segments > 0 then do the following, else set false.

//E1KNVVM

this expression will return a sequence of E1KNVVM elements, and when you combine it with the other criteria using a boolean operator, it will be implicitly converted to a boolean value: an empty sequence will return false while a sequence of at least one element will yield the value true.

If KTOKD = Z002|Z004 - Set false. No need to check VKORG. else check the following

//KTOD=('Z002', 'Z004')

This expression will create a sequence of all the KTOD elements in the document, and compare that sequence with the sequence ('Z002', 'Z004'). Because the items in the second sequence are strings, the = comparison will cause the elements in the first sequence to be converted to strings, in order to be comparable to the items in the second sequence. The = comparison will return true if there is at least one pair of items in the two sequences which are judged to be equal; e.g. ('A', 'B') = ('B', 'C') is true. For details about using the = operator used to compare sequences, see the section on "General Comparisons" in the XPath 2.0 spec: https://www.w3.org/TR/xpath20/#id-general-comparisons

If there is atleast one E1KNVVM segment with VKORG = 1000|1010|1140|1150|1060 - set true.

//E1KNVVM\VKORG=('1000', '1010', '1140', '1150', '1060')

if all the VKORG = 1140 and KTOKD = Z012|Z013, set false.
if all the VKORG = 1140 and KTOKD != Z012|Z013, set true

The following expression tests the following:

*

*At least one VKORG is not equal to 1140, OR,

*there is at least one KTOKD which is neither Z012 nor Z013

//VKORG != '1140' or //KTOKD[not(. = ('Z012', 'Z013')]

This expression creates a sequence of all the VKORG elements and checks that there's at least one VKORG whose value is not equal to 1140.
The second part of the expression //KTOKD[not(. = ('Z012', 'Z013')] creates a sequence of all the KTOKD elements, and filters it to include only those which are not equal to either one of the strings Z012 and Z013.
NOTE this is different to //KTOKD != ('Z012', 'Z013') which would be true if every KTOKD was not equal to at least one of Z012 or Z013; of course if there were a KTOKD whose value was Z012 it would be != Z013, and if its value were Z013 then it would be != Z012. So //KTOKD != ('Z012', 'Z013') would always return true, so long as there was at least one KTOKD element, no matter what its text value is.

if all the VKORG = 1060 and KTOKD = Z012|Z013, set false. if all the VKORG = 1060 and KTOKD != Z012|Z013, set true

not(//VKORG != '1060') and not(//KTOKD = ('Z012', 'Z013'))

The first part of this expression creates a sequence of all the VKORG elements, and returns true if there are any whose text value is not 1060, and false if there are none whose value is not 1060; in other words it returns false if they are all 1060. The not() function then negates that boolean value, meaning that if they're all 1060 the result is true.
As an aside, in XPath version 3 there's some new syntax which allows this kind of condition to be written in a more readable way: every $v in //VKORG satisfies $v = '1060', but that's no help if you're stuck using XPath 2.
The second part of the expression is the same as in the previous criterion.

If KTOKD = Z012|Z013 and there is at least one VKORG = 1000|1010|1150 - set true.

//KTOKD = ('Z012', 'Z013') and //VKORG = ('1000', '1010', '1150')

Good luck! I hope this helps!


text:
Q: Get the html of a TR I have a html in the format of tr td .Now i want to get the html of tr whose id is table_structure.And i want to get the very specific html of the id.I want to get the last 3 td html by using jquery .How can we get this .Please help me
HTML :

        Code

            <input type="text" id="code" name="code" value=""/>

        Charges

            <input type="text" id="charges_id" name="charges" value=""/>

        Adt Charges

            <input type="text" id="adt_charges" name="adt_charges" value=""/>

        Chd Charges

            <input type="text" id="chd_charges" name="chd_charges" value=""/>

            <input type="checkbox" name="chk" id="chk" value="Checked" >Cheked

On the click of chk i want to get the this HTML from te above
Charges

            <input type="text" id="charges_id" name="charges" value=""/>

        Adt Charges

            <input type="text" id="adt_charges" name="adt_charges" value=""/>

        Chd Charges

            <input type="text" id="chd_charges" name="chd_charges" value=""/>

A: Try,
$('#table_structure td:gt(1)').each(function(){
  console.log($(this).html());
});

DEMO
var xHtml = $('#table_structure td:gt(1)').map(function(){
                return $(this).html();
            }).get().join('');

DEMO I

As per your new request and your new html structure I just written some code and framed a demo, just check that here and here

A: You can use slice(-3) to get the last three TD's regardless of how many there are
$('#table_structure td').slice(-3);

FIDDLE
EDIT:
Based on the edited question, you can get the markup like this
$('.inputstr td').slice(-6).map(function() {
    return this.outerHTML;
}).get().join('');

FIDDLE

A: Just try with:
$('#table_structure td:gt(-4)');

It returns last 3 td elements in the table.
http://jsfiddle.net/arKSB/

A: Check out this fiddle i hope its what you are looking for.
fiddle
var html = $('table').find($('tr#table_structure')).html();
console.log(html);

A: If you need the last six s as jQuery objects, use @adeneo's answer. If you need the HTML as string, you can use this (w/o jQuery):
/* mark-up of last six cells (including '') as string: */
html = Array.prototype
          .slice(document.getElementById('table_structure').cells, -6)
          .map(function(td) { return td.outerHTML(); })
          .join('');

(Edit: Replace -3 with -6, since the updated question suggests this.)


text:
Q: Cordova Android JDK Requirement On the cordova website, it says the requirement is 1.7 or greater.
https://cordova.apache.org/docs/en/latest/guide/platforms/android/
I recently updated ionic, cordova, and cordova-android platform:
cordova: 6.5.0
android: 6.1.2
ionic: 2.2.1

Now when I run ionic run android --device:
I get:
Error: Requirements check failed for JDK 1.8 or greater
Do I have to upgrade the JDK or is there another method?
I have another java project needs to stay on JDK 1.7

A: You gotta get JDK 1.8 to make it working. You can install JDK 1.8 and set the path of JDK 1.8 in the system environment path variable to make use of JDK 1.8
JDK 1.7 can still remain as is and you can switch the path to JDK 1.7 when your other JAVA project demands it. Hope it helps. Cheers.


text:
Q: Using Rails view helpers with Haml::Engine I have a Rails app in which I am rendering a block of Haml stuff stored in a model attribute. It would be nice to use Rails view helpers in that block of Haml. Currently I am using the Haml::Engine#render in a view helper to render the content of this model attribute. It works well enough but I can't use things like =link_to. To illustrate the problem:
irb(main):003:0> haml_text=<<"EOH"
irb(main):004:0" %p
irb(main):005:0"   =image_tag 'someimage'
irb(main):006:0" EOH
=> "%p\n  =image_tag 'someimage'\n"
irb(main):007:0> engine = Haml::Engine.new(haml_text)
=> #<Haml::Engine:0x7fa9ff7f1150 ... >
irb(main):008:0> engine.render
NoMethodError: undefined method `image_tag' for #<Object:0x7fa9ff7e9a40>
        from (haml):2:in `render'
        from /usr/lib/ruby/gems/1.8/gems/haml-3.0.25/lib/haml/engine.rb:178:in `render'
        from /usr/lib/ruby/gems/1.8/gems/haml-3.0.25/lib/haml/engine.rb:178:in `instance_eval'
        from /usr/lib/ruby/gems/1.8/gems/haml-3.0.25/lib/haml/engine.rb:178:in `render'
        from (irb):8

Any thoughts on how to do that?
Better ideas?

A: Marcel was going in the right direction. But you need to get a valid scope for the render engine from somewhere. What I did was call the helper with a valid scope like this:
In my_view/edit.html.haml
=my_revertable_field(self, 'hello world')

In application_helper.rb
def my_revertable_field(haml_scope, title, field)
      template =<<EOS
.field
  #{label}
  = text_field_tag #{field.name}, #{field.amount}, :size=>5, :class=>"text"
  = image_tag("refreshArrow.gif",:class=>"revert-icon", :style=>"display:none;",:title=>"Revert to default, #{field.default}")
EOS
end

Then you have a valid haml scope and so image_tab, form_tag_helpers all work

A: class RailsRenderingContext
  def self.create(controller)
    view_context = ApplicationController.helpers
    class << view_context; include Rails.application.routes.url_helpers; end

    view_context.request = controller.request
    view_context.view_paths = controller.view_paths
    view_context.controller = controller

    view_context
  end
end

class MyController < ApplicationController
  def show
    # ...
    engine = Haml::Engine.new haml
    ctx = RailsRenderingContext.create(self)
    engine.render ctx
  end
end

It works for me. Based on this issue.

A: The render method allows you to specify a context. Something like
base = Class.new do
  include ActionView::Helpers::AssetTagHelper
  include ApplicationHelper
end.new

Haml::Engine.new(src).render(base)

could work.


text:
Q: aws cloudformation s3 event notification to SQS not working I have written one cloudformation template in which I am trying to create S3 and SQS queue.
I am trying to achieve following functionality:
1.create SQS queue
2.create SQs queue policy to allow S3 event
3.create S3 and notification QueueConfigurations to trigger SQS
Following is my AWS cloudformation template link in which 1st and 2nd step gets execute properly but I am facing issue at step no. 3
https://github.com/maheshvarak89/aws-cfn-templates/blob/master/s3_event_sqs
I am facing following error:

The ARN is not well formed (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: XXX03XXXXBC36E49; S3 Extended Request ID: bYBRrz0ybftGFwHxFCBXWBI5nRF15COGCL6Q8tm3bNs/e+aWafy+pAIIeUNy82DmOKJcVq1MthE=

A: An ARN for SQS is in the form
arn:aws:sqs:${Region}:${Account}:${QueueName}

You current ARN is of the form
arn:aws:sqs:::${QueueName}

A: Instead of building the ARN, you can simply reference it using GetAtt:
Queue: !GetAtt MyQueue.Arn


text:
Q: ABAP type pool: program with type code TYPP but with name longer than five characters We are writing a tool in Java that parses and transforms ABAP code. We therefore have no intention to write new ABAP code but our tool has to handle all of ABAP, even obsolete statements.  Furthermore, I'm not an ABAP expert.
ABAP programs can use type groups, introduced by key word TYPE-POOL.  Names of type groups have a maximal length of five (internally eight, if you count the prefix "% C"), their type code is TYPP.  In the past, relying on these assumptions worked well for us.
Recently, we see ABAP programs with type code TYPP but with name longer than 5, e.g., 'OIA===========================P'. Furthermore, for each of those, there is another, empty object with same name but type code INCL. These new objects are referenced only if a regular type group is, too.
These new objects may be internal ones and irrelevant for us - I haven't seen any reference to them in the ABAP Keyword Documentation. On the other hand, they are confusing us because we see them.
Can someone explain to me the meaning of these objects and point me to some documentation?
Edit: Here examples from an EHP7 for SAP ERP 6.0 system
An example object.  Entries in D010INC look fine:

The same object now using type pool mrm.  Where do the additional includes come from?

A: These objects are introduced through inclusions, extensions and switched objects. To read along:

*

*Check type pool MRM, type mrm_idoc_data_ers - that type contains a statement to include rmrm_idoc_data_ers_sbo. A similar include statement pulls rmrm_upd_arseg_nfm into mrm_upd_arseg. That explains the last two lines. Your parser should have caught that.

*RMRM_IDOC_DATA_ERS_SBO contains an enhancement point named RMRM_IDOC_DATA_ERS_SBO_02 that belongs to an enhancement spot ES_RMRM_IDOC_DATA_ERS_SBO. Similarly, RMRM_UPD_ARSEG_NFM contains an enhancement point RMRM_UPD_ARSEG_NFM_01 that belongs to the enhancement spot ES_RMRM_UPD_ARSEG_NFM.

*For ES_RMRM_IDOC_DATA_ERS_SBO, an enhancement implementation named ISAUTO_MRM_RMRM_IDOC_DATA_ERS exists. For ES_RMRM_UPD_ARSEG_NFM, an implementation named /NFM/MM_RMRM_UPD_ARSEG_NFM exists. That explains the references ending with =E

*The implementation ISAUTO_MRM_RMRM_IDOC_DATA_ERS is located in the package ISAUTO_MRM. The implementation /NFM/MM_RMRM_UPD_ARSEG_NFM is located in the package /NFM/MM. That explains the references ending with =P. Obviously, these references are not generated for every package:

*The package ISAUTO_MRM is controlled by the switch AM_ERS, the package /NFM/MM is controlled by the switch /NFM/MM. That explains the references ending in =S.

Ultimately, these references can be used to determine which programs need to be re-generated when the state of a switch is changed.


text:
Q: Microsoft Graph API Office 365 - How change message flags property with REST API? Following this question :
Microsoft Graph API mail office 365: Is any option create inbox message NOT as Draft?
I want to convert from EWS to Graph API ,
in EWS it is under the section below:

https://msdn.microsoft.com/en-us/library/ms527629.aspx
How can I change/ modify mail message flags with REST ?
I saw in beta version is possible somehow...
Part of the REST is here:
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/mail_api_overview
Any suggestions please ?

A: @Nicolas is correct.  Check out Microsoft Graph API mail office 365: Is any option create inbox message NOT as Draft?
In there there is a link to an MSDN article that explains each of the flags, their integer values, etc...

A: It's important to remember that while the graph API (for Exchange related foo) looks a lot different than EWS, they actually share a bunch of the same logic underneath and ultimately talk to the exchange Store underneath.  What this means is that all of the MAPI goodness (proptags, named props, etc...) can be accessed through the graph API via extended props.  Funny bit of trivia - currently the REST API on the server side when it deals with extended props converts them into the EWS internal representation of extended props and calls the server side EWS business logic (in proc) to process them.  So not only is it similar, it is exactly the same :)


text:
Q: Como colocar um subtítulo embaixo no nome do aplicativo no menu bar
Estou querendo colocar duas coisas no menu bar, mais não faço ideia de como faz isso.
O WhatsApp tem duas coisas no menu bar, o nome do contato e a hora que visualizou o WhatsApp.
Tem como eu fazer isso? Ter dois nomes no menu bar?
Minha classe  MainActivity
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    ViewPager galeria = (ViewPager) findViewById(R.id.galeria);
    GaleriaImagensAdapter adapter = null;
    try {
        adapter = new GaleriaImagensAdapter(this);
    } catch (SQLException e) {
        e.printStackTrace();
    }
    galeria.setAdapter(adapter);
}

Aí lá na hora de setar a imagem eu tava querendo trocar o título e subtítulo, usando este setTitle e setSubtitle, tem como?
Aqui eu coloco a imagem
@Override
public Object instantiateItem(ViewGroup pager, int position) {
    ImageView imagem = new ImageView(context);
    imagem.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

    try {
        Class res = R.drawable.class;
        Field field = res.getField(itens.get(position).nome_foto);
        int drawableId = field.getInt(null);
        imagem.setImageResource(drawableId);
    }
    catch (Exception e) {
        Log.e("MyTag", "Failure to get drawable id.", e);
    }
    ((ViewPager) pager).addView(imagem, 0);
    return imagem;
}

A: Na sua Activity, utilize o código abaixo para definir o título e subtítulo, caso você esteja utilizando ActionBar:
getActionBar.setTitle("Título");
getActionBar.setSubtitle("Subtítulo");

Ou getSupportActionBar caso esteja utilizando a biblioteca de compatibilidade.

A: Para isso você deve registrar um listener para quando o item do ViewPager mudar você capturar o evento e fazer algo relacionado.
Isso pode ser feito assim:
ViewPager galeria = (ViewPager) findViewById(R.id.galeria);
galeria.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
    @Override
    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
    }

    @Override
    public void onPageSelected(int position) {
        getActionBar().setTitle("Posição "+position);
        getActionBar().setSubtitle("Posição "+position);

        // Para biblioteca de compatibilidade
        //getSupportActionBar().setTitle("Posição "+position);
        //getSupportActionBar().setSubtitle("Posição "+position);
    }

    @Override
    public void onPageScrollStateChanged(int state) {
    }
});

Para alterar conforme o item do adapter você também pode criar um método que busque-o passando a posição recebida no onPageSelected() e então, alterar seu título e subtítulo imediatamente.


text:
Q: Меня перенаправляет на главную страницу XAMPP Вбиваю в URL адрес сайта на локалке и меня перенаправляет на главную страницу XAMPP. В настройках апача не особо еще разбираюсь. В чем проблема?
Вот содержимое файла Htaccess.
Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
    # Turn off mod_security filtering.
    SecFilterEngine Off

    # The below probably isn't needed, but better safe than sorry.
    SecFilterScanPOST Off
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
#RewriteCond %{HTTP_HOST} !^dev.guestcrew.com$ [NC]
#RewriteRule ^(.*)$ http://dev.guestcrew.com/$1 [L,R=301]

    # Some hosts require RewriteBase to make RewriteRules work.
    RewriteBase /

    # General Pages:
    RewriteRule ^contact-us.html$ contact.php [L,QSA,NC]
    RewriteRule ^landing/(guest-blogger|blog-owners|advertiser|all-about).html$ landings.php?type=$1 [L,QSA,NC]
    RewriteRule ^landing/advertiser-pro.html$ advertiser-pro.php [L,QSA,NC]

    RewriteRule ^google([^./]+).html$ google$1.html [L,QSA,NC]
    RewriteRule ^([^./]+).html$ pages.php?slug=$1 [L,QSA,NC]

    RewriteRule ^campaign/([0-9]+)-([^./]+) view.php?id=$1&title=$2 [L,QSA,NC]

    RewriteRule ^category/([0-9]+)-([^./]+)/$ filter.php?category=$1&title=$2 [L,QSA,NC]
    RewriteRule ^campaign-embed/([0-9]+)-([^./]+)/$ view.php?id=$1&title=$2&embed=true [L,QSA,NC]
</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>


text:
Q: How do I implement OO with Lua Metatables? I've never been able to fully wrap my mind about how Lua uses metatables to implement Object Orientation in its programming. I've been reading over the online tutorial directory trying to understand, however the author wrote it with experienced programmers in mind, in which I am not. With abstract ideas and not-noob-friendly variables and explanations, going's been a little tough. Here is a link to the Object Orientation page on Lua's website.
Can anyone give a noob-friendly explanation of how to implement it? I'm doing some scripting for a game I play (not WoW), and I'd like to make my code better by using it. Thank you!

A: There are many ways to code up an OO feel in Lua.
Lua goes for mechanism, not policy.
The best possible source is the chapter in Roberto's book on Object-Oriented Programming.  Definitely noob-friendly.
Great book.  The link is to the previous edition, which is free online.
But you will want to buy the latest edition :-)

A: Disclaimer: I'm the developer of MiddleClass
I've developed a library for people like you. It's called MiddleClass.
It conveniently hides the metatables so you can concentrate on object-oriented stuff. It's also reasonably commented out, should you want to take a look underneath.
There's also a wiki page explaining how to use it.


text:
Q: include something in something how can I describe in English that Institution B is becoming a part of Institution A?
In other words, can I say that: Institution A is including Institution B in?
or
Institution A is having Institution B in?
or
Institution A is taking Institution B in?
Are "taking in/having in/including in" the accurate expressions to use?

A: I would use:
-Institution B is being absorbed by Institution A
-Institution B is being acquired by Institution A