text:
Q: IsInViewport change img to gif once I'm completely stuck on this problem.
My goal is to change an img to a gif, once the img is within viewport.
I've used the IsInViewport library: https://github.com/zeusdeux/isInViewport and implemented the following code on http://www.verticalstrategy.com/agile_strategy/ (see below).
Can anyone spot why my boolean doesn't seem to work and the gif is loading every time you scroll within the viewport?
jQuery(document).ready(function ($) {

    gifset = false;

    if (gifset == false) {

        $(window).scroll(function () {

            $(".for-large-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('src', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_Landscape-1.gif?");
            $(".for-large-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('srcset', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_Landscape-1.gif?");
            $(".for-small-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('src', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_portrait-1.gif?");
            $(".for-small-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('srcset', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_portrait-1.gif?");

            if ($(".for-large-device .wpb_wrapper .vc_single_image-wrapper").is(':in-viewport')) {
                gifset = true;
            }

        });
    };
});

A: Here is what your code does, in natural language:

*

*Wait for the page to be ready

*Once the page is ready:

*. Declare gifset, set it to false.

*. If gifset is false [hint: always] do this:

*.. Register a scroll listener

*.. ...

The problem here is that you only check the gifset variable right after setting it. It can never change in that scope.
If you move the variable check to inside the scroll listener, it should work. Here, I check if gifset is true and exit, otherwise perform the action as before:
jQuery(document).ready(function ($) {

    gifset = false;

    $(window).scroll(function () {

        if(gifset) {
            return;
        }

        $(".for-large-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('src', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_Landscape-1.gif?");
        $(".for-large-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('srcset', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_Landscape-1.gif?");
        $(".for-small-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('src', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_portrait-1.gif?");
        $(".for-small-device .wpb_wrapper .vc_single_image-wrapper img:in-viewport").attr('srcset', "http://www.verticalstrategy.com/wp-content/uploads/2016/12/agileStrategy_portrait-1.gif?");

        if ($(".for-large-device .wpb_wrapper .vc_single_image-wrapper").is(':in-viewport')) {
            gifset = true;
        }

    });
});

A better solution would be to unregister the listener, once the image source has been updated, as every scroll will keep resulting in a function call until that happens (even if it is a short function call it is unnecessary overhead).


text:
Q: How can I make an if statement that asks, if the number equals to 8 to the power of n (8^n)? I want to do an if statement that looks something like this:
(n is a natural number)
if (number == 8^n) {
  // Code...
}

A: Use Math.pow(x, y);
Example:
function check(number,n){
  let r = Math.pow(8, n);
  if (number==r)
    //Do something
}

A: var n=parseInt(prompt("Enter N:"));
var _number =parseInt(prompt("Enter Number:"));
if(!isNaN(n) && !isNaN(_number))
{
  if(_number == Math.pow(8, n))
    console.log("Equal");
  else
    console.log("Not Equal");
}else
   console.log("Invalid N / Number");

Or
var n=parseInt(prompt("Enter N:"));
var _number =parseInt(prompt("Enter Number:"));
if(isNaN(n))
   console.log("Invalid N");
else if(isNaN(_number))
   console.log("Invalid N");
else
{
  if(_number == Math.pow(8, n))
    console.log("Equal");
  else
    console.log("Not Equal");
}

redpajama_set_name: RedPajamaStackExchange


text:
Q: Voltage Current and Voltage Charge Relationship for a Capacitor
*

*The voltage-current relationship for a capacitor is described by Eq. \eqref{1}:
\begin{equation}
\mathrm{v}\left(\, t\, \right) =
\frac{1}{C}\int_{0}^{1}\mathrm{i}\left(\, \tau\, \right)\,\mathrm{d}\tau
\label{1}\tag{1}
\end{equation}

*The voltage-charge relationship for a capacitor is described by Eq. \eqref{2}:
\begin{equation}
\mathrm{v}\left(\, t\, \right) =
\frac{1}{C}\,\mathrm{q}\left(\, t\, \right)
\label{2}\tag{2}
\end{equation}

*How can I prove that
$\,\mathrm{q}\left(\, t\, \right) =
\int_{0}^{1}\mathrm{i}\left(\, \tau\, \right)\,\mathrm{d}\tau$ ?.

A: The equation you want is
$$
q(t)= \int_0^t i(\tau) d\tau
$$
This comes from integrating both sides of the definition
$$
\frac{dq}{dt}= i(t)
$$

A: You can use your equations $(1)$ and $(2)$ to answer your question. From equation $(1)$, you have
$$
v(t) = \frac{1}C\int_0^1 i(\tau)\,d\tau\label{a}\tag{1}.
$$
From your equation $(2)$, you have
$$
v(t) = \frac{1}{C}q(t)\label{b}\tag{2}.
$$
Therefore, multiply equation $(2)$ by the capacitance $C$ on each side to obtain
$$
q(t) = Cv(t)\label{c}\tag{3}.
$$
Substitute the value of $v(t)$ from equation $(1)$ into $(3)$, and you're done:
$$
q(t) = C\left(\frac{1}C\int_0^1 i(\tau)\,d\tau\right) = \int_0^1 i(\tau)\,d\tau.
$$


text:
Q: Reading documents from file when using sklearn.feature_extraction.text CountVectorizer I am able to use code as in the example from the documentation, where the input to the fit_transform() function is a list of sentences, i.e:
corpus = [
   'this is the first document',
   'this is the second second document',
   'and the third one',
   'is this the first document?'
]

X = vectorizer.fit_transform(corpus)
and get expected data out.  But when I try to replace corpus with a list of files, or file objects as the documentation suggests it can be:
"
 fit(raw_documents, y=None)
Learn a vocabulary dictionary of all tokens in the raw documents.
Parameters :
raw_documents : iterable
    An iterable which yields either str, unicode or file objects.
Returns :
self :

"
.. so there is something missing in my understanding of the pipeline, I think.  Given a directory of files that I would like to CountVectorize, how do I do that?
if I try to feed a list of file objects, as [open(file,'r')] the error message I get is that file objects have no lower function.

A: Set the vectorizer's input constructor parameter to either filename or file. Its default value is content, which assumes you've already read the files into memory.


text:
Q: React native nested stack navigation showing empty screen I am trying to achieve nested react native navigation using Stack navigator following this example from website. I have also checked other question in SO but not able to find my mistake.
In Home.tsx component I have two nested route HomeView and Products. On click of a link in HomeView.tsx I am executing categoryClick in Home.tsx and inside this function , I want to navigate to Products.tsx componet. The navigation is working as expected but the nested routed defined in screen for Products component is not working as expected. it is showing an empty screen. Please help to understand my mistake
Home.tsx
import React, {useState} from "react";
import {View} from "react-native";
import Header from "../header/Header";
import HomeStyles from './Home.scss';

import {createNativeStackNavigator} from "@react-navigation/native-stack";
import Products from "../products/Products";
import HomeView from "../home-view/HomeView";

export interface HomeProps {}

export function Home({route, navigation}) {
  let [loader, setLoader] = useState(false)
  const Stack = createNativeStackNavigator()

  function categoryClick(e: number) {
    // expectation is it will navigate to `Ab` screen on loading `Products`
    navigation.navigate('Products', {
      screen: 'Ab',
      params: {}
    })
  }

  return (
    <View style={
      HomeStyles.homeContainer}>
      <View style={HomeStyles.homeHeader}>
        <Header/>
      </View>

      <Stack.Navigator initialRouteName='Products'>
        <Stack.Screen name='HomeView'
                      options={{headerShown: false}}>
          {(props) => <HomeView
            catrgotryClick={categoryClick}
            {...props} />}
        </Stack.Screen>
        <Stack.Screen
          name='Products'
          component={Products}
          options={{headerShown: false}}/>
      </Stack.Navigator>

    </View>
  );
}

export default Home;

Products.tsx
import { Route, Link } from 'react-router-dom';
import ProductsStyles from  './Products.scss';
import {Text, View} from "react-native";
import React, {useEffect, useState} from "react";
import {RouteProp, useNavigation} from "@react-navigation/native";
import Ab from "../ab/Ab";
import Hi from "../hi/Hi";
import Ac from "../ac/Ac";
import Je from "../je/Je";
import {createNativeStackNavigator} from "@react-navigation/native-stack";

export interface ProductsProps {
  route:RouteProp<any>;
  navigation:any
}

export function Products(props:ProductsProps) {
  const ProductStack = createNativeStackNavigator();
  return (
    <View style={{flex:1,justifyContent:"center",alignItems:"center"}}>
     <ProductStack.Navigator>
       <ProductStack.Screen name='Ab' options={{headerShown:false}}
        component={Ab}/>
        <ProductStack.Screen name='Hi' component={Hi}/>
        <ProductStack.Screen name='Ac' component={Ac}/>
        <ProductStack.Screen name='Je' component={Je}/>
      </ProductStack.Navigator>
      </View>
 );
}

export default Products;

A: We can't put Navigator inside View, so you need to change the Products.tsx file to
import { Route, Link } from 'react-router-dom';
import ProductsStyles from  './Products.scss';
import {Text, View} from "react-native";
import React, {useEffect, useState} from "react";
import {RouteProp, useNavigation} from "@react-navigation/native";
import Ab from "../ab/Ab";
import Hi from "../hi/Hi";
import Ac from "../ac/Ac";
import Je from "../je/Je";
import {createNativeStackNavigator} from "@react-navigation/native-stack";

export interface ProductsProps {
  route:RouteProp<any>;
  navigation:any
}

export function Products(props:ProductsProps) {
  const ProductStack = createNativeStackNavigator();
  return (
     <ProductStack.Navigator>
       <ProductStack.Screen name='Ab' options={{headerShown:false}}
        component={Ab}/>
        <ProductStack.Screen name='Hi' component={Hi}/>
        <ProductStack.Screen name='Ac' component={Ac}/>
        <ProductStack.Screen name='Je' component={Je}/>
      </ProductStack.Navigator>
 );
}

export default Products;


text:
Q: how do i remove the decimal point using vuejs I generate a random number when the model is mounted. I want to remove the "0." The 0. and decimal. I tried adding Math.round() but that gives me a NaN. Can someone tell me what I am missing.

new Vue({
el: '#app',

  data: {
      mixNumber:''
  },
  mounted: function(){
  this.myFunction();
  },

   methods:{
    myFunction: function () {
        this.mixNumber = Math.random();
    this.roundNumber=Math.round();
    }
   }

});

 My ID is: {{mixNumber}}

A: You can use the following code:

new Vue({
el: '#app',

  data: {
      mixNumber:'',
      roundNumber: ''
  },
  mounted: function(){
  this.myFunction();
  },

   methods:{
    myFunction: function () {
        this.mixNumber = Math.random();
        this.roundNumber = this.mixNumber.toString().split(".")[1];
    }
   }

});

 My ID is: {{roundNumber}}


text:
Q: pointing drupal to a subfolders using htaccess In my shared hosting root, i have 2 folders main & demo. The main contains the drupal 7 files for the main website and the demo contains the demo version of this website. What i want to do is when i call www.domain.com or domain.com it should get the contents from the main folder and when i call demo.domain.com or www.demo.domain.com (subdomain) i will be able to get the demo version of this website. I have made an .htaccess file as shown below and placed it in the root folder for redirection. The issue is when i call the www.domain.com or domain.com is opening the home page but all the other links(www.domain.com/page) will not work. The only way it works will be when i give the url as www.domain.com/main/page. I have changed the base_url also to 'www.domain.com', i dont have much of an idea with htaccess file. please assisnt me with this issue.
RewriteEngine On
RewriteCond %{THE_REQUEST} \ /+main/
RewriteRule ^main/(.*)$ http://domain.com/$1 [L,R=301]
RewriteCond %{THE_REQUEST} \ /+demo/
RewriteRule ^demo/(.*)$ http://demo.domain.com/$1 [L,R=301]
RewriteRule ^(main|demo)/ - [L]
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^(.*)$ /main/$1 [L]
RewriteCond %{HTTP_HOST} ^(www\.)?demo\.domain\.com$ [NC]
RewriteRule ^(.*)$ /demo/$1 [L]

A: This should ideally be added to your apache config in terms of both best practice and performance, and look along the lines of:
#example demo.domain.com.conf
<VirtualHost 127.0.0.1:80>
    ServerName demo.domain.com
    DocumentRoot /var/www/demo.domain.com/htdocs
 <Directory /var/www/demo.domain.com/htdocs>
    Options All
    Allow from all
    AllowOverride All
 </Directory>
