text:
Q: Prevent questions put on hold in the first 24-48 hours I'm new here but so far I've seen many times (inc myself) how questions are put on hold way too quick!
Without offending those who put them on hold, I think people are doing it too quickly and without much thought sometimes. There are many questions that are not perfect but are reasonable and understandable to more expert people or just those that understand them better.
Also - sometimes instead of letting a person to fix-edit his question, it it hold at once. This leads to questions being somewhat 'stuck' when they can be answered or edited quickly (with other's help sometimes)
I'm not you shouldn't use this option at all, or that there aren't questions that actually deserve that 'treatment' but i think that you should give a 12-24 hours for the community and original poster, to answer or edit the questions.
Does anyone else think so? Is it something that will be able to change?
EDITS
Alright so I was at fault, since on-hold questions can be commented it is far more reasonable. But Since my rep was low i wasn't even able to realize that >.<
So - I guess this Q can be closed/erased - whichever. It's a little too bad the line that answers that ^^ is the last line in the on-hold help page, which i did read just well - not to the last word apparently :/
I do recommend some sort of edit to the https://meta.stackexchange.com/help/closed-questions page - too much text + not enough listing and use of typography = hard to read!!

A: The very point of putting a question on hold is to prevent any answers from being added while the question is in a state of disarray. Until it's fixed, by commenting and/or editing (which are not stopped in any fashion), answers will do more harm than good. That's literally the only reason there is any such feature as on-hold/close in the first place.
Therefore, questions should be put on hold as fast as possible, and the occasional mistake dealt with by reopening, which is also the way to handle the more common case of salvaging the question through edits.

A:
I think that you should give a 12-24 hours for the community and original poster, to answer or edit the questions

No, if a question or answer is not okay, the author should work on it fixing it. You have as long as you want to, since a question put on hold can be reopened any time when it accumulates enough votes. In the meantime, OP and others can comment on it (if they have at least 50 reputation) or edit the question. Every edit will send the question into the reopen review queue, so it gets eyes on it.
If you force other users to wait until they can vote to close, the question is long gone and will probably never get closed, since no one sees them. This is bad for the quality of the site. We don't close questions to bully people, it is quality management tool.
If people (usually the 'Fast Gun in the West' kind) get the chance to answer questions without having any quality measures against it, the site is doomed.


text:
Q: How to apply simple thresholding on an image in ml.net? I haven't seen an implementation of simple thresholding in ml.net. This is how my pipeline looks like:
  var pipeline = mlContext.Transforms.LoadImages(outputColumnName: TinyYoloModelSettings.ModelInput, imageFolder: imagesFolder, inputColumnName: nameof(ImageNetData.ImagePath))
        .Append(mlContext.Transforms.ResizeImages(resizing: Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind.IsoCrop,
                                                    outputColumnName: TinyYoloModelSettings.ModelInput,
                                                    imageWidth: ImageNetSettings.imageWidth,
                                                    imageHeight: ImageNetSettings.imageHeight,
                                                    inputColumnName: TinyYoloModelSettings.ModelInput))
        .Append(mlContext.Transforms.ConvertToGrayscale(outputColumnName: TinyYoloModelSettings.ModelInput))
        .Append(mlContext.Transforms.ExtractPixels(outputColumnName: TinyYoloModelSettings.ModelInput))
        .Append(mlContext.Transforms.ApplyOnnxModel(modelFile: modelLocation,
                        outputColumnNames: new[] { TinyYoloModelSettings.ModelOutput },
                        inputColumnNames: new[] { TinyYoloModelSettings.ModelInput }));

Ideally I would be able to add this after the ExtractPixels() call. I'm looking for a way to access the raw pixel values in the pipeline after that call but I'm not sure how to access that column's values

redpajama_set_name: RedPajamaStackExchange


text:
Q: How can I add elements to slice reflection? Hi i am learning Go and i was doing some reflection. I got stuck in a case like this:

*

*I want to create a slice of struct passed to function as interface{}

*Then I want to append new elements to this slice

Here is a playground with the code example.
package main

import (
    "fmt"
    "reflect"
)

type A struct{ Name string }

func main() {
    bbb(A{})
}

func aaa(v interface{}) {
    sl := reflect.ValueOf(v).Elem()
    typeOfT := sl.Type()

    ptr := reflect.New(typeOfT).Interface()
    s := reflect.ValueOf(ptr).Elem()
    sl.Set(reflect.Append(sl, s))

    ptr = reflect.New(typeOfT).Interface()
    s = reflect.ValueOf(ptr).Elem()
    sl.Set(reflect.Append(sl, s))
}

func bbb(v interface{}) {
    myType := reflect.TypeOf(v)
    models := reflect.Zero(reflect.SliceOf(myType)).Interface()
    aaa(&models)

    fmt.Println(models)
}

Error: panic: reflect: call of reflect.Append on interface Value
Is there a way to make it work ?
Note: that i want to work on a reference.
Solution:
Here is what i manage to do: playground.

A: The problem was with reflect.Zero when i created slie with reflect.New it worked. Here you have full working example.
https://play.golang.org/p/3mIEFqMxk-
package main

import (
    "encoding/json"
    "fmt"
    "reflect"
)

type A struct {
    Name string `column:"email"`
}

func main() {
    bbb(&A{})
}

func aaa(v interface{}) {
    t := reflect.TypeOf(v)
    if t.Kind() == reflect.Ptr {
        t = t.Elem()
    }

    if t.Kind() == reflect.Slice {
        t = t.Elem()
    } else {
        panic("Input param is not a slice")
    }

    sl := reflect.ValueOf(v)

    if t.Kind() == reflect.Ptr {
        sl = sl.Elem()
    }

    st := sl.Type()
    fmt.Printf("Slice Type %s:\n", st)

    sliceType := st.Elem()
    if sliceType.Kind() == reflect.Ptr {
        sliceType = sliceType.Elem()
    }
    fmt.Printf("Slice Elem Type %v:\n", sliceType)

    for i := 0; i < 5; i++ {
        newitem := reflect.New(sliceType)
        newitem.Elem().FieldByName("Name").SetString(fmt.Sprintf("Grzes %d", i))

        s := newitem.Elem()
        for i := 0; i < s.NumField(); i++ {
            col := s.Type().Field(i).Tag.Get("column")
            fmt.Println(col, s.Field(i).Addr().Interface())
        }

        sl.Set(reflect.Append(sl, newitem))
    }
}

func bbb(v interface{}) {
    t := reflect.TypeOf(v)
    if t.Kind() == reflect.Ptr {
        t = t.Elem()
    }
    if t.Kind() != reflect.Struct {
        panic("Input param is not a struct")
    }

    models := reflect.New(reflect.SliceOf(reflect.TypeOf(v))).Interface()

    aaa(models)

    fmt.Println(models)

    b, err := json.Marshal(models)
    if err != nil {
        panic(err)
    }
    fmt.Println(string(b))
}

A: Does this do what you want? (playground link)
package main

import (
    "fmt"
    "reflect"
)

type A struct{ Name string }

func main() {
    bbb(A{})
}

func aaa(v interface{}) interface{} {
    sl := reflect.Indirect(reflect.ValueOf(v))
    typeOfT := sl.Type().Elem()

    ptr := reflect.New(typeOfT).Interface()
    s := reflect.ValueOf(ptr).Elem()
    return reflect.Append(sl, s)
}

func bbb(v interface{}) {
    myType := reflect.TypeOf(v)
    models := reflect.MakeSlice(reflect.SliceOf(myType), 0, 1).Interface()
    fmt.Println(aaa(models))
}

Note that I'm returning the new slice. I think you'd need another layer of indirection (pointer to a pointer) to do this without a return value, but this was my first time doing reflection in Go, so I may be going about things all wrong.


text:
Q: using update panel in ASP.NET MVC 4 Please explain me how to create update panel in ASP.NET MVC4 application. I looked for many blogs... but can not find any useful way.
This is my view

How I can separate these actions in same view?

A: Update panel does not really exist in ASP.NET MVC. It used to be there in ASP.NET Web form develeopment world before people actually realized it is better to use hand written  jQuery ajax for doing the partial page update.
You may use jQuery ajax methods to post your form data to an action method and do partial page update to the page as needed. You may also consider using Partial view (to return a part of a page) as required.
In your case you can create 2 partial views for Sign in and Register and include those in your  main view, to make your code more reusable.

Login or Register

  @Html.Partial("Login")

 @Html.Partial("Register")

A: Your two panels don't allow the user to switch between one or the other so I assume that you have an "intro" view with the option to either Sign in or Register. Right? In that case there is no real need for client side panel switching using Javascript/Ajax. Your "intro" view can pass a parameter to the controller action defining whether it needs a Sign In or Register view back.
For instance:
// RouteConfig.cs
routes.MapRoute(
    name: null,
    url: "login-register/{action}",
    defaults: new { controller = "Authentication"},
    constraints: new { action = @"(SignIn|Register)" }
);

// AuthenticationController.cs
public ActionResult SignIn()
{
    ...
    return View(); // Will return the Authentication\SignIn.cshtml view
}

public ActionResult Register()
{
    ...
    return View(); // Will return the Authentication\Register.cshtml view
}


text:
Q: Как показать блоки только один раз? Есть блок в котором есть картинки. Когда пользователь нажимает на картинку ему показывает три блока с текстом.

Как сделать так чтобы эти блоки показывало лишь один раз. То есть пользователь нажал первый раз на любую картинку ему показали эти три блока. Нажал второй, третий и тд раз и эти блоки уже не показывались
Это действие не должно запоминаться (после перезагрузки страницы можно все сначала)

A: ну проще всего сделать так:
var flag = false;
$('.stickers_block img').on('click', function () {
    if (flag) return;
    flag = true;
    var feedback = 'какой-то текст 1 ';
    var twofeedback = 'какой-то текст 2';
    var threefeedback = 'какой-то текст 3 ';
    setTimeout(function() {
        setTimeout(function() {
        ...
        },1000)
    ...
    }, 500);
});


text:
Q: Same Object id in Java Map Was trying to understand the internal working of HashSet when Class objects are used as elements of the set. Here is what i have done => Code <=.
Found that the Object id are same for all the values in the map.

What does this mean ? Shouldn't they be different, as i have created new instances of Class Element ?

A: A HashSet is backed by an internal HashMap, where the keys are the Set's elements and the values are all references to the same dummy object. Therefore all the values you see in the map refer to the same object.
For example, see the implementation of add() :
public boolean add(E e) {
    return map.put(e, PRESENT)==null;
}

Where PRESENT is :
// Dummy value to associate with an Object in the backing Map
private static final Object PRESENT = new Object();

Shouldn't they be different, as i have created new instances of Class Element ?

Only the keys should be different.

A: You can check here:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7u40-b43/java/util/HashSet.java#HashSet
HashSet is implemented using HashMap :
private static final Object PRESENT = new Object();
For every put of a key-value pair, there is always same object inserted as value for every key, therefore there is always same id of the object which is PRESENT. Although you have put a new key but value of every entry in the map would be same.
Check these blogs:
http://www.java67.com/2014/01/how-hashset-is-implemented-or-works-internally-java.html
http://javahungry.blogspot.com/2013/08/how-sets-are-implemented-internally-in.html


text:
Q: PyAutoGui при поиске картинки нажимает куда-то, где картинки нет Столкнулся с проблемой при использовании PyAutoGui. Я задал ему несколько картинок, которые он должен найти и нажать на то место, где они находятся. Проблема заключается в том, что он нажимает в точку на экране, на которой указанной картинки нет.
import time
import pyautogui
import os
import subprocess
time.sleep(5)
if (pyautogui.locateOnScreen(r'C:\Script\Update\battlenet_button_continue.png', confidence=0.5) is not None):
    bnetcontinuelocation = pyautogui.locateOnScreen(r'C:\Script\Update\battlenet_button_update.png', confidence=0.5)
    bnetcontinuepoint = pyautogui.center(bnetcontinuelocation)
    bnetcontinuex, bnetcontinuey = bnetcontinuepoint
    pyautogui.click(bnetcontinuex, bnetcontinuey)
time.sleep(5)
if (pyautogui.locateOnScreen(r'C:\Script\Update\battlenet_button_stop.png', confidence=0.5) is not None):
    bnetstoplocation = pyautogui.locateOnScreen(r'C:\Script\Update\battlenet_button_stop.png', confidence=0.5)
    bnetstoppoint = pyautogui.center(bnetstoplocation)
    bnetstopx, bnetstopy = bnetstoppoint
    pyautogui.click(bnetstopx, bnetstopy)
    time.sleep(5)
    pyautogui.click(bnetstopx, bnetstopy)
time.sleep(5)
print("Готово")

Пытался менять параметр confidence, добавлять grayscale и это не помогает.

Вот эти 2 изображения. Используются они в лаунчере battle.net при нажатии на данную кнопку
С другими картинками работает корректно. Также пробовал перескринить эти "кнопки", но на результат это не повлияло.


text:
Q: I cant connect to MySql database Android studio with jdbc try {
    conn = DriverManager.getConnection(databaseURL, user, password);
    if (conn != null) {
    }
} catch (SQLException ex) {
    username="dsadsa2";
    ex.printStackTrace();
} finally {
    if (conn != null) {
        try {
            username="dsadsa";
            conn.close();
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }
}

I trying with this code,
databaseURL="jdbc:mysql://DATABASE_IP:3306/DATABASE_NAME"

maybe wrong syntax?
Its always get to SQLException and doesnt write in log anything...
Not sure why its happend?
logs

03-05 14:18:33.862 8177-8177/com.example.myapplication
  E/YOUR_APP_LOG_TAG: I got an error
      java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
          at java.lang.Class.classForName(Native Method)
          at java.lang.Class.forName(Class.java:309)
          at java.lang.Class.forName(Class.java:273)
          at com.example.myapplication.VestActivity.onCreate(VestActivity.java:73)
          at android.app.Activity.performCreate(Activity.java:5990)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2280)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
          at android.app.ActivityThread.access$800(ActivityThread.java:153)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:135)
          at android.app.ActivityThread.main(ActivityThread.java:5305)
          at java.lang.reflect.Method.invoke(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:372)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
       Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mysql.jdbc.Driver" on path: DexPathList[[zip file
  "/data/app/com.example.myapplication-1/base.apk"],nativeLibraryDirectories=[/vendor/lib,
  /system/lib]]
          at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
          at java.lang.Class.classForName(Native Method)
          at java.lang.Class.forName(Class.java:309)
          at java.lang.Class.forName(Class.java:273)
          at com.example.myapplication.VestActivity.onCreate(VestActivity.java:73)
          at android.app.Activity.performCreate(Activity.java:5990)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2280)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
          at android.app.ActivityThread.access$800(ActivityThread.java:153)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:135)
          at android.app.ActivityThread.main(ActivityThread.java:5305)
          at java.lang.reflect.Method.invoke(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:372)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
        Suppressed: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
          at java.lang.Class.classForName(Native Method)
          at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
          at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                ... 18 more
       Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 03-05 14:18:33.863
  8177-8177/com.example.myapplication E/YOUR_APP_LOG_TAG: I got an error
      java.sql.SQLException: No suitable driver
          at java.sql.DriverManager.getConnection(DriverManager.java:186)
          at java.sql.DriverManager.getConnection(DriverManager.java:213)
          at com.example.myapplication.VestActivity.onCreate(VestActivity.java:79)
          at android.app.Activity.performCreate(Activity.java:5990)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2280)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
          at android.app.ActivityThread.access$800(ActivityThread.java:153)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:135)
          at android.app.ActivityThread.main(ActivityThread.java:5305)
          at java.lang.reflect.Method.invoke(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:372)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 03-05
  14:18:33.918 8177-8177/com.example.myapplication E/libEGL:
  validate_display:255 error 3008 (EGL_BAD_DISPLAY)

