text:
Q: Picture overlay... Only at the area of the real picture and not the background of the picture I'm a student, and currently busy with creating my own website, but now I've got a question which I can't figure out myself.
My website is about professional cycling and on it I'll have the jerseys of the teams which I want to overlay when going over it with the mouse. I figured this out OK, but now it happens that if I move over it with my mouse, a big square overlays the picture (because it's a square picture with a transparent background) and I want that there is only an overlay over the jersey and not over the "background" of the picture.
I hope you can help me! Need to fix this!
Thank you in advance!

.container {
  position: relative;
  width: 25%;
  height: auto;
}
.image {
  display: block;
  width: 100%;
  height: auto;
}
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #00b0f0;
  opacity: 0.8;
  overflow: hidden;
  width: 100%;
  height: 0;
  transition: .5s ease;
}
.container:hover .overlay {
  height: 100%;
}
.text {
  white-space: nowrap;
  color: white;
  font-size: 20px;
  position: absolute;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
}

AG2R La Mondiale

A: I found a relevant Stack Overflow thread where the consensus is that this is unachievable with CSS unless you want a pure black image done with filters - which aren't compatible in all browsers and would not have the sliding transition you've implemented.
So I opted to show you how this could look if you created blue overlays yourself in Photoshop as separate PNG images and transitioned with them. I created the PNG by making a layer filled with #00b0f0, set it to 80% opacity and used it as a clipping mask - essentially what your .overlay was trying to do. Here's a demo:

.container {
  position: relative;
  width: 25%;
  height: auto;
}
.image {
  display: block;
  width: 100%;
  height: auto;
}
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0.8;
  overflow: hidden;
  width: 100%;
  height: 0;
  transition: .5s ease;
}
.overlay .image {
  position: absolute;
  bottom: 0;
}
.container:hover .overlay {
  height: 100%;
}
.text {
  white-space: nowrap;
  color: white;
  text-shadow: #000 0 1px 1px;
  font-size: 20px;
  position: absolute;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
}

AG2R La Mondiale


text:
Q: select a list of rows from this table format based on distinct fk2 and > date? Is it possible to select a list of rows from this table format based on distinct fk2 and > date?
Table
pk  fk1 fk2 value   date
1  1   1   100     1/1/2009
2  1   2   110     1/1/2009
3  1   2   120     5/1/2009
4  1   3   130     1/1/2009
I would like it to return rows 1,3,4
I only pass in fk1
Select * from table where fk1=1 'and the row with the latest date for each fk2?
Regards

A: Select * from table t where t.fk1=1 and t.date=( select max(date) from table where fk2=t.fk2 and fk1=t.fk1)

redpajama_set_name: RedPajamaStackExchange


text:
Q: Dudas referentes a microservicios y contenedores Buenas tardes,
Estamos empezando a desarrollar las nuevas aplicaciones con microservicios, contendores... y estamos encontrando una serie de dudas referentes a ellos que por más que estamos buscando no conseguimos resolverlas al 100%, la cuestión es la siguiente:
Tenemos desarrollados varios microservicios y a la hora de introducirlos en el contendedor ejecutamos la siguiente sentencia por cada microservicio que creamos:

docker run -d -p 8080:8080 --name micro1 micro-service-spring-boot:0.0.1-SNAPSHOT

por lo que si tenemos varios microservicios: micro1, micro2,... microN ejecutamos esta sentencia anterior tantas veces como microservicios tengamos (por lo que tenemos que cambiar el puerto).
La cosa es que si todos los microservcicios se despliegan dentro del contenedor cada uno tendrá un puerto diferente.
¿Sería posible que los microservicios se desplegarán dentro del mismo contenedor y todos tuvieran el mismo puerto y solo cambiara la ruta de acceso al mismo?

A: No aconsejo realizar de esta forma el despliegue, lo mejor es desplegar los microservicios mediante Docker Swarm. Siga los siguientes pasos:

*

*Cree un archivo Dockerfile para cada uno de los microservicios.

*Cree un archivo yml para el despliegue de todos los microservicios mediante docker-compose.

*Cree un script de bash para la construcción de las imágenes mediante docker build, inicio del enjambre mediante docker init swarm y despliegue de la solución con el archivo yml mediante el comando docker stack deploy y sus respectivas opciones.


text:
Q: Can't get device ID on Chrome 81, Firefox, and Safari using Agora Web SDK I've noticed that within Chrome 81, Firefox and Safari, I can't get the device ID for the camera and microphones.
I'm using the getDevices method but it returns an empty response.
const devices = AgoraRTC.getDevices(info => {
    console.log("get device info!", info);
});

How can I get the device IDs?

A: As of Chrome 81, device IDs are not exposed if permission to use devices has not been granted. This change was made to protect user privacy.
For the Agora Web SDK, if you try to get device information before the Stream.init successfully creates the stream, then the privacy guard will be applied and the deviceIDs will not properly get returned. It is recommended to first initialize the streams, then  query the devices after the user has accepted the device permissions.
const audioStream = AgoraRTC.createStream({ audio: true, video: false});
const videoStream = AgoraRTC.createStream({ audio: false, video: true});

// Initialize the streams to trigger the device permissions
const audioPermissionGranted = new Promise(resolve => {
  audioStream.init(() => resolve(null), (e) => resolve(e));
});
const videoPermissionGranted = new Promise(resolve => {
  videoStream.init(() => resolve(null), (e) => resolve(e));
});

Promise.all([audioPermissionGranted, videoPermissionGranted]).then(res => {
  if (res[0] !== null) {
    console.warn("create audio stream failed!", res[0]);
  }
  if (res[1] !== null) {
    console.warn("create video stream failed!", res[0]);
  }

  // After the permissions are granted, call getDevices to get device information
  const devices = AgoraRTC.getDevices(info => {
    console.log("get device info!", info);
  });
});


text:
Q: AngularJS HTTP Post to PHP I am posting some data to a php page from angularjs controller using the $http method as shown below.
$scope.login = function(){
    var data = {
        'username' : $scope.username,
        'password' : $scope.password
    };
    $http.post('login.php', data).success(function(response){
        console.log(response);
    });
};

I know I can retrieve this data in php using :
$postdata = json_decode(file_get_contents('php://input'), true);

But I was wondering if there is better way in angularjs so I could use the simple $_POST in php to retrieve the data.
In jQuery we could just simply use $.post and those are available for php in $_POST. Why for angularjs that is not that simple.
Is there any way to populate $_POST of php when we do a $http post request in angularjs. Please help.

A: You need to convert your request to php known format.
I use jQuery $.param method to build it. You can write your own.
app.config(['$httpProvider', function($http) {
    $http.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
    $http.defaults.transformRequest = function(data) {
            return $.param(data);
        };
    }]);

urlencoded is followed simple format:
username=Name&password=My%20Password

JSFiddle

A: Got it working using jQuery $.param method. Thanks to vp_arth's answer. I just added this answer as it might help someone. This can be used if it is needed for only one request.
$scope.login = function(){
    var data = {
        'username' : $scope.username,
        'password' : $scope.password
    };

    $http({
        url: "login.php",
        method: "POST",
        headers: {'Content-Type': 'application/x-www-form-urlencoded'},
        data: $.param(data)
    }).success(function(response){
        console.log(response);
    });

};

A: well I just use this in my controller class, so all my post requests: normal ones with jQuery or the ones through angular all end up being in $_post
    if ($_SERVER['REQUEST_METHOD'] == 'POST' && empty( $_POST ))
        $_POST=$_REQUEST = json_decode( file_get_contents( 'php://input' ), true );

have fun,


