text:
Q: Como lo puedo hacer Quiero crear dos arreglos que guarden nombre y calificación Y que tenga un menú ya lo hice pero nose como implementar los dos arreglos mencionados sin usar JOptionPane solo con scanner

public class MenuOperaciones {
// atributo arr de tipo Arreglo
Arreglo arr = new Arreglo();

/**
 * Despliega las opciones del menú: listar, agregar, sacar, buscar y salir
 * @return la opcion del menu [1, 5]
 */
public int despliegaMenu()
{
    int opcion = 0;
    System.out.println("");
    System.out.println("Menu para la gestion del arreglo.");
    System.out.println("----------------------------------------");
    System.out.println("1. Listar elementos");
    System.out.println("2. Agregar elemento");
    System.out.println("3. Sacar elemento");
    System.out.println("4. Buscar elemento");
    System.out.println("5. Salir");
    System.out.println("----------------------------------------");
    do
    {
        opcion = leerNumeroPositivo("Escribe tu opción: ");
    } while ( !((opcion>=1) && (opcion<=5)) );
    return opcion;
}

/**
 * Metodo que despliega el menu de opciones y procesa la opcion capturada desde teclado.
 */
public void procesaOpciones()
{
    int opcion = 0;
    int valor = 0, posicion =0;
    do
    {
        opcion = despliegaMenu();
        switch(opcion)
        {
            case 1:
                arr.listarElementos();
                break;
            case 2:
                valor = leerNumeroPositivo("Escribe tu valor para agregar al arreglo.");
                arr.push(valor);
                break;
            case 3:
                valor = arr.pop();
                if (valor >=0)
                {
                    leerNumeroPositivo("El valor sacado del arreglo es: " + valor);
                }
                else
                {
                    System.out.println("No se pudo sacar elemento del arreglo");
                }
                break;
            case 4:
                valor = leerNumeroPositivo("Escribe el valor a buscar en el arreglo.");
                posicion = arr.buscar(valor);
                if (posicion >=0)
                {
                    leerNumeroPositivo("El valor buscado en el arreglo arreglo se encuentra en la posición: " + posicion);
                }
                else
                {
                    System.out.println("No se encontró el elemento dentro del arreglo");
                }
                break;
            default:
               System.out.println("Opción no reconocida.");
        }
    } while (opcion != 5);
    System.out.println("Adios...");
}

/**
 * Método que solicita al usuario un valor desde teclado, utiliza excepciones para validar el valor capturado
 * @param texto mensaje de texto que será desplegado en la solicitud del valor.
 * @return el valor numérico entero positivo capturado desde teclado
 */
public int leerNumeroPositivo(String texto)
{
    Scanner teclado =  new Scanner(System.in);
    int valor = 0;

    do
    {
        System.out.println(texto);
        try
        {
            valor = teclado.nextInt();
            if (valor<=0)
            {
                throw new Exception("No se permiten valores negativos");

            }
        }
        catch (Exception e)
        {
            System.out.println("Error en la captura de datos");
            valor = 0;
            //limpia el buffer
            teclado.nextLine();
        }

    }while (valor <=0);

    return valor;
}

//atributos: vector (arreglo), n: total de elementos del arreglo, ap: apuntador
int[] vector = new int[5];
int n;
int ap;

/**
 * Contructor que inicializa los atributos del arreglo: n y ap
 */
Arreglo ()
{
    n = 5;
    ap = 0;
}

/**
 *  Método que introduce un valor en el arreglo en la posición indicada por el apuntador
 * @param valor a introducir
 */
public void push(int valor)
{
    if (ap>=n)
    {
        System.out.println("Arreglo lleno, no se pudo ingresar el valor: " + valor);
    }
    else
    {
        vector[ap] = valor;
        ap++;
    }
}

/**
 * Método que saca un elemento del arreglo y actualiza el valor del apuntador
 * @return valor obtenido del arreglo
 */
public int pop()
{
    int valor=-1;
    if (ap>0)
    {
        ap--;
        valor = vector[ap];
    }
    else
    {
        System.out.println("Arreglo vacio");
    }
    return valor;
}

/**
 * Método que enlista los elementos del arreglo
 */
public void listarElementos()
{
    int i=0;

    System.out.println("Listar elementos del arreglo.");

    if (ap>0)
    {
        for (i=0; i<ap; i++)
        {
            System.out.println("Elemento ("+i+"): " + vector);
        }
    }
    else
    {
        System.out.println("Arreglo vacio.");
    }
}

/**
 * Método que busca un elemento y devuelve el índice de
 * la primera aparición del elemento a buscar, en caso de no encontrarlo devuelve el valor -1.
 * @param valor el dato a buscar dentro del arreglo
 * @return la posición del valor a buscar, o en caso de no encontrarlo -1
 */
public int buscar(int valor)
{
    int indice = -1;
    for (int i=0; i<ap; i++)
        {
            if (vector == valor)
            {
                indice = i;
                break;
            }
        }
    return indice;
}

}
}

public class ArreglosMenu {
public static void main(String[] args) {
    MenuOperaciones mnu = new MenuOperaciones();

    mnu.procesaOpciones();
}

}


text:
Q: Using a logger with vhosts with a node webapp I have some low traffic sites and I'm trying to set up an easy way to convert standalone node apps into something that can be require()d by a main app that uses vhost to serve many domains on a single machine. This is useful because if I don't have to hack it too bad, I can easily go back to split these apps back out into dedicated deployments.
What I'm noticing is that when I have two apps that both use morgan to do logging, only the second vhost app that is registered produces logger output.
I think I know what's going on but it doesn't hurt to get this clarified.
Since both of the vhosted apps add the logger as a middleware, my guess is that the first app binds it to stdout and so does the second app, so now it's not really clear what happens to the first one, but what is certain is that there's no real mechanism in place for dealing with the situation.
I would expect a way around this would be to just take out the logging from the individual apps and put a single logger in front of the vhost entries (which effectively has turned my full apps into middlewares), that way I can still see all the hits on my server.
However, this would preclude me from being able to do things like not log any requests handled by the static middleware in a particular one of these apps.

A: I'm not sure if this is going to work, but sometimes making a shared file that is using one morgan instance can be the fix:
// logger.js
var morgan = require('morgan')

exports = morgan

And require this instead of the morgan by:
var morgan = require('./lib/logger')

Hope this works for you.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Modify existing inline code for asp.net in a gridview I have an item template inside a gridview which is an a:href and whose value depends on a bound field inside the same grid view. So, if the value of the bound field(testType) is 1, there will be one link and if it is 2, it will display another link. Here is the code:
         <ItemTemplate>
             <%#
                 Int32.Parse(DataBinder.Eval(Container.DataItem, "testType").ToString()) == 1 ?
                "Change to Performance Test" :

                "Change to Unit Test"
             %>

            </ItemTemplate>

Now the requirement has changed and I have to add a third condition to check if the testType is 0, so I can't use the ternary operator. I'm not very familiar with the asp inline code syntax and wondering how to use may be if-else block and still access the field using Container.DataItem, can someone help me please please please!!!

A: Since the markup for each is very similar, I'd use a simple lookup object:

<ItemTemplate>
    <a target="_self"
        href="TestRequestOverview.aspx?testCaseId=<%# DataBinder.Eval(Container.DataItem, "testType") %>&mode=toggle"
        class="myToggle">
        <%# TypeNames[Int32.Parse(DataBinder.Eval(Container.DataItem, "testType").ToString())] %>

</ItemTemplate>


text:
Q: R.layout.main cannot be resolved Using Eclipse on win XP. I've previously created an app or 2, but am now working on the 'real' version and get the above error.
I was having funnies creating a 1.5 version, so have started a new project for 2.1.
package xxx.guest;

import android.R;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

public class briefme extends Activity {

 private String strURL;
           ........
           ........

 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main );