</virtualhost>

#example domain.conf
<VirtualHost 127.0.0.1:80>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /var/www/domain.com/htdocs
 <Directory /var/www/domain.com/htdocs>
    Options All
    Allow from all
    AllowOverride All
 </Directory>
</virtualhost>

however if this isn't an option and your control is limited to .htaccess in your root web folder, you can proxy a subdomain to the demo folder by adding the following:
#Add to .htaccess in web root under IfModule block:
RewriteBase /
RewriteCond %{HTTP_HOST} ^demo\.(.+)$ [NC]
RewriteRule ^(.*)$ http://domain.com/demo/$1 [P]

This is assuming that you have drupal core in both your main site folder and demo.

A: Thanks guys, i figured it out. This .htaccess solved my issue.
Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^$ main/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/main%{REQUEST_URI} -f
RewriteRule .* main/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* main/index.php?q=$0 [L,QSA]

Now i am able to put the drupal files in a subfolder named main and was able to access the subdomain demo.subdomain from the browser. Also need to change the $base_url in settings.php to $base_url='www.domain.com' . A really big thanks to kahthong.com  for this valuable post.


text:
Q: Add a static/hardcoded price if textfield contains text I have a textbox that is shown on some products so that people can type a name or word that they want engraved onto the item they are buying. Now my issue is if they type something in the textbox and click add to cart I need a hardcoded price added ontop of the products base price. So say the item is $100.00 and they type a word in the textbox and click add to cart the item should then have its price changed to $106.99
My issue is I am not sure how to go about changing the products price if a textbox contains a value.

A: This can be done in the Magento admin panel using Custom Options.
On the product to be modified, go to Custom Options and click Add New Option.
Choose Input Type: Text Field, set Required to No, and set your price as 6.99.
When saved this will give the product a text option which when filled will add 6.99 to the price. It is important to note that prices on custom options are always additional to the product price, unless you have any extensions in place that allow these to set the final price.
Note: it is also possible to reduce the price using a custom option, by prefixing the price with a minus sign '-'


text:
Q: MySQL Query Browser Error I'm using an old MySQL Query Browser which isn't a problem except for this one bit of code in my script that I cannot fix. I'll post the bit below along with the error.
    /*!40000 ALTER TABLE `pets` ENABLE KEYS */;

--
-- Definition of table `petsaves`
--

DROP TABLE IF EXISTS `petsaves`;
CREATE TABLE `petsaves` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `characterid` int(11) NOT NULL,
  `petid1` int(10) NOT NULL DEFAULT '-1',
  `petid2` int(10) NOT NULL DEFAULT '-1',
  `petid3` int(10) NOT NULL DEFAULT '-1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Error:

24086 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `pets` ENABLE KEYS*/;
  --
  -- Definition of table \`petsaves\`
  -' at line 843

UPDATE***
If I remove this large dump of data into the tables pets everything works.
/*!40000 ALTER TABLE `pets` DISABLE KEYS */;
INSERT INTO `pets` (`petid`,`name`,`level`,`closeness`,`fullness`) VALUES
 (1,'White Bunny',1,0,50),
 (2,'Kino',7,100,72),
 (3,'Ger <3',4,12,60),
 (4,'Panda',15,2153,20),
 (5,'Sara',16,2213,82),
 (6,'Maya <3',2,1,98),
 (7,'Pink Bunny',1,0,100),
 (8,'White Tiger',1,0,88),
 (9,'Tiger',1,0,46),
 (10,'Penguin',1,0,100),
 (11,'Penguin',1,0,56),
 (12,'Aimar',2,2,97),
 (13,'White',5,16,15),
 (14,'Baby Tiger',4,7,67),
 (15,'White Tiger',1,0,50),
 (16,'White Tiger',1,0,46),
 (17,'Snowman',1,0,56),
 (18,'Baby Tiger',13,1100,97),
 (19,'Sun Wu Kong',2,2,40),
 (20,'Elvis',5,15,90),
 (21,'White Tiger',3,3,6),
 (22,'Pink Bunny',1,0,100),
 (23,'Kino',1,0,96),
 (25,'Baby Robo',1,0,90),
 (26,'Pink Bunny',12,800,98),
 (27,'Black Kitty',1,0,86),
 (28,'Snowman',3,3,76),
 (29,'Koopa Jr',18,4414,15),
 (30,'Monkey',1,0,100),
 (31,'Husky',6,89,66),
 (32,'Husky',1,0,92),
 (34,'Baby Robo',1,0,93),
 (35,'Dragon',1,0,100),
 (36,'White Tiger',1,0,100),
 (37,'Pikachu',3,5,15),
 (38,'White Bunny',2,2,90),
 (40,'Baby Robo',10,400,99),
 (41,'Rudolph',1,0,100),
 (42,'Rudolph',1,0,100),
 (43,'Grey',4,7,60),
 (44,'White Bunny',1,0,58),
 (45,'Monkey',1,0,100),
 (46,'Jr. Balrog',1,0,50),
 (47,'Kino',1,0,98),
 (48,'White Tiger',1,0,100),
 (49,'Baby Tiger',1,0,100),
 (50,'Panda',1,0,92),
 (51,'Kino',1,0,100),
 (52,'Pink Bunny',1,0,100),
 (53,'Allmighty',1,0,48),
 (55,'Baby Robo',3,4,44),
 (56,'White Tiger',1,0,7),
 (57,'White Tiger',1,0,100),
 (58,'Penguin',1,0,100),
 (59,'Baby Tiger',1,0,100),
 (60,'White Bunny',1,0,80),
 (61,'Pink Bean',1,0,100),
 (62,'BuNnY',2,2,15),
 (63,'BuNnY',10,403,94),
 (64,'Jr. Reaper',2,2,90),
 (65,'Dino Girl',3,4,40),
 (66,'Faint',2,2,15),
 (67,'Brown Puppy',1,0,37),
 (68,'Pink Bunny',1,0,14),
 (69,'PhagTard<3',2,2,38),
 (70,'Mini Yeti',1,0,70),
 (71,'Sun Wu Kong',1,0,58),
 (72,'Monkey',1,0,92),
 (73,'iBlackyJr',1,0,70),
 (74,'White Tiger',1,0,90),
 (75,'Brown Puppy',1,0,91),
 (76,'Burt',2,1,70),
 (78,'Baby Dragon',1,0,73),
 (79,'Baby Tiger',13,1100,67),
 (80,'Kino',1,0,100),
 (82,'Baby Dragon',8,115,85),
 (83,'White Bunny',7,87,15),
 (84,'Husky',1,0,100),
 (85,'Tooth Fairy',2,1,100),
 (86,'Kino',1,0,100),
 (87,'Jr. Reaper',1,0,84),
 (89,'Baby Dragon',1,0,88),
 (91,'Baby Dragon',1,0,100),
 (92,'Dragon',1,0,100),
 (93,'Dragon',1,0,100),
 (94,'Husky',1,0,80),
 (95,'Husky',1,0,100),
 (96,'Kinky',1,0,96),
 (97,'Kino',1,0,100),
 (98,'Penguin',3,3,70),
 (99,'Golden Pig',5,21,15),
 (101,'Baby Tiger',10,400,15),
 (102,'Baby Dragon',12,701,61),
 (103,'White Bunny',1,0,100),
 (104,'Dragon',1,0,100),
 (105,'Snowman',1,0,13),
 (106,'Baby Tiger',1,0,12),
 (107,'Sun Wu Kong',1,0,13),
 (108,'Baby Tiger',1,0,100),
 (109,'Penguin',2,1,15),
 (110,'Golden Pig',3,5,15),
 (111,'Rudolph',4,7,15),
 (113,'Baby Dragon',13,1105,15),
 (114,'Bunneary',4,9,60),
 (115,'Brown Puppy',2,2,91),
 (116,'Mr.Husky',4,7,76),
 (117,'Husky',1,0,15),
 (118,'Sparky',16,2409,85),
 (119,'Husky',1,0,100),
 (120,'Baby Tiger',3,4,58),
 (122,'Baby Dragon',1,0,70),
 (123,'Mini Yeti',1,0,79),
 (124,'Mini Yeti',7,99,88),
 (125,'Cha-Cha',11,512,85),
 (126,'Mini Kargo',1,0,28),
 (127,'Husky',9,400,52),
 (128,'Mini Kargo',3,5,58),
 (129,'Japan',3,7,82),
 (130,'Baby Tiger',1,0,34),
 (131,'White Tiger',1,0,68),
 (132,'Baby Tiger',16,2400,70),
 (133,'White Bunny',1,0,94),
 (134,'White Bunny',2,1,100),
 (135,'White Tiger',3,3,80),
 (136,'White Bunny',1,0,100),
 (137,'Kino',12,800,100),
 (138,'White Tiger',2,1,15),
 (140,'Jr. Reaper',1,0,15),
 (141,'Baby Robo',0,0,97),
 (142,'Tony Tony',1,0,80),
 (143,'Monkey D',7,102,62),
 (144,'Panda',2,2,84),
 (145,'Baby Tiger',1,0,100),
 (146,'Jr. Reaper',1,0,100),
 (147,'LittleBoy',2,2,32),
 (148,'White Bunny',1,0,54),
 (149,'Panda',1,0,96),
 (150,'Panda',1,0,100),
 (151,'Reshiram',16,2327,64),
 (152,'Penguin',2,1,76),
 (153,'Jr. Reaper',1,0,24),
 (154,'Jr. Reaper',1,0,15),
 (155,'White Tiger',1,0,68),
 (156,'Penguin',4,6,90),
 (157,'Snowman',2,1,72),
 (158,'Fan of Emil',9,200,90),
 (159,'Black Kitty',1,0,60),
 (160,'White Duck',13,900,100),
 (161,'Jr. Reaper',11,600,74),
 (162,'Jr. Reaper',1,0,96),
 (163,'Jr. Balrog',1,0,65),
 (164,'nooben',11,500,96),
 (165,'White Tiger',3,4,15),
 (166,'Husky',10,400,52),
 (167,'White Bunny',1,0,15),
 (168,'Penguin',1,0,50),
 (169,'Jr. Reaper',13,1100,36),
 (170,'Baby Tiger',1,0,70),
 (171,'Robo',1,0,100),
 (172,'Goldy',1,0,45),
 (173,'Suck my....',2,1,48),
 (174,'Black Kitty',1,0,13),
 (175,'Kino',1,0,100),
 (176,'Monkey',1,0,44),
 (177,'Pink Bunny',1,0,92),
 (178,'White Bunny',2,2,15),
 (179,'Baby Tiger',2,1,72),
 (180,'Baby Tiger',1,0,100),
 (181,'Baby Tiger',1,0,100),
 (182,'Baby Tiger',3,5,70),
 (183,'Black Kitty',1,0,100),
 (184,'White Tiger',5,14,96),
 (185,'Jr. Reaper',19,5525,15),
 (186,'Brown Puppy',1,0,70),
 (187,'Sun Wu Kong',1,0,100),
 (188,'??? ??',1,0,100),
 (189,'Porcupine',1,0,100),
 (190,'Brown Kitty',15,1700,92),
 (191,'Kino',15,2489,76),
 (192,'Brown Puppy',1,0,82),
 (193,'whale',1,0,84),
 (194,'Turkey',1,0,100),
 (195,'Turkey',1,0,100),
 (196,'Turkey',1,0,100),
 (197,'Turkey',1,0,100),
 (199,'Baby Robo',1,0,80),
 (200,'Pink Bunny',16,2301,64),
 (201,'Kino',12,805,98),
 (202,'Black Kitty',1,0,98),
 (203,'Kino',10,302,92),
 (205,'Baby Dragon',1,0,6),
 (206,'Husky',1,0,74),
 (207,'Jr. Reaper',7,100,88),
 (208,'Monkey',4,10,88),
 (209,'Jr. Reaper',1,0,24),
 (210,'White Bunny',13,1101,96),
 (212,'Baby Dragon',3,3,85),
 (213,'[Kae]',13,1108,49),
 (214,'Brown Puppy',1,0,85),
 (216,'Star Jr.',15,2130,96),
 (217,'White Tiger',1,0,76),
 (218,'Sun Wu Kong',5,15,78),
 (219,'Baby Tiger',2,2,70),
 (221,'Dubu',15,1858,55),
 (222,'Jr. Reaper',1,0,90),
 (223,'Husky',1,0,16),
 (224,'Pupa',5,28,96),
 (225,'boothang',1,0,80),
 (226,'Kino',1,0,78),
 (228,'Baby Dragon',15,1800,15),
 (230,'Baby Robo',15,1900,100),
 (231,'Pink Bunny',1,0,76),
 (232,'White Bunny',1,0,34),
 (233,'Mini Yeti',1,0,58),
 (234,'Baby Tiger',5,30,88),
 (235,'Kino',3,3,100),
 (236,'Rudolph',1,0,48),
 (238,'Dragon',1,0,100),
 (239,'Dragon',1,0,100),
 (240,'Baby Dragon',4,9,97),
 (241,'Jr. Reaper',1,0,98),
 (242,'Husky',3,3,88),
 (243,'Penguin',9,245,84),
 (244,'Monkey',1,0,100),
 (245,'Penguin',6,52,68),
 (246,'Sushi',1,0,100),
 (247,'Penguin',1,0,100),
 (248,'Penguin',1,0,100),
 (249,'Husky',1,0,72),
 (250,'Penguin',1,0,100),
 (251,'Penguin',1,0,54),
 (252,'Black Kitty',1,0,78),
 (253,'Black Dragon',1,0,100),
 (254,'Blue Dragon',1,0,100),
 (255,'Red Dragon',1,0,100),
 (256,'Snowman',1,0,58),
 (257,'White Tiger',2,2,15),
 (258,'Kino',1,0,16),
 (260,'Baby Dragon',1,0,100),
 (261,'Mini Yeti',2,2,13),
 (262,'Sun Wu Kong',13,1100,98),
 (263,'GrrrImScary',15,1704,67),
 (264,'Penguin',2,2,50),
 (265,'Kino',9,200,100),
 (266,'Jr. Reaper',1,0,15),
 (267,'POKE <3',17,3303,61),
 (269,'Midnight',16,2200,48),
 (270,'Baby Tiger',1,1,73),
 (271,'Lumuu',13,1100,76),
 (272,'Brown Kitty',1,0,90),
 (273,'Mini Yeti',2,2,82),
 (274,'Snowman',1,0,82),
 (275,'Baby Tiger',19,5500,100),
 (276,'Bomb',7,101,84),
 (277,'Baby Tiger',1,0,43),
 (279,'Baby Robo',1,0,66),
 (280,'Baby Tiger',13,1100,70),
 (281,'White Tiger',1,0,36),
 (282,'White Tiger',1,0,100),
 (283,'White Tiger',1,0,100),
 (285,'Robo',1,0,100),
 (286,'Baby Robo',0,0,77),
 (287,'MushyMush',1,0,58),
 (288,'Baby Tiger',1,0,34),
 (289,'White Tiger',5,27,70),
 (290,'Jr. Reaper',5,20,15),
 (291,'White Duck',2,1,15),
 (292,'Snowman',2,1,11),
 (293,'Pink Bean',1,0,100),
 (294,'Mini Kargo',7,100,88),
 (295,'Shoe.',19,5502,68),
 (296,'Jr. Reaper',1,0,88),
 (297,'Jr. Reaper',1,0,100),
 (298,'Kino',1,0,84),
 (300,'Yuri',15,2303,46),
 (302,'Baby Dragon',17,3405,88),
 (303,'Penguin',9,270,64),
 (304,'Baby Tiger',1,0,19),
 (305,'Rawrz',14,1602,88),
 (307,'Baby Robo',6,68,54),
 (308,'Baby Tiger',11,600,49),
 (309,'Sushi',4,12,50),
 (310,'White Bunny',22,8812,100),
 (311,'Baby Tiger',1,1,67),
 (312,'White Tiger',5,21,98),
 (313,'Panda',5,24,15),
 (315,'Baby Dragon',1,0,100),
 (316,'Penguin',1,0,66),
 (317,'Brown Puppy',1,0,34),
 (318,'Mini Yeti',1,0,7),
 (320,'Baby Dragon',1,0,100),
 (321,'Nick Jr',16,2210,94),
 (322,'Rudolph',1,0,80),
 (323,'Sushi',1,0,88),
 (324,'Mini Yeti',1,0,100),
 (325,'Golden Pig',1,0,50),
 (326,'Husky',4,8,42),
 (327,'Baby Tiger',1,0,91),
 (328,'White Duck',1,0,49),
 (329,'DaBoy',16,2400,70),
 (330,'Pink Bean',6,55,67),
 (331,'Black Bunny',1,0,100),
 (332,'Crys.Rudolph',6,42,94),
 (333,'Jr. Reaper',3,3,94),
 (334,'Penguin',1,0,76),
 (335,'DaLeetDaLeet',5,17,56),
 (336,'Kino',1,0,94),
 (337,'Star',12,800,15),
 (339,'Baby Dragon',1,0,97),
 (340,'Kino',1,0,86),
 (341,'Crazy',10,305,70),
 (342,'White Tiger',3,5,70),
 (343,'Baby Tiger',2,2,55),
 (344,'Lucy',1,0,66),
 (345,'Baby Tiger',1,0,100),
 (346,'Sun Wu Kong',1,0,100),
 (347,'White Bunny',1,0,76),
 (348,'Kino',1,0,96),
 (349,'Cutie<3',17,3300,15),
 (351,'Baby Dragon',1,0,70),
 (352,'Kino',1,0,84),
 (353,'Panda',4,10,84),
 (354,'Jr. Balrog',7,101,95),
 (355,'Panda',1,0,44),
 (356,'Jr. Balrog',1,0,100),
 (357,'White Tiger',3,4,90),
 (358,'Monkey',18,3709,80),
 (359,'Awesomo',2,1,30),
 (360,'Keox',1,0,11),
 (361,'White Bunny',2,1,62),
 (362,'Husky',1,0,10),
 (363,'Jr. Reaper',1,0,100),
 (364,'Brown Puppy',1,0,100),
 (365,'Querx',1,0,11),
 (367,'BooDragon',19,5536,79),
 (368,'White Bunny',13,905,70),
 (370,'Baby Robo',1,0,100),
 (371,'Kino',14,1321,86),
 (372,'Stubby',9,200,15),
 (373,'Penguin',2,1,40),
 (374,'White Tiger',1,0,48),
 (375,'Icy<3',4,13,52),
 (376,'Swagsurfin',9,200,58),
 (377,'Bryan',1,0,40),
 (378,'Jr. Reaper',1,0,100),
 (379,'Husky',1,0,84),
 (380,'Robot',1,0,66),
 (381,'Baby Tiger',1,0,100),
 (382,'Monkey',2,1,64),
 (383,'Pink Bunny',9,200,96),
 (384,'Panda',1,0,100),
 (385,'Jr. Reaper',1,0,82),
 (386,'Kino',7,100,62),
 (387,'Rage',10,300,90),
 (388,'Swagsurfin',17,3009,97),
 (389,'Brown Kitty',11,500,100),
 (390,'White Tiger',1,0,13),
 (391,'BigThing',16,2200,70),
 (392,'White Tiger',1,0,78),
 (393,'White Tiger',1,0,48),
 (394,'Kino',1,0,100),
 (395,'Kino',1,0,100),
 (397,'PetLatin',1,0,10),
 (398,'PONCHO',2,2,96),
 (399,'Baby Tiger',1,0,52),
 (400,'Jr. Reaper',1,0,15),
 (401,'Brown Puppy',1,0,15),
 (402,'Grim Reaper',1,1,100),
 (404,'Baby Dragon',13,1200,97),
 (405,'Penguin',1,0,30),
 (406,'Baby Tiger',1,0,73),
 (407,'Monkey',2,3,70),
 (408,'Pink Bean',5,23,97),
 (409,'White Tiger',1,0,52),
 (410,'Jr. Reaper',1,0,100),
 (411,'Kino',6,47,96),
 (412,'White Tiger',1,0,100),
 (413,'White Bunny',1,0,78),
 (414,'Kino',1,0,66),
 (416,'Baby Dragon',1,0,100),
 (417,'Baby Tiger',1,0,58),
 (418,'Doggie (:',0,0,55),
 (419,'CreamPie',16,2201,76),
 (420,'Sun Wu Kong',11,600,15),
 (421,'IrSexy',15,1715,70),
 (422,'Kino',1,0,68),
 (424,'Baby Robo',20,6761,58),
 (425,'Jr. Balrog',1,0,15),
 (427,'Baby Dragon',18,4002,73),
 (429,'Baby Dragon',18,4400,91),
 (430,'Penguin',1,0,54),
 (431,'Svampbob',16,2700,64),
 (433,'Baby Dragon',9,200,94),
 (434,'Penguin',1,0,26),
 (435,'NickJr',16,2200,15),
 (437,'ZackJr',1,0,100),
 (438,'Baby Tiger',1,0,100),
 (439,'Baby Tiger',1,0,100),
 (440,'Baby Tiger',1,0,100),
 (441,'Baby Tiger',3,4,67),
 (442,'White Bunny',1,0,62),
 (443,'Jr. Balrog',1,0,65),
 (444,'Husky',1,0,98),
 (445,'Jr. Reaper',1,0,100),
 (446,'Penguin',1,0,13),
 (447,'White Duck',1,0,100),
 (448,'Baby Tiger',1,0,15),
 (449,'Jr. Yami',1,0,15),
 (450,'Baby Tiger',1,0,70),
 (451,'Kino',1,0,98),
 (452,'Sun Wu Kong',1,1,98),
 (453,'Sargon',2,2,82),
 (454,'Brown Puppy',1,0,76),
 (455,'Mini Kargo',1,0,100),
 (456,'Mini Kargo',4,8,70),
 (457,'Baby Tiger',7,100,15),
 (458,'White Tiger',4,10,82),
 (459,'AndCookies',16,2211,100),
 (460,'Monkey',16,2303,76),
 (461,'Hosea(:',1,0,68),
 (462,'White Tiger',1,0,66),
 (463,'Honda',15,1801,84),
 (465,'Penguin',1,0,100),
 (466,'Baby Robo',3,3,96),
 (468,'Baby Dragon',6,59,97),
 (470,'Alpha.Jr',14,1307,95),
 (471,'Husky',13,1100,100),
 (472,'White Duck',3,5,70),
 (473,'Penguin',3,3,15),
 (474,'Kino',7,100,80),
 (475,'Husky',1,0,100),
 (476,'Baby Tiger',1,0,100),
 (478,'Lil BadAzz',13,900,50),
 (479,'Baby Tiger',1,0,64),
 (481,'Jr.singer',16,2402,80),
 (482,'Sun Wu Kong',4,12,96),
 (483,'Baby Tiger',1,0,49),
 (484,'P!nkeh',5,15,66),
 (485,'White Tiger',1,0,98),
 (487,'Baby Robo',1,0,99),
 (488,'Brown Kitty',1,0,94),
 (489,'Evo\'s Pet',2,4,88),
 (490,'Jr. Reaper',1,0,46),
 (491,'Snowman',1,0,98),
 (492,'Baby Tiger',7,100,100),
 (493,'White Duck',1,0,55),
 (494,'Sun Wu Kong',5,15,90),
 (495,'Kino',2,1,72),
 (496,'Baby Tiger',1,0,42),
 (497,'Panda',9,201,72),
 (498,'Kino',1,1,86),
 (499,'White Bunny',10,300,72),
 (500,'Baby Tiger',2,1,55),
 (501,'Baby Tiger',1,0,82),
 (502,'Kino',1,0,15),
 (503,'White Duck',1,0,76),
 (504,'Baby Tiger',17,3400,70),
 (505,'Penguin',1,0,100),
 (506,'Penguin',1,0,100),
 (507,'Penguin',1,0,100),
 (508,'White Bunny',1,0,100),
 (509,'White Duck',1,0,100),
 (511,'Baby Robo',3,5,98),
 (512,'Gever',10,409,100),
 (513,'Penguin',1,1,92),
 (514,'Pink Bunny',1,0,58),
 (515,'Panda',11,529,100),
 (516,'iPod',1,0,28),
 (517,'Kino',1,0,90),
 (518,'Xia0Gu0',12,700,50),
 (519,'Husky',1,0,54),
 (521,'Baby Robo',1,0,88),
 (522,'Sara',2,1,62),
 (523,'Kino',11,509,96),
 (524,'Penguin',1,0,52),
 (525,'Husky',1,0,70),
 (527,'Baby Dragon',15,2001,94),
 (528,'White Duck',1,0,15),
 (529,'Baby Tiger',14,1600,25),
 (530,'Kino',1,0,100),
 (531,'White Duck',7,100,31),
 (532,'Kino',1,0,74),
 (533,'Auzure',8,135,50),
 (534,'Baby Tiger',2,2,94),
 (535,'White Tiger',4,9,82),
 (536,'Jr. Reaper',1,0,100),
 (537,'Fatass',16,2232,100),
 (538,'White Duck',1,0,52),
 (539,'Sun Wu Kong',13,1212,86),
 (540,'xDaniel',8,176,100),
 (541,'Panda',13,1113,72),
 (542,'Snowman',11,500,100),
 (543,'Baby Tiger',1,0,28),
 (544,'White Tiger',1,0,76),
 (545,'Snowman',1,0,54),
 (546,'Jr. Balrog',1,0,90),
 (547,'-sun',12,800,92),
 (548,'Shifu',1,0,96),
 (549,'Sun Wu Kong',1,0,100),
 (550,'Baby Tiger',1,0,100),
 (551,'Baby Tiger',1,0,100),
 (552,'Jr. Reaper',1,0,68),
 (553,'Lune',2,2,92),
 (554,'Baby Tiger',7,100,94),
 (555,'Black Kitty',1,0,100),
 (556,'Husky',3,4,98),
 (558,'Xavier',13,1100,91),
 (559,'White Duck',1,0,100),
 (560,'Piplup.',1,0,98),
 (561,'MySexy',30,30000,90),
 (562,'Pink Bean',1,0,100),
 (563,'Pink Bean',1,0,100),
 (564,'Pink Bean',1,0,100),
 (565,'White Tiger',1,0,15),
 (566,'Sven',1,0,42),
 (567,'Sushi',1,0,98),
 (568,'Ruben',13,1017,82),
 (569,'Baby Tiger',1,0,22),
 (570,'Baby Tiger',1,0,91),
 (571,'Baby Tiger',4,6,91),
 (572,'Crys.Rudolph',1,0,100),
 (573,'Crys.Rudolph',1,0,100),
 (574,'Crys.Rudolph',1,0,100),
 (575,'Sun Wu Kong',1,0,86),
 (576,'Baby Tiger',1,0,31),
 (577,'Sun Wu Kong',1,0,98),
 (578,'Husky',1,0,86),
 (579,'Baby Tiger',1,0,43),
 (580,'White Tiger',1,0,22),
 (581,'Monkey',1,0,88),
 (582,'Jr. Reaper',1,0,76),
 (584,'Nature',15,2202,15),
 (585,'Baby Tiger',1,0,58),
 (586,'Dino Boy',5,14,96),
 (587,'Black Kitty',1,0,84),
 (588,'Kino',2,2,15),
 (590,'Contamination',10,400,70),
 (591,'Baby Tiger',11,500,85),
 (593,'Baby Dragon',1,0,100),
 (594,'Dragon',1,0,100),
 (595,'Dragon',1,0,100),
 (596,'Panda',10,400,64),
 (597,'Jr. Reaper',6,37,98),
 (598,'Panda',1,0,92),
 (599,'Panda',1,0,15),
 (600,'White Tiger',1,0,72),
 (601,'White Tiger',1,0,74),
 (602,'Black Kitty',1,0,66),
 (603,'Kino',1,0,10),
 (604,'Panda',1,0,48),
 (605,'Dragon',1,0,100),
 (606,'Baby Tiger',6,59,55),
 (607,'Penguin',2,1,88),
 (608,'White Tiger',5,19,98),
 (609,'Kino',7,100,80),
 (610,'Jr. Reaper',1,0,6),
 (611,'Mini Yeti',1,0,15),
 (613,'Baby Dragon',13,1103,70),
 (614,'Dragon',1,0,100),
 (616,'Baby Dragon',1,0,100),
 (617,'Dragon',1,0,100),
 (618,'Kino',8,109,96),
 (619,'Sushi',7,100,82),
 (620,'Panda',1,0,15),
 (621,'Golden Pig',23,10206,70),
 (622,'Stein',15,1643,94),
 (623,'Ruben<3',11,500,94),
 (624,'Sara<3',15,1900,64),
 (625,'White Bunny',1,0,76),
 (626,'Baby Tiger',1,0,34),
 (627,'Jr. Reaper',1,0,64),
 (628,'Snowman',9,200,10),
 (629,'Baby Tiger',4,10,49),
 (631,'Dragon',15,2000,70),
 (632,'Kino',1,0,78),
 (634,'Baby Dragon',18,3601,82),
 (635,'Shiver',9,200,15),
 (637,'Baby Robo',11,501,83),
 (638,'Baby Tiger',1,0,97),
 (639,'Baby Tiger',1,0,94),
 (640,'Jr. Reaper',1,0,100),
 (641,'Kino',16,2409,76),
 (642,'Twix',16,2608,61),
 (643,'Jr. Reaper',1,0,86),
 (644,'Aidsto',15,1800,62),
 (645,'Kino',1,0,100),
 (646,'White Bunny',1,0,100),
 (647,'Golden Pig',1,0,100),
 (648,'Aria',1,0,15),
 (649,'Golden Pig',1,0,100),
 (650,'Ketchup',1,0,96),
 (651,'Baby Tiger',1,0,67),
 (652,'Baby Tiger',3,4,100),
 (654,'Baby Robo',21,7725,79),
 (656,'Baby Dragon',1,0,10),
 (658,'Baby Dragon',1,0,97),
 (659,'White Bunny',1,0,100),
 (660,'White Bunny',1,0,100),
 (661,'Mini Kargo',1,0,82),
 (662,'Penguin',1,0,72),
 (663,'Sun Wu Kong',1,0,82),
 (664,'Black Kitty',9,401,58),
 (665,'Husky',1,0,94),
 (667,'Corey',11,605,88),
 (669,'Baby Dragon',9,207,16),
 (670,'Husky',1,0,96),
 (671,'Cee-Loo',2,1,24),
 (672,'Moonstar~',4,13,64),
 (673,'Lilly',1,0,90),
 (674,'Baby Tiger',1,0,43),
 (675,'Black Kitty',1,0,100),
 (676,'Penguin',2,1,86),
 (678,'Baby Dragon',13,1100,82),
 (679,'Roar',7,69,82),
 (680,'Kino',4,12,15),
 (681,'Baby Tiger',1,1,67),
 (682,'Mini Yeti',1,0,91),
 (684,'Baby Dragon',10,404,40),
 (686,'Baby Dragon',1,0,94),
 (687,'White Bunny',3,4,88),
 (688,'Mini Kargo',13,1200,85),
 (689,'Angel<3',4,10,38),
 (690,'Mini Yeti',1,0,94),
 (691,'FuckHead',1,0,92),
 (693,'Yami',1,0,19),
 (694,'Jr. Zackie',1,0,15),
 (696,'Baby Robo',16,2204,100),
 (697,'Mini Yeti',1,0,100),
 (698,'White Tiger',1,0,94),
 (699,'Penguin',1,0,100),
 (700,'Penguin',1,0,100),
 (701,'White Bunny',3,3,15),
 (702,'Frosty',9,200,56),
 (703,'mikki',4,22,70),
 (704,'Kino',2,2,50),
 (705,'Baby Tiger',7,100,10),
 (706,'Devil </3',18,3705,75),
 (707,'iRsexy',6,56,58),
 (708,'Panda',1,0,52),
 (709,'Panda',1,0,100),
 (710,'White Tiger',3,3,80),
 (711,'Cookies',5,26,15),
 (713,'Tora Jr.',2,1,79),
 (714,'Baby Tiger',1,0,91),
 (715,'White Bunny',1,0,100),
 (716,'White Bunny',1,0,100),
 (717,'Sara',1,0,94),
 (718,'Ruben',13,1117,90),
 (719,'Robot',1,0,100),
 (721,'Baby Robo',15,2102,90),
 (722,'Orange',16,2440,88),
 (723,'Mini Yeti',3,4,85),
 (725,'Baby Robo',1,0,69),
 (726,'Kino',9,204,98),
 (727,'COCO',8,116,67),
 (728,'Kino',14,1311,88),
 (729,'Equal',2,1,79),
 (730,'Baby Tiger',1,0,94),
 (731,'Baby Tiger',2,2,85),
 (732,'White Tiger',5,17,80),
 (733,'White Tiger',1,0,10),
 (734,'White Bunny',4,6,96),
 (735,'Jr. Reaper',1,0,100),
 (736,'Baby Tiger',7,100,58),
 (738,'Dragon',1,0,100),
 (739,'Dragon',1,0,100),
 (740,'Baby Dragon',1,0,100),
 (741,'Kino',1,0,90),
 (742,'Turkey',9,200,98),
 (743,'Chris',19,5198,85),
 (744,'Pink Bean',1,0,100),
 (745,'Ohai',1,0,15),
 (746,'Baby Tiger',7,100,37),
 (748,'Labour',15,2062,27),
 (750,'Baby Dragon',8,109,100),
 (752,'Baby Robo',6,36,99),
 (753,'Robo',1,0,100),
 (754,'White Bunny',1,0,36),
 (755,'Husky',1,0,100),
 (756,'Penguin',7,81,50),
 (757,'Kino',10,400,68),
 (759,'SexyStuff',1,0,60),
 (760,'doggydoggy',9,203,55),
 (762,'Baby Dragon',23,10927,15),
 (764,'Baby Dragon',1,0,100),
 (766,'Baby Dragon',14,1401,100),
 (767,'Angel<3',17,2904,96),
 (768,'Pico',12,717,15),
 (769,'Baby Tiger',12,807,91),
 (770,'Penguin',3,3,74),
 (771,'White Tiger',1,0,15),
 (773,'Baby Dragon',19,4502,91),
 (774,'Jr. Reaper',1,0,100),
 (776,'Baby Dragon',18,3903,97),
 (777,'Penguin',1,0,50),
 (778,'Baby Tiger',1,0,76),
 (779,'Dragon',1,0,100),
 (781,'Baby Robo',2,5,38),
 (782,'Kino',20,6306,15),
 (783,'White Bunny',1,0,15),
 (784,'Jr. Reaper',6,35,15),
 (785,'Baby Tiger',4,11,91),
 (786,'Jr. Reaper',1,0,76),
 (787,'Turkey',4,25,15),
 (788,'Husky',14,1410,80),
 (789,'MosDef',25,15500,15),
 (790,'Penguin',3,3,15),
 (791,'Penguin',1,0,100),
 (792,'Penguin',1,0,100),
 (793,'Kino',1,0,100),
 (794,'White Bunny',7,100,100),
 (795,'Wizzam',6,36,76),
 (796,'Kino',2,2,15),
 (797,'<333',13,1100,90),
 (798,'Jr. Reaper',1,0,92),
 (799,'Jr. Balrog',1,0,65),
 (800,'Jr. Reaper',11,600,88),
 (801,'Mushi`BABY!',15,2004,7),
 (803,'Baby Robo',1,0,93),
 (804,'yami',1,0,82),
 (805,'Biancax3',1,0,97),
 (806,'Kitten',9,200,85),
 (807,'Brown Puppy',1,0,100),
 (808,'Ambulante',14,1300,61),
 (809,'Dragon',1,0,100),
 (810,'White Tiger',1,0,88),
 (812,'Baby Dragon',1,0,85),
 (813,'White Bunny',3,5,100),
 (814,'Baby Tiger',4,8,76),
 (815,'Kino',2,1,54),
 (816,'Baby Tiger',1,0,100),
 (817,'Kino',3,3,78),
 (818,'Orange tiger',1,0,100),
 (819,'Snowman',1,0,100),
 (820,'Skunk',1,0,90),
 (821,'White Duck',1,0,88),
 (822,'Sun Wu Kong',2,2,80),
 (823,'Jr. Reaper',1,0,52),
 (824,'Jr. Reaper',7,101,15),
 (825,'Baby Tiger',1,0,94),
 (826,'White Bunny',1,0,100),
 (827,'Monkey',1,0,15),
 (828,'White Tiger',1,0,100),
 (830,'Baby Robo',1,0,88),
 (831,'Rudolph',1,0,94),
 (832,'Husky',2,2,92),
 (834,'Baby Dragon',1,0,64),
 (835,'Pink Bunny',1,0,98),
 (836,'Kino',0,0,94),
 (838,'Baby Dragon',1,0,100),
 (839,'Dragon',1,0,100),
 (840,'Dragon',1,0,100),
 (841,'Dragon',1,0,100),
 (843,'Baby Robo',1,0,83),
 (844,'Baby Tiger',4,12,79),
 (845,'biggie',1,0,96),
 (846,'Penguin',3,5,78),
 (847,'Golden Pig',1,0,35),
 (848,'Husky',2,1,52),
 (850,'Baby Robo',1,0,100),
 (851,'Baby Tiger',1,0,52),
 (852,'Baby Tiger',4,8,97),
 (853,'BoyBoy',13,1110,15),
 (854,'Husky',1,0,98),
 (855,'White Tiger',4,9,28),
 (856,'Robo',1,0,100),
 (857,'Kino',1,0,15),
 (859,'Baby Dragon',14,1303,100),
 (860,'Husky',6,31,72),
 (861,'Husky',1,0,70),
 (862,'Sun Wu Kong',13,1101,46),
 (863,'Sexy<3',13,1101,96),
 (864,'Jr. Balrog',5,19,75),
 (865,'Pink Bunny',1,0,74),
 (867,'Baby Dragon',4,7,15),
 (868,'Kino',8,139,48),
 (869,'Kino',1,0,66),
 (870,'DEFAME LUDA.',1,0,49),
 (871,'Baby Tiger',1,0,100),
 (872,'Derp',1,0,100),
 (873,'Brown Kitty',1,0,100),
 (874,'Mini Kargo',5,20,25),
 (875,'Snowman',5,16,94),
 (876,'Penguin',1,0,100),
 (877,'Ryan<3',5,15,64),
 (879,'Baby Dragon',1,0,100),
 (880,'Jr. Death',1,0,15),
 (881,'Kino',5,31,15),
 (882,'Robo',1,0,100),
 (883,'Mini Yeti',1,0,100),
 (884,'Baby Tiger',1,0,100),
 (885,'Baby Tiger',1,0,100),
 (886,'iRsexy',15,2300,94),
 (887,'Jr. Reaper',1,0,100),
 (888,'Panda',1,0,15),
 (889,'Mini Yeti',2,2,100),
 (890,'White Bunny',1,0,92),
 (892,'Baby Robo',1,0,98),
 (893,'Jr. Reaper',1,0,76),
 (895,'Baby Robo',3,5,83),
 (896,'White Tiger',1,0,100),
 (897,'Sun Wu Kong',1,0,68),
 (898,'Baby Tiger',9,200,97),
 (899,'Jr. Reaper',16,2200,74),
 (900,'Baby Tiger',1,0,43),
 (901,'Penguin',1,0,100),
 (902,'Sun Wu Kong',1,0,96),
 (903,'Robot',1,0,100),
 (904,'Steve',2,2,58),
 (905,'Boner',1,0,66),
 (906,'ASSHAIRS',16,2200,15),
 (907,'Brown Puppy',1,0,100),
 (908,'Cookies <3',1,0,64),
 (909,'Baby Tiger',1,0,100),
 (910,'Mini Yeti',2,2,28),
 (911,'Sun Wu Kong',1,0,100),
 (912,'Baby Tiger',1,0,15),
 (913,'White Tiger',1,0,100),
 (914,'Trippy',2,4,66),
 (915,'Jr. Death',1,0,74),
 (916,'White Bunny',1,0,100),
 (917,'Kino',10,312,100),
 (918,'Dino Boy',1,0,12),
 (919,'Panda',5,27,92),
 (920,'Brown Kitty',1,0,100),
 (922,'Dragon',1,0,100),
 (923,'Dragon',1,0,100),
 (924,'Baby Dragon',1,0,100),
 (925,'Dino Girl',1,0,72),
 (926,'Dino Girl',1,0,100),
 (927,'Dino Girl',1,0,100),
 (928,'Dino Boy',2,1,15),
 (929,'Jr. Balrog',2,2,65),
 (931,'Baby Dragon',1,0,9),
 (932,'Nico.<3',13,1113,82),
 (933,'Angel.<3',2,1,98),
 (934,'White Bunny',1,0,100),
 (935,'Jr. Balrog',1,0,100),
 (937,'Baby Dragon',1,0,88),
 (938,'Kino',7,100,94),
 (939,'Baby Tiger',13,1100,100);