A: First you have to add jtds library in dependencies as,
  public class ConnectionClass
{
    Connection con;
    @SuppressLint("NewApi")
    public Connection conclass(){
        String ip= "yourip",port="1433",database="DatabaseName",username="username",password="password@123";
        StrictMode.ThreadPolicy a=new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(a);
        String connecturl=null;

        try{
            Class.forName("net.sourceforge.jtds.jdbc.Driver");
            connecturl = "jdbc:jtds:sqlserver://" + ip + ":" + port + ";databasename=" + database + ";user=" + username + ";"+"password=" + password + ";";

           con = DriverManager.getConnection(connecturl);
        } catch (Exception e) {
          Log.e("Error :", e.getMessage());
        }
    return con;
}

}


text:
Q: Colormap/color problems with bar3d plot I have written some code to plot the longitude and latitude of towns/cities in the UK with the 3D bar height representing the population of these places. I am trying to also colour code the bars using a colormap so that the variation in population can be more easily seen. However, my code doesnt seem to follow the colormap and instead all the bars have very similar colours - I am not sure where I have gone wrong
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

pop = [189120, 91297, 107123, 107355, 94782, 87590, 142968, 1085810, 117963, 147663, 194189, 187503, 349561, 229700, 535907, 145818, 335145, 110507, 116447, 86011, 88483, 119441, 325949, 106943, 92363, 255394, 109805, 144170, 109185, 468720, 113507, 120046, 104157, 589900, 136362, 88243, 88134, 88855, 91053, 94932, 120256, 162949, 284321, 144957, 474632, 443760, 100160, 552267, 8173941, 211228, 107627, 510746, 174700, 171750, 268064, 128060, 215173, 186682, 289301, 86552, 96555, 159994, 161707, 234982, 154718, 238137, 97886, 95580, 218705, 107926, 109691, 134022, 103886, 518090, 155298, 123187, 253651, 175547, 91703, 102885, 89663, 105878, 270726, 174286, 109015, 179485, 182441, 142723, 99251, 165456, 131982, 91930, 218791, 83641, 103608, 105367, 265178, 100153, 109120, 152841]

