python – Package Import error after installation while package exist in sys.path

I install package androidlib in Python using and this package egg also exist in sys.path but unable to import it

kallz@kallz:~/Project/AndroidLib$ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08) 
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', 
'/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', 
'/usr/local/lib/python2.7/dist-packages/dlib-19.4.99-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/Theano-0.10.0b1-py2.7.egg', 
'/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0']
>>> import opencvlib
>>> import androidlib
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named androidlib

لینک منبع

Connecting Java to MySQL – Package does not exist

I have spent many hours trying to figure this out and have followed many instruction but to no avail.

I am trying to connect my script up with my MySQL database, I have install the MySQL driver, or at least I think I have, I have added it to the class path, then I also installed it as a user library.

Then when I compile it through the command line I get an error:
error: package com.mysql.jdbc does not exist

I even downloaded an earlier version of the driver jar and this did not work, I have spent probably a solid 8 hours trying to figure this out

My code:

String[] settings = new String[10];

    try {

        FileReader fr = new FileReader("settingsFile.txt");
        BufferedReader textReader = new BufferedReader(fr);

        for(int i=0; i <=9; i++){
                settings[i] = textReader.readLine();


    } catch (IOException e) {
        JOptionPane.showMessageDialog(null, "Unable to connect to database.nSettings file Not Found");

    String host = settings[2];
    String uName = settings[3];
    String uPass = settings[4];

    try {
        String driver = "com.mysql.jdbc.Driver";
        Connection con = DriverManager.getConnection(host, uName, uPass);

        JOptionPane.showMessageDialog(null, "Connection to database established");
    catch ( SQLException | ClassNotFoundException | IllegalAccessException | InstantiationException err ) {
        JOptionPane.showMessageDialog(null, err.getMessage( ) + "nnDid not connect.");


Please help, I think I am going grey over this.

لینک منبع

go – function visibility in the same package

If I understand correctly – all the source files of a package live at the same scope.

I have two files – room.go:

package main

func newRoom() *room {
    return &room{
        forward: make(chan []byte),
        join:    make(chan *client),
        leave:   make(chan *client),
        clients: make(map[*client]bool),
        tracer:  trace.Off(),


package main

func main() {    
    r := newRoom()

When I am compiling the code I get the error:

.main.go:34: undefined: newRoom

Why ?

Full code is here

لینک منبع

android – share data between two flavoured apps having same package name using shared preferences

I have one app which is using different build variant(flavour), Now i want to share data between these flavoured apps(different apps for End User). Now my question is that how can i use shared preferences as only one package name mentioned in manifest file.

//To set data

SharedPreferences settings = getSharedPreferences(MyPref, Context.MODE_WORLD_READABLE);

SharedPreferences.Editor editor = settings.edit();

editor.putString(“UserEmail”, m_email);

editor.putString(“UserPass”, m_pass);

editor.putString(“LoggedUserName”, m_statusData);


//To Get data

Context con = getApplicationContext().createPackageContext(“my_packagename”, 0);

SharedPreferences pref = con.getSharedPreferences(MyPref, Context.MODE_PRIVATE);

EmailId = pref.getString(“UserEmail”, email);//got always null

Password = pref.getString(“UserPass”, Password);//got always null

But it is not working. What to do now?

لینک منبع

image processing – Error using R magick package

I am trying to save a jpeg picture in png format using the magick package in R and I’m facing an error.

Below is the error that I get using this code:


testPic <- ""

image <- image_read(testPic)
image_convert(image, format = "png", depth = NULL)
Error in magick_image_write(image, format, quality) : 
  Magick: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `' @ warning/png.c/MagickPNGWarningHandler/1656

لینک منبع

Meteor Email package sends the email to the same email address

I am working on an application that sends email after a verification process. The email works, however it sends only to the same email address, even though the data has different email addresses for the from and to options. I already tried hard-coding the email addresses:

  from: "",
  to: "",
  subject: 'Feedback',
  text: data.enquiry

But it sends to How do I fix this one?

لینک منبع

vuejs2 – How to publish an Vue.js NPM package with a Vuex module?

I am developing some Vue components that I would like to place in an NPM package. The problem that I am facing is that I have no idea how to publish components that rely on a Vuex module.

I have neatly placed all the code needed for this library of components into a separate Vuex module but how do I register my module when somebody imports my package?

A good start would be creating a plugin I guess but I would still need to check for a Vuex instance and somehow register my module.

I’ve seen plenty of tutorials on how to publish Vue components but not something more complex.

Any suggestions?

لینک منبع

Amazon gets patent for package parachutes

Now with parachutes!
Now with parachutes!

Image: Amazon/REX/Shutterstock

It’s no secret that Amazon’s been pursuing the delivery-by-drone method for a while now, but now we have a better idea about the next step in the evolution of that plan thanks to a new patent the mega-company received. 

As flagged by GeekWire, Amazon has received a patent for a shipping label with a parachute built in, intended for “packages to be dropped from the aerial vehicle, yet land at the package’s destination without damage.” 

Amazon's nifty package parachute

Amazon’s nifty package parachute

Image: US Patent/trademark office

The parachute would be built in as part of the shipping label but done so using a harness or other method that keeps the cords of the parachute from getting tangled, screwing up the parachute, and sending your latest Precious Moments figurine purchase crashing to the ground.

According to the patent, the parachute could be made from any number of materials, including paper, canvas, silk, nylon, or a combination. 

The execution of the plan is simple: the drone launches with the package, flies to its location, confirms its location (via GPS, cell location, or even an onboard camera), drops the package to the ground safely, and then flies away.

Video or other sensors like radar can confirm the successful deployment of the parachuted package. 

Here comes your package! Plop!

Here comes your package! Plop!

Image: US Patent/Trademark office

There are still plenty of things to take into consideration, too, like the weight of the package and rate of descent. Other issues include the exact location of delivery. Can a drone safely maneuver its way to your front porch like a UPS driver or will it be plopped in your yard where it’s exposed to the elements, from rain to the neighbor’s dog?  

The patent does note that if the package winds up, say, on your roof or in a tree, the drone will be able to communicate with a control center to let them know. Perhaps a push notification of hey, the package is stuck in a tree, whoops, my bad.

If you’re into that sort of thing, the entire patent goes into more detail about the materials that could be used, how the parachute would fit into the label, and all kinds of other possibilities. MAGIC POSSIBILITIES.

Https%3a%2f%2fblueprint api uploaders%2fdistribution thumb%2fimage%2f2391%2f28c8f681 7ea9 4888 acb0 a9805bcd3d9b

لینک منبع