/*!40000 ALTER TABLE `pets` ENABLE KEYS */

A: /*!40000 ALTER TABLE `pets` ENABLE KEYS */;

Remove the ; at the end


text:
Q: Не рисуется на QFrame Есть окно, на котором - кнопки и разные элементы. Также есть QFrame на которм я бы хотел выводить график приходящих сигналов. На главном окне все рисуется нормально, но как выделить конкретный элемент (например - фрейм) для рисования? Само окно сделано в QT Designer и импортируется с .ui. Тоесть, я делаю простой COM терминал в котором хочу отображать график сигналов
from PyQt5 import QtWidgets, uic
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtGui     import *
from PyQt5.QtWidgets import *

import sys

def start_bt():
    print("Start")

def msg_bt():
    print("Message")

class Ui(QtWidgets.QMainWindow):
    def __init__(self):
        super(Ui, self).__init__()
        uic.loadUi('main.ui', self)
        self.start.clicked.connect(start_bt)
        self.msg.clicked.connect(msg_bt)
        self.show()
    def paintEvent(self, e):
        painter = QPainter()
        painter.begin(self.frame)
        painter.drawLine(10,10,100,140)
        painter.end()

app = QtWidgets.QApplication(sys.argv)
window = Ui()

app.exec_()

A: Лучше заведите новый фрейм-наследник, служащий для отображения сигнала:
class SignalFrame(QFrame):
    def paintEvent(self, event):
        super().paintEvent(event)
        painter = QPainter(self)
        painter.drawLine(10,10,100,140)