lat = [57.14369, 53.55, 51.56844, 51.26249, 51.37795, 52.13459, 53.39337, 52.48142, 53.75, 53.81667, 53.58333, 50.72048, 53.79391, 50.82838, 51.45523, 52.2, 51.48, 51.73575, 51.9, 53.1905, 53.25, 51.88921, 52.40656, 51.11303, 54.52429, 52.92277, 53.52327, 56.5, 50.76871, 55.95206, 50.7236, 54.96209, 51.38914, 55.86515, 51.86568, 53.56539, 53.71667, 54.68611, 50.85519, 51.75369, 51.62907, 53.64904, 53.7446, 52.05917, 53.79648, 52.6386, 53.22683, 53.41058, 51.50853, 51.87967, 51.26667, 53.48095, 54.57623, 52.04172, 54.97328, 51.58774, 52.25, 52.62783, 52.9536, 52.52323, 53.54051, 51.75222, 52.57364, 50.37153, 50.71667, 50.79899, 53.76667, 51.58571, 51.45625, 53.61766, 53.43012, 53.42519, 53.48771, 53.38297, 51.50949, 52.41426, 50.90395, 51.53782, 53.64779, 53.45, 51.90224, 53.40979, 53.00415, 54.90465, 52.56667, 51.62079, 51.55797, 52.67659, 53.68331, 53.39254, 51.65531, 52.51868, 51.50853, 51.34603, 53.53333, 51.31903, 52.58547, 52.18935, 50.81448, 53.95763]

long = [-2.09814, -1.48333, 0.45782, -1.08708, -2.35907, -0.46632, -3.01479, -1.89983, -2.48333, -3.05, -2.43333, -1.8795, -1.75206, -0.13947, -2.59665, 0.11667, -3.18, 0.46958, -2.08333, -2.89189, -1.41667, 0.90421, -1.51217, -0.18312, -1.55039, -1.47663, -1.13691, -2.96667, 0.28453, -3.19648, -3.52751, -1.60168, 0.54863, -4.25763, -2.2431, -0.07553, -1.85, -1.2125, 0.57292, -0.47517, -0.74934, -1.78416, -0.33525, 1.15545, -1.54785, -1.13169, -0.53792, -2.97794, -0.12574, -0.41748, 0.51667, -2.23743, -1.23483, -0.75583, -1.61396, -2.99835, -0.88333, 1.29834, -1.15047, -1.46523, -2.1183, -1.25596, -0.24777, -4.14305, -2.0, -1.09125, -2.71667, 0.60459, -0.97113, -2.1552, -1.35678, -2.32443, -2.29042, -1.4659, -0.59541, -1.78094, -1.40428, 0.71433, -3.00648, -2.73333, -0.20256, -2.15761, -2.18538, -1.38222, -1.81667, -3.94323, -1.78116, -2.44926, -1.49768, -2.58024, -0.39602, -1.9945, -0.12574, -2.97665, -2.61667, -0.55893, -2.12296, -2.22001, -0.37126, -1.08271]

fig = plt.figure()
ax = Axes3D(fig)

X,Y,Z = np.array(long),np.array(lat),np.log10(np.array(pop))

colours = plt.cm.rainbow_r(Z/np.log10(max(pop)))

plot1 = ax.bar3d(X,Y,Z,dx=0.2,dy=0.2,dz=Z/3,color=colours)
ax.set_xlabel('\nLongitude (\u00B0)')
ax.set_ylabel('\nLatitude (\u00B0)')
ax.set_zlabel('\nlog\u2081\u2080(Population)')
ax.set_zlim3d(4,7)
ax.view_init(elev=70,azim=280)

colourMap = plt.cm.ScalarMappable(cmap=plt.cm.rainbow_r)
colourMap.set_array(Z)
colBar = plt.colorbar(colourMap).set_label('log\u2081\u2080(Population)')

plt.show()

The code produces this plot:

I think that the majority of the bars should be red/orange in colour, with only the major cities being yellow/green/blue...

A: (Z/np.log10(max(pop))).min() is 0.7. So all values are indeed in the upper range of the colormap.
You probably want to normalize your data before giving it to the colormap:
norm = plt.Normalize((Z/np.log10(max(pop))).min(), (Z/np.log10(max(pop))).max())
colours = plt.cm.rainbow_r(norm(Z/np.log10(max(pop))))


text:
Q: i want to know that how to create an indicator based on net price movement i have created a buy or sell signal at first somehow in day's first 10 minutes of trading. now i want to further trade based on net price movement. i have following code , which doesn't work effectively.
aa = ta.valuewhen(buy1 == true, close, 0) + 120
bb = ta.valuewhen(buy1 == true, close, 0) - 120
cc = ta.valuewhen(sell1 == true, close, 0) + 120
dd = ta.valuewhen(sell1 == true, close, 0) - 120

if c == false and (close > aa or close > dd)
    c := true
    d := false
    buy := true
    buy
else
    buy := false
    buy
if d == false and (close < bb or close < cc)
    d := true
    c := false
    sell := true
    sell
else
    sell := false
    sell


text:
Q: EXCEPT operator query to differentiate between new and changed rows I am using the EXCEPT Operator to compare data between two tables (as part of a final import I want to compare "today's data" with "yesterday's data" and only finally import new and changed rows.)
It (EXCEPT) seems to be exactly what I need, but does anyone know a way I could extend it so that in the resulting data subset I was able to differentiate between rows that are new and rows that are changed?

A: You could use the technique from this post.
--Demo setup
set nocount on
drop table if exists #T1
drop table if exists #T2
Create table #T1 (Id int, OtherData varchar(10))
Create table #T2 (Id int, OtherData varchar(10))

insert into #T1(Id,OtherData) values(1,'NewRow')
insert into #T1(Id,OtherData) values(2,'ChgRowB')

insert into #T2(Id,OtherData) values(2,'ChgRowA')

-----------------------------------------------
--The actual query
-----------------------------------------------

-- NEW
SELECT A.*, 'NEW'  AS 'CHANGE_TYPE'
FROM #T1  A
LEFT JOIN #T2  B ON B.ID = A.ID
WHERE B.ID IS NULL
UNION
-- MODIFIED
SELECT B.*, 'MODIFIED'  AS 'CHANGE_TYPE'
FROM (
        SELECT * FROM #T1
        EXCEPT
        SELECT * FROM #T2
    ) S1
INNER JOIN #T2  B ON S1.ID = B.ID;

| Id | OtherData | CHANGE_TYPE |
|----|-----------|-------------|
| 1  | NewRow    | NEW         |
| 2  | ChgRowA   | MODIFIED    |


text:
Q: Vault authentication with Okta We have a setup of Vault cluster and we are trying to authenticate Vault with Okta. Have enabled auth and configured it:
vault auth enable okta
vault write auth/okta/config base_url="BASE_URL" organization="ORG" token="TOKEN"

Whenever I trying to authenticate against Okta in the Vault UI, I am getting this error:

Authentication failed: Okta auth failed: HTTP Method: POST - URL:
  https://org.okta.com/api/v1/authn: - HTTP Status Code: 401, OKTA Error
  Code: E0000004, OKTA Error Summary: Authentication failed, OKTA Error
  Causes: []

The catch is we are using Google as IdP. Login requests are being sent to Google. In Okta we configured Google as IDP.
If I save a user's credentials in the Okta itself then it works. So, is there a way to authenticate via Okta when IDP is Google?

A: You are using the Okta auth method within Vault. This will just post your credentials against the AuthN endpoint of Okta to validate them and grant access based on the response.
With Google as the user's IDP within Okta you will need to setup the JWT/OIDC auth method in Vault and configure Vault in Okta. When the user authenticates their browser will redirect to Okta to complete sign-in which will redirect them to Google to authenticate if they do not already have a session.

