gopalanraja's Profile




  • Asked on May 6, 2019 in Spring.
    //qInfo is qt5.5+ only.
    qInfo() << "C++ Style Info Message";
    qInfo( "C Style Info Message" );
    qDebug() << "C++ Style Debug Message";
    qDebug( "C Style Debug Message" );
    qWarning() << "C++ Style Warning Message";
    qWarning( "C Style Warning Message" );
    qCritical() << "C++ Style Critical Error Message";
    qCritical( "C Style Critical Error Message" );
    // qFatal does not have a C++ style method.
    qFatal( "C Style Fatal Error Message" );

    Though as pointed out in the comments, bear in mind qDebug messages are removed if QT_NO_DEBUG_OUTPUT is defined ,If you need stdout you could try something like this (as Kyle Strand has pointed out):

    QTextStream& qStdOut()
        static QTextStream ts( stdout );
        return ts;

    You could then call as follows:

    qStdOut() << "std out!";
    • 1 answers
    • 0 votes
  • Asked on May 6, 2019 in Tensorflow.

    A couple of years ago, deep learning started to outperform all other machine learning algorithms when giving a massive amount of data. Google saw it could use these deep neural networks to improve its services:

    • Gmail
    • Photo
    • Google search engine

    They build a framework called Tensorflow to let researchers and developers work together on an AI model. Once developed and scaled, it allows lots of people to use it.

    It was first made public in late 2015, while the first stable version appeared in 2017. It is open source under Apache Open Source license. You can use it, modify it and redistribute the modified version for a fee without paying anything to Google.

    • 1 answers
    • 0 votes
  • Asked on May 6, 2019 in Linux.

    The permissions on a file can be changed by ‘chmod’ command which can be further divided into Absolute and Symbolic mode. The ‘chown’ command can change the ownership of a file/directory. Use the following commands: chown user file or chown user:group file.

    • 1 answers
    • 0 votes
  • Asked on May 6, 2019 in Python.

    In the above program the syntax error is occur

    prog.pas:1: error: undeclared identifier `from’ (first use in this routine)
    prog.pas:2: error: (Each undeclared identifier is reported only once
    prog.pas:3: error: for each routine it appears in.)
    prog.pas:4: error: syntax error before `bs4′

    this code is not able to get the output


    • 1 answers
    • 0 votes
  • Asked on May 6, 2019 in R Programming.

    Quick Dive Into R. …

    R Basics — R Programming Language Introduction. …

    Learn Data Science With R. …

    Learn R for Business Analytics from Basics. …

    R, ggplot, and Simple Linear Regression.

    • 2 answers
    • 0 votes
  • Asked on March 27, 2019 in Python.

    The most basic three-dimensional plot is a line or collection of scatter plot created from sets of (x, y, z) triples. In analogy with the more common two-dimensional plots discussed earlier, these can be created using the ax.plot3Dand ax.scatter3D functions. The call signature for these is nearly identical to that of their two-dimensional counterparts, so you can refer to Simple Line Plotsand Simple Scatter Plots for more information on controlling the output. Here we’ll plot a trigonometric spiral, along with some points drawn randomly near the line:

    In [4]:
    ax = plt.axes(projection='3d')
    # Data for a three-dimensional line
    zline = np.linspace(0, 15, 1000)
    xline = np.sin(zline)
    yline = np.cos(zline)
    ax.plot3D(xline, yline, zline, 'gray')
    # Data for three-dimensional scattered points
    zdata = 15 * np.random.random(100)
    xdata = np.sin(zdata) + 0.1 * np.random.randn(100)
    ydata = np.cos(zdata) + 0.1 * np.random.randn(100)
    ax.scatter3D(xdata, ydata, zdata, c=zdata, cmap='Greens');

    Notice that by default, the scatter points have their transparency adjusted to give a sense of depth on the page. While the three-dimensional effect is sometimes difficult to see within a static image, an interactive view can lead to some nice intuition about the layout of the points.

    • 1 answers
    • 0 votes
  • Asked on March 27, 2019 in Django.

    Django is a high-level Python Web framework. It helps to create websites with ease. Django takes care of most of the irritating parts in Web Development. It is free and open source Web framework with an excellent documentation.

    • 1 answers
    • 0 votes
  • Asked on March 27, 2019 in Django.
    class Customer(models.Model):
        name = models.CharField(max_length=100)
        email = models.EmailField(max_length=100)
        address = models.CharField(max_length=100)
        purchase_history = models.ForeignKey('cart.Invoice')
    class Staff(models.Model):
        name = models.CharField(max_length=100)
        email = models.EmailField(max_length=100)
        address = models.CharField(max_length=100)
        bio = models.TextField()
        position = models.CharField(max_length=20)

    As you can see these two models are legitimate models with fields, but they do have common elements. In a lot of cases it is fine to leave them this way. However, if we use these same fields yet again it would be a good idea to use an abstract base class.

    • 1 answers
    • 0 votes
  • Asked on March 27, 2019 in Django.
    How To Create a Django App and Connect it to a Database
    1. Step 1 — Create the Initial Django Project Skeleton. …
    2. Step 2 — Edit Settings. …
    3. Step 3 — Install MySQL Database Connector. …
    4. Step 4 — Create the Database. …
    5. Step 5 — Add the MySQL Database Connection to your Application. …
    6. Step 6 — Test MySQL Connection to Application.
    • 1 answers
    • 0 votes
  • Asked on March 27, 2019 in Django.
    Set up a static files mapping
    1. Go to the Web tab on the PythonAnywhere dashboard.
    2. Go to the Static Files section.
    3. Enter the same URL as STATIC_URL in the url section (typically, /static/ )
    4. Enter the path from STATIC_ROOT into the path section (the full path, including /home/username/etc )
    • 1 answers
    • 0 votes