class Ui(QtWidgets.QMainWindow):
    def __init__(self):
        super(Ui, self).__init__()
        uic.loadUi('main.ui', self)
        self.start.clicked.connect(start_bt)
        self.msg.clicked.connect(msg_bt)

        # меняем QFrame (uic.frame) на наш SignalFrame
        _frame = SignalFrame()
        self.frame.parent().layout().replaceWidget(self.frame, _frame)

        # удаляем старый frame
        self.frame.deleteLater()
        # присваиваем ссылку на новый  фрейм
        self.frame = _frame

        self.show()

app = QtWidgets.QApplication(sys.argv)
window = Ui()


text:
Q: Functions differentiable at zero Is there a case where a function $f$ that is not differentiable at $0$ and a function $g$ that is differentiable at $0$ where $f+g$ is differentiable at $0$?

A: One has: $$f=f+g-g.$$
Then, if $f+g$ and $g$ are differentiable at the origin, $f$ is differentiable at the origin with: $$f'(0)=(f+g)'(0)-g'(0).$$
Therefore, the answer to your question is no.

A: Hint:
let $f+g=h$, if $h$ is differentiable and $g$ is differentiable what can we say about $f=h-g$ ?


text:
Q: Thymeleaf: How to properly specify HTML name and Id attribute in case of nested List entity? The entity contains nested Lists. With th:each, I can see the values get displayed on the form but no update is getting persisted in the database and sure this is because of incorrect 'name' and/or 'id' attributes specified which Thymeleaf is not transcoding. How do I specify them?
I tried with different combination of name and Id  and following the documentation, but none of them worked. Tried with just th:each loop variable, but that did not work either too.
Main Entity:
CustomAttributesMap.java
@Entity
public class CustomAttributesMap implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    private Long id;

    private EntityType entityType;

    @ElementCollection
    //@ManyToMany
    private List<CustomAttributesFieldMap> customAttributesFieldMapList = new ArrayList<>();
// setter and getter code
...
}

First child List:
CustomAttributesFieldMap.java
@Entity
public class CustomAttributesFieldMap implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    private Long id;

    private CustomFieldType fieldType;

    @ElementCollection
    //@ManyToMany
    private List<CustomAttribute> customAttributesList = new ArrayList<>();
// setter and getter methods.
...
}

Second child list:
@Entity
public class CustomAttribute implements Serializable {

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Long id;

    private String name;
    private boolean required;
    private String value;
// setter and getter methods
....
}

Controller.java
...
@ModelAttribute("customAttributesMapList")
    public List<CustomAttributesMap> populateCustomAttributes() {
       return customerAttributeMapService.findAll();
    }