A: I'm not familiar with Vault, but it looks to me like Vault is doing a simple AuthN Authentication, basically just checking a Username/Password against Okta.
So, unfortunately, from what I see with what you provided doing Social Authentication to Okta then logging into Vault might not be supported by Vault.
Now, if you create a local account in Okta, and the Authentication works, then we can confirm that Vault is not properly supporting Federation (Single Sign-on) :(
Unfortunately, Vault would need to support Federation to allow you to login via Google, then log into Vault.


text:
Q: Add two float values in Java Acually i tried to add two float values in Java like this:
import java.text.DecimalFormat;
class ExactDecimalValue
{
    final strictfp static public void main(String... arg)
    {
       float f1=123.00000f;
       float f2=124.00000f;
       float f3=f1+f2;

       System.out.println(f1+f2);
       System.out.println("sum of two floats:"+f3);

       /*my expected output is:247.00000
         but comming output is:247.0   and 247*/
    }
}

Now what i can do to get the value in this format:247.00000.

A: This will work:
float f1=123.00000f;

float f2=124.00000f;

float f3=f1+f2;

System.out.println(f1+f2);
System.out.printf("%.5f", f3);

Whenever I want to format floats I always use printf.

A: You can use DecimalFormat class for setting up the precision
float f1=123.00000f;
float f2=124.00000f;
float f3=f1+f2;
DecimalFormat f = new DecimalFormat("0.00000");
System.out.println(f.format(f3));

the output will be 247.00000

A: It's not that the actual addition is wrong, it's just that printing the value out is assuming that you don't need the exact value, in layman's terms... For more information about floating point precision, see: Round-Off Error.
See this answer on specifying decimal output of a float: How to display an output of float data with 2 decimal places in Java?

A: Method 1:
Float f3 = Float.sum(f1, f2);

Method 2:
Float f3 = f1.floatValue()+f2.floatValue();


text:
Q: Word viewer in asp web application I've to create one asp web application page for show .docx file( with exact alignment text,images, table etc) and also table of content(like tree view of that document). I would like to ask, Is there any open source ActiveX control or plugin or something else to achieve the specific task .  I already done it in windows form application but now want to do it asp web form . i used dsoframer control in windows application . please make me to achieve that.

A: There is support to render a .docx file as HTML - I can't speak to how accurately it renders in the webpage verse desktop version of Word.  Still, there is a tutorial here:
http://blog.maartenballiauw.be/post/2008/01/11/Preview-Word-files-%28docx%29-in-HTML-using-ASPNET-OpenXML-and-LINQ-to-XML.aspx

A: Please look into following article,
Link


text:
Q: Android application build faild after update com.android.tools.build:gradle from 3.1.4 to 3.2.1 After update gradle-build-plugin from 3.1.4 to 3.2.1 build fails with the following exception on :app:lint task:

    09:38:53.491 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:lint'.
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all files for configuration ':app:androidApis'.
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]    > Failed to transform file 'android.jar' to match attributes {artifactType=android-mockable-jar, returnDefaultValues=false} using transform MockableJarTransform
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]       > java.lang.IllegalArgumentException (no error message)
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    09:38:53.492 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
    09:38:53.493 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]  Run with --scan to get full insights.
    09:38:53.493 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    09:38:53.493 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
    09:38:53.494 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:lint'.
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
    09:38:53.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
    09:38:53.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:596)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:androidApis'.
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:995)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$1700(DefaultConfiguration.java:121)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:969)
    09:38:53.497 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.file.AbstractFileCollection.getSingleFile(AbstractFileCollection.java:59)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.ide.ModelBuilder.createUnitTestsJavaArtifact(ModelBuilder.java:615)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.ide.ModelBuilder.createVariant(ModelBuilder.java:501)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.ide.ModelBuilder.buildAndroidProject(ModelBuilder.java:379)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.ide.ModelBuilder.buildAll(ModelBuilder.java:196)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.AppModelBuilder.buildAll(AppModelBuilder.kt:71)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.lint.gradle.LintGradleExecution.createAndroidProject(LintGradleExecution.java:349)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.lint.gradle.LintGradleExecution.analyze(LintGradleExecution.java:85)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.lint.gradle.api.ReflectiveLintRunner.runLint(ReflectiveLintRunner.kt:38)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.tasks.LintBaseTask.runLint(LintBaseTask.java:88)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.tasks.LintGlobalTask.lint(LintGlobalTask.java:47)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
    09:38:53.498 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:794)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:761)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 29 more
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'android.jar' to match attributes {artifactType=android-mockable-jar, returnDefaultValues=false} using transform MockableJarTransform
    09:38:53.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.UserCodeBackedTransformer.transform(UserCodeBackedTransformer.java:89)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.TransformFileOperation.run(TransformFileOperation.java:40)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.access$900(DefaultBuildOperationExecutor.java:50)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$ParentPreservingQueueWorker.execute(DefaultBuildOperationExecutor.java:359)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runOperation(DefaultBuildOperationQueue.java:230)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.access$600(DefaultBuildOperationQueue.java:172)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable$1.call(DefaultBuildOperationQueue.java:209)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable$1.call(DefaultBuildOperationQueue.java:203)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runBatch(DefaultBuildOperationQueue.java:202)
    09:38:53.500 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.run(DefaultBuildOperationQueue.java:177)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationQueue.waitForCompletion(DefaultBuildOperationQueue.java:116)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.executeInParallel(DefaultBuildOperationExecutor.java:146)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.runAll(DefaultBuildOperationExecutor.java:117)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DelegatingBuildOperationExecutor.runAll(DelegatingBuildOperationExecutor.java:41)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ParallelResolveArtifactSet$VisitingSet.visit(ParallelResolveArtifactSet.java:60)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.visitArtifacts(DefaultLenientConfiguration.java:255)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.access$500(DefaultLenientConfiguration.java:68)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$2.run(DefaultLenientConfiguration.java:230)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    09:38:53.501 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.visitArtifactsWithBuildOperation(DefaultLenientConfiguration.java:227)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.access$200(DefaultLenientConfiguration.java:68)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$1.visitArtifacts(DefaultLenientConfiguration.java:132)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:966)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 54 more
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.IllegalArgumentException
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.objectweb.asm.AnnotationVisitor.(Unknown Source)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.objectweb.asm.AnnotationVisitor.(Unknown Source)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.objectweb.asm.tree.AnnotationNode.(AnnotationNode.java:90)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.objectweb.asm.tree.AnnotationNode.(AnnotationNode.java:74)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.objectweb.asm.tree.ClassNode.visitAnnotation(ClassNode.java:263)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.objectweb.asm.ClassReader.accept(Unknown Source)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.objectweb.asm.ClassReader.accept(Unknown Source)
    09:38:53.502 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.testing.MockableJarGenerator.rewriteClass(MockableJarGenerator.java:133)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.testing.MockableJarGenerator.createMockableJar(MockableJarGenerator.java:93)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.dependency.MockableJarTransform.transform(MockableJarTransform.java:54)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.TransformArtifactsAction.apply(TransformArtifactsAction.java:44)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.TransformArtifactsAction.apply(TransformArtifactsAction.java:29)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache$TransformAction.execute(DefaultTransformedFileCache.java:224)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache$TransformAction.execute(DefaultTransformedFileCache.java:211)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.resource.local.DefaultPathKeyFileStore$1.execute(DefaultPathKeyFileStore.java:91)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.resource.local.DefaultPathKeyFileStore$1.execute(DefaultPathKeyFileStore.java:87)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.resource.local.DefaultPathKeyFileStore.doAdd(DefaultPathKeyFileStore.java:137)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.resource.local.DefaultPathKeyFileStore.doAdd(DefaultPathKeyFileStore.java:127)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.resource.local.DefaultPathKeyFileStore.add(DefaultPathKeyFileStore.java:87)
    09:38:53.503 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.resource.local.DefaultPathKeyFileStore.add(DefaultPathKeyFileStore.java:50)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache$1$1.create(DefaultTransformedFileCache.java:143)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache$1$1.create(DefaultTransformedFileCache.java:122)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.withFileLock(LockOnDemandCrossProcessCacheAccess.java:89)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheAccess.withFileLock(DefaultCacheAccess.java:193)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultPersistentDirectoryStore.withFileLock(DefaultPersistentDirectoryStore.java:158)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.withFileLock(DefaultCacheFactory.java:187)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache$1.create(DefaultTransformedFileCache.java:122)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache$1.create(DefaultTransformedFileCache.java:115)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.cache.internal.ProducerGuard$AdaptiveProducerGuard.guardByKey(ProducerGuard.java:97)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache.loadIntoCache(DefaultTransformedFileCache.java:115)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache.getResult(DefaultTransformedFileCache.java:107)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.artifacts.transform.UserCodeBackedTransformer.transform(UserCodeBackedTransformer.java:87)
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 84 more
    09:38:53.504 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    09:38:53.505 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
    09:38:53.505 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
    09:38:53.505 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
    09:38:53.505 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 15s
    09:38:53.505 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 94 actionable tasks: 11 executed, 83 up-to-date
    09:38:53.508 [INFO] [org.gradle.api.Project] AAPT2 aapt2-3.2.1-4818971-linux Daemon #0: shutdown

My build tool version is buildToolsVersion "27.0.3"
Other configs
ext {
  compileSdkVersion = 27
  supportLibVersion = "27.1.1"
  minSdkVersion = 14
  targetSdkVersion = 22
}