text:
Q: XML Only allow certain input in an element using a DTD Alright, I'm trying to allow only the following inputs (electronics, groceries, household) to be allowed in the category element, however I cannot figure out the correct way to do this. I'm using an internal DTD and have two full examples of how I want it to handle documents. Here is the code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE manufacturer[
    <!ELEMENT manufacturer (companyName, address, phone, contactPerson?, products)>
    <!ATTLIST manufacturer identifier CDATA #REQUIRED>
    <!ELEMENT companyName (#PCDATA)>
    <!ELEMENT address (#PCDATA)>
    <!ELEMENT phone (#PCDATA)>
    <!ELEMENT contactPerson (#PCDATA)>
    <!ELEMENT products (product+)>
    <!ELEMENT product (model, price, description, category)>
    <!ATTLIST product code CDATA #REQUIRED>
    <!ELEMENT model (#PCDATA)>
    <!ELEMENT price (#PCDATA)>
    <!ELEMENT description (#PCDATA)>
    <!ELEMENT category (household|groceries|electronics)
    ]>

<manufacturer identifier = "m1">
    <companyName>Kitchen Manufacturers International</companyName>
    <address>1256 Factory Lane, Cleveland, OH 44111</address>
    <phone>216-333-4444</phone>
    <contactPerson>Fred Smith</contactPerson>
    <products>
        <product code = "X345">
            <model>Sun Beam Mixer</model>
            <price>14.75</price>
            <description>Popular handheld mixer</description>
            <category>household</category>
        </product>
        <product code = "MW30">
            <model>GE30 Microwave</model>
            <price>99.95</price>
            <description>A popular model</description>
            <category>household</category>
        </product>
    </products>
</manufacturer>

<manufacturer identifier = "m3">
    <companyName>Kraft Foods Incorporated</companyName>
    <address>1515 Kraft Avenue, Chicago, IL 37897</address>
    <phone>222-333-4444</phone>
    <products>
        <product code = "345DR">
            <model>Jiffy Peanut Butter</model>
            <price>4.95</price>
            <description>America's favorite, made from real peanuts</description>
            <category>groceries</category>
        </product>
        <product code = "321SD">
            <model>Mac N' Cheese</model>
            <price>1.99</price>
            <description>Every child's favorite dinner</description>
            <category>groceries</category>
        </product>
        <product code = "123DD">
            <model>Rice Krispies</model>
            <price>2.99</price>
            <description>Snap Crackle and Pop</description>
            <category>groceries</category>
        </product>
    </products>
</manufacturer>

A: You can't specify restriction on the contents of an XML element with a DTD. What you specified is that the only child elements under category can be household... etc.


text:
Q: Storing OAuth keys in code for iPhone apps I'm writing an iPhone app that integrates with third party APIs. These APIs use OAuth (key/secret specific to my app not per user) in order to authenticate which app the request is being made in behalf of.
Is it secure (or how secure) is it to simply put the key/secret in code? Can this sort of data be reverse-engineered? Is there a better way to go about including this data in a project?

A: There is no place on the iPhone to hide data.  A user with a jailbroken iPhone has more control over the device than any developer.  If possible you should setup a web service such as a REST or SOAP service to take care of these OAuth transactions on behalf of the client.

A: As Rook said earlier, there is no way to hide your data in iPhone. But you can make hacker job so difficult. I just done a work around for the same issue.

*

*Put oAuth key information in PLIST

*Mannually I encrypt this PLIST by using AES key and I got encrypted "CIPHER TEXT"

*Modify the AES key by appending characters in between with your own logic. Since it required at runtime to decrypt the plist

*Add this modified key with plist "CIPHER TEXT" and store this value in New plist.

*Remove old plist which has oAuth information

Now you have only one plist which has encrypted value with modified KEY
Advantage:

*

*Hacking is so difficult since hacker don't have a proper cipher text in plist

*To hack this code they should know to separate Modified AES key from Cipher text.

*Thou they found Modified AES key, they don't have any clue about the appending algorithm, here i simple used EVEN position of the character, but you can't modify this and you can take 3rd or 4th position of the character. Which is actually will differ for each developer
for more information please visit below link;
https://sites.google.com/site/greateindiaclub/mobil-apps/ios/securelystoringoauthkeysiniosapplication

A: I'd suggest looking into the Keychain services provided by Apple
http://developer.apple.com/library/ios/#documentation/Security/Conceptual/keychainServConcepts/01introduction/introduction.html


text:
Q: How do you find the solution for $ x+3z+w=0, y+z+2w=0 $? They say the answers are $c(-3,-1,1,0)$, $c(-1,-2,0,1) $ when c is an arbitrary constant. I kinda understand you can get the answers by putting $0$ respectively into the variable both of the two equations have and derive other values. However, how do you know they are the only answers? You could say there might be some answers where neither $z$ and $w$ are $0$, right?

A: You need to find vectors $(x,y,z,w)$, orthogonal to both $\vec{a}=(1,0,3,1)$ and $\vec{b}=(0,1,1,2)$. Extend these two vectors to form a basis of $\mathbb{R}^4$, say $\{\vec{a}, \vec{b}, \vec{c}, \vec{d}\}$, and then run Gram Schmidt Orthogonalization to get a orthogonal basis, say $\{\vec{a}^*, \vec{b}^*, \vec{c}^*, \vec{d}^*\}$. Any vector $(x,y,z,w)\in\mathrm{span}(\vec{c}^*, \vec{d}^*)$ will satisfy the two equations given abovr.


text:
Q: C++/CLI: Passing C++ class ptr to unmanaged method I've been given a third party C/C++ library (.dll, .lib, .exp and .h) that I need to use in our C# app.
ThirdPartyLibrary.h contains...
class AClass {
 public:
  typedef enum {
      green = 7,
      blue = 16
  } Color;
  virtual int GetData()=0;
  virtual int DoWork(Color, char *)=0;
};

void * Func1(int, AClass **aClass);

In my C++/CLI code I have done this...
#include "ThirdPartyLibrary.h"
using namespace System;
using namespace System::Runtime::InteropServices;

namespace Wrapper {
public ref class MyBridgeClass
{
private:
  AClass* pAClass;

public:
  // C# code will call this method
  void AMethod (int x)
  {
    int y = x+10;
    Func1 (y, &(this->pAClass));  // <-- error!
  }
}
}

I get a build error that reads...
cannot convert parameter 2 from 'cli::interior_ptr<Type>' to 'AClass **'
      with
      [
          Type=AClass *
      ]
      Cannot convert a managed type to an unmanaged type

Any ideas?  Maybe I need #pragma manage/unmanged tags in my C++/CLI?

A: The reason you're getting that error is because of how managed memory works.
In your managed class, you've got a pointer defined. The address of that pointer is part of the managed object, and can change when the garbage collector runs. That's why you can't just pass &pAClass to the method, the GC can change what that address actually is.
There's a couple things you can do to fix this:
You could create an unmanaged helper class to hold the AClass* member. I'd do this if that pointer needs to stay valid beyond the invocation of this method, or if you have a lot of unmanaged pointers to hold.
struct UnmanagedHolder
{
    AClass* pAClass;
};

public ref class MyBridgeClass
{
private:
  // must create in constructor, delete in destructor and finalizer.
  UnmanagedHolder* unmanaged;

public:
  // C# code will call this method
  void AMethod (int x)
  {
    int y = x+10;
    Func1 (y, &(this->unmanaged->pAClass));
  }
};

If you only need the pointer to be valid within AMethod, and the pointer doesn't need to remain valid after the call to Func1, then you can use a pin_ptr.
void AMethod (int x)
{
  int y = x+10;
  pin_ptr<AClass*> pin = &(this->pAClass);
  Func1 (y, pin);
}


text:
Q: In Hollowviews, how do I get grid lines to line up with tick marks?
When I change the xticks in hollowviews, the grid lines sill line up with the default xticks. How can I get the grid to line up with my custom xticks?
import holoviews as hv
import numpy as np
hv.extension('bokeh')
points = [(0.1*i, np.sin(0.1*i)) for i in range(100)]
%opts Curve  [xticks=[0,1.5,9] show_grid=True]
hv.Curve(points)

A: Hi if this is still relevant, you would have to convert it to a Bokeh figure and then utilize Bokeh functions like this.
from bokeh.io import output_notebook, show
from bokeh.models.tickers import FixedTicker
import holoviews as hv
import numpy as np
hv.extension('bokeh')
renderer = hv.renderer('bokeh')

%opts Curve [xticks=[0, 1.5, 9] show_grid=True]

points = [(0.1 * i, np.sin(0.1 * i)) for i in range(100)]
plot = hv.Curve(points)
p = renderer.get_plot(plot).state
p.xgrid[0].ticker=FixedTicker(ticks=[1.5, 9])
show(p)

Specific Tick Locations


text:
Q: Using Callable instead of Supplier or vice versa I came across code that used Callable instead of Supplier. I did not see any threads spawning across to use Callable. But is it okay to use Callable instead of Supplier?.
One of the devs I work with stated that it does the same job. Going by the docs it doesn't but would like to know experts opinions here.
  Callable<Optional<NodePermissionResponse>> successHandler = () -> {
        NodePermissionResponse restResponse = response.readEntity(NodePermissionResponse.class);
        return Optional.of(restResponse);
    };

    Callable<Optional<NodePermissionResponse>> errorHandler = () -> {
        ApplicationResponse appResponse = response.readEntity(ApplicationResponse.class);
        if(appResponse.getError().getStatusCode() == NOT_FOUND_STATUS_CODE) {
            return Optional.empty();
        }
        log.error("Fetching entitlements for group failed", appResponse.getError());
        throw new ApplicationAccessException(appResponse.getError());
    };

 return processResponse(
            successHandler, errorHandler, response);
}

Method to process response
  public static <T> T processResponse(Callable<T> successfulResponseHandler,
                             Callable<T> unsuccesfulResponseHandler,
                             Response response) {
   //do the job here
}

A:
I did not see any threads spawning across to use Callable. But is it
  okay to use Callable instead of Supplier.

As mentioned in the comments already both Callable and Supplier are interfaces which have the same function descriptor i.e. their SAM (Single Abstract Method) are same in their signatures.
One difference being that, Callable#call is able to throw checked exceptions, on the other hand Supplier#get is not.
This means for your use case using any of them is completely acceptable, although as mentioned in this answer
Though both interfaces will suffice in this specific case they're intended for different purposes i.e. A Callable is "A task that returns a result" while a Supplier is "a supplier of results". The latter is more "general" in as opposed to the former.
So, the conclusion is to go with the one that most suits your specific scenario.


text:
Q: How to fix dependencies / broken packages When I try to install system updates, skype or phpmyadmin I got this error:
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libc6 : Depends: libgcc1 but it is not going to be installed
         Depends: tzdata but it is not going to be installed
 libc6-dev : Depends: libc-dev-bin (= 2.15-0ubuntu10.3)
             Depends: linux-libc-dev but it is not going to be installed
             Recommends: gcc but it is not going to be installed or
                         c-compiler
 skype:i386 : Depends: libasound2:i386 (>= 1.0.16) but it is not going to be installed
              Depends: libc6:i386 (>= 2.3.6-6~) but it is not going to be installed
              Depends: libc6:i386 (>= 2.7) but it is not going to be installed
              Depends: libgcc1:i386 (>= 1:4.1.1) but it is not going to be installed
              Depends: libqt4-dbus:i386 (>= 4:4.5.3) but it is not going to be installed
              Depends: libqt4-network:i386 (>= 4:4.8.0) but it is not going to be installed
              Depends: libqt4-xml:i386 (>= 4:4.5.3) but it is not going to be installed
              Depends: libqtcore4:i386 (>= 4:4.7.0~beta1) but it is not going to be installed
              Depends: libqtgui4:i386 (>= 4:4.8.0) but it is not going to be installed
              Depends: libqtwebkit4:i386 (>= 2.1.0~2011week13) but it is not going to be installed
              Depends: libstdc++6:i386 (>= 4.6) but it is not going to be installed
              Depends: libx11-6:i386 but it is not going to be installed
              Depends: libxext6:i386 but it is not going to be installed
              Depends: libxss1:i386 but it is not going to be installed
              Depends: libxv1:i386 but it is not going to be installed
              Depends: libssl1.0.0:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

How to solve this?

A: -f or --fix-broken

Explanation from the man apt-get pages

Fix; attempt to correct a system with broken dependencies in place. This
           option, when used with install/remove, can omit any packages to permit APT
           to deduce a likely solution. If packages are specified, these have to
           completely correct the problem. The option is sometimes necessary when
           running APT for the first time; APT itself does not allow broken package
           dependencies to exist on a system. It is possible that a system's dependency
           structure can be so corrupt as to require manual intervention (which usually
           means using dselect(1) or dpkg --remove to eliminate some of the offending
           packages). Use of this option together with -m may produce an error in some
           situations. Configuration Item: APT::Get::Fix-Broken.

I recommend trying the following commands.
sudo dpkg --configure -a

sudo apt-get install -f

Answer yes to any prompts and let apt-get try to resolve the issue for you.
EDIT:
Based on comment try the following command it should clean up your system.
sudo sh -c "apt-get update;apt-get dist-upgrade;apt-get autoremove;apt-get autoclean"


text:
Q: How can I make an interop call using a struct as a parameter that contains a string I am attempting to call a C++ function in a DLL from C# via interop. The DLL was written by someone else. The function signature is as follows:
AXI_DLL_EXPORT int __stdcall GetFileType(StringParam *stringParam, int *fileType)

StringParam is a struct defined as follows:
struct StringParam
{
    int size;    // 4 byte integer for the size of the string buffer
    LPWSTR buff; // Pointer to a wide char buffer
}

This struct is used for passing strings back and forth. It can be used as both in and out parameters. The purpose of the size field in the struct is primarily for returning strings to the caller and to indicate the size of the buffer required. If the size of the buffer (provided by the caller) is too small to hold the string the caller can be informed of this and can then provide a larger buffer in a successive call to the function.
In C# I created a corresponding struct as follows:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct StringParam
{
    public int Size;

    [MarshalAs(UnmanagedType.LPWStr)]
    public string Text;

    public StringParam(string text)
    {
        this.Text = text;
        this.Size = text.Length;
    }
}

I declared the DllImport function call as follows:
[DllImport("Custom.dll", CharSet = CharSet.Unicode)]
public static extern int GetFileType(StringParam stringParam, out int fileType);

The call fails with the following error:
A call to PInvoke function '... GetFileType' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
How should I declare the struct and call the native function from C#?

A:
public static extern int GetFileType(ref StringParam stringParam, out int fileType);

A: Have you tried :
[DllImport("Custom.dll", CharSet = CharSet.Unicode)]
public static extern int GetFileType(StringParam stringParam, ref int fileType);

And I think you have to pin the ref int before you pInvoke.


text:
Q: Getting unexpected error while sorting the drop down value using Angular.js I am getting some error  while sorting my drop down value alphabetically using Angular.js. I am providing my code below:

 angular.forEach(response.data,function(obj){
      var data={'label':obj.cat_name+':'+obj.subcat_name,'id':obj.subcat_id};
      $scope.example16data.push(data);
 })

Here I am using Anguar's angularjs-dropdown-multiselect for drop down list but when I am trying to sorting the list I am getting the following unexpected error.
Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.4.6/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%5D
    at angularjs.js:6
    at n.$digest (angularjs.js:131)
    at n.$apply (angularjs.js:133)
    at HTMLDocument.<anonymous> (multipledropdown.js:1)
    at HTMLDocument.dispatch (jquery.js:4670)
    at HTMLDocument.r.handle (jquery.js:4338)
(anonymous) @ angularjs.js:6
$digest @ angularjs.js:131
$apply @ angularjs.js:133
(anonymous) @ multipledropdown.js:1
dispatch @ jquery.js:4670
r.handle @ jquery.js:4338

Here I need to sort the drop down value alphabetically order.

A: You can add a $timeout function itself from your code then only we can avoid the digest looping in Angularjs.
You can remove your orderBy in HTML and apply the bellow login to the
 controller.
$scope.$example16data = $filter("orderBy")($scope.example16data,
"label")


text:
Q: Spring Boot - Scheduler configuration In Spring Boot application I have several scheduled tasks. I want them to run simultaneously, so in my configuration I should create ThreadPoolTaskScheduler object and register it in ScheduledTaskRegistrar.
 I find two ways to do that:
way 1
@Configuration
@EnableScheduling
public class SchedulerConfig implements SchedulingConfigurer {

    private final int POOL_SIZE = 10;

    @Override
    public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {

        ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();

        scheduler.setPoolSize(POOL_SIZE);
        scheduler.setThreadNamePrefix("name");
        scheduler.initialize();

        scheduledTaskRegistrar.setTaskScheduler(scheduler);
    }
}

way 2
@Configuration
@EnableScheduling
public class SchedulerConfig implements SchedulingConfigurer {

    private final int POOL_SIZE = 10;

    @Override
    public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {

        scheduledTaskRegistrar.setTaskScheduler(this.poolScheduler());
    }

    @Bean
    public TaskScheduler poolScheduler() {

        ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();

        scheduler.setPoolSize(POOL_SIZE);
        scheduler.setThreadNamePrefix("name");

        return scheduler;
    }
}

*

*Which way is better or they do exactly the same?

*Why in way 2 initialize method of ThreadPoolTaskScheduler object isn't called?

A: Why in way 2 initialize method of ThreadPoolTaskScheduler object isn't called?
Because now, ThreadPoolTaskScheduler is a bean and it follows the Bean Life Cycle.
You can see that ThreadPoolTaskScheduler implements InitializingBean.
So after spring builds this bean, it will call the afterPropertiesSet() method .
If you inspect the code of ThreadPoolTaskScheduler, you will see:
public void afterPropertiesSet() {
    this.initialize();
}

A: Second way is better because you let Spring handle class TaskScheduler and later you can use it in other classes using  @Autowired as:
@Autowired
TaskScheduler taskScheduler


text:
Q: How to mask the input while loading (before click) I am using Masked Input Plugin
Here is the Jsfiddle i tried to load. [ But it is not loading in jsfiddle, it works perfect in local ]
It is working only if i type in the textbox. How can i make the masking by default.
Here is the demo by them
Here is the code i have so far.
<script src="jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="jquery.maskedinput.js" type="text/javascript"></script>
<input id="name" type="text"></input>
<script>
$('document').ready(function() {
    $("#name").mask("99/99/9999");
});
</script>

A: document should not be a string:
$(document).ready(function() {
    $("#name").mask("99/99/9999");
});


text:
Q: Swift 3 and Xcode 8 : Get Image From URL Path Stored in SQLITE Database Field I have Implemented the Following code to add the image into Document directory and store the Path in my sqlite Database
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) {

        imagePath = imagesDirectoryPath + "/\(Date().description.replacingOccurrences(of: " ", with: "")).png"
        print(imagePath)

        let data = UIImagePNGRepresentation(image)
        print(data!)
        let success = FileManager.default.createFile(atPath: imagePath, contents: data, attributes: nil)
        print(success)
        dismiss(animated: true) { () -> Void in

        }
    }

Can Anyone help me how to get image back into My Tableview Using this Path as shown in the Image.

A: In the Table View cellForRowAt Method Or In Ur case if u want to display image in some other Case
You can Simply Do this by
let imageURL = URL(fileURLWithPath: student.Image_URL)
cell.imgProfileDisplay.image = UIImage(contentsOfFile: imageURL.path)

This will convert the image from the URL that we store in our DataBAse.
For Full Source Code of the Implementation kindly Comment.
Thanks


text:
Q: android gradle deamon invalid response Error:Received invalid response from the daemon: 'org.gradle.launcher.daemon.protocol.ForwardInput@6abb1b33' is a result of a type we don't have a strategy to handle. Earlier, 'Build{id=0e61f099-e554-40bb-8282-d5f838838db1.1, currentDir=E:\samrin shaikh\DreamSwaliya}' request was sent to the daemon. Diagnostics: No diagnostics available.
can anyone help me?

A: I just had the same error. I also had this related error:

Error:Failed to complete Gradle execution. Cause: An existing
  connection was forcibly closed by the remote host

I tried to open another project which was working properly before, but saw the same error on that project too. I restarted Android Studio and this time my second project loaded normally. When I got back to my original project it found a tiny error in my build.gradle file which was an unexpected character at the beginning of that file. Apparently, I unknowingly made a faulty change in that file.
I am using Android Studio 2.3.3.
Hope this helps.


text:
Q: concatenate date and time in google spreadsheet I have a script that imports events from spreadsheets into calendar:
function caltest1() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var startRow = 2;  // First row of data to process
  var numRows = 3;   // Number of rows to process
  var dataRange = sheet.getRange(startRow, 1, numRows, 5);
  var data = dataRange.getValues();
  var cal = CalendarApp.getDefaultCalendar();
  for (i in data) {
    var row = data[i];
    var title = row[0];  // First column
    var desc = row[1];       // Second column
    var tstart = row[2];
    var tstop = row[3];
    var loc = row[4];
    //cal.createEvent(title, new Date("March 3, 2010 08:00:00"), new Date("March 3, 2010     09:00:00"), {description:desc,location:loc});
    cal.createEvent(title, tstart, tstop, {description:desc,location:loc});
 }
}

The script works fine if my spreadsheet contains the data like:
Title      Description    Start               Stop                  Channel
Mr Dear    no drinks      5/6/2014 20:55:00   5/6/2014 21:57:00     what ever

But it does not work if I create my own date =CONCATENATE($D4, " ",$G4), given that D4 has a date and G4 has time combined into a single cell Date and time. I figured because it senses that concatenate creates a plain text and not a time formatting, but how can I fix it?

A: In spreadsheets, dates have a native value of an integer representing the number of days since december 31 1899 and time is a decimal value which is the fraction of a day ( 6 hours = 1/4 of a day for example , 0.25 day).
So when you add DATE+TIME (integer+decimal) in a spreadsheet you get a full date with time .
So the answer (as you noticed it in your comment on the other answer) is logically to ADD both values. That's actually the reason spreadsheets are build like that ! (to make it easy to use date and time)
Use the formula =D2+E2 in a new column and you get a complete date object directly useable in JavaScript.
In Javascript date and time are the same objects, there is no time object that has no date and no date without time : their native values are milliseconds counted from January 1 1970 at midnight (which is an integer).

A: Since the type of concatenated strings is text, you can convert them to date before calling the Calendar methods.
var tstart = new Date(row[2]);
var tstop = new Date(row[3]);

A: I successfully concatenated date and time by using
=text(A2,"dd/mm/yy") & ", " & text(B2,"HH:MM")
I concatenated date and time


text:
Q: AutoML Video Inteligence with custom labels - true negatives in training data This question pertains to AutoML for Video Intelligence (custom labels).
When setting up training data, you are instructed to only label videos with your custom labels in them (and not videos that don't have that label). How does the model train to identify true negatives for custom labels?

A: After applying the score threshold, the predictions made by your model will fall in one of the following four categories.

We can use these categories to calculate precision and recall — metrics that help us gauge the effectiveness of our model.


text:
Q: Golang: avoiding race conditions What are some good practices to prevent race conditions in Go?
The only one I can think of is not sharing data between goroutines - the parent goroutine sends a deep copy of an object rather than the object itself, so the child goroutine can't mutate something that the parent can. This would use up more heap memory, but the other alternative is to learn Haskell :P
Edit: also, is there any scenario in which the method I described above can still run into race conditions?

A: Go doesn't enforce memory safety statically. There are several ways to handle the problem even in large code bases, but all of them require your attention.

*

*You can send pointers around, but one common idiom is to signal the transfer of ownership by sending a pointer. E.g., once you pass the pointer of an object to another Goroutine, you do not touch it again, unless you get the object back from that goroutine (or any other Goroutine if the object is passed around several times) through another signal.

*If your data is shared by many users and doesn't change that often, you can share a pointer to that data globally and allow everybody to read from it. If a Goroutine wants to change it, it needs to follow the copy-on-write idiom, i.e. copy the object, mutate the data, try to set the pointer to the new object by using something like atomic.CompareAndSwap.

*Using a Mutex (or a RWMutex if you want to allow many concurrent readers at once) isn't that bad. Sure, a Mutex is no silver bullet and it is often not a good fit for doing synchronization (and its overused in many languages which lead to its poor reputation), but sometimes it is the simplest and most efficient solution.
There are probably many other ways. Sending values only by copying them is yet another and easy to verify, but I think you shouldn't limit yourself to this method only. We are all mature and we are all able to read documentation (assuming you document your code properly).
The Go tool also comes with a very valuable race detector built in, that is able to detect races at runtime. Write a lot of tests and execute them with the race detector enabled and take each error message seriously. They usually indicate a bad or complicated design.
(PS: You might want to take a look at Rust if you want a compiler and type system that is able to verify concurrent access during compile time, while still allowing shared state. I haven't used it myself, but the ideas look quite promising.)

A: Race conditions can certainly still exist even with unshared data structures. Consider the following:
B asks A for the currentCount
C asks A for the currentCount
B sends A (newDataB, currentCount + 1)
A stores newDataB at location currentCount+1
C sends A (newDataC, currentCount + 1)
A stores newDataC at currentCount + 1 (overwriting newDataB; race condition)

This race condition requires private mutable state in A, but no mutable shared data structures and doesn't even require mutable state in B or C. There is nothing B or C can do to prevent this race condition without understanding the contract that A offers.
Even Haskell can suffer these kinds of race conditions as soon as state enters the equation, and state is very hard to completely eliminate from a real system. Eventually you want your program to interact with reality, and reality is stateful. Wikipedia gives a helpful race condition example in Haskell using STM.
I agree that good immutable data structures could make things easier (Go doesn't really have them). Mutable copies trade one problem for another. You can't accidentally change someone else's data. On the other hand, you may think that you're changing the real one, when you're actually just changing a copy, leading to a different kind of bug. You have to understand the contract either way.
But ultimately, Go tends to follow the history of C on concurrency: you make up some ownership rules for your code (like @tux21b offers) and make sure you always follow them, and if you do it perfectly it'll all work great, and if you ever make a mistake, then obviously it's your fault, not the language.
(Don't get me wrong; I like Go, quite a lot really. And it offers some nice tools to make concurrency easy. It just doesn't offer many language tools to help make concurrency correct. That's up to you. That said, tux21b's answer offers lots of good advice, and the race detector is definitely a powerful tool for reducing race conditions. It's just not part of the language, and it's about testing, not correctness; they're not the same thing.)
EDIT: To the question about why immutable data structures make things easier, this is the extension of your initial point: creating a contract where multiple parties don't change the same data structure. If the data structure is immutable, then that comes for free…
Many languages have a rich set of immutable collections and classes. C++ lets you const just about anything. Objective-C has immutable collections with mutable subclasses (which creates a different set of patterns than const). Scala has separate mutable and immutable versions of many collection types, and it is common practice to use the immutable versions exclusively. Declaring immutability in a method signature is an important indication of the contract.
When you pass a []byte to a goroutine, there is no way to know from the code whether the goroutine intends to modify the slice, nor when you may modify the slice yourself. There a patterns emerging, but they're like C++ object ownership before move semantics; lots of fine approaches, but no way to know which one is in use. It's a critical thing that every program needs to do correctly, yet the language gives you no good tools, and there is no universal pattern used by developers.


text:
Q: Change layout background with Android Studio with new API I want to change the layout background by clicking a button, but a red underline occurs in layoutname.setBackground(drawable) which says that I should have minimum SDK version 16 and not 9 (which I have) My question is, the following code I use to check is proper?
Resources res = getResources(); //resource handle
Drawable drawable = res.getDrawable(R.drawable.gradientblue);
int sdk = android.os.Build.VERSION.SDK_INT;
if(sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) {
LinearForColor.setBackgroundDrawable(drawable);
           } else {
                LinearForColor.setBackground(drawable);
            }

A: Why you aren't using setBackgroundResource() instead? It is supported in all the API levels (API1 to API21).
It is more simpler then the others.
Rather than passing the drawable you have to pass the id of a drawable in it.
For example what you are doing for setBackground and for setBackgroundDrawable is:
    LinearForColor.setBackgroundDrawable(getResources().getDrawable(R.drawable.myLogo));
    LinearForColor.setBackground(getResources().getDrawable(R.drawable.myLogo));

For setBackgroundResource just pass the ID of the drawable like below:
LinearForColor.setBackgroundResource(R.drawable.myLogo);

So you don't need to be worried about the BuildVersion of the device. isn't it more convenient?


text:
Q: Got the error `failed with VK_ERROR_INCOMPATIBLE_DRIVER` when I ran `vulkaninfo` after Installing vulkan I installed Vulkan as mentioned in the instructions on their website.
After installing, when I ran vulkaninfo in terminal , I get
===========
VULKAN INFO
===========

Vulkan API Version: 1.0.3

INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_draw_state.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_api_dump.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_threading.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_object_tracker.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_screenshot.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_device_limits.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_swapchain.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_param_checker.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_mem_tracker.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_unique_objects.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_image.json, version "1.0.0"
INFO: [loader] Code 0 : Found manifest file /etc/vulkan/explicit_layer.d/VkLayer_vktrace_layer.json, version "1.0.0"
Cannot create Vulkan instance.
/home/jeremy/Development/LunarG/Vulkan/LinuxSDK/LoaderAndValidationLayers/demos/vulkaninfo.c:691: failed with VK_ERROR_INCOMPATIBLE_DRIVER

I'm on Ubuntu 15.10.
My graphic card :
NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
    Subsystem: Dell GeForce 820M
    Kernel driver in use: nouveau

Does this mean that Vulkan isn't compatible with my graphic card?

A: I believe your noveau doesn't have Vulkan support or vice-versa. You can install the proprietary Nvidia driver, by going in Settings, it looks like this :

Then go in Software and Updates, and proceed to last tab. It will search for latest Nvidia drivers, select the Nvidia-one, like below :

Then try out Vulkan


text:
Q: What is the purpose of cacti? Lanayru Desert is covered with cacti. I realize they hold bombs at a nice height for the beetle to pick them, but do they have another purpose? You can bash on them and get the bark off, but can you destroy them? Do they hide anything valuable?

A: If you hit the red bulb-like object on top of the non-bomb cacti, they provide a heart.  Besides this and providing bombs for the beetle, there isn't really much purpose to them.

A: The ones with blue tops have bombs, while the ones with red tops have hearts.
You can also use them to block the enemies with shells (can't recall their names), which should stun them.


text:
Q: @Stateless NullPointerException I am newbee with EJB3.
I have create a dao User.
@Entity
@Table(name = "t_user")
public class User implements Serializable {

    @Column(name = "name")
    private String name;

    private String street;
    private int houseNumber;

    @Column(name = "email")
    private String email;
//... getters and setters

}

A Stateless EJB:
@Stateless
public class ItemFacade implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @PersistenceContext(unitName = "databaseName")
    private EntityManager em;

    public void create(User user) {
        em.persist(user);
    }
}

The managed bean:
@ManagedBean
@ViewScoped
public class UserBean implements Serializable {
    private User user = new User();
    @EJB
    private ItemFacade itemFacade;
    public void save(){
        itemFacade.create(this.user);
    }
    //....
}

The persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
    xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
        <persistence-unit name="my-unit" >
          <jta-data-source>TestDS</jta-data-source>
        </persistence-unit>
</persistence>

And the tomee.xml
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
  <!-- see http://tomee.apache.org/containers-and-resources.html -->

  <!-- activate next line to be able to deploy applications in apps -->
  <!-- <Deployments dir="apps" /> -->
    <Resource id="TestDS" type="DataSource">
      JdbcDriver com.mysql.jdbc.Driver
      JdbcUrl jdbc:mysql://localhost:3306/databaseName
      UserName username
      Password password
      JtaManaged true
    </Resource>
</tomee>

But I get NullPointerException when I try to save the user in the line:
itemFacade.create(this.user);

Any help will be appreciated.
The full stacktrace is:
ADVERTENCIA: java.lang.NullPointerException
javax.el.ELException: java.lang.NullPointerException
    at org.apache.el.parser.AstValue.invoke(AstValue.java:291)
    at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:273)
    at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:149)
    at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
    at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:813)
    at javax.faces.component.UICommand.broadcast(UICommand.java:300)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
    at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
    at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:105)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at managedBeans.UserBean.create(UserBean.java:11)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
    ... 34 more

How can I create an EntityManager not null?

A: It looks likly that your entity manager is not getting injected.
Change
@PersistenceContext(unitName = "databaseName")
to
@PersistenceContext(unitName = "my-unit")
As it should match what you have in your persistance.xml
<persistence-unit name="my-unit" >

A: Thanks you, is the unitName the name of the database? I put in both places the same name, but I continue with NullPointe
I solve it by:
public void save(){
      itemFacade = new ItemFacade();
       itemFacade.create(this.user);
}


text:
Q: How to make multiple url on the embed? (discord.py) How to make each line of video_title become hyperlink for a url? (url1, url2, url3, ... url10)
embed = discord.Embed(title="", description=(
                                             "`1.` " + video_title1 + "\n\n"
                                             "`2.` " + video_title2 + "\n\n"
                                             "`3.` " + video_title3 + "\n\n"
                                             "`4.` " + video_title4 + "\n\n"
                                             "`5.` " + video_title5 + "\n\n"
                                             "`6.` " + video_title6 + "\n\n"
                                             "`7.` " + video_title7 + "\n\n"
                                             "`8.` " + video_title8 + "\n\n"
                                             "`9.` " + video_title9 + "\n\n"
                                             "`10.` " + video_title10 + "\n"
                                             ), color=9699539)

embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text=f"{ctx.message.author.name}",
                 icon_url="https://i.pinimg.com/originals/26/c8/03/26c8038be8ac9ac7594bb23a03c5c8be.jpg")
await ctx.channel.send(embed=embed)

Example: https://i.stack.imgur.com/9lP4H.png
My bot: https://i.stack.imgur.com/k48Ni.png

A: I think you want to use the fields of an embed, via using add_field with the name of the field, the value of the field, and whether it is line per line ( inline=False). Also I recommend that you look into this website : https://cog-creators.github.io/discord-embed-sandbox/ to see how the embed could look like

A: I managed, using: [video title](url hidden)
embed = discord.Embed(title="", description=(
                                             f"`1.` [{video_title1}]({url1})\n\n"
                                             f"`2.` [{video_title2}]({url2})\n\n"
                                             f"`3.` [{video_title3}]({url3})\n\n"
                                             f"`4.` [{video_title4}]({url4})\n\n"
                                             f"`5.` [{video_title5}]({url5})\n\n"
                                             f"`6.` [{video_title6}]({url6})\n\n"
                                             f"`7.` [{video_title7}]({url7})\n\n"
                                             f"`8.` [{video_title8}]({url8})\n\n"
                                             f"`9.` [{video_title9}]({url9})\n\n"
                                             f"`10.` [{video_title10}]({url10})\n"
                                             ), color=9699539)

Print: https://i.stack.imgur.com/IGsjK.png


text:
Q: Hide pop up windows behind main window in chrome I wondered if it was possible to hide a pop-up window behind the "main" window, the browser i am using is the newest Google Chrome.
It's because i have this javascript code that's being called everytime a user presses a button, that open's a window and then print and close the window.
But i would like it to open behind the "main" window so the user dont really see it open.
Is it possible?
The javascript code:

And the button and the div with the text

   Hello

Is it in any way possible to do, if it's a browser setting, or change in the javascript, it doesn't matter.
Hope you can help :-)


text:
Q: Find an integrable, positive, unbounded, analytic function Is there a standard example of a function $f \in L^1( \mathbb R)$ which is analytic, positive, integrable but not bounded?
An example which comes immediately to mind is to take the series of narrower but steeper gaussians centered at every integer. But do we obtain an analytic function this way?

A: What do you mean by analytic? Analytic on the real line, or entire. The method you suggest can be used to obtain an entire example. Let $F$ be a Gaussian.
Consider a series
$$\sum a_nF(b_n(z-c_n))$$
with positive $a_n, b_n$ and $c_n$. If $a_n\to+\infty$ does not grow fast, but $c_n$ does grow fast enough, the
series converges on every compact in the complex plane, and gives you an entire function with the properties you stated.
EDIT. I corrected according to R. Israel suggestion. With $b_n=1$ and $a_n\to\infty$
it will not be in $L^1$.
In fact, Carleman's theorem says that for every continuous function $\phi$ on the real line, and every positive continuous function $\epsilon$ on the real line, one can find an
entire function $f$ such that $|f(x)-\phi(x)|<\epsilon(x)$.

A: Consider the function
$$ f(t) = \frac{2e^{-2t^2}}{e^{-3t^2}(1+\cos(2t))+(1-\cos(2t))}. $$
I think that this does what you want.  It is certainly real analytic and strictly positive.  It satisfies $f(k\pi)=e^{k^2\pi^2}$, and so is unbounded.  Near $k\pi$ it has a hump of width approximately proportional to $e^{-3k^2\pi^2/2}$, so the area scales like $e^{-k^2\pi^2/2}$.  Away from these humps, the function is extremely small.  This suggests that it is integrable, but I have not proved that rigorously.

A: The function you suggest is perfectly fine. It's just a question of filling in the details.
For all positive $t$, define
$$
g_t(z) := \frac{t}{\sqrt{\pi}} e^{-t^2z^2}.
$$
For all $t$, $g_t$ is a holomorphic function defined over the whole of $\Bbb{C}$ (in other words, it is entire), its restriction to the real line is positive, and its integral over the real line is equal to $1$. Furthermore, these functions all decay exponentially over the quadrants $\left\{-\pi/4<\text{Arg}(z)<\pi/4\right\}$ and $\left\{3\pi/4<\text{Arg}(z)<5\pi/4\right\}$ of the complex plane. In particular, for all $r>0$, if $\left|z\right|>r$ and if $\left|\text{Arg}(z)\right|<\frac{\pi}{6}$ (or if $\left|\text{Arg}(z)-\pi\right|<\frac{\pi}{6}$), then,
$$
\left|g_t(z)\right| \leq \frac{t}{\sqrt{\pi}}e^{-t^2 r^2/2}.
$$
We now define, for example
$$
f(z) = \sum_{n\in\Bbb{Z}\setminus\left\{0\right\}} \frac{1}{n^2}g_{n^3}(z-n).
$$
Observe that $f$ is unbounded. However, it follows from the above inequality that $f$ converges uniformly over every compact subset of $\Bbb{C}$. It is therefore also an entire function, and in particular is analytic over $\Bbb{R}$. Furthermore, since $\sum_{n\in\Bbb{Z}\setminus\left\{0\right\}}\frac{1}{n^2}$ is finite, $f$ also has finite integral, as desired.


text:
Q: Thurston measure under finite covers Let $S= S_{g,n}$ be a finite type orientable surface of genus $g$ and $n$ punctures and let $\mathcal{ML}(S)$ denote the corresponding space of measured laminations. The Thurston measure, $\mu^{Th},$ is a mapping class group invariant and locally finite Borel measure on $\mathcal{ML}(S)$ which is obtained as a weak-$\star$ limit of (appropriately weighted and rescaled) sums of Dirac measures supported on the set of integral multi-curves.
The Thurston measure arises in Mirzakhani's curve counting framework. Concretely, given a hyperbolic metric $\rho$ on $S_{g,n}$, let $B_{\rho} \subset \mathcal{ML}(S)$ denote the set of measured laminations with $\rho$-length at most $1$. Then $\mu^{Th}(B_{\rho})$ controls the top coefficient of the polynomial that counts multi-curves up to a certain $\rho$-length and living in a given mapping class group orbit.
Question: Fix a hyperbolic metric $\rho$ on $S$ and a finite (not necessarily regular) cover $p: Y \rightarrow S$. Let $\rho_{p}$ denote the hyperbolic metric on $Y$ obtained by pulling $\rho$ back to $Y$ via $p$. Is there a straightforward relationship between $\mu^{Th}(B_{\rho_{p}})$ and $\mu^{Th}(B_{\rho})$? For example, is the ratio
$$    \frac{\mu^{Th}(B_{\rho})}{\mu^{Th}(B_{\rho_{p}})}  $$
uniformly bounded away from $0$ and $\infty$? Does it equal a fixed value, independent of $\rho$? If so, can it be easily related to the degree of the cover $Y \rightarrow S$?
It seems hard to approach the above by thinking about counting curves on $Y$ versus $S$, because "most" simple closed curves on $Y$ project to non-simple curves on $S$. But, maybe the generalizations of curve counting for non-simple curves due to Mirzakhani (https://arxiv.org/pdf/1601.03342.pdf) or Erlandsson-Souto (https://arxiv.org/pdf/1904.05091.pdf) could be useful. Of course, both apply to counting curves in a fixed mapping class group orbit, so it's not clear (to me) how to apply these results either since multi-curves on $Y$ can project to curves on $S$ with arbitrarily large self intersection.
Thanks for reading! I appreciate any ideas or reading suggestions.


text:
Q: Enable submit when all form items are valid I need some help with something... say I have the following form...
<form name="" id="" method="" action="">

    <input type="text" id="text1" name="text1" />

    <input type="text" id="text2" name="text2" />

    <input type="text" id="text3" name="text3" />

    <input type="text" id="text4" name="text4" />

    <input type="submit" value="let's go" disabled="disabled" />

</form>

Now I want to have a simple script to enable the submit when the values of the text boxes are not an empty string or null...
So I have something like this.. which I will bind to the window.onload
 function enableButton(){

    var formitemsArray = ['text1','text2','text3','text4'],
       i;

        // Loop through all items
        for(i=0;i<formitemsArray.length;i++){

            // validate the length on the keypress...
            formitemsArray.onkeypress = function(){

                // loop through all the items again
                for(j=0;j<formitemsArray.length;j++){

                    if(formitemsArray[j] == "" || formitemsArray[j] == null ){
                        // return false or something???
                    }else{
                        document.getElementById("submitButton").disabled = false;
                    }

                }
            }

        }

}

Now I think I'm on the right lines to a solution but I'm getting lost when trying to make sure that all the items are greater than a zero length string as I'm returning false too soon. Can someone set me straight please?

A: Welcome to event bubbling!
This does the following: listen to an event (onkeypress) on the whole element and all its children! Which means you can do the following:
document.getElementById('form-id').onkeypress = function(e) {
    var text1 = document.getElementById('text1'),
        text2 = document.getElementById('text2'),
        text3 = document.getElementById('text3'),
        text4 = document.getElementById('text4')

    if (text1.value.length > 0 &&
        text2.value.length > 0 &&
        text3.value.length > 0 &&
        text4.value.length > 0) {
        document.getElementById('submit-button').disabled = false
    }

    // As an aside, for later: if you want to get the element
    // that triggered the event, you have to do the following
    // to be cross-browser:
    var evt = e || window.event, // IE doesn't get the event passed by argument
        target = e.target || e.srcElement // 'target' is official, old versions of FF used 'srcElement'

    // With the 'target' variable, you can now play.
}

There is another more generic solution, but it might not fit your needs (note that it requires a forEach shim:
// Declare a counter variable
var count = 0
document.getElementById('form-id').onkeypress = function(e) {
    // Get all the inputs!
    var inputs = this.getElementsByTagName('input')

    // Now loop through all those inputs
    // Since a NodeList doesn't have the forEach method, let's borrow it from an array!
    [].forEach.call(inputs, loopThroughInputs)
}
function loopThroughInputs(input) {
    // First check the type of the input
    if (input.type === 'text') {
        // If the value is correct, increase the counter
        if (input.value.length > 0) {
            count++
        }
        // If the 4 inputs have increased the counter, it's alright!
        if (count === 4) {
            document.getElementById('submit-button').disabled = false
        }
    }
}

And now this code was proposed by @Esailija, and it is way better and cleaner. However, it also requires ES5-Shim (for the every method):
document.getElementById('form-id').onkeypress = function(e) {
    var inputs = [].slice.call( this.querySelectorAll( '[type=text]') );
    document.getElementById('submit-button').disabled = !inputs.every(function(input){
        return !!input.value;
    });
}

(This guy is brillant, just don't tell him)

A: There are a few ways you can do this... One would be to keep the button enabled but use javascript to check the validity of the form data upon submission. The benefit to this is that the validation code is only run once, when the user clicks submit and is expecting his data to be validated (at least I do) .
function validateForm() {
  var formElement = document.forms[0]; // you didn't give me a name
  for(var i = 0, l = formElement.elements.length; i < l; i++ ) {
      if( formElement.elements[i].value.length === 0 ) {
         return false;
      }
      return true;
  }
}

The other way is live validation, which would validate each input onBlur (focus lost). This method has the benefit of showing the user in real time what values are bad, however this can be very resource heavy depending on the number of form elements and the way you introduce the check.
Personally I would go with my first suggestion; however with that said if you choose to validate each element, I would do so like this:
  var formElement = document.forms[0]; // you didn't give me a name
  for(var i = 0, l = formElement.elements.length; i < l; i++ ) {
      formElement.elements[i].addEventListener('blur', function() {
           if( this.value.length === 0 ) {
              alert('this input is invalid');
           }
      }, false);
  }

The latter method also requires you hold onto a 'state' variable to determine whether or not the form is valid upon submission, or check all the values again.
Hope this sheds some light, and I hope my code examples help some.

A: If possible use jquery validation plugin instead of re-inventing the code, http://docs.jquery.com/Plugins/Validation its so easy to use.

A: In this jsfiddle you'll find a way to monitor the progress of form contents. If all the field conditions are fulfilled, a submit button is shown. Maybe it's useful for you. Bare in mind that client side checking of a form may be tampered with, so you always need a server side check too, if your data need to adhere to certain requirements. In other words: client side form checks are merely usability enhancements.


text:
Q: How would I implement a ranking algorithm in my website to sort database data? I want to implement a ranking system on a website I've been working on and have decided to go with the Hacker News algorithm. My reasoning for choosing this algorithm is simply because it's been described here.
I was looking at this Python code (the language I'm using to build my site) and couldn't figure out how I would implement it.
def calculate_score(votes, item_hour_age, gravity=1.8):
    return (votes - 1) / pow((item_hour_age+2), gravity)

Given the tables:
posts:
    id | title | time_submitted

votes:
    id | postid | userid | score

How would I pull the data from the database? The ideal solution (most efficient) would be to construct a MySQL query to retrieve the top 10 posts ranked using the algorithm. But given that Hacker News has it implemented in Arc, it makes me think they pull out all the posts then run them through the algorithm to rank them.
Reddit also comes to mind for this... They use a non-relational database schema so I would assume they, like Hacker News, perform the rankings in their code - not the database.
How would you implement this?
EDIT: one post can have many votes as I would like to log which user votes on which post.

A: You can use the data you need in the ORDER BY clause.
SELECT p.id, p.title, p.time_submitted, SUM(v.score) as num_votes
  FROM posts p, votes v
 WHERE v.postid = p.id
GROUP BY p.id
ORDER BY
   (SUM(v.score) - 1) / POW(TIMESTAMPDIFF(HOUR,p.time_submitted,NOW()) + INTERVAL 2 HOUR, 1.8) DESC
LIMIT 100

A: In your case, the number of votes would be returned by:
SELECT count(*) FROM votes WHERE postid=<THE POST'S ID>;

If you want to consider score, you could include that in the query but the formula you provided is not equipped to handle it.
The item hour age is simply the current time subtracted from the time submitted:
SELECT HOUR(TIMEDIFF(NOW(), time_submitted)) FROM posts WHERE id=<THE POST'S ID>;

This can also be done entirely in SQL:
SELECT id FROM posts ORDER BY (((SELECT count(*) FROM votes WHERE postid=posts.id) - 1) / MOD(HOUR(TIMEDIFF(NOW(), time_submitted) + INTERVAL 2 HOURS), <GRAVITY>)) LIMIT 10;


text:
Q: Angular datatables - missing sort arrows when columns defined with DTColumnBuilder I'm using Angular-datatables and when I define the table using the angular renderer I can see nice arrows for sorting column.

          My header

       {{ex.myValue}}

When I define the columns with DTColumnBuilder.newColumn the arrows are missing (sorting works).

and
vm.dtColumns = [
        DTColumnBuilder.newColumn('myValue').withTitle('My header'),

Can I bring the sorting arrows back?


text:
Q: Having Trouble installing dependencies for OpenCV on RPi for some reason, when i run the code below i get the following error. what should i do? I'm trying to install opencv for python 3.
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev

Err:1 http://raspbian-us.ngc292.space/raspbian stretch/main armhf
  libjbig-dev armhf 2.1-3.1   Could not connect to
  raspbian-us.ngc292.space:80 (198.211.116.210). - connect (113: No
  route to host) Err:3 http://raspbian-us.ngc292.space/raspbian
  stretch/main armhf libpng12-dev armhf 1.2.54-6   Unable to connect to
  raspbian-us.ngc292.space:http: Fetched 712 kB in 26s (26.8 kB/s) E:
  Failed to fetch
  http://raspbian-us.ngc292.space/raspbian/pool/main/j/jbigkit/libjbig-dev_2.1-3.1_armhf.deb
  Could not connect to raspbian-us.ngc292.space:80 (198.211.116.210). -
  connect (113: No route to host) E: Failed to fetch
  http://raspbian-us.ngc292.space/raspbian/pool/main/libp/libpng/libpng12-dev_1.2.54-6_armhf.deb  Unable to connect to raspbian-us.ngc292.space:http: E: Unable to fetch
  some archives, maybe run apt-get update or try with --fix-missing?


text:
Q: Searching a 2d list in python for a tuple tuple1 = [3,4]
list1 = [(1,2),(3,4),(5,6)]

if tuple1 in list1 == True:
    print("tuple in list")

I would've thought that this should print, but it doesn't. Can anyone help?

A: You are not asking if a tuple is in your list, you are asking if a list is in your list.
>>> list1 = [(1,2),(3,4),(5,6)]
>>> [3,4] in list1
False
>>> (3,4) in list1
True

It works as you'd expect if you pass the correct type for tuple1.


text:
Q: How to get full name from domain name So a while back, I managed to make a bat file that would let me enter in somone's username.
Then, it would search the domain for the full name and I could use that for other work. The bat I used would spit out JUST the fullname and put it in a variable.I know I can use the  net user /domain $username command, but that doesn't let you single out a result, as far as I'm aware
Unfortunately, I lost it and I can even fine the tutorial I used to help me with it. Does anyone know how this might be done? I did it a few years back on a windows 7 machine, I'm not sure if that changes anything.

A: Powershell is a much better option for pulling AD info and exporting it. Using the PS AD Module you could do something similar to Get-ADUser -filter $username -properties Name | Select-Object Name From here you could store this info in a variable or write it to a file etc. I will also link to the AD Module documentation for reference on Get-ADUser

A: If your variable $username is the SamAccountName for the user, just do PowerShell:
$user = Get-ADUser -Filter "SamAccountName -eq '$username'" -Properties DisplayName

You now have an object with these user properties: DistinguishedName, Enabled, GivenName, Name, ObjectClass, ObjectGUID, SamAccountName, SID, Surname, UserPrincipalName, DisplayName
Only DisplayName needs to be asked for, all other properties are returned by default using Get-ADUser
So if you want just the DisplayName ('FullName' as you call it), just return that:
$fullName = (Get-ADUser -Filter "SamAccountName -eq '$username'" -Properties DisplayName).DisplayName


text:
Q: Error: "Declaration expected but identifier 'SysUtils' found" I am trying to use multiple identifiers in Delphi 7 receiving error
uses
   Math;
   SysUtils;

I am however receiving the error above.
Any help would be amazing.

A: Should be:
uses
      Math,
      SysUtils;

Semicolon (;) is a end of statement character, comma (,) separates items.


text:
Q: Calculate or Estimate TRUE AREA from an irregular polygon and a DEM in QGIS I have to calculate or estimate the surface area (sq m) considering the elevation data on several places (wich i have in different shapefiles, and some multipolygon shapefiles).
I'm aware of this QGIS calculate the 3d surface area of a region? but this is only for rectangular polygons.
I have the shapefiles and the DEM. Working on QGIS 2.14

A: The following method would make a reasonable approximation knowing that your raster DEM is a discretization of space.

*

*Compute the slope of your DEM (this will give you the strongest slope) Raster > Analyses > DEM

*Use the slope to compute the area of each pixel (using the raster calculator , projected_area_of_the_pixel / cos(slope_in_radian) )

*Use zonal statistics to have the sum of the "non projected" area of the pixels in the zone (QGIS geoprocesing tools > raster tools > zonal statistics)


text:
Q: Visualize date specific data with a line chart in browser with javascript I want to visualize some data in the browser with a line chart. At the x-axis there should be the date, at the y-axis there should be the value.
I know that there are some javascript plotting solutions out there. But especially for
date-specific data it is difficult to find a suitable solution.
Here is the scheme, how i have the data:
[
   [
      startTimestamp,
      endTimestamp,
      value
   ],
   [
      startTimestamp,
      endTimestamp,
      value
   ]
]

Here with some example values:
[
   [
      1365163327,
      1365163339,
      0
   ],
   [
      1365163339,
      1365163360,
      1
   ]
]

See js-fiddle here, with some better sample data:
http://jsfiddle.net/JWhmQ/1992/

A: My personal preference is for the Google Chart API's. They have good date format support: see Chart API Date Format Docs. The good thing about the API, is once you have it in a JavaScript date format, the google chart API knows how to sort, and also can change the date format for localization / formatting preference.
The only required addition to your source JSON is converting the timestamps to a Date Object. In PHP, I'd do a date('Y', $timestamp), etc. for each part of the date object. See W3 Schools for Date Object format

A: Have a look at this flot - example, it can be feeded with unix-timestamps:
http://www.flotcharts.org/flot/examples/visitors/index.html


text:
Q: get value of instance var controller method being tested I have a method that essentially clones a record. Then redirects to the cloned records edit page. I have a mini test that needs to test that the record gets cloned and redirected to the new records edit path.
@new_record is a new object created in the controller method
  describe 'clone_record' do
    it 'should clone record' do
      @first_record = FactoryGirl.create(:blah)
      get :clone_record, :first_record_id => @first_record, :new_record => 'new_record'
      assert_redirected_to(edit_record_path(@new_record.id))
    end
  end

How do I get the value of @new_record in the test?

A: If you want the most recently created record Record.last should work.