@PostMapping("/customAttributeCustomization")
    public String saveCustomAttributeCustomization(
        List<CustomAttributesMap> customAttributesMapList, Model model) {
        Logger.getLogger(WebController.class, "Logigng for WebController").error(""
                + "customAttributesMapList " + customAttributesMapList);
        for(CustomAttributesMap customAttributesMap: customAttributesMapList) {
            customerAttributeMapService.save(customAttributesMap);
        }
....

CustomAttributesEdit.html
<form class="user" th:action="@{/customAttributeCustomization}" th:object="${customAttributesMapList}" method="POST">
..

..

...

Name
Mandatory
Delete

<input class="form-control"  type="text" th:value="${customAttribute.name}"  th:id="customAttributesMapList+${iterIndex.index}+.customAttributesFieldMapList+${iterStat.index}+.customAttributesList+${rowStat.index}+.name" name="customAttributesMapList[+${iterIndex.index}+].customAttributesFieldMapList[+${iterStat.index}+].customAttributesList[+${rowStat.index}+].name"/>

....

</form>

I am expecting that in the above form, the value of customattribute.name need to be edited and persisted in the database, which currently is not happening. Upon debugging on the controller, the main entity list (CustomAttributesMapList) is unchanged and do not contain any user updates on the HTML form. Sure this is due to the above code with incorrect name and id for the input field, couldnt get that right.
Update
Ok, I couldn't find any helpful answer so I flattened the entities to have single entity CustomAttrubute which has both entityType and fieldType properties and have CustomAttributesMap (list) which contain the CustomAttribute entity and this map will be the form object sent to the front end from web controller. But I would like to review if anyone has got an answer to the Thymeleaf puzzle :) .

A: Use @RequestMapping instead of @PostMapping
    @RequestMapping(value = "/customAttributeCustomization",method=RequestMethod.POST)
    public String saveCustomAttributeCustomization(
        List<CustomAttributesMap> customAttributesMapList, Model model) {
        Logger.getLogger(WebController.class, "Logigng for WebController").error(""
                + "customAttributesMapList " + customAttributesMapList);
        for(CustomAttributesMap customAttributesMap: customAttributesMapList) {
            customerAttributeMapService.save(customAttributesMap);
        }


text:
Q: Save file path on show dialog I want to  save path on  text box after Directory 1: whenever I try to close the application and open again the path is not there.I want it to show every time I open the application.

Private Sub btnRootBrowse1_Click(sender As System.Object, e As System.EventArgs) Handles btnBrowse1.Click
        RootFolderBrowserDialog.ShowDialog()
        txtPath1.Text = RootFolderBrowserDialog.SelectedPath
    End Sub

A: You need save your data (in this case txtPath1.Text) to Hard-Drive (File or DataBase) and reload it in the next execution.

It can be easy when you use Application-Setting:

*

*In the Solution Explorer, Double-Click "My Project"

*in left pane click "Setting"

*in the table, Fill in the fields as needed, example for you case: Name: DirectoryLocation Type: String Scope: User Value: Empty.

*Sample Code Using:
Public Sub New()
    InitializeComponent()

    'load from the hard-disk
    txtPath1.Text = My.Settings.DirectoryLocation
End Sub

Private Sub btnRootBrowse1_Click(sender As System.Object, e As System.EventArgs) Handles btnBrowse1.Click
    RootFolderBrowserDialog.ShowDialog()
    txtPath1.Text = RootFolderBrowserDialog.SelectedPath

    'save to hard-disk
    My.Settings.DirectoryLocation = txtPath1.Text
    My.Settings.Save()
End Sub


text:
Q: Intersection of subgroups of a finite group
Let $H$ and $K$ be subgroups of a group $G$, and assume that $|H|$ is a prime number. Prove that either $H\subseteq K$ or$ H\cap K =\left \{ 1 \right \}$.

We have $H\cap K \leq H$ and hence by Lagrange's theorem $|H\cap K|$ divides $|H|$.
Similarly, $H \cap K ≤ K$ and hence by Lagrange's theorem $|H \cap K|$ divides $|K|$.
Thus $|H \cap  K|$ is a common divisor of $|H|$ and $|K|$. Since $\gcd(|H|, |K|) = 1$, it follows that $|H \cap  K| = 1$ and hence $|H \cap  K| = \left \{  1\right \}$.
Is there a way to prove that both $H$ and $K$ are relatively prime, or is it obvious?
Would this be true for the second assertion, and how would I go about proving the first assertion false?
Any hints would be greatly appreciated!

A: We don't need to dwell on $|H|$ and $|K|$ being relatively prime. All we need is that $|H\cap K|$ divides $|H|=p$. This leads to $|H\cap K|=1$ or $|H\cap K|=p$. The last condition is equivalent to $H\cap K=H$ which means $H\subset K$.

A: In any case, $|H\cap K|$ divides $|H|$, so either $|H\cap K|=1$ or $p$. Hence $H\cap K = {1} \space or\space H$ ,and you 're done.

A: Just note that $H \cap K$ is itself a subgroup and the results follow with Lagrange's Theorem since $|H \cap K|$ divides $p$, which is a prime, but then primes only have two factors. Then you do the case work get the desired results.
It is not immediately obvious (to me at least) why $(|H|, |K|) = 1$ and it doesn't help with your second result anyways.
"Never underestimate the power of a counting theorem" - Unknown

A: If $|H|$ is prime then the only subgroups of $H$ are $\{1\}$ and $H:$
For $x\in H$ let $Ord(x)$ be the least $n\in \mathbb N$ such that $x^n=1,$ and let $g(x)= \{x^j: 1\leq j\leq Ord(x)\}.$ Then $g(x)$ is a subgroup of $H$. By Lagrange's theorem, $Ord(x)=|g(x)|$ divides $|H|.$ So if $x\ne 1$ then $|g(x)|>1$  and $|H|=|g(x)|=Ord(x).$
So if $J$ is a subgroup of $H$ and $1\ne x\in J$ then $J\supset g(x)=H,$ so $J=H.$
For your Q: $H\cap K$ is a subgroup of $H.$ So  $H\cap K=\{1\}$ or $H\cap K=H$.


text:
Q: Why is my email being rejected? I am having problems sending an email from one email address to another on my domain. I am using a shared server. I use weather software which automatically constructs and sends the email message. I have omitted the host, domain and IP info and replaced them like so: host= example.co.uk, domain = mydomain.co.uk .
The situation is I run a mail group using email address (weatherinfo@) and some users in the group set auto-responders. Therefore to prevent these from going to the whole group the email is sent from a different address (reports@) to weatherinfo@ with the reports@ address receiving the auto-responder messages.
I am getting the following message from the mail delivery system when trying to send the email to weatherinfo@ from report@:
This is the mail system at host mailauth.example.co.uk.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

               The mail system

<weatherinfo@mydomain.co.uk>: host 127.0.0.1[127.0.0.1] said: 554 5.6.0
Reject, id=02474-18 - BAD HEADER (in reply to end of DATA command).

The error log accompanying the email shows:
Reporting-MTA: dns; mailauth.example.co.uk
X-Postfix-Queue-ID: 88002C306D
X-Postfix-Sender: rfc822; reports@mydomain.co.uk
Arrival-Date: Fri,  2 May 2014 22:00:43 +0100 (BST)

Final-Recipient: rfc822; weatherinfo@mydomain.co.uk
Original-Recipient: rfc822;weatherinfo@mydomain.co.uk
Action: failed
Status: 5.6.0
Remote-MTA: dns; 127.0.0.1
Diagnostic-Code: smtp; 554 5.6.0 Reject, id=02474-18 - BAD HEADER

The header from the original message is:
Return-Path: <reports@mydomain.co.uk>
Received: from LAPTOP (helium.example.co.uk [IP Address])
by mailauth.example.co.uk (Postfix) with ESMTPA id 88002C306D
for <weatherinfo@mydomain.co.uk>; Fri,  2 May 2014 22:00:43 +0100 (BST)
To: weatherinfo@mydomain.co.uk
From: reports@mydomain.co.uk
Subject: WEATHER REPORT
Reply-To: reports@mydomain.co.uk
Date: Fri, 02 May 2014 23:00:56 +0100
Message-Id: <43786804l.820319781l1635676l1l@mydomain.co.uk>
Message-ID: <2014.05.02.17001.wd@mail.mydomain.co.uk>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"

Why is this message being rejected?
Is this being caused by my software or the server?
If it is the software what does the developer need do to fix it?
If it is the server what should I ask my host to do to overcome this problem?

A: It appears you may be triggering a spam filtering rule.  Your address is listed in the Spamhaus PBL list which indicates your IP address should not be originating email to the Internet.  Spamhaus provides clear documentation on their policies.
If you want reliable delivery to the Internet the server sending to the Internet needs a fixed IP address with DNS configured to pass rDNS validation.  Your mail server should identify itself with the domain you have configured for rDNS.
If you don't have a fixed IP address with appropriate DNS entries use your provider's email relay server to deliver the email.
As other have noted you seem to have an extra Message-Id header being added.  This may be causing header validation to fail.  (SPAM is much more likely to have bad headers than valid email.)

A: I can see two problems with the headers you cited. First of all the Received header is incorrectly formatted. When a header spans multiple lines, all but the first line must be indented. Additionally there are two Message-ID headers.
It would be possible for a mail server to process a mail without ever parsing the already existing headers. So, there may be a way to turn off that validation. But rather than turning off validation, I recommend fixing the formatting of the headers, since they may cause you other problems in the future.


text:
Q: Ruby on Rails - Excluding a single domain from some routes In Rails route, usually we do constraints: {domain: "example.com" } if we want to specify specific routes that example.com can have. But how do I reverse this such that everyone can access this except example.com

A: You can create custom constraint. Add more excluded domains if you want.
class DomainConstraint
  def matches?(request)
    excluded_hosts = ['example.com']
    excluded_hosts.exclude?(request.host)
  end
end

Use it like this:
constraints DomainConstraint.new do
  ..
end

https://guides.rubyonrails.org/routing.html#advanced-constraints


text:
Q: Is it possible to checkout Gitlab repository in YML which sits in Github? So I'm trying to learn deployement with Azure Devops. I have this Angular app sitting in Gitlab which already has a CI/CD pipeline with jenkins to kubernetes cluster. So i was thinking to do the same with Azure Devops via YAML. Which is not possible according to Azure docs directly from gitlab.
So what i'm trying to do is create CI pipeline from github which takes checkout from gitlab UI repo and build it for deployement.
I have created a Repository Resource in my below pipeline YAMl file. Azure give me error saying:

Repository JpiPipeline references endpoint https://gitlab.com/myusername/myUiRepo.git which does not exist or is not authorized for use

trigger:
  - master

resources:
  repositories:
  - repository: UiPipeline.  #alias
    type: git
    name: repository_name
    # ref: refs/heads/master  # ref name to use; defaults to 'refs/heads/master'
    endpoint: https://@gitlab.com/myusername/myUiRepo.git   # <-- Is this possible

stages:
- stage: Checkout
  jobs:
  - job: Build
    pool:
      vmImage: 'Ubuntu-16.04'
    continueOnError: true
    steps:
    - checkout: JpiPipeline
    - script: echo "hello to my first Build"

A: Repository type gitlab is not support in YAML pipeline yet. The currently supported types are git, github, and bitbucket, see supported types.
The workaround to get the gitlab repo sources is to run git command inside the script tasks.
For below example Yaml pipeline:
- checkout: none to avoid checkout the github source.
Use git clone  https://username:password@gitlab.com/useraccount/reponame.git to clone the gitlab repo inside a script task.
stages:
- stage: Checkout
  jobs:
  - job: Build
    pool:
      vmImage: 'Ubuntu-latest'
    steps:
    - checkout: none
    - script: |
        git clean -ffdx
        git clone  https://username:password@gitlab.com/useraccount/reponame.git
         #if your password or username contain @ replace it with %40

Your gitlab repo will be clone to folder  $(system.defaultworkingdirectory)/reponame
Another workaround is to classic UI pipeline. Gitlab repo type is supported in Classic UI pipeline.
You can choose Use the classic editor to create a classic ui pipeline.

When you come to select source page. Choose other git and click Add connection to add your gitlab repo url. Then the pipeline will get the sources for your gitlab repo.


text:
Q: show negative hours with time calculations? is there a way to show negative hours?
for example:
if a user checksin and checksout and has 3 hours worked but he should have worked for atleast 4 hours the calculation (3 - 4) should result into -1 hour (-01:00).
but when i do this calculation:
checkin = datetime.datetime(1, 1, 1, 8) # this is 0001-01-01 08:00:00
checkout = datetime.datetime(1, 1, 1, 11) # 0001-01-01 11:00:00

should_work = datetime.timedelta(hours=4)
has_worked = checkout - checkin # results in 03:00:00

result = has_worked - should_work # this results into "-1 day, 23:00:00" insted of "-01:00"

is there some other library or datetime function for this kind of things?

A: The timedelta object isn't that good at display formats. Minus 1 day, plus 23 hours is -1 hour, but that's awkward. Since there are lots of ways to display deltas, (e.g., should you allow 25 hours, or should that be a day?), its normal to do the math yourself. This one just does hours and minutes. multiple days are expressed in hours >= 24.
import datetime

def timedelta_str(td):
    s = int(td.total_seconds())
    if s < 0:
        s = abs(s)
        neg = "-"
    else:
        neg = ""
    m, seconds = divmod(s, 60)
    hours, minutes = divmod(m, 60)
    return f"{neg}{hours:02d}:{minutes:02d}"

checkin = datetime.datetime(1, 1, 1, 8) # this is 0001-01-01 08:00:00
checkout = datetime.datetime(1, 1, 1, 11) # 0001-01-01 11:00:00

should_work = datetime.timedelta(hours=4)
has_worked = checkout - checkin # results in 03:00:00
result = has_worked - should_work

print('result', timedelta_str(result))


text:
Q: System.Runtime.Serialization.SerializationException: While enabling migration for entity framework code first approach, I am getting below mentioned error. What is the issue? Please help me.

System.Runtime.Serialization.SerializationException: Type is not
  resolved for member
  'System.Data.Entity.Migrations.Design.ToolingFacade+GetContextTypeRunner,EntityFramework,
  Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
  at System.AppDomain.DoCallBack(CrossAppDomainDelegate
  callBackDelegate)    at
  System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner
  runner)    at
  System.Data.Entity.Migrations.Design.ToolingFacade.GetContextType(String
  contextTypeName)    at
  System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable(String
  contextTypeName)    at
  System.Data.Entity.Migrations.EnableMigrationsCommand.<>c__DisplayClass2.<.ctor>b__0()
  at
  System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action
  command) Type is not resolved for member
  'System.Data.Entity.Migrations.Design.ToolingFacade+GetContextTypeRunner,EntityFramework,
  Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

A: Possible duplicate of:
Entity Framework Code First Migrations - Enable-Migrations fails
Also you can read here:
http://forums.asp.net/t/1978562.aspx?Getting+exception+while+running+EF+Migrations+command+in+Package+Manager+Console


text:
Q: How to create for loop cv.write in image processing tensorflow and jupyter notebook? I am currently doing image processing in python and tensorflow want to create a for loop python code for a specified folder
This is the code for the specific folder
import pathlib
PATH_TO_TEST_IMAGES_DIR = pathlib.Path('C:/Object_detection/models-master/research/object_detection/test_images')
TEST_IMAGE_PATHS = sorted(list(PATH_TO_TEST_IMAGES_DIR.glob("*.jpg")))
TEST_IMAGE_PATHS

I want to create a for loop in this part of my image processing so that it can output multiple images without right click save as in the jupyter notebook
def show_inference(model, image_path):

  image_np = np.array(Image.open(image_path))

  output_dict = run_inference_for_single_image(model, image_np)

  vis_util.visualize_boxes_and_labels_on_image_array(
      image_np,
      output_dict['detection_boxes'],
      output_dict['detection_classes'],
      output_dict['detection_scores'],
      category_index,
      instance_masks=output_dict.get('detection_masks_reframed', None),
      use_normalized_coordinates=True,
      line_thickness=8)

  display(Image.fromarray(image_np))

A: Kind of difficult to tell what you're asking for here, but this is a method that would display n images sampled from the directory. The random sampling is done with numpy.random's choice function.
def show_n_inferences(model, image_paths=TEST_IMAGE_PATHS, n=10):
  sampled_paths = np.random.choice(image_paths, size=n)
  for image_path in sampled_paths:
    image_np = np.array(Image.open(image_path))
    output_dict = run_inference_for_single_image(model, image_np)

    vis_util.visualize_boxes_and_labels_on_image_array(
      image_np,
      output_dict['detection_boxes'],
      output_dict['detection_classes'],
      output_dict['detection_scores'],
      category_index,
      instance_masks=output_dict.get('detection_masks_reframed', None),
      use_normalized_coordinates=True,
      line_thickness=8)

    display(Image.fromarray(image_np))