Project as below (note I've removed some names for confidentiality reasons!)
Any ideas what's gone wrong?
Thanks,
Martin.
Project screenshot here

A: I would try refreshing. If that doesn't work, close and open the project.
If those two fail, delete and re-create R (it should auto-generate -- copy it just to be on the safe side).
I've had this happen to me a few times and those are the three things I usually do to fix the error.
Also try changing your import:
import android.R;

to:
import your.package.R;

A: In my case this happened because their was a layout resource with upper case letters in the file name. Resources weren't compiled because of the error and because of that the R class was missing.

A: As suggested above, simply changing the import "import android.R;" to one relative to your app e.g. "import your.package.name.R;" should do the trick here.

A: You can also check if adb program in /platform-tools folder has permissions to run in your system. If not, the R.java for your project won't be generated.

A: My two cents.
In my case, i had used another variable with the same name R which resulted in compilation error. Eclipse could get better in terms of guiding the users with the exact error message.

A: Possible duplicate of R cannot be resolved - Android error.
In that thread we have an excellent answer.
Referring to http://source.android.com/source/using-eclipse.html we get the following snippet:

Note: Eclipse sometimes likes to add an "import android.R" statement at the top of your files that use resources, especially when you ask Eclipse to sort or otherwise manage imports. This will cause your make to break. Look out for these erroneous import statements and delete them.

So the answer is to delete rather than rename your import android.R;
The reason for this is that your.package.R is visible since you share package.
The import android.R; masks this, so it is cleaner to delete this rather than changing it to something redundant.

A: If you have 64 bit Linux platform without ia32 libraries, then this problem could also occur. It took me quite some time to pin this one down, seeing that the problem is not clearly linked with the inability to execute 32 bit code.

A: In my case (seeing other tutorials) you have to change:
setContentView(R.layout.main );

To:
setContentView(R.layout.activity_main);


text:
Q: Handling a large amount of images in android I am loading about 200 images from a MySQL database into my android application.
When I try to store them all in Bitmaps and ArrayLists of Bitmaps, I soon get an out of memory exception.
I would like to know what the best way of storing these images is. I could save them all on the sd-card and only save the path to them in my app.
But I also need to always show these images in the pages of a ViewPager (about 8 images are displayed per page). If I fill the ViewPager with images from the ressources, Android and the ViewPager manages the memory-issues itself (it removes non-displayed images from the RAM when it runs out of memory and loads them back, when you scroll back to them)
How can I manage storing so many images without running out of memory?

A: With the limited memory available you will not be able to have a direct reference to each of the images, otherwise like you say you will run out of memory. These images will take up space in memory as long as there is a reference to your BitMap objects. To free up this memory you need to dereference these BitMaps and or clear the ArrayList, this will allow the Garbage Collector to free up the unused memory. Ideally you only want a reference only to the images you can see, or the ones you will see next.
You could just look up the 8 images for every page view, or perhaps the the images in the surrounding page views. If the images you are display are much larger than the size they take up then you may want to resize these images on the fly and only store them as the size they appear, this should also help reduce the memory footprint of your images.

A: The Android developers have written a series of tutorials on just this topic:
http://developer.android.com/training/displaying-bitmaps/index.html


text:
Q: Parallell make with multiple yacc parsers I have a project that contains multiple parsers generated using yacc. There are rules for each parser that looks something like:
xgram.c xgram.h : xgram.y
    yacc xgram.y
    mv y.tab.c xgram.c
    mv y.tab.h xgram.h

If I run this with make it works fine since each parser will be generated in sequence.
However, if I run it with make -j 10 there is an obviously a conflict about the y.tab.c file since the commands for each grammar will generate its own y.tab.h in parallel.
How can I avoid this? The only thing that I have found and tried is to use TMPDIR on each yacc command line to make it create the output files in different directories, which did not work.
Any other ideas?

A: Call bison by its name (bison), don't use the -y flag, and use the -o command-line flag:
xgram.c xgram.h : xgram.y
    bison -o xgram.c -d xgram.y

A: I'm sure that you mis-typed the mv commands in your recipe.
If you have bison, see the other answer.
If your version of yacc is POSIX-compliant it should support the -b option, in which case you can use:
xgram.c xgram.h : xgram.y
        yacc -b xgram -d xgram.y
        mv xgram.tab.c xgram.c
        mv xgram.tab.h xgram.h

If you're not using a POSIX yacc you can do a hack like this:
xgram.c xgram.h : xgram.y
        mkdir -p tmp_xgram
        (cd tmp_xgram && yacc -d ../xgram.y && mv y.tab.c ../xgram.c && mv y.tab.h ../xgram.h)
        rm -rf tmp_xgram

I think that will work.  If it still complains you may have to actually copy ../xgram.y to the temp directory first...
If you have GNU make 4.3 you can use xgram.c xgram.h &: xgram.y to get a more correct rule, rather than :


text:
Q: How to find and fix source of android build failure ':transformClassesWithMultidexlistForRelease' in Unity project This game has been out for several years, and has accumulated lots of old dependencies, like old versions of Swrve, IronSource, Crashlytics (using Fabric), Facebook, and others. I'm in the process of updating them, which caused all sorts of conflicts and build failures.
I am stuck on this latest build failure:
Execution failed for task ':transformClassesWithMultidexlistForRelease'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

This is not very specific, but I did look into ensuring that multidex is enabled for the project (it is, and if I turn it off I get a different error that is clear about exceeding the number of methods for a single DEX).
I exported a gradle project and attempted to build from the command line, using the --debug option for more details. Note, I couldn't use system gradle (v6.6) because the version of the project that Unity generates uses deprecated features (v5.1.1). Instead, I made an alias to the internal gradle command Unity uses. I extracted the part that fails here.
01:38:01.777 [INFO] [com.android.build.gradle.internal.transforms.D8MainDexListTransform] Generating the main dex list using D8.
01:38:01.778 [INFO] [com.android.build.gradle.internal.transforms.D8MainDexListTransform] Program files:

 /Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/unity-android-resources/build/intermediates/intermediate-jars/release/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/f1a15ce9a3a238f913b1713c5b7eef8e/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/androidx.arch.core/core-common/2.0.0/bb21b9a11761451b51624ac428d1f1bb5deeac38/core-common-2.0.0.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/eafba0cd0d7e84442d378b6269357dc1/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/IronSource/libs/hyprmxadapter.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/6673f931a57b5dd7ba35e730131945d3/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/f723d303fde323253ef3670a7230198e/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/5315d1a553466e092ce2c4adb36c70ed/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/4da13394b8dfee0f81ebf3ba0d5cf1e1/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/3b6be90f862d2551f8ea28852889473f/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/93d642daf13ca919edc2114bcf171b98/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.1.0/e3a6fb2f40e3a3842e6b7472628ba4ce416ea4c8/annotation-1.1.0.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/b3224239e209e5cae589d6955f71e794/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/8012f241b1a94c937ae18da3cafcaccc/jetified-gson-2.8.5.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/061305bdad448d4ef850486898ce319e/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/a38b28179d7ba502e2bc5420005e1c81/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/d7033b64e7b421d923c873c8e1204c36/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/ee22c2bc5bb5d17778d30fd2f0d75f25/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/libs/AppsFlyerAndroidPlugin.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/28a19cfa10dc0aa1eb2571ec47520027/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/06c285be385b1e39ea6786bcb5fc9220/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/09ccabea0402ffea9ca87f157a761f6e/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/GooglePlayGamesManifest.plugin/build/intermediates/intermediate-jars/release/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/78542fe719422e18a588a7947da0926f/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/dd2c404be1e461c8a1f58455b6604c5d/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/com.parse.bolts/bolts-android/1.4.0/cc174c559b5177982887bf6e1b76003aebad9516/bolts-android-1.4.0.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/549f8a7eb2e15c3019a92607210809fa/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/073d4008289eb1e150f9b3f369e185b4/jetified-DisruptorBeamAndroid.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/libs/kotlin-stdlib-1.2.31.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/75cf5c04b9976659a3ef67ac8d77f145/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/Firebase/build/intermediates/intermediate-jars/release/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/3dc95681308d227c6e5bc752ff93fc3c/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/libs/uniClipboard.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/c3d32deac353d5f1fb471db3a02a1131/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/1fbd554b105b4246e31c79a86b00cc7e/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/e49f42c281104d5fb717dc445b75f1cd/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/1b32181da5afc525e5857e71b55891d1/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/f7f3a0f5bd79255fd4e62549d5bc98eb/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/bc4cfca8c8e09c91af448d0011106a82/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/e5784d07c4ad4a243e10bc62559afb45/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/c83bed95635284252e516d2c7a1b9d61/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/6dfc4b939a9d42374c14cf762b2b43e4/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/d6108d0a33d4cda276a38c5166a26dad/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/306398bc2747158d3587dcc5ddf49477/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/SwrveSDKPushSupport/build/intermediates/intermediate-jars/release/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/d0230fe767ceb118a398ca2c730bf7dd/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/3e9b0c3d5fe551f4ea2a4867ce977cf9/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/libs/unity-classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/a7f0290a194fcc555ea898d4bde46740/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/ffd42a1f3b628f23f04a3a39ad335022/jetified-core-3.3.3.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/cf254de769b28738e6c63506e5f82686/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/743a6a717d00e80cc4b0f8b3839a1ee9/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/a31d30846755b3ff6b2f03ee7b410983/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common/2.0.0/e070ffae07452331bc5684734fce6831d531785c/lifecycle-common-2.0.0.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/c30fdf68f92f178ea72e5d137f390b3e/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/fd760d17092eba5c486ea913af538348/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/com.google.auto.value/auto-value-annotations/1.6.5/c3dad10377f0e2242c9a4b88e9704eaf79103679/auto-value-annotations-1.6.5.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/a09c4480412e6a783b1406029f226252/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/8164bfc19e26dce5a908f4991a94ebee/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/543e95802eac363b870360d81de86f4d/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/b6463a160d15f09ed3851863047a8161/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/f941645e1371e163af9938b0062d97c8/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/260bf0740efdb40a73127a21798d1a14/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/IronSource/libs/unityadsadapter.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/IronSource/libs/facebookadapter.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/b45ee707e73a1949fa6a8da3f0cf70a4/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/4f41f9c5806083b563657fe85a4c830d/jetified-mediationsdk-6.13.0.1.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/37bc5e9ec46b9d6acaaf24702cb20df8/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/libs/org.jetbrains-annotations-16.0.1.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/c890ca71b9051456c04468dd219ff709/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/cb85d5c065c74e76671452c3f22f0cb2/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/6464e0de38ec16d025e0e7fff6e76550/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/99db557dece88ec352cb8ca138e6ed64/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/18c95ca1410323e2c5cd8cde1f196e93/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/faf7d3eaee1a578117434594c3eba86b/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/5081230f297cc37d85e34361bf683f2f/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/f5c020bf9567cf89dca167ff6265b80b/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/462a9cc6c8925e43a1226282105223aa/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/b57b2745c98102f954f6c0cd463f47a1/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/2790e9d931fe828f07667e1b0bc06ce1/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/IronSource/libs/admobadapter.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/IronSource/build/intermediates/intermediate-jars/release/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/SwrveSDKPushSupport/bin/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/34cbd0f86be48cda79884cdf97c39407/jetified-bolts-applinks-1.4.0.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/bdec4ab3f67bc66d2c21e2eb0a1a8c1d/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/com.parse.bolts/bolts-tasks/1.4.0/d85884acf6810a3bbbecb587f239005cbc846dc4/bolts-tasks-1.4.0.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/944e4b57ebabd144a5ce0dcea946bcc9/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/81959a3524ea9f279a63736759266114/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/d6264f0987e8e73b1738aa706b140338/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/32ac2f02a6857aa8c5aebf11d897e8c3/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/53396bac2c9f428b56a001c9490a05ed/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/IronSource/libs/android-bridge.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/39a26e542fff640961e0b813c7d42d1d/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/be965c0032f6bef33b826291dbbfdb5b/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/androidx.collection/collection/1.0.0/42858b26cafdaa69b6149f45dfc2894007bc2c7a/collection-1.0.0.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/f845891ce8b4288176a267ff8a08245d/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/com.google.dagger/dagger/2.27/7bee2792b10523e298a7de508635c6eed0c309be/dagger-2.27.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/607ef9c8e817a0307715c3b318067023/jetified-applovinadapter.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/IronSource/libs/adcolonyadapter.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/ec1f3eb9bae4e8df758580a267cdd167/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/libs/com.google.auto.value-auto-value-annotations-1.6.5.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/9d61fe2e60187d2e21fe7ff3edf8bd1d/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/29ef74aa71c0a4fe0ebd973f9c0fb428/jetified-okhttp-3.12.1.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/03a59754e24d260fc305c269c0a69c6d/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/f0e31f146365f5b25fb61cde670b0ed7/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/7b21b4096c47184bdfa164dc8d0ea009/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/bcad103e788ee6b97bf6b052ff358250/jetified-unibillandroid.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/123f8fbe9fbe6ee8cfbc30f9079ac8c0/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/692e68acbb964a6dc022a2eadc9a8f1c/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/c691abf570948f1954570fc7c4dcb272/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/3c2ec62dd8b34d91e1c732f54a7db2a3/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/SwrveSDKUnityBridge/bin/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/b40c7cdba61144dc341675e388f49dc5/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/025ccf4a3abbbcdc5823131f74407c0c/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/6ac1c6e2bc1447551e91d252d85e1baa/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/3e466b7af40b8c861d32d9eb25189058/jetified-okio-1.15.0.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/libs/in-app-purchasing-1.0.3.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/15c5ef78ac2873e0e55b2095be4d970e/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/7108fe7b41612e1952647bc170370efc/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/6081032f7ca98cafd13a9d83e65b8a6c/jars/classes.jar
/Users/turkeybash/Perforce/uname_dependencies/client/Builds/Game/android/Mimetime_gradle2.apk/Star Horse/SwrveSDKUnityBridge/build/intermediates/intermediate-jars/release/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/7aae005f11858b3b3782580528514877/jars/classes.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/e6545e5d81dfd31acd8b7dd2ae0902e7/jetified-AF-Android-SDK.jar
/Users/turkeybash/.gradle/caches/transforms-2/files-2.1/77c4e1f59d89a4925593cf5475857ae2/jars/classes.jar
/Users/turkeybash/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar

01:38:01.778 [INFO] [com.android.build.gradle.internal.transforms.D8MainDexListTransform] Library files: /Users/turkeybash/Library/Android/sdk/platforms/android-28/android.jar
/Users/turkeybash/Library/Android/sdk/platforms/android-28/optional/org.apache.http.legacy.jar
/Users/turkeybash/Library/Android/sdk/platforms/android-28/optional/android.test.mock.jar
/Users/turkeybash/Library/Android/sdk/platforms/android-28/optional/android.test.base.jar
/Users/turkeybash/Library/Android/sdk/platforms/android-28/optional/android.test.runner.jar

Using gradle's --stacktrace option yielded the following.
com.android.builder.multidex.D8MainDexList$MainDexListException:
com.android.tools.r8.errors.CompilationError:
Program type already present: com.google.auto.value.extension.memoized.Memoized
        at com.android.builder.multidex.D8MainDexList.generate(D8MainDexList.java:87)

So resolving it seems to be a matter of finding out which dependencies are using this program. I'm not sure what I'd do at that point, since these are all precompiled external libraries. I also have no idea how to find which particular dependencies have it.

A: I ended up solving this by writing a utility that traverses the contents of the .apk directory, finding .jar and .aar files, and unzipping them into subdirectories. This could be done manually, without a script, as well. You see references to these files in the log lines containing Mimetime_gradle2.apk/Star Horse/ in this project.
After unzipping all of these, it was simply a matter of searching the parent directory recursively for references to the library called out in the output of the gradle command using --stacktrace. In this case it was com.google.auto.value.extension.memoized.Memoized
Then it was simply a matter of removing one of the libraries that contained it from the Unity project. In this case it was an outdated copy of another library which was included with ExternalDependencyManager.
The difficulty is that you need to export a gradle project from the Unity build menu, rather than build the APK directly. Then you need to copy the command for the specific version of gradle that your specific version of Unity uses, and run it with the --stacktrace option in order to get the output you need to identify the duplicate package. THEN you can unzip the resultant build directory (which takes the place of the APK file) and search it for the offending package.

A: Try this:
Go to Player Settings --> Publishing Settings
and enable Minify Proguard for Debug and Release


text:
Q: How to get the Joins right in a SQL query I have two tables, as follows:
People:
First_Name Last_Name
  Bill       Smith
  David      Williams
  Fred       Jones
  Freda      Jones
  Jane       Smith
  John       Smith
  Peter      Williams
  Sally      Williams

Pets:
Species Title  Owner
  Dog    Fido   Jones
  Cat    Tibs   Jones
  Dog    Jock   Williams

I know it's a weird database design, but please don't tell me to redesign the database. It's an example that represents the real problem, which is more complicated and can't be redesigned.
I am trying to formulate a query that will return exactly one row for each person, and a column containing the title of their Cat or null if they do not own a cat (I used Title because Name is a reserved word and Access complained).
The nearest I have come up with is:
SELECT People.*, Pets.Title
FROM People
LEFT JOIN Pets ON People.Last_Name = Pets.Owner
WHERE Pets.Species IS NULL OR Pets.Species = "Cat"

However this doesn't list any rows for the Williams family because they own a dog.
I have tagged this as MS Access because I am actually using Access 97 (don't ask!), but, other than Access's rather limited Join facilities, it should be a general SQL question.

A: EDIT: The left join syntax in Access causes trouble, which means that for access we need to involve a subquery. This will look something like (the untested);
SELECT People.*, Pets.Title
FROM People LEFT JOIN
  [SELECT Pets.* FROM Pets WHERE Pets.Species = 'Cat']. AS Pets
    ON People.Last_Name = Pets.Owner

-- Original answer --
What you seem to want is a regular left join with an additional condition that the pet needs to be a cat;
SELECT People.*, Pets.Title
FROM People LEFT JOIN Pets
  ON People.Last_Name = Pets.Owner AND Pets.Species = 'Cat'

The reason for not putting the cat condition in a WHERE clause is that a where clause eliminates all non matches, while putting it in the ON clause makes the result NULL if it can't find a match (just as you describe your desired result)

A:
this doesn't list any rows for the Williams family because they own a Dog

That's because of the WHERE clause:
WHERE Pets.Species IS NULL OR Pets.Species = "Cat"

If Pets.Species is "Dog" then this would evaluate to false, so those records are not shown.  First remove the clause entirely:
SELECT People.*, Pets.Title
FROM People
LEFT JOIN Pets ON People.Last_Name = Pets.Owner

Now you're getting the records you want, but not specifically the data you want.  The Title column is showing any value, and you only want it to show "Cat" or NULL.  You can adjust the JOIN to achieve that:
SELECT People.*, Pets.Title
FROM People
LEFT JOIN Pets ON People.Last_Name = Pets.Owner
              AND Pets.Species = 'Cat'

This will filter the joined table, but not the entire result set.

A: Try this
SELECT People.*, case when Pets.Species = 'Cat' then Pets.Title else null end as Title
 FROM People LEFT JOIN Pets ON People.Last_Name = Pets.Owner

A: For posterity - I finally got it:
SELECT People.*, Pets.Title FROM
People LEFT JOIN (SELECT * FROM Pets WHERE Species='Cat') AS PeopleWithCats
ON People.Last_Name=PeopleWithCats.Owner


text:
Q: Effect on CSS and fancybox add-on I will try to be brief, I made a design that when I passed the mouse through a box with an image, it was raised a bit using a css effect and I showed two buttons, one of them when I clicked open a video using the fancybox plugin 3.
When I close the video, the box remains with the effect pasted until I put the mouse back in the box, as shown in the image.
How can I make it so that once the video is closed, the image of the box returns to normal?
I make a copy of the code that I used in the style sheet and the fancybox code 3
javascript:
$(".imagen-evento").hover(function() {
    $(this).find(".imagen").toggleClass("imagenHover");
    $(this).find(".caption").toggleClass("captionHover");
});

$("[data-fancybox]").fancybox({
    buttons : [
        'close'
    ],
    afterClose : function(instance, current) {
        $(".imagen-evento").each(function(){
            $(this).find(".imagen").removeClass('imagenHover');
            $(this).find(".caption").removeClass('captionHover');
        });
    }
});

css:
.imagenHover {
    -webkit-transform: translateY(-47px);
    transform: translateY(-47px);
}
.captionHover {
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
}

html:

                    Más información
                    Ver video

17

nov

 Chill Out

 180 personas en lista

 Tiempo de lista:

With the option "afterClose" of fancybox 3 I try to remove the class that contains the effect in css but when I see the box, it does not have that class but the effect is still pasted as if it were active.
ok, better explain with an example ... in the following link click on the "watch video" button and when you close the video the image will be raised again and this should not happen.
https://jsfiddle.net/greermurray/9jt5Lzq3/1/


text:
Q: PHP - json_decode from url to variables i had this url
 https://poloniex.com/public?command=returnTicker

thats the json output of the first 2 (for example)
 {"BTC_BCN":{"id":7,"last":"0.00000018","lowestAsk":"0.00000018","highestBid":"0.00000017","percentChange":"0.00000000","baseVolume":"58.73610647","quoteVolume":"328275043.97652394","isFrozen":"0","high24hr":"0.00000019","low24hr":"0.00000017"},"BTC_BELA":{"id":8,"last":"0.00001191","lowestAsk":"0.00001191","highestBid":"0.00001174","percentChange":"0.13536701","baseVolume":"6.33896473","quoteVolume":"572949.02508918","isFrozen":"0","high24hr":"0.00001200","low24hr":"0.00001033"},

now i want to get all datas to varialbles. Like... $curreny = xxx; $last = xxx,..
i have tried it with that..
$url = "https://poloniex.com/public?command=returnTicker";
$response = file_get_contents($url);
$obj = json_decode($response,true);
$keys = array_keys((array)$obj);

foreach($keys as $result) {
$marketname = $result; }

that works for the first level .
then i get a list of all currencies. But.. how can i get all other data to the currency?
a second foreach? like..
 foreach($result[$marketname] as $result2) { }

doesn't make sense, i think!?
i would like to have it in that form
$currency = BTC_BCN;
$last = 0.00003223;
and so on..
Any idea?

A: You don't need to use array_keys.
You can use foreach to keep track of the key.
//$json = file_get_contents($url);
$json = '{"BTC_BCN":{"id":7,"last":"0.00000018","lowestAsk":"0.00000018","highestBid":"0.00000017","percentChange":"0.00000000","baseVolume":"58.73610647","quoteVolume":"328275043.97652394","isFrozen":"0","high24hr":"0.00000019","low24hr":"0.00000017"},"BTC_BELA":{"id":8,"last":"0.00001191","lowestAsk":"0.00001191","highestBid":"0.00001174","percentChange":"0.13536701","baseVolume":"6.33896473","quoteVolume":"572949.02508918","isFrozen":"0","high24hr":"0.00001200","low24hr":"0.00001033"}}';

$arr = json_decode($json, true);

Foreach($arr as $key => $val){
    Echo "in ".$key . " last is ". $val['last'] ."\n";
}

Output is:
in BTC_BCN last is 0.00000018
in BTC_BELA last is 0.00001191

https://3v4l.org/UpkOm

If you want to use the items from the array as variables you can extract the variables.
I do not use this method myself as the values are in the array anyways.
I add this method because your question kind of implies that it's what you want.
On each iteration the variables will be overwritten, that is why this method is not recommended.
If one of the items do not have "last" all other variables will be overwritten with new data on the iteration except "last".
That means you have both new and old data in your variables at the same time.
My advice is to use the array and not to extract the variables.

$json = '{"BTC_BCN":{"id":7,"last":"0.00000018","lowestAsk":"0.00000018","highestBid":"0.00000017","percentChange":"0.00000000","baseVolume":"58.73610647","quoteVolume":"328275043.97652394","isFrozen":"0","high24hr":"0.00000019","low24hr":"0.00000017"},"BTC_BELA":{"id":8,"last":"0.00001191","lowestAsk":"0.00001191","highestBid":"0.00001174","percentChange":"0.13536701","baseVolume":"6.33896473","quoteVolume":"572949.02508918","isFrozen":"0","high24hr":"0.00001200","low24hr":"0.00001033"}}';

$arr = json_decode($json, true);

Foreach($arr as $key => $val){
    Extract($val);
    Echo $key ."\n";
    Echo $last ."\n";
    Echo $baseVolume ."\n\n";
}

https://3v4l.org/aZv1s

A: <?php
$url = "https://poloniex.com/public?command=returnTicker";
$response = file_get_contents($url);
$obj = json_decode($response,true);
$keys = array_keys((array)$obj);
for($i=0;$i<count($keys);$i++)
{
    echo 'Currency '.$keys[$i].', last '.$obj[$keys[$i]]['last'].'
';
}
?>

You already done all job of getting the information, just needed to use it :D
Use print_r($variable) to see what you have in an array and what indexes it has.


text:
Q: how to restore a subsite after being deleted via powershell I deleted a subsite by mistake using PowerShell but now I can't find it in Recycle Bin of the site collection. I used Get-DeletedSite, but I don't see the subsite there.
Anyone has got any idea how to restore this subsite?

A: If the site is not available in 1st and 2nd stage recycle bin then that means it is gone completely.
Now the only option is to restore it from Backup. If you have backup of your site collection then restore just before you deleted the subsite.

*

*If you have content DB backup then restore it and using the Unattached Content Database recovery and export the desired site collection. After that import in to your site collection.

*If you have site collection backup then restore it to test/qa farm, from their export the subsite and import into your production site collection.


text:
Q: How to set up route with parameter when calling pagination controls helper? I am trying to add pagination controls on news page and on news page with specified category.
I have two different routes and actions for simple news feed and news feed with specified news (news and news/category). I want to add pagination controls to the pages. I found, that I need to do this (in simple news feed case it works):
<?=$this->paginationControl(
    $this->news,
    'Sliding',
    'pagination_control',
    array('route' => 'news/pagination')
)?>

If I have news feed with specified category I need to change 4th parameter.
How I call paginationControls helper?:
<?=$this->paginationControl(
    $this->news,
    'Sliding',
    'pagination_control',
    array('route' => 'news/category/pagination', array('category' => $this->category->getUrl()))
)?>

I am stuck here. I am getting this error:

Missing parameter "category"

Firstly, I think, that it is not possible to use forth parameter of paginationControl, but I found this post and in answer to this post I found Chris suggested same approach as I use.
Also, I think this can be caused by this: I am specifying route news/category/pagination and send parameter to it, but I have to send this parameter to news/category, not news/category/pagination (this route doesn't even pass this parameter). Looks like this causing problem.
Anyway, even if I am not mistaken in assumption what caused the error, I don't know how to solve it. Thats the question.
Update
news/category/pagination route config:
'news' => array(
    'type' => 'Segment',
    'options' => array(
        'route' => '/news',
        'defaults' => array(
            'controller' => 'News\Controller\Item',
            'action'     => 'index',
        ),
    ),
    'may_terminate' => true,
    'child_routes' => array(
        // other news child routes,
        'category' => array(
            'type' => 'Segment',
            'options' => array(
                'route' => '/:category',
                'constraints' => array(
                    'category'     => '[a-z]+',
                ),
                'defaults' => array(
                    'controller' => 'News\Controller\Item',
                    'action'     => 'category',
                )
            ),
            'may_terminate' => true,
            'child_routes' => array(
                'pagination' => array(
                    'type' => 'Segment',
                    'options' => array(
                        'route' => '/page-:page',
                        'constraints' => array(
                            'page'     => '[1-9][0-9]*',
                        ),
                        'defaults' => array(
                            'page'      => 1,
                        )
                    ),
                    'may_terminate' => true,
                ),
            ),
        ),
    ),
),


text:
Q: What does this symbol mean for this given circuit?
I have circled the symbol in question (red). It looks like a variable resistor, but the rest of the circuit is attached to the tail of the arrow. I feel as though this circuit is trying to describe a voltage divider. Is this true?

A:
It looks like a variable resistor, ...

Agreed. The convention is that when the wiper arrow lies across the resistor that it is a preset potentiometer or"trim-pot" used to adjust or calibrate the equipment. These usually feature a screwdriver adjustment rather than a knob. (The regular potentiometer symbol arrowhead usually just touches the resistor at the midpoint.)
The lower variable resistor seems to set a minimum resistance value for the combination.

Figure 1. A selection of preset potentiometers. Source:Robot Room.

... but the rest of the circuit is attached to the tail of the arrow. I feel as though this circuit is trying to describe a voltage divider. Is this true?

That sounds right. It's difficult to know without knowing what the circuit is for and what U and M are.

Update after additional information was supplied:

U is a voltagemeter and M is a motor. On the device there are two buttons [knobs] that are used to adjust the voltage going through the motor. I figured that this would be done with the two variable resistors. Maybe this will be of some help? http://shop.skolebutik.dk/images/U15040_EN.pdf.

From the additional information supplied it appears that the incorrect symbol has been used in the diagram. They are regular potentiometers with knobs. I would expect the upper potentiometer's resistance to be 10× that of the lower one as the lower one is the fine adjustment.
It is a little unusual these days to control a motor's speed just with a potentiometer. A variable voltage regulator would maintain the motor's voltage much better than the simple potentiometer arrangement.

If they are both potentiometers, wouldn't the bottom one have no influence when varied?

simulate this circuit – Schematic created using CircuitLab
Figure 2. The circuit redrawn in conventional manner flowing from left to right and top to bottom. Note the connection of R2's wiper to one end of the track to create a rheostat rather than a potentiometer.

I think that it behaves as a non-variable resistor in that sense.

Correct. See the corrected diagram in Figure 2.

Would I be allowed to put an ammeter directly after the power supply and use the current read as the current in the motor in calculations? I know the resistors would also draw current, but I am wondering if this is negligible.

It would but, as you correctly think, you'd be measuring the potentiometer current too and since these must be low-resistance to provide enough current for the motor I think it would be no use. I would open up the box and add the ammeter as shown in Figure 2.

You say I am correct in stating that the bottom potentiometer behaves as a non-variable resistor, but later state that it behaves as a rheometer (which IS a variable resistor).

There are two ways to interpret the symbol.

*

*The wiper isn't connected to anything so it's just a resistor.

*It's a variable resistor.

Since they've used the same symbol for both pots they should have connected the wiper as I did in Figure 2.

On reconsideration I would state that the bottom potentiometer functions as a VARIABLE resistor used for fine tuning.

Correct. Their drawing could have been better. My Figure 2 should be less confusing.

A: The red circled component is a potentiometer. The one below it is a variable resistor. And yes, the two together form a voltage divider.


text:
Q: accessing a variable showing in single line instead of multiple lines I am storing the multiple lines in a variable and when I am trying to access them it is showing in a single line.
$ echo -e "A\nB"
A
B
$ VAR=`echo -e "A\nB"`
$ echo $VAR
A B

let me know is there any way to get the output as same as command. I want A, B to be in different lines while accessing it.

A: Need quotes when echoing:
$ var=$(echo -e "A\nB")

$ echo "$var"
A
B

A: $ VAR=echo -e "A\nB"
$ echo "$VAR"
A
B


text:
Q: How to detect scroll up and down inside a div element in react js? Currently, I have this custom hook to detect whether the user has scroll down/up the page entire page, but how can I implement it to detect scroll down and up inside a div element??
By using a ref? Any suggestion?

export const useScrollDirection = () => {
  const [scrollDirection, setScrollDirection] = useState(null);
  const [prevOffset, setPrevOffset] = useState(0);

  console.log("prevOffset", prevOffset);
  const toggleScrollDirection = () => {
    let scrollY = window.scrollY;
    console.log("scrollY", scrollY);
    if (scrollY === 0) {
      setScrollDirection(null);
    }
    if (scrollY > prevOffset) {
      setScrollDirection("down");
    } else if (scrollY < prevOffset) {
      setScrollDirection("up");
    }
    setPrevOffset(scrollY);
  };
  useEffect(() => {
    window.addEventListener("scroll", toggleScrollDirection);
    return () => {
      window.removeEventListener("scroll", toggleScrollDirection);
    };
  });
  return scrollDirection;
};

A: First, create a variable inside componentDidMount() and initialize with the current scroll position. Then attach the handleScroll() to a target element. I am using this hope this will help you too.
componentDidMount() {
    this.prev = window.scrollY;
}
handleScroll = (e) => {
    //console.log("scrolling!", e.target.scrollTop);

    const window = e.target;

    if (this.prev > window.scrollTop) {
      console.log("scrolling up");
    } else if (this.prev < window.scrollTop) {
      console.log("scrolling down");
    }
    this.prev = window.scrollTop;
};

Then attach handleScroll() to the target element.
<div onScroll={this.handleScroll}>
</div>


text:
Q: How would i append the text file into my contenteditable div?
*

*Process only .txt files

*Format if not properly formatted (apple-tab-span must be converted into   if possible)

*Append to my contenteditable div

I know no.2 is way far from this question, just tell me how would i process something like it. I've already finished the IDE-like system and im about to add the Open and Save functions.
$('#open').addEventListener('change', getTextFile, false);

function getTextFile (e) {
     var files = e.target.files;
     var file = files[0];
     var reader = new FileReader();
     reader.onload = function() {
     console.log(this.result);
     }
     reader.readAsText(file)
}

http://jsfiddle.net/3veCE/7/

A: Try this WORKING DEMO
function readSingleFile(evt) {

var f = evt.target.files[0];
  console.log(f);
   if (!f) {
    alert("Failed to load file");
       return;
}
if (f.name.indexOf('.txt') == -1) {
        alert(f.name + " is not a valid text file.");
         return;
              }

  var r = new FileReader();
  r.onload = function(e) {
      var contents = e.target.result;
    alert( "Got the file.n"
          +"name: " + f.name + "n"
          +"type: " + f.type + "n"
          +"size: " + f.size + " bytesn"
          + "contents: " + contents
    );
      document.getElementById('board').innerHTML = contents;
  }
  r.readAsText(f);
   }

 document.getElementById('fileinput').addEventListener('change', readSingleFile, false);


text:
Q: OWL Class Expression for Data Property In my ontology, I have an individual that has this data property
hasName "somaName"^^string,
however, when i'm building a class expression and sending to the reasoner for get the instances, I'm getting an empty set with the following query,
OWLClassExpression x = schema.getFactory().getOWLDataHasValue(schema.getDataProperty("hasName"), schema.getFactory().getOWLLiteral("somaName"));
System.out.println(reasoner.getInstances(x, true));

the getDataProperty is just a small method:
public OWLDataProperty getDataProperty(String dataProperty){
        return factory.getOWLDataProperty("#"+dataProperty,pm);
    }

A: The following code snippet works, compare it to your code to see what's different. You should use a reasoner that support this type of construct (Hermit does).
//Initiate everything
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
String base = "http://www.example.org/";
OWLOntology ontology = manager.createOntology(IRI.create(base + "ontology.owl"));
OWLDataFactory factory = manager.getOWLDataFactory();
//Add the stuff to the ontology
OWLDataProperty hasName = factory.getOWLDataProperty(IRI.create(base + "hasName"));
OWLNamedIndividual john = factory.getOWLNamedIndividual(IRI.create(base + "john"));
OWLLiteral lit = factory.getOWLLiteral("John");
OWLDataPropertyAssertionAxiom ax =
                  factory.getOWLDataPropertyAssertionAxiom(hasName, john, lit);
AddAxiom addAx = new AddAxiom(ontology, ax);
manager.applyChange(addAx);

//Init of the reasoner
//I use Hermit because it supports the construct of interest
OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory();
OWLReasoner reasoner = reasonerFactory.createReasoner(ontology);
reasoner.precomputeInferences();

//Prepare the expression for the query
OWLDataProperty p = factory.getOWLDataProperty(IRI.create(base + "hasName"));
OWLClassExpression ex =
                factory.getOWLDataHasValue(p, factory.getOWLLiteral("John"));

//Print out the results, John is inside
Set<OWLNamedIndividual> result = reasoner.getInstances(ex, true).getFlattened();
for (OWLNamedIndividual owlNamedIndividual : result) {
    System.out.println(owlNamedIndividual);
}


text:
Q: How can I slice a specific string? [Tue, 6. Apr 2021 13:56:55 UTC INFO] =======[]=======
[Tue, 6. Apr 2021 13:56:55 UTC INFO] Playtime: 2hrs 50mins 50s
[Tue, 6. Apr 2021 13:56:55 UTC INFO] Times joined: 18
[Tue, 6. Apr 2021 13:56:55 UTC INFO] Joined Date: 02/12/2021
[Tue, 6. Apr 2021 13:56:55 UTC INFO] ============================

This is a piece of text here and I want to slice off anything in the [], how can I do that?

A: You mean this?

const text = `[Tue, 6. Apr 2021 13:56:55 UTC INFO] =======[]=======
[Tue, 6. Apr 2021 13:56:55 UTC INFO] Playtime: 2hrs 50mins 50s
[Tue, 6. Apr 2021 13:56:55 UTC INFO] Times joined: 18
[Tue, 6. Apr 2021 13:56:55 UTC INFO] Joined Date: 02/12/2021
[Tue, 6. Apr 2021 13:56:55 UTC INFO] ============================`;
const content = text
  .split("\n")
  .map(line => line.split("]")[1].trim())
  .filter(line => !line.startsWith("="))
console.log(content.join("\n"))


text:
Q: installed kodak 3250 aio printer, but will not print I have installed drivers for the Kodak 325O AIO printer but it will not print...It stalls in the processing phase.  It will not print anything. Pictures, documents, anything...can anyone help with this.  Looking through the forums, there seem to be issues with Kodak and Ubuntu.
is there any fix for this that anyone knows of?

A: Install Kodak ESP AIO printer drivers package.
sudo apt-get install printer-driver-c2esp


text:
Q: Finding Homomorphisms Let D be the dihedral group of order 6 and C be the cyclic group of order 6. Find all homomorphisms D $\longrightarrow$C, (you may assume standard facts about cyclic and dihedral groups but you must state them), any help is greatly appreciated thank you!

A: Let $D$ be generated by $a$ and $b$ with $a^3=b^2=1$ and $bab=a^2$. The kernel of any morphism is normal in $D$. The only normal subgroups of $D$ are $D$ itself, the trivial subgroup and $\{1, a, a^2\}$. If the kernel is trivial then our morphism would be an isomorphism, which is impossible. If the kernel is $D$ then we have the zero map. If the kernel is $\{1, a, a^2\}$ then $b$ must be mapped to a non-zero element of order $2$. Hence $b\mapsto 3$ and $a\mapsto 0$.


text:
Q: How to prove an alternating series is convergent? How to prove that the sequence $\sum_{n=1}^{\infty} (-1)^{n-1} \frac{1}{\sqrt{n}}$ is convergent? I was trying to find the upper bound and lower bound of the partial sum $s_k$ and use Squeeze Theorem to figure out the limit, but I couldn't find the lower bound for $s_k$. Any suggestions? Thanks!

A: Look up: "alternating series".

A: This is an alternating series. Letting $a_n = \frac{1}{\sqrt{n}}$, for $n\geq 1$, then the series is $\sum (-1)^{n-1}a_n$. Notice that the sequence $a_n$ is strictly decreasing, as $a_1\gt a_2\gt a_3\gt\cdots$.
Now, consider the sequences of even and odd terms of the partial sum sequence:
$$\begin{align*}
s_1 &= 1\\
s_3 &= 1 - \left(\frac{1}{\sqrt{2}} - \frac{1}{\sqrt{3}}\right)\\
s_5 &= 1 - \left(\frac{1}{\sqrt{2}} - \frac{1}{\sqrt{3}}\right) - \left(\frac{1}{\sqrt{4}} - \frac{1}{\sqrt{5}}\right)\\
&\vdots\\
s_{2n+1} &= 1 - \left(\frac{1}{\sqrt{2}} - \frac{1}{\sqrt{3}}\right) -\cdots -\left(\frac{1}{\sqrt{2n}} - \frac{1}{\sqrt{2n+1}}\right)\\
&\vdots
\end{align*}$$
and
$$\begin{align*}
s_2 &= \left( 1- \frac{1}{\sqrt{2}}\right)\\
s_4 &= \left(1 - \frac{1}{\sqrt{2}}\right) + \left(\frac{1}{\sqrt{3}} - \frac{1}{\sqrt{4}}\right)\\
s_6 &= \left(1 - \frac{1}{\sqrt{2}}\right) + \left(\frac{1}{\sqrt{3}}-\frac{1}{\sqrt{4}}\right) + \left(\frac{1}{\sqrt{5}} - \frac{1}{\sqrt{6}}\right)\\
&\vdots\\
s_{2n} &= \left(1 - \frac{1}{\sqrt{2}}\right) + \left(\frac{1}{\sqrt{3}}-\frac{1}{\sqrt{4}}\right) + \cdots + \left(\frac{1}{\sqrt{2n-1}} - \frac{1}{\sqrt{2n}}\right)\\
&\vdots
\end{align*}$$
We have:
$$s_2 \lt s_4 \lt s_6 \lt\cdots \lt s_{2n} \lt \cdots \lt s_{2k+1} \lt \cdots \lt s_3 \lt s_1.$$
The sequence of odd terms of the partial sum sequence is strictly decreasing, and bounded below by each of the even terms, so it converges to some $L$. The sequence of even terms of the partial sum sequence is strictly increasing and bounded above by each of the odd terms, so it converges to some $M$; we have $M\leq L$. But notice that $\lim\limits_{n\to\infty}a_n = 0$, so
$$L-M = \lim_{n\to\infty}(s_{2n+1} - s_{2n}) = \lim_{n\to\infty}\left(\sum_{k=1}^{2n+1}(-1)^{k-1}a_k - \sum_{k=1}^{2n}(-1)^{k-1}a_k\right) = \lim_{n\to\infty}(-1)^{2n+1}a_n = 0,$$
so $L=M$. It is now straightforward to verify that the sequence of partial sums $s_n$ converges to this common limit $L$, so the series converges.
(This is just the usual proof that the Alternating Series Test "works).


text:
Q: Error al instalar cordova por NPM Estoy empezando en Ionic framework e intento instalar cordova con el comando   npm install -g cordova pero me suelta este error, ¿alguien sabe por qué?

sommer@sommer-AO532h:~$ npm install -g cordova
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
/usr/local/lib
└─┬ cordova@7.0.1
  ├─┬ configstore@2.1.0
  │ ├─┬ dot-prop@3.0.0
  │ │ └── is-obj@1.0.1
  │ ├── graceful-fs@4.1.11
  │ ├─┬ mkdirp@0.5.1
  │ │ └── minimist@0.0.8
  │ ├── object-assign@4.1.1
  │ ├── os-tmpdir@1.0.2
  │ ├─┬ osenv@0.1.4
  │ │ └── os-homedir@1.0.2
  │ ├── uuid@2.0.3
  │ ├─┬ write-file-atomic@1.3.4
  │ │ ├── imurmurhash@0.1.4
  │ │ └── slide@1.1.6
  │ └── xdg-basedir@2.0.0
  ├─┬ cordova-common@2.0.3
  │ ├── ansi@0.3.1
  │ ├─┬ bplist-parser@0.1.1
  │ │ └── big-integer@1.6.23
  │ ├── cordova-registry-mapper@1.1.15
  │ ├─┬ elementtree@0.1.6
  │ │ └── sax@0.3.5
  │ ├─┬ glob@5.0.15
  │ │ ├─┬ inflight@1.0.6
  │ │ │ └── wrappy@1.0.2
  │ │ ├── inherits@2.0.3
  │ │ ├── once@1.4.0
  │ │ └── path-is-absolute@1.0.1
  │ ├─┬ minimatch@3.0.4
  │ │ └─┬ brace-expansion@1.1.8
  │ │   ├── balanced-match@1.0.0
  │ │   └── concat-map@0.0.1
  │ ├─┬ plist@1.2.0
  │ │ ├── base64-js@0.0.8
  │ │ ├── util-deprecate@1.0.2
  │ │ ├── xmlbuilder@4.0.0
  │ │ └── xmldom@0.1.27
  │ ├── q@1.5.0
  │ ├── semver@5.3.0
  │ ├── shelljs@0.5.3
  │ ├── underscore@1.8.3
  │ └── unorm@1.4.1
  ├─┬ cordova-lib@7.0.1
  │ ├─┬ aliasify@2.1.0
  │ │ └─┬ browserify-transform-tools@1.7.0
  │ │   └─┬ falafel@2.1.0
  │ │     ├── acorn@5.0.3
  │ │     ├── foreach@2.0.5
  │ │     ├── isarray@0.0.1
  │ │     └── object-keys@1.0.11
  │ ├─┬ cordova-create@1.1.1
  │ │ ├── cordova-app-hello-world@3.12.0
  │ │ └── shelljs@0.3.0
  │ ├─┬ cordova-fetch@1.1.0
  │ │ ├─┬ dependency-ls@1.1.1
  │ │ │ └── q@1.4.1
  │ │ ├── is-url@1.2.2
  │ │ ├── q@1.5.0
  │ │ └─┬ shelljs@0.7.8
  │ │   ├── glob@7.1.2
  │ │   ├── interpret@1.0.3
  │ │   └── rechoir@0.6.2
  │ ├─┬ cordova-js@4.2.1
  │ │ └─┬ browserify@13.3.0
  │ │   ├── assert@1.4.1
  │ │   ├─┬ browser-pack@6.0.2
  │ │   │ ├─┬ combine-source-map@0.7.2
  │ │   │ │ ├── convert-source-map@1.1.3
  │ │   │ │ ├── inline-source-map@0.6.2
  │ │   │ │ ├── lodash.memoize@3.0.4
  │ │   │ │ └── source-map@0.5.6
  │ │   │ └── umd@3.0.1
  │ │   ├─┬ browser-resolve@1.11.2
  │ │   │ └── resolve@1.1.7
  │ │   ├─┬ browserify-zlib@0.1.4
  │ │   │ └── pako@0.2.9
  │ │   ├─┬ buffer@4.9.1
  │ │   │ ├── base64-js@1.2.1
  │ │   │ ├── ieee754@1.1.8
  │ │   │ └── isarray@1.0.0
  │ │   ├── cached-path-relative@1.0.1
  │ │   ├─┬ concat-stream@1.5.2
  │ │   │ ├─┬ readable-stream@2.0.6
  │ │   │ │ └── isarray@1.0.0
  │ │   │ └── typedarray@0.0.6
  │ │   ├─┬ console-browserify@1.1.0
  │ │   │ └── date-now@0.1.4
  │ │   ├── constants-browserify@1.0.0
  │ │   ├─┬ crypto-browserify@3.11.0
  │ │   │ ├─┬ browserify-cipher@1.0.0
  │ │   │ │ ├─┬ browserify-aes@1.0.6
  │ │   │ │ │ └── buffer-xor@1.0.3
  │ │   │ │ ├─┬ browserify-des@1.0.0
  │ │   │ │ │ └── des.js@1.0.0
  │ │   │ │ └── evp_bytestokey@1.0.0
  │ │   │ ├─┬ browserify-sign@4.0.4
  │ │   │ │ ├── bn.js@4.11.7
  │ │   │ │ ├── browserify-rsa@4.0.1
  │ │   │ │ ├─┬ elliptic@6.4.0
  │ │   │ │ │ ├── brorand@1.1.0
  │ │   │ │ │ ├── hash.js@1.1.1
  │ │   │ │ │ ├── hmac-drbg@1.0.1
  │ │   │ │ │ ├── minimalistic-assert@1.0.0
  │ │   │ │ │ └── minimalistic-crypto-utils@1.0.1
  │ │   │ │ └─┬ parse-asn1@5.1.0
  │ │   │ │   └── asn1.js@4.9.1
  │ │   │ ├── create-ecdh@4.0.0
  │ │   │ ├─┬ create-hash@1.1.3
  │ │   │ │ ├── cipher-base@1.0.3
  │ │   │ │ └─┬ ripemd160@2.0.1
  │ │   │ │   └── hash-base@2.0.2
  │ │   │ ├── create-hmac@1.1.6
  │ │   │ ├─┬ diffie-hellman@5.0.2
  │ │   │ │ └── miller-rabin@4.0.0
  │ │   │ ├── pbkdf2@3.0.12
  │ │   │ ├── public-encrypt@4.0.0
  │ │   │ └── randombytes@2.0.5
  │ │   ├── defined@1.0.0
  │ │   ├── deps-sort@2.0.0
  │ │   ├── domain-browser@1.1.7
  │ │   ├── duplexer2@0.1.4
  │ │   ├── events@1.1.1
  │ │   ├── glob@7.1.2
  │ │   ├─┬ has@1.0.1
  │ │   │ └── function-bind@1.1.0
  │ │   ├── htmlescape@1.1.1
  │ │   ├── https-browserify@0.0.1
  │ │   ├─┬ insert-module-globals@7.0.1
  │ │   │ ├── is-buffer@1.1.5
  │ │   │ └─┬ lexical-scope@1.2.0
  │ │   │   └─┬ astw@2.2.0
  │ │   │     └── acorn@4.0.13
  │ │   ├─┬ JSONStream@1.3.1
  │ │   │ └── jsonparse@1.3.1
  │ │   ├─┬ labeled-stream-splicer@2.0.0
  │ │   │ └── stream-splicer@2.0.0
  │ │   ├─┬ module-deps@4.1.1
  │ │   │ ├─┬ detective@4.5.0
  │ │   │ │ └── acorn@4.0.13
  │ │   │ └── stream-combiner2@1.1.1
  │ │   ├── os-browserify@0.1.2
  │ │   ├─┬ parents@1.0.1
  │ │   │ └── path-platform@0.11.15
  │ │   ├── path-browserify@0.0.0
  │ │   ├── process@0.11.10
  │ │   ├── querystring-es3@0.2.1
  │ │   ├── read-only-stream@2.0.0
  │ │   ├─┬ readable-stream@2.3.2
  │ │   │ ├── core-util-is@1.0.2
  │ │   │ ├── isarray@1.0.0
  │ │   │ ├── process-nextick-args@1.0.7
  │ │   │ ├── safe-buffer@5.1.1
  │ │   │ └── string_decoder@1.0.3
  │ │   ├─┬ resolve@1.3.3
  │ │   │ └── path-parse@1.0.5
  │ │   ├─┬ shasum@1.0.2
  │ │   │ ├── json-stable-stringify@0.0.1
  │ │   │ └── sha.js@2.4.8
  │ │   ├─┬ shell-quote@1.6.1
  │ │   │ ├── array-filter@0.0.1
  │ │   │ ├── array-map@0.0.0
  │ │   │ ├── array-reduce@0.0.0
  │ │   │ └── jsonify@0.0.0
  │ │   ├── stream-browserify@2.0.1
  │ │   ├─┬ stream-http@2.7.2
  │ │   │ ├── builtin-status-codes@3.0.0
  │ │   │ └── to-arraybuffer@1.0.1
  │ │   ├── string_decoder@0.10.31
  │ │   ├─┬ subarg@1.0.0
  │ │   │ └── minimist@1.2.0
  │ │   ├─┬ syntax-error@1.3.0
  │ │   │ └── acorn@4.0.13
  │ │   ├── through2@2.0.3
  │ │   ├── timers-browserify@1.4.2
  │ │   ├── tty-browserify@0.0.0
  │ │   ├─┬ url@0.11.0
  │ │   │ ├── punycode@1.3.2
  │ │   │ └── querystring@0.2.0
  │ │   ├─┬ util@0.10.3
  │ │   │ └── inherits@2.0.1
  │ │   ├─┬ vm-browserify@0.0.4
  │ │   │ └── indexof@0.0.1
  │ │   └── xtend@4.0.1
  │ ├─┬ cordova-serve@1.0.1
  │ │ ├─┬ compression@1.6.2
  │ │ │ ├─┬ accepts@1.3.3
  │ │ │ │ └── negotiator@0.6.1
  │ │ │ ├── bytes@2.3.0
  │ │ │ ├── compressible@2.0.10
  │ │ │ ├─┬ debug@2.2.0
  │ │ │ │ └── ms@0.7.1
  │ │ │ ├── on-headers@1.0.1
  │ │ │ └── vary@1.1.1
  │ │ ├─┬ express@4.15.3
  │ │ │ ├── array-flatten@1.1.1
  │ │ │ ├── content-disposition@0.5.2
  │ │ │ ├── content-type@1.0.2
  │ │ │ ├── cookie@0.3.1
  │ │ │ ├── cookie-signature@1.0.6
  │ │ │ ├─┬ debug@2.6.7
  │ │ │ │ └── ms@2.0.0
  │ │ │ ├── depd@1.1.0
  │ │ │ ├── encodeurl@1.0.1
  │ │ │ ├── escape-html@1.0.3
  │ │ │ ├── etag@1.8.0
  │ │ │ ├─┬ finalhandler@1.0.3
  │ │ │ │ ├─┬ debug@2.6.7
  │ │ │ │ │ └── ms@2.0.0
  │ │ │ │ └── unpipe@1.0.0
  │ │ │ ├── fresh@0.5.0
  │ │ │ ├── merge-descriptors@1.0.1
  │ │ │ ├── methods@1.1.2
  │ │ │ ├─┬ on-finished@2.3.0
  │ │ │ │ └── ee-first@1.1.1
  │ │ │ ├── parseurl@1.3.1
  │ │ │ ├── path-to-regexp@0.1.7
  │ │ │ ├─┬ proxy-addr@1.1.4
  │ │ │ │ ├── forwarded@0.1.0
  │ │ │ │ └── ipaddr.js@1.3.0
  │ │ │ ├── qs@6.4.0
  │ │ │ ├── range-parser@1.2.0
  │ │ │ ├─┬ send@0.15.3
  │ │ │ │ ├── debug@2.6.7
  │ │ │ │ ├── destroy@1.0.4
  │ │ │ │ ├── http-errors@1.6.1
  │ │ │ │ ├── mime@1.3.4
  │ │ │ │ └── ms@2.0.0
  │ │ │ ├── serve-static@1.12.3
  │ │ │ ├── setprototypeof@1.0.3
  │ │ │ ├── statuses@1.3.1
  │ │ │ ├─┬ type-is@1.6.15
  │ │ │ │ └── media-typer@0.3.0
  │ │ │ └── utils-merge@1.0.0
  │ │ └── q@1.5.0
  │ ├─┬ dep-graph@1.1.0
  │ │ └── underscore@1.2.1
  │ ├─┬ glob@7.1.1
  │ │ └── fs.realpath@1.0.0
  │ ├─┬ init-package-json@1.10.1
  │ │ ├── glob@7.1.2
  │ │ ├─┬ npm-package-arg@5.1.2
  │ │ │ └── hosted-git-info@2.4.2
  │ │ ├── promzard@0.3.0
  │ │ ├─┬ read@1.0.7
  │ │ │ └── mute-stream@0.0.7
  │ │ ├─┬ read-package-json@2.0.5
  │ │ │ ├── glob@7.1.2
  │ │ │ ├─┬ json-parse-helpfulerror@1.0.3
  │ │ │ │ └── jju@1.3.0
  │ │ │ └─┬ normalize-package-data@2.3.8
  │ │ │   └─┬ is-builtin-module@1.0.0
  │ │ │     └── builtin-modules@1.1.1
  │ │ ├─┬ validate-npm-package-license@3.0.1
  │ │ │ ├─┬ spdx-correct@1.0.2
  │ │ │ │ └── spdx-license-ids@1.2.2
  │ │ │ └── spdx-expression-parse@1.0.4
  │ │ └─┬ validate-npm-package-name@3.0.0
  │ │   └── builtins@1.0.3
  │ ├── nopt@4.0.1
  │ ├─┬ npm@2.15.12
  │ │ ├── abbrev@1.0.9
  │ │ ├── ansi@0.3.1
  │ │ ├── ansi-regex@2.0.0
  │ │ ├── ansicolors@0.3.2
  │ │ ├── ansistyles@0.1.3
  │ │ ├── archy@1.0.0
  │ │ ├── async-some@1.0.2
  │ │ ├── block-stream@0.0.9
  │ │ ├── char-spinner@1.0.1
  │ │ ├── chmodr@1.0.2
  │ │ ├── chownr@1.0.1
  │ │ ├── cmd-shim@2.0.2
  │ │ ├─┬ columnify@1.5.4
  │ │ │ └─┬ wcwidth@1.0.0
  │ │ │   └─┬ defaults@1.0.3
  │ │ │     └── clone@1.0.2
  │ │ ├─┬ config-chain@1.1.10
  │ │ │ └── proto-list@1.2.4
  │ │ ├─┬ dezalgo@1.0.3
  │ │ │ └── asap@2.0.3
  │ │ ├── editor@1.0.0
  │ │ ├── fs-vacuum@1.2.9
  │ │ ├─┬ fs-write-stream-atomic@1.0.8
  │ │ │ └── iferr@0.1.5
  │ │ ├── fstream@1.0.10
  │ │ ├─┬ fstream-npm@1.1.1
  │ │ │ └── fstream-ignore@1.0.5
  │ │ ├── github-url-from-git@1.4.0
  │ │ ├── github-url-from-username-repo@1.0.2
  │ │ ├─┬ glob@7.0.6
  │ │ │ ├── fs.realpath@1.0.0
  │ │ │ └── path-is-absolute@1.0.0
  │ │ ├── graceful-fs@4.1.6
  │ │ ├── hosted-git-info@2.1.5
  │ │ ├── imurmurhash@0.1.4
  │ │ ├── inflight@1.0.5
  │ │ ├── inherits@2.0.3
  │ │ ├── ini@1.3.4
  │ │ ├─┬ init-package-json@1.9.4
  │ │ │ ├─┬ glob@6.0.4
  │ │ │ │ └── path-is-absolute@1.0.0
  │ │ │ └── promzard@0.3.0
  │ │ ├── lockfile@1.0.1
  │ │ ├─┬ lru-cache@4.0.1
  │ │ │ ├── pseudomap@1.0.2
  │ │ │ └── yallist@2.0.0
  │ │ ├─┬ minimatch@3.0.3
  │ │ │ └─┬ brace-expansion@1.1.6
  │ │ │   ├── balanced-match@0.4.2
  │ │ │   └── concat-map@0.0.1
  │ │ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ ├─┬ node-gyp@3.6.0
  │ │ │ └── semver@5.3.0
  │ │ ├── nopt@3.0.6
  │ │ ├── normalize-git-url@3.0.2
  │ │ ├─┬ normalize-package-data@2.3.5
  │ │ │ └─┬ is-builtin-module@1.0.0
  │ │ │   └── builtin-modules@1.1.0
  │ │ ├── npm-cache-filename@1.0.2
  │ │ ├── npm-install-checks@1.0.7
  │ │ ├── npm-package-arg@4.1.0
  │ │ ├─┬ npm-registry-client@7.2.1
  │ │ │ ├─┬ concat-stream@1.5.2
  │ │ │ │ ├─┬ readable-stream@2.0.6
  │ │ │ │ │ ├── core-util-is@1.0.2
  │ │ │ │ │ ├── isarray@1.0.0
  │ │ │ │ │ ├── process-nextick-args@1.0.7
  │ │ │ │ │ ├── string_decoder@0.10.31
  │ │ │ │ │ └── util-deprecate@1.0.2
  │ │ │ │ └── typedarray@0.0.6
  │ │ │ └── retry@0.10.0
  │ │ ├── npm-user-validate@0.1.5
  │ │ ├─┬ npmlog@2.0.4
  │ │ │ ├─┬ are-we-there-yet@1.1.2
  │ │ │ │ └── delegates@1.0.0
  │ │ │ └─┬ gauge@1.2.7
  │ │ │   ├── has-unicode@2.0.0
  │ │ │   ├─┬ lodash.pad@4.4.0
  │ │ │   │ ├── lodash._baseslice@4.0.0
  │ │ │   │ ├── lodash._basetostring@4.12.0
  │ │ │   │ └── lodash.tostring@4.1.4
  │ │ │   ├── lodash.padend@4.5.0
  │ │ │   └── lodash.padstart@4.5.0
  │ │ ├── once@1.4.0
  │ │ ├── opener@1.4.1
  │ │ ├─┬ osenv@0.1.3
  │ │ │ ├── os-homedir@1.0.0
  │ │ │ └── os-tmpdir@1.0.1
  │ │ ├── path-is-inside@1.0.1
  │ │ ├─┬ read@1.0.7
  │ │ │ └── mute-stream@0.0.5
  │ │ ├─┬ read-installed@4.0.3
  │ │ │ ├── debuglog@1.0.1
  │ │ │ ├── readdir-scoped-modules@1.0.2
  │ │ │ └── util-extend@1.0.1
  │ │ ├─┬ read-package-json@2.0.4
  │ │ │ ├─┬ glob@6.0.4
  │ │ │ │ └── path-is-absolute@1.0.0
  │ │ │ └─┬ json-parse-helpfulerror@1.0.3
  │ │ │   └── jju@1.3.0
  │ │ ├─┬ readable-stream@2.1.5
  │ │ │ ├── buffer-shims@1.0.0
  │ │ │ ├── core-util-is@1.0.2
  │ │ │ ├── isarray@1.0.0
  │ │ │ ├── process-nextick-args@1.0.7
  │ │ │ ├── string_decoder@0.10.31
  │ │ │ └── util-deprecate@1.0.2
  │ │ ├── realize-package-specifier@3.0.1
  │ │ ├─┬ request@2.74.0
  │ │ │ ├── aws-sign2@0.6.0
  │ │ │ ├── aws4@1.4.1
  │ │ │ ├─┬ bl@1.1.2
  │ │ │ │ └─┬ readable-stream@2.0.6
  │ │ │ │   ├── core-util-is@1.0.2
  │ │ │ │   ├── isarray@1.0.0
  │ │ │ │   ├── process-nextick-args@1.0.7
  │ │ │ │   ├── string_decoder@0.10.31
  │ │ │ │   └── util-deprecate@1.0.2
  │ │ │ ├── caseless@0.11.0
  │ │ │ ├─┬ combined-stream@1.0.5
  │ │ │ │ └── delayed-stream@1.0.0
  │ │ │ ├── extend@3.0.0
  │ │ │ ├── forever-agent@0.6.1
  │ │ │ ├─┬ form-data@1.0.0-rc4
  │ │ │ │ └── async@1.5.2
  │ │ │ ├─┬ har-validator@2.0.6
  │ │ │ │ ├─┬ chalk@1.1.3
npm ERR! Linux 4.8.0-56-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "cordova"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

  │ │ │ │ │ ├── escape-string-regexp@1.0.5
  │ │ │ │ │ ├── has-ansi@2.0.0
  │ │ │ │ │ └── supports-color@2.0.0
  │ │ │ │ ├─┬ commander@2.9.0
  │ │ │ │ │ └── graceful-readlink@1.0.1
  │ │ │ │ ├─┬ is-my-json-valid@2.13.1
  │ │ │ │ │ ├── generate-function@2.0.0
  │ │ │ │ │ ├─┬ generate-object-property@1.2.0
  │ │ │ │ │ │ └── is-property@1.0.2
  │ │ │ │ │ ├── jsonpointer@2.0.0
  │ │ │ │ │ └── xtend@4.0.1
  │ │ │ │ └─┬ pinkie-promise@2.0.1
  │ │ │ │   └── pinkie@2.0.4
  │ │ │ ├─┬ hawk@3.1.3
  │ │ │ │ ├── boom@2.10.1
  │ │ │ │ ├── cryptiles@2.0.5
  │ │ │ │ ├── hoek@2.16.3
  │ │ │ │ └── sntp@1.0.9
  │ │ │ ├─┬ http-signature@1.1.1
  │ │ │ │ ├── assert-plus@0.2.0
  │ │ │ │ ├─┬ jsprim@1.3.0
  │ │ │ │ │ ├── extsprintf@1.0.2
  │ │ │ │ │ ├── json-schema@0.2.2
  │ │ │ │ │ └── verror@1.3.6
  │ │ │ │ └─┬ sshpk@1.9.2
  │ │ │ │   ├── asn1@0.2.3
  │ │ │ │   ├── assert-plus@1.0.0
  │ │ │ │   ├── dashdash@1.14.0
  │ │ │ │   ├── ecc-jsbn@0.1.1
  │ │ │ │   ├── getpass@0.1.6
  │ │ │ │   ├── jodid25519@1.0.2
  │ │ │ │   ├── jsbn@0.1.0
  │ │ │ │   └── tweetnacl@0.13.3
  │ │ │ ├── is-typedarray@1.0.0
  │ │ │ ├── isstream@0.1.2
  │ │ │ ├── json-stringify-safe@5.0.1
  │ │ │ ├─┬ mime-types@2.1.11
  │ │ │ │ └── mime-db@1.23.0
  │ │ │ ├── node-uuid@1.4.7
  │ │ │ ├── oauth-sign@0.8.2
  │ │ │ ├── qs@6.2.1
  │ │ │ ├── stringstream@0.0.5
  │ │ │ ├── tough-cookie@2.3.1
  │ │ │ └── tunnel-agent@0.4.3
  │ │ ├── retry@0.10.0
  │ │ ├── rimraf@2.5.4
  │ │ ├── semver@5.1.0
  │ │ ├─┬ sha@2.0.1
  │ │ │ └─┬ readable-stream@2.0.2
  │ │ │   ├── core-util-is@1.0.1
  │ │ │   ├── isarray@0.0.1
  │ │ │   ├── process-nextick-args@1.0.3
  │ │ │   ├── string_decoder@0.10.31
  │ │ │   └── util-deprecate@1.0.1
  │ │ ├── slide@1.1.6
  │ │ ├── sorted-object@2.0.0
  │ │ ├── spdx-license-ids@1.2.2
  │ │ ├── strip-ansi@3.0.1
  │ │ ├── tar@2.2.1
  │ │ ├── text-table@0.2.0
  │ │ ├── uid-number@0.0.6
  │ │ ├── umask@1.1.0
  │ │ ├─┬ validate-npm-package-license@3.0.1
  │ │ │ ├── spdx-correct@1.0.2
  │ │ │ └─┬ spdx-expression-parse@1.0.2
  │ │ │   └── spdx-exceptions@1.0.4
  │ │ ├─┬ validate-npm-package-name@2.2.2
  │ │ │ └── builtins@0.0.7
  │ │ ├─┬ which@1.2.11
  │ │ │ └── isexe@1.1.2
  │ │ ├── wrappy@1.0.2
  │ │ └── write-file-atomic@1.1.4
  │ ├── opener@1.4.2
  │ ├─┬ plist@2.0.1
  │ │ ├── base64-js@1.1.2
  │ │ └── xmlbuilder@8.2.2
  │ ├─┬ properties-parser@0.3.1
  │ │ └── string.prototype.codepointat@0.2.0
  │ ├─┬ request@2.79.0
  │ │ ├── aws-sign2@0.6.0
  │ │ ├── aws4@1.6.0
  │ │ ├── caseless@0.11.0
  │ │ ├─┬ combined-stream@1.0.5
  │ │ │ └── delayed-stream@1.0.0
  │ │ ├── extend@3.0.1
  │ │ ├── forever-agent@0.6.1
  │ │ ├─┬ form-data@2.1.4
  │ │ │ └── asynckit@0.4.0
  │ │ ├─┬ har-validator@2.0.6
  │ │ │ ├─┬ commander@2.10.0
  │ │ │ │ └── graceful-readlink@1.0.1
  │ │ │ ├─┬ is-my-json-valid@2.16.0
  │ │ │ │ ├── generate-function@2.0.0
  │ │ │ │ ├─┬ generate-object-property@1.2.0
  │ │ │ │ │ └── is-property@1.0.2
  │ │ │ │ └── jsonpointer@4.0.1
  │ │ │ └─┬ pinkie-promise@2.0.1
  │ │ │   └── pinkie@2.0.4
  │ │ ├─┬ hawk@3.1.3
  │ │ │ ├── boom@2.10.1
  │ │ │ ├── cryptiles@2.0.5
  │ │ │ ├── hoek@2.16.3
  │ │ │ └── sntp@1.0.9
  │ │ ├─┬ http-signature@1.1.1
  │ │ │ ├── assert-plus@0.2.0
  │ │ │ ├─┬ jsprim@1.4.0
  │ │ │ │ ├── assert-plus@1.0.0
  │ │ │ │ ├── extsprintf@1.0.2
  │ │ │ │ ├── json-schema@0.2.3
  │ │ │ │ └── verror@1.3.6
  │ │ │ └─┬ sshpk@1.13.1
  │ │ │   ├── asn1@0.2.3
  │ │ │   ├── assert-plus@1.0.0
  │ │ │   ├── bcrypt-pbkdf@1.0.1
  │ │ │   ├─┬ dashdash@1.14.1
  │ │ │   │ └── assert-plus@1.0.0
  │ │ │   ├── ecc-jsbn@0.1.1
  │ │ │   ├─┬ getpass@0.1.7
  │ │ │   │ └── assert-plus@1.0.0
  │ │ │   ├── jsbn@0.1.1
  │ │ │   └── tweetnacl@0.14.5
  │ │ ├── is-typedarray@1.0.0
  │ │ ├── isstream@0.1.2
  │ │ ├── json-stringify-safe@5.0.1
  │ │ ├─┬ mime-types@2.1.15
  │ │ │ └── mime-db@1.27.0
  │ │ ├── oauth-sign@0.8.2
  │ │ ├── qs@6.3.2
  │ │ ├── stringstream@0.0.5
  │ │ ├── tunnel-agent@0.4.3
  │ │ └── uuid@3.1.0
  │ ├── shelljs@0.3.0
  │ ├─┬ tar@2.2.1
  │ │ ├── block-stream@0.0.9
  │ │ └─┬ fstream@1.0.11
  │ │   └─┬ rimraf@2.6.1
  │ │     └── glob@7.1.2
  │ ├── valid-identifier@0.0.1
  │ └─┬ xcode@0.9.3
  │   ├── pegjs@0.10.0
  │   ├─┬ simple-plist@0.2.1
  │   │ ├─┬ bplist-creator@0.0.7
  │   │ │ └── stream-buffers@2.2.0
  │   │ └─┬ plist@2.0.1
  │   │   ├── base64-js@1.1.2
  │   │   └── xmlbuilder@8.2.2
  │   └── uuid@3.0.1
  ├── editor@1.0.0
  ├─┬ insight@0.8.2
  │ ├── async@1.5.2
  │ ├─┬ chalk@1.1.3
  │ │ ├── ansi-styles@2.2.1
  │ │ ├── escape-string-regexp@1.0.5
  │ │ ├── has-ansi@2.0.0
  │ │ ├── strip-ansi@3.0.1
  │ │ └── supports-color@2.0.0
  │ ├── configstore@1.4.0
  │ ├─┬ inquirer@0.10.1
  │ │ ├── ansi-escapes@1.4.0
  │ │ ├── ansi-regex@2.1.1
  │ │ ├─┬ cli-cursor@1.0.2
  │ │ │ └─┬ restore-cursor@1.0.1
  │ │ │   ├── exit-hook@1.1.1
  │ │ │   └── onetime@1.1.0
  │ │ ├── cli-width@1.1.1
  │ │ ├── figures@1.7.0
  │ │ ├── lodash@3.10.1
  │ │ ├─┬ readline2@1.0.1
  │ │ │ ├── code-point-at@1.1.0
  │ │ │ ├── is-fullwidth-code-point@1.0.0
  │ │ │ └── mute-stream@0.0.5
  │ │ ├── run-async@0.1.0
  │ │ ├── rx-lite@3.1.2
  │ │ └── through@2.3.8
  │ ├─┬ lodash.debounce@3.1.1
  │ │ └── lodash._getnative@3.9.1
  │ ├── node-uuid@1.4.8
  │ ├─┬ os-name@1.0.3
  │ │ ├─┬ osx-release@1.1.0
  │ │ │ └── minimist@1.2.0
  │ │ └── win-release@1.1.1
  │ └─┬ tough-cookie@2.3.2
  │   └── punycode@1.4.1
  ├─┬ nopt@3.0.1
  │ └── abbrev@1.1.0
  ├── q@1.0.1
  └─┬ update-notifier@0.5.0
    ├── configstore@1.4.0
    ├── is-npm@1.0.0
    ├─┬ latest-version@1.0.1
    │ └─┬ package-json@1.2.0
    │   ├─┬ got@3.3.1
    │   │ ├─┬ duplexify@3.5.0
    │   │ │ ├─┬ end-of-stream@1.0.0
    │   │ │ │ └── once@1.3.3
    │   │ │ └── stream-shift@1.0.0
    │   │ ├── infinity-agent@2.0.3
    │   │ ├── is-redirect@1.0.0
    │   │ ├── is-stream@1.1.0
    │   │ ├── lowercase-keys@1.0.0
    │   │ ├── nested-error-stacks@1.0.2
    │   │ ├── object-assign@3.0.0
    │   │ ├── prepend-http@1.0.4
    │   │ ├── read-all-stream@3.1.0
    │   │ └── timed-out@2.0.0
    │   └─┬ registry-url@3.1.0
    │     └─┬ rc@1.2.1
    │       ├── deep-extend@0.4.2
    │       ├── ini@1.3.4
    │       ├── minimist@1.2.0
    │       └── strip-json-comments@2.0.1
    ├─┬ repeating@1.1.3
    │ └─┬ is-finite@1.0.2
    │   └── number-is-nan@1.0.1
    ├── semver-diff@2.1.0
    └── string-length@1.0.1

npm ERR! Please include the following file with any support request:
npm ERR!     /home/sommer/npm-debug.log

Actualizar:
Tras el comentario de un usuario que ejecutara el comando como administrador me salio lo siguiente :

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova

esa error no me probocara error en la ejecucion de la aplicacion?
soy nuevo en cordova
pero si me instalo correctamen cordova :

sommer@sommer-AO532h:~$ cordova --version
7.0.1
sommer@sommer-AO532h:~$

A:
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
  npm ERR!     at Error (native)
  npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
  npm ERR!   errno: -13,
  npm ERR!   code: 'EACCES',
  npm ERR!   syscall: 'access',
  npm ERR!   path: '/usr/local/lib/node_modules' }
  npm ERR!
  npm ERR! Please try running this command again as root/Administrator.

El error es claro: no tienes permisos de escritura en el directorio /usr/local/lib/node_modules.
3 soluciones:

*

*Como te indica el propio mensaje

Please try running this command again as root/Administrator.

Es decir, lanza el comando como usuario root:
sudo npm install -g cordova

*No lo instales global; limítalo a tu usuario:
npm install cordoava

*Cambia el dueño de dicho directorio:
sudo chown TU_USUARIO:TU_GRUPO /usr/local/lib/node_modules
Esta última solución conlleva que solo tu usuario podrá instalar nuevos módulos.


text:
Q: How to add animation to navigation in flutter using Get package? I want to change the default animation of page transition to fade transition when I go to a new route using get package, Currently I am using this command to navigate : Get.offAllNamed(HomeScreen.routeName);, this clears my route stack and takes me to the new page using default transition.
Is there a way I can change that animation to fading animation using Get package?

A: I found a kind of transaction.
 Get.to(() => const RegisterView(),
                              transition: Transition.downToUp);

Transition is enum you can give any of this and they're different animations.
fade,
fadeIn,
rightToLeft,
leftToRight,
upToDown,
downToUp,
rightToLeftWithFade,
leftToRightWithFade,
zoom,
topLevel,
noTransition,
cupertino and so on...


text:
Q: flask application not running from flask import Flask
app=Flask(__name__)
@app.route('/admin')
def admin():
return "the current user is admin"

@app.route('/student')
def student():
  return "the current user is student"

@app.route('/teacher')
def teacher():
  return "the current user is teacher"

@app.route('/user/<name>')
def user(name):
  if name == 'admin':
     return redirect(url_for('admin'))
  if user == 'student':
     return redirect(url_for('student'))
  if user == 'teacher':
     return redirect(url_for('teacher'))
if _name_=='_maiin_':
  app.run(debug=true)

this is the flask code am trying to execute.showing me error of-
  File "C:\Users\Nitish Phutane\Desktop\flask.py", line 1, in <module>
    from flask import Flask
  File "C:\Users\Nitish Phutane\Desktop\flask.py", line 1, in <module>
    from flask import Flask
ImportError: cannot import name 'Flask' from partially initialized module 'flask' (most likely due to a circular import) (C:\Users\Nitish Phutane\Desktop\flask.py)

though i have install flask on my system too.can someone please help me to run this code.

A: You have a circular import because your file in named flask.py. Change this to anything else and the problem will be gone.

A: I think you have created a file called flask.py, so now it is trying to import Flask module from your own file. Try renaming that file in desktop to something else and try again. It is called circular import, and you should always prevent it from happening.


text:
Q: How to solve ImportError: cannot import name 'ProcessPoolExecutor' I'm getting this error when trying to using polyglot library for the first time.
from polyglot.text import Text, Word

word = Text("Preprocessing is an essential step.").words[0]
print(word.morphemes)

here is the full error message.
Traceback (most recent call last):
  File "/home/adeesha/PycharmProjects/theme_recomend/plyglot.py", line 2, in <module>
    from polyglot.text import Text, Word
  File "/usr/local/lib/python3.5/dist-packages/polyglot-16.7.4-py3.5.egg/polyglot/__init__.py", line 12, in <module>
    from .base import Sequence, TokenSequence
  File "/usr/local/lib/python3.5/dist-packages/polyglot-16.7.4-py3.5.egg/polyglot/base.py", line 9, in <module>
    from concurrent.futures import ProcessPoolExecutor, as_completed
ImportError: cannot import name 'ProcessPoolExecutor'

the version of Python 3.5.2
how I gonna solve this problem?


text:
Q: Plotly, how to subplot pie chart? How can I subplot 'pie1' in 'fig', so it be located at 'the first' position. this is how I am doing it but it doesn't work out:
import pandas as pd
import numpy as np
import seaborn as sns
import plotly.offline as pyp
import plotly.graph_objs as go
from plotly import tools
import plotly.plotly as py
from plotly.offline import iplot,init_notebook_mode
from IPython.core.display import HTML
import plotly.io

df1=pd.read_excel('file.xlsx',sheet_name='sheet1',index=False)
con_pivot=pd.pivot_table(con,index='Category',values=('Payment'),aggfunc='sum',margins=True,margins_name='Total')

fig = tools.make_subplots(rows=2, cols=2, subplot_titles=('The first','3','2','4'))

pie1=go.Pie(labels=con_pivot.index,values=con_pivot.values,domain=dict(x=[0.5,1.0]),name='Test',hoverinfo='label+percent+name',)
layout = go.Layout(title="Test XXXX",)
data=[pie1]
fig = go.Figure(data=data, layout=layout)
pyp.plot(fig, filename='simple-pie-subplot')

I am getting a strange result when I run the script:

as you can see, it shows only the title. Not sure what I am doing wrong.(I am able to see the chart in chart studio though)


text:
Q: Question on GMRES convergence Assume that the matrix A is diagonalizable, $A = V ΛV$
with the
condition number of V , κ(V ) ≤ 10. Assume also that its spectrum (its
eigenvalues) are contained in the disk of radius 1/2 around z = 2 in
the complex plane. Show that at step n of the GMRES iteration for
solving Ax = b, where $|b|$ ≤ 10, the residual satisfies
$|r_n| ≤ 100/4^n$
I'm stuck on this. Thanks!
.


text:
Q: What does defining a function with in the __init__ constructor in python mean? I have just seen the following code and would like to know what the function within the
__init__ function means
def __init__(self):
    def program(percept):
        return raw_input('Percept=%s; action? ' % percept)
    self.program = program
    self.alive = True

A: This code
class Foo:
    def __init__(self):
        def program(percept):
            return raw_input('Percept=%s; action? ' % percept)
        self.program = program

AFAIK, is actually the exact same as this since self.program = program.
class Foo:
    def __init__(self):
        pass

    def program(self, percept):
        return raw_input('Percept=%s; action? ' % percept)

The only reason I can see to nest a function there was if you just used the function to do some initializations within the constructor, but didn't want to expose it on the class.


text:
Q: Export multiple worksheets to CSV and specify save folder I've got this Macro working beautifully, but every now and again it will save the exported sheets into the last folder I was working in, and not the specific folder I want them in. How do I specify the folder they should go into?
Sub asdf()
Dim ws As Worksheet, newWb As Workbook

Application.ScreenUpdating = False
For Each ws In Sheets(Array("sheet1", "sheet2", "sheet3"))
   ws.Copy
   Set newWb = ActiveWorkbook
   With newWb
      .SaveAs ws.Name & ".csv", xlCSVWindows
      .Close (False)
   End With
Next ws
Application.ScreenUpdating = True

End Sub

A: You need to specify the location you want it saved to in the code.
Try this.
.SaveAs FileName:="C:\OutputFilepath\" & ws.Name & ".csv", FileFormat:=xlCSV, CreateBackup:=False

A: Replace this line
.SaveAs ws.Name & ".csv", xlCSVWindows

With
.SaveAs "D:\MyFolder\" & ws.Name & ".csv", xlCSVWindows

Change the "D:\MyFolder\" to your desired path.

A: Add a string type var that contains the full path to the folder. In the following example, I'll use the temp directory.
Sub asdf()

    Dim ws As Worksheet, newWb As Workbook, fp as string

    fp = environ("TEMP") & Chr(92)
    'could be something like
    'fp = environ("USER") & "\desktop\"

    Application.ScreenUpdating = False
    For Each ws In Sheets(Array("sheet1", "sheet2", "sheet3"))
       ws.Copy
       Set newWb = ActiveWorkbook
       With newWb
          .SaveAs fp & ws.Name, xlCSVWindows   'add the path, let saveas add the extension
          .Close savechanges:=False
       End With
    Next ws
    Application.ScreenUpdating = True

End Sub


text:
Q: Electron on windows 10 can anyone tell me how to instal electron on windows i try everything but nothing this steps i make sow far

*

*install nodeJs

*i update NodeJs and npm to the latest versions

*i see this video on youtube for guide but i have error when i make this comand on cmd

npm start
i want to ask if this is work on windows 10 if not i gona stop heare else how to instaled or how to make my fist electro app with javascrip - html5 - css
if there is alternative method to make apps with this 3 programming languages
and i want access the file system i want the user to can reade and write xml files
i try UWP apps with WinJS but i canot use require.js with the winJs i want this module feture with the modules and then i find the Electron 1.0 that can make apps with this 3 languages (javascript - html - css - and the js libs on the internt) i know the nodeJs have requre functions is like the modules on require.js and i dont have problem to lern NodeJs

*

*what can i do to make Native app

*to use file System (read and write xml file)

*3 languages javascript - html - css

*i want the code on javascript to split like the require.js or NodeJs require function

*i have windows 10

that is the criteria i have pls help me i stuck

A: npm install electron -g

or
npm install electron --save-dev

as described here
after that go to the directory where your package.json via cmd and type electron .


text:
Q: jQuery form with .load()ed elements ignores them Thanks for reading.
I have a form with a few elements in it.  Inside the form is a div.graph.  When the form is submitted, the div is .load()'d with the result, which includes some additional form elements, such as a page selector.  The form is then submitted repeatedly with part of it updated each time via the .load().
It's submitted like so:
/* ... */
// Build the form info as necessary.
FormAction = './stats_chart.php?cb='+Math.random();
FormDataJSON = $('#frmStats').serializeArray();

// Hide any current report, and blank out the div.
ChartItem.find('.graph').load(FormAction, FormDataJSON, function(){/* etc... */});

The results would look like so:
/* ... a bunch of crap */
<select id='PageSelector' name='PageSelector'>
    <option value='1'>1</option>
</select>

The problem is that if I submit the form, .load() some results, and submit it again, the elements that were .load()'d aren't present in either the FormDataJSON, or the form post.  It seems like they are not recognized by serializeArray().
Any ideas what's going on?  I do have name attribs for all of the elements, the div is inside the form tags, and exploring the DOM with Firebug shows everything where it should be.
Thanks!
Edit:
I made a workaround by adding a hidden element in the main form and having the select update it before submission, so it is now working, but still would love to know why the elements weren't being seen.
Oddly, if I log it to the console in Firefox, it shows up as it's own root, not attached to the body at all.  Normally, you would see /html/body/form/div/etc..., but in this case, it's just /select.


text:
Q: Windows 7 boot hangs at logo I'm troubleshooting a laptop for a friend, and her computer will not boot into Windows 7 at all, no matter what I do. I've tried normal startup (logo loads but doesn't go any further), repairing using the recovery partition (same thing), using a repair disk (same thing), an install disk (loads through "Windows is loading files..." but then sits at a black screen), and safe mode (stops loading after avgidsha.sys). UBCD won't load (BSoD stating that acpi.sys is the problem), nor will Hiren's Boot CD (same problem as UBCD). Linux distros load fine, but that's it.
I did run a BootDefender boot disc virus scan and it found several viruses, but they've been removed and all of the same problems persist. I'm at my wits' end and have no idea what to do because I can't access anything in Windows, not System Restore or anything.

A: It could be a problem with your hard drive, but mostly it is a problem with your hard drive due to bad sectors and clusters.
To prevent this, you can boot your system in advanced mode and check if is it hanging there.
If it is, then go to BIOS and perform a SMART test. This will help you locate the exact problem with the hard disk or the operating system.

A: Is AVG installed? As this page recommends, boot using any Linux LiveCD/DVD/USB, go to the Windows\system32\drivers folder and rename all files starting with avg (e.g. avgidsha.sys, avgldx86.sys, avgtdix.sys etc.)
See if the laptop boots properly now. If it does, get rid of AVG and install MSE instead.

A: This happened to me when  I tried windows 8 and attempted to go back to windows 7. It was a fiasco resulting in windows 8 deleting its self and trying to start windows 7 that wasn't installed. After staying up all night working on the problem I took it to Best Buy and had them create a backup of some files and completely wipe my computer. They reinstalled windows 7 for me and my computer has been running well ever since. So in short, the viruses must have destroyed key files in your OS. People such as the Geek Squad can backup your data and wipe your computer. Unless you are under warranty it will cost money.

A: Looks like a hardware problem, otherwise recovery CDs wouldn't fail. Boot memtest from HBCD to check RAM, check hard disk SMART status and run every other test you could think of. You can use Linux distros for this too.

A: Well I know this is a little late but the same AVG file loaded for me and the system halted. I ended up getting a Ghost 15 boot disc and saw the partition type was incorrect (17 instead of 07 which is installable NTFS). I backed up the partition table before that but it only took 15 minutes to fix.
Before I even got the option to boot safe mode I needed to do a system start up repair with the windows disc. Tough to say if my clone jacked up the partition table or if windows worked on more than the boot configuration (bootcfg or bcdedit tools).
Anyhow that's what worked for my windows 7 cloning.  Good luck!

A: I have faced the same Issue.
This is caused due to the 3 party software's which has changed/damaged the boot sectors.
This can be caused due to AVG antivirus software installation.
Following attempts can be made to solve this issue

*

*Download the AVG Rescue on to USB/CD and Boot the computer from the USB/CD. Follow the steps given in the Download link.

*If the AVG rescue doesn't work, then make a boo table USB/CD of Ubuntu/Linux and boot your computer using USB/CD and select Try  Ubuntu/Linux without installing. Now check whether u have access to drives  (i;e C and D drive on your computer), If you don't have access to the drives then hard drive is corrupted and cannot be restored. If you can access the drives then backup all the data in those drives and install the Ubuntu by complete formatting of the disk. After successful installation of Ubuntu, make boo table Windows 7 on USB/CD and install it.

*If installation of ubuntu doesn't work then try to recover your system using recovery CD which are available.

*If all the 3 options doesn't work then its hard drive failure consider replacing your hard drive.
I was able to recover my computer using recovery CD. First two options failed.


text:
Q: How do you put a transparent screen over a GWT widget? High level abstraction:
In GWT, I need to create some sort of GUI feedback to show that a widget is either selected and/or has a mouse hovering over it.
Medium level abstraction:
My plan is to place a colored-transparent-screen over the widget. Think of a physical box with stuff in it... and now place a piece of glass with some coloring over the box.
I don't really know where to start on creating this sort of effect. My best guess would be to embed the widget into some sort of GWT widget.
(The GWT Cell widgets have some nice highlight effects. I would like the "colored-transparent-screen" to look similar to the CellTable highlighting when you mouse over the specific cells... but instead of affecting a cell it will affect a widget)

Use case:
I will have a GWT grid. Each grid cell is a widget (each widget is a grid of grids... with a grid of grids).

A: I used FocusPanel and twiddled with the CSS to achieve what you are trying to do. Which I think would not be necessary if a widget already implements HasFocus - i.e., not necessary to use FocusPanel but still need to twiddle with CSS.


text:
Q: Netbeans, C++ and Git so I'm using NB with the C++ plugin and Git version control so I can work with colleagues.
I don't know what files are supposed to be "tracked" and we are getting problems because if we only add the code files to git, new files are not being automatically add to NB but only in the physical folder. We figured out that the configuration file is the problem but if we had it to repository we get another problem, absolute paths to the files.
What is the solution for this?
Cheers

A:
I don't know what files are supposed to be "tracked"

As a rule of thumb:

*

*Source / test files

*NetBeans project files nbproject (some files only, see below!)

*Possible project related files, that are not generated for each compilation

*Makefile

What shouldn't go into git (and therefore onto your gitignore):

*

*build directory

*dist directory

*within nbproject ignore these:

*

*private dir

*The Package-* and Makefile-* files

About the last (Package-* / Makefile-*) files i'm not completely sure - please try with them on gitignore first.

Let's assume such a project - put everything with a (x) on gitignore:
<project>
|
+- build/ (x)
|
+- dist/ (x)
|
+- nbproject/
|   |
|   +- private (x)
|   |
|   +- some files (as above)
|
+- src/
|
+- test/
|
+- Makefile