And android options are:

    android {
        compileSdkVersion rootProject.ext.compileSdkVersion
        buildToolsVersion "27.0.3"

        defaultConfig {
            applicationId ""
            minSdkVersion rootProject.ext.minSdkVersion
            targetSdkVersion rootProject.ext.targetSdkVersion
            versionCode rootProject.ext.versionCode
            versionName rootProject.ext.versionName
            multiDexEnabled true
        }
        dexOptions {
            keepRuntimeAnnotatedClasses false
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
        android {
            lintOptions {
                abortOnError false
            }
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }


text:
Q: java.sql.SQLException: Missing IN or OUT parameter at index::4 error occurs with preparestatement strInsertQuery="INSERT INTO SYNPACKAGEFREEUSAGEMAPPING (PACKAGEID,SERVICEID,PRIORITY,MAPPINGID,ATTRIBUTEVALUE,FREEUSAGE,UOM,PARAMSTR1,UNITCREDITPOLICYDETAILID) VALUES (?,?,?,?,?,?,?,?,?)";
newPstmt=newCon.prepareStatement(strInsertQuery);
newPstmt.setString(1,strProductId);
              newPstmt.setString(2,strUPGServiceId);
              newPstmt.setInt(3,0);
              if(FieldMappingrs.next())
              {
               newPstmt.setLong(4,FieldMappingrs.getLong(1));
              }
              newPstmt.setString(5,ucpDetailData.getCreditattributevalue());
              for(Iterator itrColUnitCreditDetail=ucpData.iterator();itrColUnitCreditDetail.hasNext();)
       {

        unitCreditData = (UnitCreditDetailData)itrColUnitCreditDetail.next();
        if(ucpDetailData.getUnitcreditpolicydetailid().equals(unitCreditData.getUnitcreditpolicydetailid()))
        {
         debugLog(PackageConstant.PACKAGE_MODULE_NAME,"ServicePackageSessionBean:createFreeUsageServiceDetails() unitCreditData "+ unitCreditData);
                newPstmt.setDouble(6,unitCreditData.getEndvalue());
               }

               debugLog(PackageConstant.PACKAGE_MODULE_NAME,"Insert record successfull"+ ucpDetailData);
              }
              newPstmt.setString(7,ucpDetailData.getUom());
              newPstmt.setString(8,ucpDetailData.getCreditattribute());
              newPstmt.setString(9,ucpDetailData.getUnitcreditpolicydetailid());

              newPstmt.executeUpdate();

A: Well, look at this:
if(FieldMappingrs.next())
{
    newPstmt.setLong(4,FieldMappingrs.getLong(1));
}

So you're conditionally setting parameter 4.
What do you want to insert if FieldMappingsrs.next() returns false? (I suspect this is what is happening.) Try setting it to an appropriate value in an else block.

A: Your problem is just at this block
  if(FieldMappingrs.next()) {
      newPstmt.setLong(4,FieldMappingrs.getLong(1));
  }

As you see if .next() returns false you won't be passing the parameter at index 4.
I suggest to, if you can pass to that table 0 instead of null use this
  if(FieldMappingrs.next()) {
      newPstmt.setLong(4,FieldMappingrs.getLong(1));
  } else {
      newPstmt.setLong(4,0);
  }

Or if it is required value, just throw an exception.


text:
Q: Can an adverb modify an article? In English, can an adverb modify an article?
If so, I'd like to see an example sentence.
I have come across some claims that an adverb can modify everything but a noun/pronoun. This means that it can modify an article, but I have not seen this in any of the grammar books or dictionaries I have used. The claim did not mention the word article let alone give an example.

A: It's an interesting problem. The thing to remember, though, is that articles aren't independent words. They are used only as determiners of nouns, and fulfil no grammatical role otherwise. There are various examples in the the comments, such as

This is merely an example

And the question is, what does merely modify. Actually, what it appears to modify is a noun phrase, "an example", but that would be strange - if it can't modify a noun, surely it can't modify a noun phrase?
What you're actually seeing here is an area that linguists get into arguments about. Sometimes you see an adverb that doesn't appear to be modifying an identifiable verb or adjective. Linguists then tie themselves in knots trying to come up with an explanation that doesn't contradict the nice, simple basic explanations people get taught in school.
Sometimes, it's easy. Sometimes, it's an adverb modifying an entire clause:

Suddenly, a voice cried out.

The adverb is prepended to the clause and modifies the whole thing, with a subtly different meaning to "a voice suddenly cried out". Such whole-clause adverbs can also be appended, placed after the clause. They don't generally apply to the whole clause when placed in the middle of it, though.
But it's not modifying is. It's unusual, but you can say:

This merely is an example.

However, then you're not saying that all it is is an example, as you are with the merely after is. You're insisting that it is an example, a difference that is clearer if you use the nearly synonymous (in this context) simply:

This is simply an example
  This simply is an example

The first would be used to reassure people that this is just being used as an example, not as something that they should worry about in itself. The second would be used if someone were arguing about whether it was an example, and you were insisting - using certain sorts of argument - that it was.
So, if merely or simply appears after is, what is it modifying? Some linguists will say it's modifying a noun phrase, with the explanation that some adverbs can modify some noun phrases in some situations. Some linguists will say it is modifying the determiner, with arguments against it modifying the noun phrase being that it can't modify an arbitrary noun phrase. However, it's not always as simple as that. The meaning of the adverb depends on what the determiner is. For example, consider:

This is merely an example.
  This is merely one example.

The first is saying that it is an example, and shouldn't be taken as having any other significance. The second is asserting that there are other examples out there that could be chosen. In the second, it is clear that the adverb is modifying the determiner one. In the first, it is the "example-ness" that is being modified.
It's not hard to see how linguists end up in knots over this stuff. If you work at it, you can find examples of adverbs applying to pretty much any part of speech, and then you argue about how it should be parsed. The bottom line, really, is that different adverbs can apply to different things in different situations, and the important thing is to learn how they are used rather than coming up with general rules, because any general rules like that will have to be supplemented by an immense list of exceptions.


text:
Q: What is the fastest way to find where an address is mapped in GDB? Currently I manually go through the list of memory mappings in info proc mappings to see in what range the address falls in. Isn't there an easier way?
(gdb) i proc map
process 23912
Mapped address spaces:

      Start Addr           End Addr       Size     Offset objfile
        0x601000           0x6ce000    0xcd000        0x0 [heap]
  0x7fffe6d65000     0x7fffe6d67000     0x2000        0x0 /usr/lib64/libXau.so.6.0.0
  0x7fffe6d67000     0x7fffe6f67000   0x200000     0x2000 /usr/lib64/libXau.so.6.0.0
  0x7fffe6f67000     0x7fffe6f68000     0x1000     0x2000 /usr/lib64/libXau.so.6.0.0
  0x7fffe6f68000     0x7fffe6f69000     0x1000     0x3000 /usr/lib64/libXau.so.6.0.0
  0x7fffe6f69000     0x7fffe6f89000    0x20000        0x0 /usr/lib64/libxcb.so.1.1.0
  0x7fffe6f89000     0x7fffe7188000   0x1ff000    0x20000 /usr/lib64/libxcb.so.1.1.0
  0x7fffe7188000     0x7fffe7189000     0x1000    0x1f000 /usr/lib64/libxcb.so.1.1.0
  0x7fffe7189000     0x7fffe718a000     0x1000    0x20000 /usr/lib64/libxcb.so.1.1.0
  0x7fffe718a000     0x7fffe718c000     0x2000        0x0 /usr/lib64/libXss.so.1.0.0
  0x7fffe718c000     0x7fffe738c000   0x200000     0x2000 /usr/lib64/libXss.so.1.0.0
  0x7fffe738c000     0x7fffe738d000     0x1000     0x2000 /usr/lib64/libXss.so.1.0.0
  0x7fffe738d000     0x7fffe738e000     0x1000     0x3000 /usr/lib64/libXss.so.1.0.0
...

A: You want info sym.  Here it is from different frames in the stack of a simple program:
(gdb) info sym $pc
_fxstat + 20 in section .text of /lib64/libc.so.6

or
(gdb) info sym $pc
std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) + 422 in section .text of /lib64/libstdc++.so.6

or
(gdb) info sym $pc
main + 25 in section .text of /tmp/q


text:
Q: C++ template specialisation for abstract base class I want to write a Settings class to load and store settings of various types:
template <typename T>
class Setting {
    std::string m_name;
    T m_defaultValue;

    T load() {
        if(backend.contains(m_name))
            return backend.load<T>(m_name);
        return m_defaultValue;
    }

    void save(const T &value) {
        backend.save(m_name, value);
    }
}

The backend has implementaions for some basic types, but not for my own. So I need template specializations for my types. My idea is to create a Serializable class and derive my classes from it:
class Serializable {
public:
    virtual std::string serialize() const = 0;
    virtual void deserialize(const std::string &data) = 0;
}

Now I need a template specialization for load and save in the Setting class to use the serialize and deserialize functions in Serializable:
template<>
void Setting<Serializable>::load()
{
    if(backend.contains(m_name)) {
        Serializable s;
        s.deserialize(backend.load<std::string>(m_name);
        return s;
    }
    return m_defaultValue;
}

template<>
void Setting<Serializable>::save(const Serializable &value)
{
    backend.save(m_name, value.serialize());
}

Obviously this doesn't work because in Setting<Serializable>::load() I cannot instantiate Serializable s. But even if I leave out load for the time being, it does not work because it cannot declare field 'Setting<Serializable>::m_defaultValue' to be of abstract type 'Serializable'.
Is there a way to write a different implementation for all subtypes of Serializable but still use a template parameter T?

A: You could do this by creating a specialized version of Setting that is only available if the type of the setting inherits from Serializable.
By using partial template specialization with std::enable_if you can create a separate Settings class that will only be used if the Setting type implements Serializable.
e.g.:
// Normal Setting class, for the primitive types your backend supports
template <typename T, typename _ = void>
class Setting {
    std::string m_name;
    T m_defaultValue;

public:
    T load() {
        if(backend.contains(m_name))
            return backend.load<T>(m_name);
        return m_defaultValue;
    }

    void save(const T &value) {
        backend.save(m_name, value);
    }
};

// specialized Setting class that will apply to all classes that implement Serializable
template<typename T>
class Setting<T, std::enable_if_t<std::is_base_of_v<Serializable, T>>> {
    std::string m_name;
    T m_defaultValue;

public:
    T load() {
        if(backend.contains(m_name)) {
            T s;
            s.deserialize(backend.load<std::string>(m_name));
            return s;
        }

        return m_defaultValue;
    }

    void save(const T &value) {
        backend.save(m_name, value.serialize());
    }
};

(heres an example godbolt)


text:
Q: Make a Material UI Component in React Sticky when scrolling (not AppBar) So I have AppBar working fine.  And I didn't even use sticky for that but I think I need some kind of sticky style to make my element in the page essentially stick at the top when the user scrolls.  I essentially want this.
https://www.w3schools.com/howto/howto_css_sticky_element.asp
But within my React page I want my ProgressBar component to remain at the top. The component below this RenderTeamSelections which is a big table, it will push the ProgressBar out of view quickly.  I want to kept the ProgressBar in view while the user makes selections from the table.  Here is the relevant code.
 return (

            <AccountProfile {...this.props} />

            <Team team={this.props.team} profileDetail={profileDetail} />

            <ProgressBar {...this.props} />

            <RenderTeamSelections {...this.props] />

    );

I am familiar with the use of withStyles and have played with some settings on the position of ProgressBar like 'fixed', 'sticky' and '-webkit-sticky' but have not gotten it to stick at the top when I scroll yet.  Any help would be greatly appreciated.  I didn't see anything Material docs that seemed to directly relate to this scenario.

A: On most components you can add {position: 'fixed'}. So try to use it in the component styling. if that doesn't work try to change the zIndex.
Example:
<Paper style={{position: 'fixed'}}>
   <List className={classes.list} component="nav" aria-label="main mailbox folders"
      subheader={<ListSubheader component="div" id="nested-list-subheader">Navigation</ListSubheader>}>
          <ListItem button>
             <ListItemIcon>
               <SubjectIcon/>
             </ListItemIcon>
             <ListItemText primary="Overview" />
          </ListItem>
  </List>

A: I was able to get it working with material ui themes
here is my styles.  I added a z-index because my table selects and table header data were still visible in <RenderTeamSelections {...this.props] /> in the sticky as I scrolled.
Here is the final component with styles.
const styles = theme => ({
    root: {
        background: 'white',
        position: '-webkit-sticky',
        position: 'sticky',
        top: 20,
        bottom: 20,
        paddingTop: '40px',
        paddingBottom: '40px',
        zIndex: 5,
    },
    details: {
        display: 'flex'
    },
    progressWrapper: {
        marginTop: theme.spacing(2)
    },
    linearProgress: {
        height: 20
    },
});

export function ProgressBar(props) {
    const { profileDetail, classes } = props;
    const [completeness, setCompleteness] = useState(0)

    useEffect(() => {
        if (profileDetail) {
            setCompleteness(profileDetail.teamKeysTier1.split(",").filter(x => { return x.length != 0 }).length + profileDetail.teamKeysTier2.split(",").filter(x => { return x.length != 0 }).length)
        }
    }, [profileDetail])

    return (
        <Portlet className={classes.root} >
            <PortletContent >
                {completeness > 8 ?

                        <Typography variant="h3" color="textSecondary">Team Selection Completeness: {completeness * 10 + 10}%</Typography>

                        <LinearProgress
                            className={classes.linearProgress}
                            value={completeness * 10 + 10}
                            variant="determinate"
                            position="fixed"
                        />
 :

                        <Typography variant="h3" color="textSecondary">Team Selection Completeness: {completeness * 10}%</Typography>

                        <LinearProgress
                            className={classes.linearProgress}
                            value={completeness * 10}
                            variant="determinate"
                            position="fixed"
                        />

}
            </PortletContent>
        </Portlet>

    )

}

export default withStyles(styles)(ProgressBar);


text:
Q: How to roll back touchpad driver to synaptic? I wanted to try gnome3, I followed omg ubuntu's guide which was basically adding the PPA
Everything was working great except it wasn't, I was getting low on root under 600 MB, so I had to uninstall gnome3 first I tried
sudo apt-get install gnome3 gnome-shell as that what I installed in the first place, now unity was broken and I login to black screen and the grey sub menus disappeared, I figured that I should use sudo apt-get autoremove to remove the gnome3-* still no use.
I tried to reinstall lightdm and this didn't fix anything
finally I found this answer that said I should use ppapurge I used and unity was back wokring. ouldn't find synaptics properties. No synaptics driver loaded?

Now to the current question touchpad tap to click wasn't working, some answers on askubuntu advised to use synclient it kept replying with this Couldn't find synaptics properties. No synaptics driver loaded? I found that gnome3 uses libinput drivers instead of syntapics I succeded in enabling the touchpad using xinput. So how do I revert the touchpad drivers to synaptics!? My touchpad is an Elantech touchpad

A: I uninstalled the libinput package and synaptic took over
just write down in terminal
sudo apt-get remove xserver-xorg-input-libinput


text:
Q: Autofocus only working on page refresh I have a form which is in a popup, I've set the autofocus attribute autofocus="autofocus" but it is not focusing when the form loads however it will focus if you refresh the page. The form is inserted into a div.
Form Sample:
First Name:<input type="text" name="fname" placeholder="First Name" class="userField" autofocus="autofocus" id="firstNameUserField" value="<?php
    if(isset($_SESSION['firstname'])){
       echo trim($_SESSION['firstname']);
    }
  ?>">

Div form is inserted into:

Form is shown if user is logged in and clicks their username:
if(isset($_SESSION['username'])){
          echo "".$_SESSION['username']."
";
        }

A: To solve the issue of "Autofocus only working on page refresh"
Do the following changes in your files:-
//In module.ts file

import { AutofocusModule } from 'angular-autofocus-fix';

@NgModule({
imports: [
AutofocusModule
],

//In package.json file add the dependencies as:-

    "dependencies": {
    "angular-autofocus-fix": "^0.1.0"
}

A: autofocus will apply only for elements initially in the page, not elements loaded with Javascript.
You can force the focus in the Javascript code that you use to render the SimpleModal, add it to the onShow event:
$('#firstNameUserField').focus();

You didn't include the Javascript used to open the popup in your question, so this is just a general example:
$("#popupEl").modal({onShow: function (dialog) {
 $('#firstNameUserField').focus();
}});


text:
Q: Objective-C UIWebView not loading website I am trying to get a UIWebView to display google.com for now, but its not loading:
I just get a blank screen
.h
#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

@property (strong, nonatomic) IBOutlet UIWebView *webView;

@end

.m
#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {

    [super viewDidLoad];

    NSURL *targetURL = [NSURL URLWithString:@"http://www.google.com"];
    NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
    [_webView loadRequest:request];

    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

What I did is the following to create a web view:

*

*Created a new UIViewController scene

*Added a UIWebView to it

*connected the webview to .h controller

*Made my scene the inital scene

*Ran the app, nothing was loaded, no errors, just go straight to UIViewController with nothing in it, please help.

I tried adding the following:
[self.view addSubview:self.webView];

That did nothing

A: If You're running Web View on iOS > 9.0, probably You haven't added NSAppTransportSecurity key to project *.plist file, so the app can't request any URL.
If You want to allow all of URL request, then following code should be added to project plist file:
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

else if You want to allow only specific URL request:
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>allowed.domain.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>

A: Try adding :
- (void)viewDidLoad {

    [super viewDidLoad];

    //Check if the web view is linked correctly from the XIB
    NSLog(@"WebView : %@",_webView);
    _webView.delegate = self;

    NSURL *targetURL = [NSURL URLWithString:@"http://www.google.com"];
    NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
    [_webView loadRequest:request];

    // Do any additional setup after loading the view, typically from a nib.
}

and add this new method in your class (also implement UIWebViewDelegate in te .h)
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
   //Check if the web view loadRequest is sending an error message
   NSLog(@"Error : %@",error);
}

A: If you are really using an outlet for webview, then this should work no matter what.
   [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];

A: add Break point , check if NSURLRequest *request is nil ,
if nil, then do
NSString *urlString = @"http://www.yourWebAddress.com";
NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
[webView loadRequest:urlRequest];

try to encode the url...hope it will works

A: Would you happen to be building in Xcode 7 and targeting iOS 9?
If so, you're likely running into the new default security requirement for accessing sites via https, as detailed here:
Disabling ATS for an in-app browser in iOS 9?

A: Perhaps the problem is that you call seter (_webView). Try through:
[self.webView loadRequest:request];

A: Allow AppTransport permission to yes in Info.plist


text:
Q: jQuery minify duplication I have a working jsFiddle that shows content based on drop-down value. How can I minify the jQuery so that I don't have to repeat myself for each 'port'. At the moment I have done 2 'ports' but it will take a while to populate the remainder.
http://jsfiddle.net/d4pvz51v/1/
$(document).ready(function () {
$("select").change(function () {
    $("select option:selected").each(function () {
        if ($(this).attr("value") == "all") {
            $(".auckland").hide();
            $(".tauranga").hide();
            $(".all").show();
        }
        if ($(this).attr("value") == "auckland") {
            $(".all").hide();
            $(".auckland").show();
            $(".tauranga").hide();
        }
        if ($(this).attr("value") == "tauranga") {
            $(".all").hide();
            $(".auckland").hide();
            $(".tauranga").show();
        }
    });
}).change();

$('.auckland-link').click(function () {
    $('select option:contains("Auckland")').prop('selected', true);
    $('.auckland').show();
    $('.tauranga').hide();
    $(".all").hide();
});
$('.tauranga-link').click(function () {
    $('select option:contains("Tauranga")').prop('selected', true);
    $('.auckland').hide();
    $('.tauranga').show();
    $(".all").hide();
});
});

A: function manageState(hide1,hide2,show){
 $(hide1).hide();
 $(show).show();
 $(hide2).hide();
}

Make a method that takes in two fields to hide and one to show. Pass in the specific classes for each condition. This works since you seem to be hiding in paris and showing a single item.
Example:
manageState('.all','.auckland','.tauranga')

A: Instead of adding different handlers for each option or link you can
On change of the select, hide all elements with class data, then show the element with the class as the selected value
In the same way you can have a single click handler for the links, assign a common class to all of the link elements then add an data-*(data-el in this case) to specify the target elements class name. In its click handler read the data value and set it as the select element's value and then manually trigger the select's change handler which will set the proper data element visibility.

$(document).ready(function() {
  $("select").change(function() {
    var $target = $('.' + $(this).val()).show();
    $('.data').not($target).hide();
  }).change();

  $('.data-link').click(function() {
    var val = $(this).data('el')
    $('select').val(val).change();
  });
});

PORTS OF OPERATION

Select a port to view information and contact details

        <select class="choose">
          <option value="all">Select Port</option>
          <option value="auckland">Port of Auckland</option>
          <option value="tauranga">Port of Tauranga</option>
        </select>

Port of Whangarei

Port of Auckland

Port of Tauranga

Eastland Port

Port Taranaki

Port of Napier

Port Nelson

Centre Port Wellington

Port Malborough

Greymouth Port

Lyttleton Port

Primeport Tmaru

Port Otago

Southport

Port Information

Port of Auckland is centrally located on the west coast of the North Island and is one of New Zealand 's key import and export ports.

Port of Auckland offers nine fully serviced berths for a wide variety of cargoes and vessels. The maximum port draft is 12.5m, and for vessels in excess of 10m Dynamic Under Keel Clearance (DUKC) must be used.

Port of Auckland has the ability to handle a wide diversity of cargoes including all forms of bulk products (liquid and dry), containerised, and break-bulk products (general, refrigerated or palletised), and has specialist experience in the
            handling of heavy lift and project cargoes. All wharves are supported by covered and open storage areas.

Features

An unusual feature of the port is that it has a beach within its breakwaters adjacent to its operational area. The popularity of Ngamotu Beach is testament to Port Taranaki's commitment to safe working practices and regard for the environment.

Another special feature of Port of Auckland is its "heavy lift" expertise. Auckland has a sophisticated engineering infrastructure, which evolved primarily as a result of development of the region's oil and gas industries. As the petrochemical
            industries grew many oversized and heavy cargoes were imported and exported through Port Taranaki. Specialist know-how and facilities are available through Port of Auckland for the handling of extra heavy lifts.

Port Tauranga

Port of Auckland is centrally located on the west coast of the North Island and is one of New Zealand 's key import and export ports.

Port of Auckland offers nine fully serviced berths for a wide variety of cargoes and vessels. The maximum port draft is 12.5m, and for vessels in excess of 10m Dynamic Under Keel Clearance (DUKC) must be used.

Port of Auckland has the ability to handle a wide diversity of cargoes including all forms of bulk products (liquid and dry), containerised, and break-bulk products (general, refrigerated or palletised), and has specialist experience in the
            handling of heavy lift and project cargoes. All wharves are supported by covered and open storage areas.

Features

An unusual feature of the port is that it has a beach within its breakwaters adjacent to its operational area. The popularity of Ngamotu Beach is testament to Port Taranaki's commitment to safe working practices and regard for the environment.

Another special feature of Port of Auckland is its "heavy lift" expertise. Auckland has a sophisticated engineering infrastructure, which evolved primarily as a result of development of the region's oil and gas industries. As the petrochemical
            industries grew many oversized and heavy cargoes were imported and exported through Port Taranaki. Specialist know-how and facilities are available through Port of Auckland for the handling of extra heavy lifts.


text:
Q: Debugging in rails 3 i want to debug ROR without going through the effort of putting inspect method for every relevant object in the controller as well in the model.is there a better way as we have in Java (Run time debugger using eclipse).i know that I can Use Rails.logger and also make use of rails Console(irb`).i am even aware of debugging/inspecting elements in erb/rb file.Still is there a better,quick and reliable way to debug a Rails app.

A: There is much better, see this railscats.
It presents two great gems, especially Better Errors
Otherwise, you could use pry with rails, see this railscast.

A: you can also use pry-rails, pry-debugger and then use binding.pry method in your code and then while using your app you have Rails console available in rails server

A: Add this lines to your application's Gemfile
group :development do
  gem 'ruby-debug19'
end

then run cammand
 bundle install

add debugger within your controller or model method, stop the rails server and restart again. Whenever rails found word debugger it stops control at that point. You can easily debug your value or object.
Hope this will helps you.


text:
Q: Plot a stacked bar plot in seaborn with hatching I am trying to plot a stacked bar plot using seaborn/matplotlib with hatching. But the hatching is not proper. Its coming as shown in image

My code is as below:
 sc_bar=sns.barplot(x='Salt Concentration',y='EPS
             Produced',data=df_salt_conc_mod,hue='Strain',fill=False,edgecolor='black')
 bars = sc_bar.patches
 pattern=['//','..','xx','*']
 hatches=np.tile(pattern,7)

i=0

for bar in bars:
bar.set_hatch(pattern[i])
i+=1
count+=1
if(i>3):
    i=0

sc_bar.legend()

What am i doing wrong?

A: Let's try zip:
df = sns.load_dataset('tips')
sc_bar = sns.barplot(data=df, x='tip', y='sex', hue='day', fill=False)
bars = sc_bar.patches
pattern=['//','..','xx','*']

# replace 2 with 7 in your code
hatches=np.repeat(pattern,2)

for pat,bar in zip(hatches,bars):
    bar.set_hatch(pat)

sc_bar.legend()

Output:


text:
Q: Is 64 bit right for my AMD Athlon XP? I have AMD Athlon XP 1.2 Ghz, 1 GB DDR RAM.
I don't know if I can install all drivers.

A: The Athlon XP CPU does not have support for 64-bit instruction thus you cannot use the Ubuntu 64-bit installation.
The Athlon XP is a K7 architecture CPU with support for 32-bit instructions only.

A: The 32bit architecture will do just fine for your PC setup.
Drivers are less of an issue, you would need some rather exotic hardware to not to be supported by either architecture.
As example: my workstation is an i7 2.3Ghz CPU with 8GiB RAM, but got by accident an 32bit installation of Ubuntu 11.10. And it runs fairly well - with the 8GiB used at max.


text:
Q: Facebook publishActivity: No error, but no activity published implementing publishActivity in PHP using the REST API using this code:
$activity = array(
    'message' => '{*actor*} did something.',
    'action_link' => array(
        'text' => 'Play Travians',
        'href' => WEBROOT
    )
);
$activity = $facebook->api_client->dashboard_publishActivity($activity);

I get a 15-digit number returned and no errors, however no activity appears in the logged in account or friends of this account.
Help appreciated.
Carlo

A: I think you're looking for a Feed post.


text:
Q: Linq to Entities: does not recognize the method I am trying to use Levenshtein Distance Linq select query (as shown below) it throws an exception.
IEnumerable<Host> closeNeighbours = (from h in _dbContext.People
                                         let lD = Utilities.LevenshteinDistance(lastName, h.LastName)
                                         let length = Math.Max(h.LastName.Length, LastName.Length)
                                         let score = 1.0 - (double)lD / length
                                         where score > fuzziness

                                         select h);

public static int LevenshteinDistance(string src, string dest)
{
    int[,] d = new int[src.Length + 1, dest.Length + 1];
    int i, j, cost;
    char[] str1 = src.ToCharArray();
    char[] str2 = dest.ToCharArray();

    for (i = 0; i <= str1.Length; i++)
    {
        d[i, 0] = i;
    }
    for (j = 0; j <= str2.Length; j++)
    {
        d[0, j] = j;
    }
    for (i = 1; i <= str1.Length; i++)
    {
        for (j = 1; j <= str2.Length; j++)
        {

            if (str1[i - 1] == str2[j - 1])
                cost = 0;
            else
                cost = 1;

            d[i, j] =
                Math.Min(
                    d[i - 1, j] + 1,              // Deletion
                    Math.Min(
                        d[i, j - 1] + 1,          // Insertion
                        d[i - 1, j - 1] + cost)); // Substitution

            if ((i > 1) && (j > 1) && (str1[i - 1] ==
                str2[j - 2]) && (str1[i - 2] == str2[j - 1]))
            {
                d[i, j] = Math.Min(d[i, j], d[i - 2, j - 2] + cost);
            }
        }
    }

    return d[str1.Length, str2.Length];
}

It does not seem to work. Any alternative?
Exception:
System.NotSupportedException was unhandled by user code
  Message=LINQ to Entities does not recognize the method 'Int32 LevenshteinDistance(System.String, System.String)' method, and this method cannot be translated into a store expression.
  Source=System.Data.Entity

A: You cannot use that function in a entity framework query, as EF will not be able to translate it to the appropriate TSQL. You'll have to bring the source sequence into memory, allowing whatever filters are applicable at the database, and then perform the rest in linq-to-objects. It's only a subtle change.
var closeNeighbors = from h in db.People.AsEnumerable() // bring into memory
                     // query continued below as linq-to-objects
                     let lD = Utilities.LevenshteinDistance(lastName, h.LastName)
                     let length = Math.Max(h.LastName.Length, LastName.Length)
                     let score = 1.0 - (double)lD / length
                     where score > fuzziness
                     select h;

Everything prior to AsEnumerable() will happen at the database. If there are filters generally applicable to People, you can use those prior to the AsEnumerable() invocation. Example
var mixedQuery = db.People
                     .Where(dbPredicate).OrderBy(dbOrderSelector) // at the database
                     .AsEnumerable() // pulled into memory
                     .Where(memoryPredicate).OrderBy(memoryOrderSelector);


text:
Q: Javascript only working for certain LI within UL I have implemented some javascript within my site but it only seems to work when you click on certain li's and not on others [Specialities, Contact Us & Referral Schemes not working as they should]
http://global-markets-recruitment.com/test/

<body <?php body_class(); ?>>

                Global Markets Recruitment

                        GMR

                                Global Markets Recruitment is an expert in financial recruitment.

Through leveraging our extensive networks and combining this with the latest recruitment practices, credibility and professionalism we find our strategic clients the most capable and intelligent candidates throughout Europe, the United States, Asia and the Middle East.

                        About Us

                            About Global Markets Recruitment

                                    Our philosophy is simple, we stick to our strengths. We understand where and how we can make a difference. We ensure that before engaging with your organisation and the assignment we appreciate how this relates to both the long and short term value of your business and our role in achieving this.
The approach is not just professional, but personal. We employ both empathy and understanding into the recruitment process. This can only be done by gaining a thorough understanding through face-face meetings with both clients and candidates, allowing us to appreciate their unique aspirations and exacting criteria.

                            Clients

                                    When working with a company, we employ a very rigorous approach. Our selection process consists of screening a pool of qualified candidates. We identify applicants from various sources based on systematic research and the Global Markets Recruitment database, through which we would entirely map the market of potential candidates in various institutions across the globe. We would also utilise our extensive professional networks and relationships, complemented with our vast experience in the recruitment space. This approach saves you a great deal of time by restricting the number of candidates you consider.
When approaching a potential candidate they are approached in the most discrete, confidential and at the same time compelling way, also taking into account their plausible concerns in relation to the career opportunity at hand.

                            Candidates

In turn we offer candidates that work with us intellectually challenging and financially rewarding positions with the most dynamic, and ambitious organisations throughout Europe, the United States, Asia and the Middle East.

                        Approach

                                    During the identification phase we would have first introductory telephone interviews.

During the selection phase we shall conduct personal and detailed interviews with motivated and rigorously qualified candidates.

This would ultimately result in the shortlist of applicants who on the basis of the defined job specification qualify for the position. They should meet the profile requirements to a large extent and should, in meetings with you, make the impression of being outstanding candidates, willing to accept the role on offer. Candidates will be presented by means of standardised curriculum vitae, detailed confidential report including all base salary, bonus and benefits.

Finally, we would assist at the offer stage and with the integration of the successful candidate into the client.

                        Expertise

                            Content coming soon

                        Specialities

                            Content coming soon...

                        Contact Us

                            Content coming soon...

                        Referral

                            Content coming soon...

Home

About Us

Approach

Expertise

Specialities

Contact Us

Referral Scheme

I have edited scripts.js but that still doesn't seem to fix the problem

A: Your scripts.js file has these functions that get called when a user clicks on a link in the nav, but they all contain scrollTo($('#context') instead of the id of the content you would like to show. Looks like they were copied and pasted from the gotoContext() function and not changed. Keep in mind the H1 tag text is not updated here as well.
function gotoSpecialities() {
    $scrollerWindow.stop().scrollTo($('#context'), $speed, { axis: 'x', offset: { left: 0, top: 0} });
    $('h1').stop().animate({ backgroundPosition: '(-2940px 0px)' }, $speed);
    $('#pointer').stop().animate({ backgroundPosition: '(643px 0px)' }, $speed);
    $('h1').text('About Charlie');
    //_gaq.push(['_trackEvent', 'Nav', 'About']);
    return false;
}

function gotoContactUs() {
    $scrollerWindow.stop().scrollTo($('#context'), $speed, { axis: 'x', offset: { left: 0, top: 0} });
    $('h1').stop().animate({ backgroundPosition: '(-3920px 0px)' }, $speed);
    $('#pointer').stop().animate({ backgroundPosition: '(867px 0px)' }, $speed);
    $('h1').text('About Charlie');
    //_gaq.push(['_trackEvent', 'Nav', 'About']);
    return false;
}

function gotoReferral() {
    $scrollerWindow.stop().scrollTo($('#context'), $speed, { axis: 'x', offset: { left: 0, top: 0} });
    $('h1').stop().animate({ backgroundPosition: '(-4900px 0px)' }, $speed);
    $('#pointer').stop().animate({ backgroundPosition: '(1091px 0px)' }, $speed);
    $('h1').text('About Charlie');
    //_gaq.push(['_trackEvent', 'Nav', 'About']);
    return false;
}

A: Tim is right, but in addition to that, the three functions are never actually called.
In scripts.js, you set up the links to call gotoSpecialities, gotoContactUs and gotoReferral on click. But there are two functions with each of those names in the same scope - meaning the one defined last will replace the earlier one. I.e., for gotoReferral, this will be called:
function gotoReferral() {
    $('#pointer').stop().animate({ backgroundPosition: '(1091px 0px)' }, $speed);
    return false;
}

... rather than this:
function gotoReferral() {
    $scrollerWindow.stop().scrollTo($('#context'), $speed, { axis: 'x', offset: { left: 0, top: 0} });
    $('h1').stop().animate({ backgroundPosition: '(-4900px 0px)' }, $speed);
    $('#pointer').stop().animate({ backgroundPosition: '(1091px 0px)' }, $speed);
    $('h1').text('About Charlie');
    //_gaq.push(['_trackEvent', 'Nav', 'About']);
    return false;
}