text:
Q: Brass wool versus steel wool We're using this kind of solder sponge made of brass in our electronics course:

One kid told me that he had seen this before. I wondered a bit, because they are all new to soldering. Finally he brought that thing into the class and it turned out to be steel wool, used in the kitchen.

Is it ok to use that instead? If not, why not?


text:
Q: amplify api, Validation error of type FieldUndefined: Field 'listNoteDatas' in type 'Query' is undefined @ 'listNoteDatas'' ** It's written using a program of translator. **
https://aws.amazon.com/getting-started/hands-on/build-android-app-amplify/module-four/?nc1=h_ls
I coded as above.
In the case of create, it was performed normally, and it was possible to check the data in DynamoDB in the AWS account.
However, in the case of read, an error message of "Validation error of type FieldUndefined: Field 'listNoteDatas' in type 'Query' is undefined @ 'listNoteDatas'' is returned.
Amplify.API.query(
            ModelQuery.list(NoteData::class.java),
            { response ->
                Log.i(TAG, "Queried 1")

                for (noteData in response.data) {
                        Log.i(TAG, noteData.name)
                        UserData.addNote(UserData.Note.from(noteData))
                    }
            },
            { error -> Log.e(TAG, "Query failure", error) }
        )

By designating the id with the get function instead of the list, it was performed normally when reading.
Amplify.API.query(
            ModelQuery.get(NoteData::class.java, "id value checked in DynamoDB"),
            { response ->
                Log.i(TAG, "Queried 2")

                if (response.data != null){
                    UserData.addNote(UserData.Note.from(response.data))
                } else {
                    Log.e(TAG, "response.data != null")
                }
            },
            { error -> Log.e(TAG, "Query failure", error) }
        )

How to run ModelQuery.list normally?
** It's written using a program of translator. **

A: *

*first you need to change schema

In AWS AppSync > Yours > Schema
find type Query {...} in left side and change
listNoteData(filter...) to listNoteDatas(filter...)
click save schema button on top right

*setting resolver at listNoteDatas

scroll down find Query section in Resolvers in right side
click connect button on listNoteDatas, select NoteDataTable for resolver table, in Configure mapping templates in order select List items for first, select Return single item for second
and save resolver

*build run, no error

Good!

A: Edit scheme to change to listNoteDatas and connect to DB.NoteData table to work normally.


text:
Q: Insert stored procedure result set into Temp table and query temp table I have the following stored proc which is trying to:

*

*Execute system stored procedure (sp_monitorconfig) and put the result set into a temp table.

*SELECT FROM this temp table and add 2 custom columns (SOURCESERVER & CollectionTime)

*This final result set will be ingested into Logstash via jdbc job.

I'm currently using SAP ASE 16 (sybase) and am getting an incorrect syntax error at keyword 'exec'.  I'm not sure if I have to prefix the stored proc or what, but I'm currently stumped and any help is appreciated.
USE db
GO
    CREATE PROCEDURE sp_active_con_ratio.sql AS
    DECLARE @servername varchar(32) DECLARE @collecttime DATETIME DECLARE @procparam varchar(32)
select
    @servername = @@servername
select
    @collecttime = getdate()
select
    @procparam = 'number of user connections' CREATE TABLE #TempUserConnections
    (
        TempName varchar(35),
        FreeConnections int,
        ActiveConnections int,
        PercentActive char(6),
        MaxUsed int,
        Reuse_cnt int,
        Instance_Name varchar(30) NULL
    )
INSERT INTO
    #TempUserConnections (TempName, FreeConnections, ActiveConnections, PercentActive, MaxUsed, Reuse_cnt, Instance_Name)
    exec sp_monitorconfig @procparam  **ERROR HERE**
SELECT
    @servername AS 'SOURCESERVER',
    FreeConnections,
    ActiveConnections,
    PercentActive,
    MaxUsed,
    @collecttime AS 'CollectionTime'
FROM
    #TempUserConnections
    DROP TABLE #TempUserConnections
    RETURN
GO

Thanks!

A: I'd forgotten that sp_monitorconfig has an optional input parameter (@result_tbl_name) that allows the operator to designate a table into which the results should be inserted.
From the documentation on sp_monitorconfig, Example #8 ...
First create the table to hold the results; while the table name can vary you'll want to keep the column names/datatypes as defined:
create table sample_table
(Name            varchar(35),
 Config_val      int,
 System_val      int,
 Total_val       int,
 Num_free        int,
 Num_active      int,
 Pct_act         char(6),
 Max_Used        int,
 Reuse_cnt       int,
 Date            varchar(30),
 Instance_Name   varchar(35))

To capture a few metrics:
exec sp_monitorconfig "locks",            sample_table
exec sp_monitorconfig "number of alarms", sample_table

Display metrics:
-- select * from sample_table
exec sp_autoformat sample_data
go
 sp_autoformat sample_table
2> go
 Name             Config_val System_val Total_val Num_free Num_active Pct_act Max_Used Reuse_cnt Date                Instance_Name
 ---------------- ---------- ---------- --------- -------- ---------- ------- -------- --------- ------------------- -------------
 number of locks       10000        942     10000     9717        283   2.83       308         0 Aug 16 2020 12:26PM
 number of alarms        400          0       400      386         14   3.50        14         0 Aug 16 2020 12:26PM

A: You could do something like this;
USE db
GO
CREATE PROCEDURE usp_active_con_ratio.sql AS
BEGIN

    DECLARE @servername varchar(32) = (select @@servername)
    DECLARE @collecttime DATETIME   = (select getdate())
    DECLARE @procparam varchar(32)  = (select 'number of user connections')

    CREATE TABLE #TempUserConnections
    (
        TempName varchar(35),
        FreeConnections int,
        ActiveConnections int,
        PercentActive char(6),
        MaxUsed int,
        Reuse_cnt int,
        Instance_Name varchar(30) NULL
    )

    INSERT INTO #TempUserConnections
    (
        TempName,
        FreeConnections,
        ActiveConnections,
        PercentActive,
        MaxUsed,
        Reuse_cnt,
        Instance_Name
    )

    -- Add the semi-colon to terminate the statement
    EXEC sp_monitorconfig @procparam;

    SELECT
        @servername AS 'SOURCESERVER',
        FreeConnections,
        ActiveConnections,
        PercentActive,
        MaxUsed,
        @collecttime AS 'CollectionTime'
    FROM
        #TempUserConnections
        DROP TABLE #TempUserConnections
END

GO

As @larnu mentioned you should not use the prefix sp, a better prefix in my opinion is usp_.
Ensure the stored procedure you're calling (sp_monitorconfig) has a RETURN


text:
Q: Why do the birds repeat what is heard in the Hunger Games? I have been reading the Hunger Games and have seen the movies. First, let me please ask to please please don't give me any horrendous spoilers for the next 2 books (I haven't started reading them yet), but one thing has been annoying me a bit is the "mockingjays".
They say that when they were first unleashed by the Capital, they were used to "listen" to people speaking and then go back to the capital and divulge what they have heard. The book describes it as if it took a while before the Districts realized this was happening.
But if they suddenly repeat exactly what they hear (like they do in the woods) wouldn't people catch on immediately? I mean they would hear their conversation repeated right away.

A: The mockingjays repeated back whatever they heard, but they were not the birds created by the Capital.
The Jabberjays are the birds created by the Capital as spies.  All Jabberjays were male, and were trained/bred to only repeat what they heard to their keepers back at the Capital.
However,  the rebels still did manage to discover that the Jabberjays were being used to spy on them, and they started feeding them false information as counter-espionage.  It was this counter-espionage campaign that prompted the Capital to stop the Jabberjay project, and leave all existing Jabberjays to die.
Before they died, many of them mated with female mockingbirds, resulting in the cross-bred mockingjays present in the books and movie that you are referring to.
From Chapter 3 of "The Hunger Games":

One {{mutt}} was a special bird called a jabberjay that had the ability to memorize and repeat whole human conversations. They were homing birds, exclusively male, that were released into regions where the Capitol's enemies were known to be hiding. After the birds gathered words, they'd fly back to centers to be recorded. It took people awhile to realize what was going on in the districts, how private conversations were being transmitted. Then, of course, the rebels fed the Capitol endless lies, and the joke was on it. So the centers were shut down and the birds were abandoned to die off in the wild.
Only they didn't die off. Instead, the jabberjays mated with female mockingbirds creating a whole new species that could replicate both bird whistles and human melodies. They had lost the ability to enunciate words but could still mimic a range of human vocal sounds, from a child's high-pitched warble to a man's deep tones. And they could re-create songs. Not just a few notes, but whole songs with multiple verses, if you had the patience to sing them and if they liked your voice.

A: The jabberjays were created in labs by the Capitol in order to be spies. It is quite likely that they were able to train them to not talk unless given some form of command. This is backed up in the second book by the fact that

 in the arena for the 75th hunger games, the jabberjays only made calls during the time that their wedge of the clock was active.

The mockingjays were not purposely created by the Capitol, they were made when the jabberjays mated with mocking birds. This either repressed the genes that kept them quiet until ready to repeat information, or since they were wild, they lacked the training of the jabberjays to stay silent.


text:
Q: Efficient way to write asynchronously into cassandra using datastax java driver? I am using datastax java driver 3.1.0 to connect to cassandra cluster and my cassandra cluster version is 2.0.10. I am writing asynchronously with QUORUM consistency.
  public void save(final String process, final int clientid, final long deviceid) {
    String sql = "insert into storage (process, clientid, deviceid) values (?, ?, ?)";
    try {
      BoundStatement bs = CacheStatement.getInstance().getStatement(sql);
      bs.setConsistencyLevel(ConsistencyLevel.QUORUM);
      bs.setString(0, process);
      bs.setInt(1, clientid);
      bs.setLong(2, deviceid);

      ResultSetFuture future = session.executeAsync(bs);
      Futures.addCallback(future, new FutureCallback<ResultSet>() {
        @Override
        public void onSuccess(ResultSet result) {
          logger.logInfo("successfully written");
        }

        @Override
        public void onFailure(Throwable t) {
          logger.logError("error= ", t);
        }
      }, Executors.newFixedThreadPool(10));
    } catch (Exception ex) {
      logger.logError("error= ", ex);
    }
  }

And below is my CacheStatement class:
public class CacheStatement {
  private static final Map<String, PreparedStatement> cache =
      new ConcurrentHashMap<>();

  private static class Holder {
    private static final CacheStatement INSTANCE = new CacheStatement();
  }

  public static CacheStatement getInstance() {
    return Holder.INSTANCE;
  }

  private CacheStatement() {}

  public BoundStatement getStatement(String cql) {
    Session session = CassUtils.getInstance().getSession();
    PreparedStatement ps = cache.get(cql);
    // no statement cached, create one and cache it now.
    if (ps == null) {
      synchronized (this) {
        ps = cache.get(cql);
        if (ps == null) {
          cache.put(cql, session.prepare(cql));
        }
      }
    }
    return ps.bind();
  }
}

My above save method will be called from multiple threads and I think BoundStatement is not thread safe. Btw StatementCache class is thread safe as shown above.

*

*Since BoundStatement is not thread safe. Will there be any problem in my above code if I write asynchronously from multiple threads?

*And secondly, I am using Executors.newFixedThreadPool(10) in the addCallback parameter. Is this ok or there will be any problem? Or should I use MoreExecutors.directExecutor. What is the difference between these two then? And what is the best way for this?

Below is my connection setting to connect to cassandra using datastax java driver:
Builder builder = Cluster.builder();
    cluster =
        builder
            .addContactPoints(servers.toArray(new String[servers.size()]))
            .withRetryPolicy(new LoggingRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE))
            .withPoolingOptions(poolingOptions)
            .withReconnectionPolicy(new ConstantReconnectionPolicy(100L))
            .withLoadBalancingPolicy(
                DCAwareRoundRobinPolicy
                    .builder()
                    .withLocalDc(
                        !TestUtils.isProd() ? "DC2" : TestUtils.getCurrentLocation()
                            .get().name().toLowerCase()).withUsedHostsPerRemoteDc(3).build())
            .withCredentials(username, password).build();

A: I think what you're doing is fine. You could optimize a bit further by preparing all the statements at application startup, so you have everything already cached, so you don't get any performance hit for preparing statement when "saving", and you don't lock anything in your workflow.
BoundStatement is not threadsafe, but PreparedStatement yes, and you are returning a new BoundStatement every time you call your getStatement. Indeed, the .bind() function of the PreparedStatement is actually a shortcut for new BoundStatement(ps).bind(). And you are not accessing the same BoundStatement from multiple thread. So your code is fine.
For thread pool, instead, you are actually creating a new thread pool on each addCallback function. This is a waste of resources. I don't use this callback method and I prefer managing plain FutureResultSet by myself, but I saw examples on datastax documentation that use MoreExecutors.sameThreadExecutor() instead of MoreExecutors.directExecutor().


text:
Q: Could not find package zendframework/zend-mvc-form 1)Try install ZF3 form components
 php composer.phar require zendframework/zend-mvc-form
    1/1:        http://packagist.org/p/provider-latest$f77721936f1c90d0ef812a52e8ce1ff658380f07a75912c022c413f5376614d6.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1

  [InvalidArgumentException]
  Could not find package zendframework/zend-mvc-form in any version matching your PHP version (5.5.38.0)

Version PHP:

2)
I'm trying to set the developer mode:
 composer development-enable

  [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "development-enable" is not defined.

A: The screenshot shows PHP 5.6, but the error message says you are using PHP 5.5.38. zend-mvc-form requires PHP 5.6 or above.


text:
Q: php, div nesting issue I'm using a php if statement to display a graphic when users aren't logged in, but the problem is that a.) I'm not great with php yet and b.) the if statement kicks my right sidebar into my #contentleft div, when they should be siblings.  Can you tell me what I'm doing wrong here?
the code:

    <?php
    if ( is_user_logged_in() ) {
            echo 'Welcome, registered user!';

    } else {
            echo '

Sign up and start posting!

';

    };
    ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?>

Posted on | <?php the_time('F j, Y'); ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>

        <?php global $wpdb;
                $query = "SELECT `ID`, `guid` FROM `$wpdb->posts` WHERE `post_type` = 'attachment' AND `post_parent` = '{$post->ID}'";
                $adimages = $wpdb->get_results($wpdb->prepare($query), OBJECT);
        // To display the first image.. ?>

        <img style="float: center; height: 500px;" src="<?php if(is_public_submission()){echo $adimages[0]->guid;} ?>" />

    <?php the_content(__('Read more'));?>

Category: <?php the_category(', ') ?>
<?php the_tags('Tags: ',' > '); ?>

Comments

    <?php comments_template(); // Get wp-comments.php template ?>

    <?php endwhile; else: ?>

<?php _e('Sorry, no posts matched your criteria.'); ?>
<?php endif; ?>

<?php include(TEMPLATEPATH."/r_sidebar.php");?>

Thanks a bunch.

A: I am confused. You are including the r_sidebar.php inside of your #contentLeft div. Would it not behove you to move it out of the div?
Instead of:
<?php include(TEMPLATEPATH."/r_sidebar.php");?>

Do:

<?php include(TEMPLATEPATH."/r_sidebar.php");?>

Sorry if that is not the answer (it seems too easy) but if you could elaborate on your problem, I am sure I could be more help!


text:
Q: How to find the last node from an html string with Jsoup? I have HTML string and want to get last closing tags.
e.g.

some text

item1Text

I want to insert a button after item1Text, thus I need to find
last tags in the html string, in this case it is

Question -> is there any easy and efficient way to get last tags in any give HTML string

A: If I understood you correctly, you have some HTML "code" in a string, and you want to process it in Java.  I am assuming that you know where opening tag for the element is, and you want to insert the button after the closing tag.
The algorithm I am suggesting you only work if in each line has no more than one opening and closing element tag.  For example, it will not return a correct answer for:

item1Text

 // more than one opening and closing element tags

My solution involves using a stack to match the start and end tags.  It assumes that you have already split the HTML into lines.

*

*Set a counter to 1

*Iterate the lines.  For each line:
2.1. Check if you found a starting tag of an element ==> counter++,
2.2. Check if this line also contains his closing tag ==> counter--1.
2.3. Check if the counter value is 0, if it does you found the line where the element closes.  Otherwise, move to the next line .
In Java code, it will look something like this:
    if (line.matches("^(.*(<)(?!/).*)$")) {`
         counter++;
    }
    if (line.matches("^(.*(</).*)$")) {`
         counter--;
    }
    if(counter == 0) {
        // done searching for the closing tag
    }

A:
is there any easy and efficient way to get last tags in any give HTML string

You want to use a CSS query. However, you must either know the structure of the given HTML string or use a generic CSS query.
If you can add more information on the HTML string, some pointers may be provided.

Here is a CSS query example using the HTML fragment from your post.
li:contains(item1Text):last-of-type

li                    /* Select any LI element... */
:contains(item1Text)  /* containing 'item1Text' ... */
:last-of-type         /* and keep only the last LI. */

Here is below, an example Java code with the above CSS query.
CODE
String htmlFragment="
\n
some text
\n
\n
\n
item1Text
\n
\n
\n
";

System.out.println("BEFORE:\n" + htmlFragment);

Document parsedHtmlFragment = Jsoup.parse(htmlFragment);
Elements matchingLIs = parsedHtmlFragment.select("li:contains(item1Text):last-of-type");

for(Element matchingLI : matchingLIs) {
    // Append the button code at the end of the LI content.
    matchingLI.append("<button type=\"button\">BUTTON CONTENT HERE...</button>");
}

System.out.println("\nAFTER:\n" + parsedHtmlFragment.outerHtml());

OUTPUT
BEFORE:

some text

item1Text

AFTER:

some text

item1Text<button type="button">BUTTON CONTENT HERE...</button>


text:
Q: finding the limit of $\lim_{x \to 0}\frac{x-\tan(x)}{x-\sin(x)}$ I'm calculating the limit for the following equation, and would like some feedback on my solution. The answer is $-2$ although, I cannot seem to derive this whilst using l'hopitals rule.
$\lim_{x \to 0}\frac{x-\tan(x)}{x-\sin(x)}$
my working out:
$$\lim_{x \to 0}\frac{\frac{d}{dx}(x-\tan(x))}{\frac{d}{dx}(x-\sin(x))}=\frac{1-\sec^2(x)}{1-\cos(x)} = \frac{\tan^2(x)(1+\cos(x))}{1-\cos^2(x)}=0$$

A: Hint:
The Maclaurin series for tan(x) is:
\begin{equation*}
\tan x=x+\frac{x^{3}}{3} +\frac{2x^{5}}{15} +...
\end{equation*}
And that for sin(x) is
\begin{gather*}
\sin x=x-\frac{x^{3}}{3!} +\frac{x^{5}}{5!} +...\\
\end{gather*}
Can you use this data to get to the answer?


text:
Q: α is a plane curve iff the binormal vector is constant I've just started studing Differencial Geometry at college and I came across the following exercise
"α is a plane curve iff the binormal vector is constant"
Would you have any hints for this proof?
I know that if the binormal vector is constant then the curve is in the span generated by T(s) and N(s)

A: The result you quoted gets one direction, ie if the curve lies in the span of two vectors then it's a plane curve.  For the other direction, assuming $\alpha$ is a plane curve then you can use the definition of binormal vector to show that it must be constant.


text:
Q: Getting object within vector based on object pointer I'm trying to iterate through a vector of Player objects and then return the next one based off a Player pointer. I have tried various ways to get the operators within the lambda to match but cannot get it to work and have read similar such issues on stack overflow. I'm sorry for not making a SSCCE, I just don't know how at my current skill level.
Source of c_player:
Defined as:
Player* current_player;

Set with:
void Game::set_first_player_turn(){
    current_player = &game_players.back();
}

Erroneous code:
using namespace std;
vector<Player>game_players;

Player* Game::find_player(Player* c_player){
    vector<Player>::iterator iter;
    iter = find_if(game_players.begin(), game_players.end(),
                   [&](Player* p ) -> bool{ return p == c_player; }); //This line
                                        // causes the exception. Sets iterator to
                                        // position of the current player
    if (iter != game_players.end()){
        advance(iter, 1);
    }
    else{
        iter == game_players.begin();
    }
    current_player = &(*iter);

    return current_player;
}

Compile error:
error C2664: 'bool Game::set_game_flow::<lambda_360ac8a355100cfac1adc9f8eba8d8b9>
::operator ()(Player *) const' : cannot convert parameter 1 from 'Player'
to 'Player *'

Thanks for any help.

A: Predicate in find_if has to take a const reference to a type stored in container. You store a Player type in vector
vector<Player> game_players;

Thus
[&](Player* p )

is not a correct predicate. This should be
[c_player]( const Player& p ) { return p == *c_player; }
                                    // ^^^^^^^^^^^^^^
                                    // to compare by value
// note: to compare by value
// bool operator==( const Player&, const Player&)
// must be defined

[c_player]( const Player& p ) { return &p == c_player; }
                                    // ^^^^^^^^^^^^^^
                                    // to compare by address
// note: address of c_player
// has to be valid (not invalidated by vector through resizing, erasing, etc)

So you can write:
vector<Player>::iterator iter;
iter = find_if( game_players.begin(), game_players.end(),
                       [c_player]( const Player& p ) { return p == *c_player;});


text:
Q: Conserved quantities for the Cauchy momentum equation I apologize if this question is too elementary for mathoverflow; I asked it (unsuccessfully) on MATH.SE first.
As a bit of background: one way to study the mechanics of deformation of a continuous solid body is by defining a reference body $B_0$, a connected, well-behaved subset of $R^2$ or $R^3$. In 3D one assumes that the boundary $\partial B_0$ is a closed, orientable surface; in 2D it is a closed curve.
A motion is then a map $\psi : B_0 \rightarrow B$, where $\psi = \psi(\bar{X},t)$, $t > 0$ and $\bar{X}$ is some label (usually a position vector) for points in the reference body $B_0$. In particular, motions are treated as diffeomorphisms parametrized by $t$.
A particular subset of motions involve those that conserve volumes / areas. For instance, in a planar motion, the area $dv^a \times dv^b$ is conserved by the motion for all time $t$. A general incompressible motion would, if I am not mistaken, preserve a volume form in 3D.
In 2D, the area preserving motions are symplectomorphisms, not just diffeomorphisms. One expects that this imposes strong restrictions on the map $\psi(\bar{X},t)$. In the odd-dimension (3D), one expects similarly strong constraints from the conservation of volume.
The governing PDE for continuous bodies is the Cauchy equation of motion
$$
\nabla \cdot \sigma + \rho \bar{b} = \rho \left ( \frac{\partial \bar{v}}{\partial t} + \bar{v} \cdot \nabla \bar{v} \right)
$$
The velocity $\bar{v}$ is defined as $\left. \dfrac{\partial \psi}{\partial t} \right|_X$ and $\bar{b}$ is a specified vector field.
In general, the stress tensor $\sigma$ at a point is a functional of the history of motion of a material point. Specifying it completes the physical description of the continuous body e.g. a fluid, elastic solid etc.
My questions are as follows:
(1) Is the presence of an incompressibility condition associated with any non-trivial, scalar, conserved quantities in the Cauchy momentum equation?
(2) It is known that there are some obvious restrictions on the velocity field, for instance $\nabla \cdot \bar{v} = 0$. However, does incompressibility also impose other, non-obvious restrictions of any kind e.g. on geometric quantities associated with the motion.
Alternatively, is there a reason that symplectomorphisms / conserved volume vs diffeomorphisms just does not yield too much more useful information as far as the Cauchy momentum equation goes?
Added: I was able to find a lot of material for a very particular case, that of incompressible fluid flow (the Euler equations), not much for the more general situation I am interested in.

A: 1) conserved quantity for incompressible flow:
$$\frac{d\rho}{dt}=\frac{\partial\rho}{\partial t}+\bar{v}\cdot\nabla\rho=0$$
so if the flow is stationary, $\partial\rho/\partial t=0$, the density $\rho$ is conserved along streamlines
2) restrictions to the velocity field:
in full generality you only have the continuity equation,
$$\frac{\partial\rho}{\partial t}=-\nabla\cdot(\rho\bar{v})=-\bar{v}\cdot\nabla\rho-\rho\nabla\cdot\bar{v},$$
which in combination with the incompressibility condition gives you $\rho\nabla\cdot\bar{v}=0$; no other restrictions.