Digitech USB multi-effect with Jack

I’m newbie in Ubuntu and I’m having a hard time to work with jack audio. I have started to use Ardour and the problem is the Jack server apparently does not recognize my digitech rp500 pedalboard connected through USB. When I use it in Windows with Adobe Audition it’s just plug&play. In Ubuntu I have […]

Keyboard pass-through from one Ubuntu PC to another?

I have two PCs running Ubuntu. Both are on a common LAN and I can even connect them directly to each other with an ethernet cable. Now, it just so happens that I hate the chiclet keyboard on the laptop. I have a mechanical keyboard attached to the desktop, but it’s PS/2, so I can’t […]

Hidden file visible

Okay. So on one of my friends computer, which runs Windows 8, I needed to password protect a folder. I did it using command prompt on windows by running: E: attrib +s +h I then made the batch file to type a password and converted it to a executable file so it couldn’t be edited […]

Intex usb modem is not recognasied in 14.04

Intex usb modem works normally on my windows dual boot but ubuntu 14.04, do not recognise any hardware but the modem shows the sign that it is connected with some device, what are the possible reasons and what should I do to make the modem recognisable?   Asked By – sanjeet kaur        Read Answers […]

What is the name of the process for a running gnome terminal?

What is the name of the process for a running gnome terminal? Does each tab in a gnome terminal have a process, or all the tabs in a gnome terminal have the same process? Thanks.   Asked By – Tim        Read Answers     0   

Issues with Ubuntu Unity

When I boot into Ubuntu on my Dell Dimension 9100 with Nvidia 7300 le graphics, everything works fine until I login, then unity freezes after a few seconds. I need some way to boot into Ubuntu in terminal only mode without already being logged on, then some commands that will either replace unity with gnome […]

Fifth partition

I’m trying to install to my Dell Latitude E6540 ubuntu 14.04 and windows 8.1. The problem is that I want to make a fifth partition for storage. The 1st partition is for ubuntu os. The 2nd is for swap(extended). The 3rd is something windows reserve for the system(I don’t know why). The 4th is for […]

GitHub Web Hook POST incomplete and broken up

So I setup a web hook on GitHub for one of my repos, for when pushes are made to it. I have a Django application running live. I set up a URL for the web hook to post to, and when it recieves the post from GitHub it just prints out the result to the […]

cannot scroll up and down on boot select menu with new keyboard

I just bought a razer deathstalker, which works great on my windows boot. However, I went to restart my system, and when I got to the boot menu, it was unable to move up and down to select a boot. This keyboard is very sluggish on my ubuntu system is there a way to fix […]

Tilde key on Mac Air with Ubuntu

By default, no layout on my Macbook Air allows me to print backtick (`) and tilde (~) symbols. Instead, I get backslash, pipe or whatever, depending from the layout. I changed the behavior of the key that I want to use to print tilde using the following commands: xev <press tilde button> keycode <keycode from […]

Django and mod-wsgi not laoding

I am strugglinf getting django working with mod_wsgi and Apache. I tested the setup with a generic test.py file to see if Apache and mod_wsgi were working ok, and they are, but now trying to get Django going, I’m stuck. Here are details from the httpd.conf: DocumentRoot “/var/www/html/mideastinfo/lib/python2.7/site-packages/django/bin/mideastinfo” # First, we configure the “default” to […]

many to many relationship between different types using a through table

I’ve been trying to understand how to get a many to many relationship working correctly. Here’s the simplified model of Entity and Event. The relationships I’m trying to model are: Entities have a many to many with other Entities Entities have a many to many with Events From a lookup perspective, here’s what works so […]

Django : Get specific columns from multiple tables

I need to fetch columns from multiple tables, how do I achieve this? UserLog +————+———-+——+—–+———+—————-+ | Field | Type | Null | Key | Default | Extra | +————+———-+——+—–+———+—————-+ | log_id | int(11) | NO | PRI | NULL | auto_increment | | time | datetime | NO | | NULL | | | ip_address […]

Django – How to get the length of the array through GET request?

I have a http get request that has an array, particularly: [29/Sep/2014 16:04:47] “GET /webapp/ajax_retreiveServerSideUsernames/?draw=1&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5 Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=& columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&order%5B0%5D%5Bcolumn%5D=0&order%5B0%5D%5Bdir%5D=asc&start=0&length=10&searc h%5Bvalue%5D=&search%5Bregex%5D=false&csrfmiddlewaretoken=Something&_=1412028280135 HTTP/1.1″ 200 1436 My question is that how do I get the “length” of a particular array in a GET request? For example the array order:order[i][column]. However, there may be cases with unkown array size. If I […]

django-autocomplete-light with User – choices should be a queryset

I can’t seem to make django-autocomplete-light work with the django contrib user model. Always get exception ‘choices should be a queryset’ This is my autocomplete class (defined in autocomplete_ligh_registry.py): import autocomplete_light from django.contrib.auth.models import User class UserAutocomplete(autocomplete_light.AutocompleteModelBase): search_fields = ['first_name'] model = User autocomplete_light.register(UserAutocomplete) my form (in forms.py): class TransactionForm(forms.Form): mymodel = forms.ModelChoiceField( required=True, queryset=User.objects.all() […]

Use dynamic alias in Python Django when switching from Debug to Production

I have the following http address when running in development (manage.py runserver) http://127.0.0.1:8000/ When using wamp i use an alias named picon http://localhost/picon/ When clicking on links from the nav bar the navigation works fine for both deployments. But when i click from the following views.py the urls break; def addcustomer(request): form = AddCustomerForm(request.POST or […]

Turn off Celery task delay on development server

I’m using Celery on Heroku with RabbitMQ and the following settings: # settings.py DEFAULT_AMQP = “amqp://guest:guest@localhost//” BROKER_URL = os.getenv(‘CLOUDAMQP_URL’, DEFAULT_AMQP) CELERY_TASK_SERIALIZER = ‘pickle’ CELERY_RESULT_SERIALIZER = ‘json’ CELERY_ENABLE_UTC = True CELERY_STORE_ERRORS_EVEN_IF_IGNORED = True CELERY_RESULT_BACKEND = False BROKER_POOL_LIMIT = 5 # trying to clean up this memory leak CELERYD_MAX_TASKS_PER_CHILD = 5 CELERYD_TASK_TIME_LIMIT = 60*10 # time limit […]

How to display multiple views in a Django template?

I want to display the following two views in a template index.html. class IndexView(generic.ListView): template_name = ‘items/index.html’ context_object_name = ‘popular_items_list’ def get_queryset(self): return Item.objects.order_by(‘-rating’)[:5] class tryView(generic.ListView): template_name = ‘items/index.html’ context_object_name = ‘latest_items_list’ def get_queryset(self): return Item.objects.order_by(‘pub_date’)[:5] Is there a way to combine these two views into one view? How should I get both query sets […]

Django TestCase error in parent class setUp

I am a unit-test newbie executing the following tests in Django 1.4 using TestCase and mock: from django.test import TestCase from mock import patch class BaseRegistrationTestCases(TestCase): def setUp(self, backend): # use these common fields for building mock form data self.form_fields = ( ‘form_email’, ‘form_companyname’, ‘form_companytype’, ‘form_region’, ‘form_socialgoals’, ) self.route = ‘/auth/registration/{backend}/’.format(backend=backend) @patch(‘authentication.views.RegistrationView._get_user_by_backend’) @patch(‘authentication.views.RegistrationView._set_base_context’) def test_invalid_form(self, […]

Answer by abstractpaper for Django 1.7 – Modifying a models property

According to the documentation, ready() method of AppConfig is called when the registry is populated which means models are also loaded, therefore referencing models shouldn’t be a problem. That line of code is still not valid as it is in ready() though, as pointed out in the documentation: You cannot import models in modules that […]

Django: in admin inline model cant have foreign key since main model isnt saved yet

The dumbed version of my models are as follow: class RandomModel (models.Model): last_edition_date = models.DateTimeField(auto_now_add=True) class TranslatedText (models.Model): content = models.CharField(max_length=200) language = models.CharField(max_length=7, choices=LANGUAGES) media_name = models.ForeignKey(‘Media’, related_name=’media_name’, null=True, blank=True) media_desc = models.ForeignKey(‘Media’, related_name=’media_desc’, null=True, blank=True) genre_name = models.ForeignKey(‘Genre’, related_name=’genre_name’, null=True, blank=True) genre_desc = models.ForeignKey(‘Genre’, related_name=’genre_desc’, null=True, blank=True) And in admin.py : class TranslatedTextInlineMediaName(admin.TabularInline): […]

Apache will not serve Django static files

So I’ve seen alot about Apache not serving Django admin static files, but for some reason, Apache is not serving any static files. It understands and finds the templates, but no images, css, or javascript is loaded. EDIT: I added the STATIC_ROOT and I was able to collectstatic files, but it still doesn’t serve them […]

How to start an activity by the click on an image in widget?

Intent intent = new Intent( context, ColorConfigure.class); Intent.putExtras(AppWidgetManager.EXTRA_APPWIDGET_ID, appwidgetId ); PendingIntent pi = PendingIntent.getActivity( context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); RemoteViews r = new RemoteViews( context.getPackageName(), R.layout. activity_widget); r.setOnClickPendingIntent(R.I’d.pic, pic); The above code isn’t working for the time i.e., when I start the widget for the first time then widget gets loaded easily but when I go […]

django facebook how to redirect back to previous page

I am using the django facebook app, how do I get the user redirected back to previous page after login ? I tried to use the “next” hidden input box, but that did not work . <input type = “hidden” name = “next” value = “{{ request.GET.next }}” />   Asked By – Prince Gato […]

How to make a Django view ONLY accessible to Unauthenticated users?

I’m building a Django API view by extending the rest_framework.views.APIView class. I have successfully built many APIs that are only callable by an authenticated user. I have done this by adding: permission_classes = [permissions.IsAuthenticated,] There are some APIs that I only want unauthenticated users to call. Such as “ForgotPassword”. Basically, I want to ensure that […]

Print all sequences of numbers using recursion

So I have this assignment in my computer algorithm class: Write a recursive algorithm that, given a positive integer n >= 1, prints all sequences of numbers k >= 1 and 1 <= i1 < i2 <…< ik <= n. For example: if n=3, then the output will be 1 1,2 1,2,3 1,3 2 2,3 […]

For developing a website with Django, how can I use localhost as a functioning SMTP server?

I’m developing a website with Django, and I’m currently working on the whole authentication setup, specifically the part where the user can use a password reset form that sends a one-time email with a link to use for resetting the password. However, if I try to use ‘localhost’ (currently my own personal machine) to send […]

Pass arguments to a django template using AJAX

I am new with Django and JavaScript and I am struggling trying to pass some values from a html table rendered with django-tables2 I want to open a django template passing 3 arguments. I have an html table with a drop down button with several options. every open a different django template. I get the […]

Using QApplication::setStyleSheet to override QSS attributes set in Qt

I created a button in Qt and gave it the QSS attribute background-color: gray;, while my external styleheet has set the QSS attribute of the same button to background-color: blue;. When I run the application the button is gray, even though the style sheet is applied after the QWidget::show() is called and just before QApplication::exec(), […]

Import Data Connection Database to Project

I built a winforms application using VS 2010. It connects to a database through SQL Express but did not include a local copy of the DB in the project(i.e .mdf). On publishing the application and consequently installing it on a client machine an SQL server instance error was thrown. I have resorted to creating a […]

Error opening solution in VS2010 – The project type is not supported by this installation

When trying to open a solution in VS2010 Professional, I get this error: The project type is not supported by this installation. I already looked at this thread and none of it seemed to relate to my specific situation. When I view the csproj in notepad, it shows this: <?xml version=”1.0″ encoding=”utf-8″?> <Project ToolsVersion=”4.0″ xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″> […]

Unable to create Windows 8.1 Apps Using Qt Libs

I am trying to test an app I’ve created with Qt in Windows 8.1. And created deplorable binary as the instruction here. I’ve followed this link, and created an appx package using the command. MakeAppx.exe pack /d C:/Users/user1/Documents/MyApp_Win-Sep-27-2014 /p C:/Users/user1/Documents/MyApp.appx I’ve self signed the package using SignTool.exe and these commands. MakeCert /n CN=myComp,O=myComp,L=miami,S=florida,C=us /r /h […]

Qt: Add qml.qrc to git repository or to .gitignore?

I’m wondering weather the qml.qrc file gets completely generated by QMake through the other *.qml files? So can I safely add the qml.qrc to the .gitignore file? Or does it contain some other important information such as which files it contains? Thanks in advance!   Asked By – mozzbozz        Read Answers     0   

Use authentication token of Django in backend

i sent a Get request to my django backend with a Token authentication. After the authentication was succesful, I want to use the provided Token in my backend. I already know how to check if it is a Token authentication by this piece of code: if isinstance(request.auth, obd_data.token.UserIDToken): #Here I want to get the token […]

Loading Qt GUI Widgets on application startup is significantly slower on Windows compared to Linux

We have a quite GUI heavy application with several nested tabwidget structures with a lot of widgets (in total approx. 10k) inside. During application start all of these get initialized, which causes a very long start up time of about 1min on Windows systems. The exact same application on Ubuntu takes about 5-10 seconds to […]

Why is the anonymousUser authenticated in Spring Security?

This is my main controller: package org.demian.demibox.controllers; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class MainController { private String getUsername() { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth.isAuthenticated()) return auth.getName(); else return null; } @RequestMapping(value = “/”, method = RequestMethod.GET) public String showHome() { String username = getUsername(); System.out.println(username); if (username […]

Running python script after 2-5 times (random) gives me error (will work again if I restart the django server!)

let’s say I created a basic web for converting youtube videos to gifs this is my views in django code from django.shortcuts import render from django.http import HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response import pafy from PIL import Image from moviepy.editor import * import os context = RequestContext(request) if request.GET: link = […]

Qt – how to use layouts in Qt designer

I have some troubles in using layouts. as you know Qt designer has some layouts by default but they cant help me. in the widgets bar in layouts section there are some customized layouts but I cant use them , they are actually do nothing when i insert them into my ui. now anyone can […]

How to give default spacing for my header names in gridview

I have made a windows application made in Visual basic, and i have added a grid view to that. the grid view populates files from different folders and list in the grid view. The headers of the grid view are: first a check box, Second:- Drawing Number, Third:- Drawing , Fourth :- Draft path. So […]

Cant install anything on ubuntu 14.04 nor updates

installArchives() failed: (Reading database … (Reading database … 5% (Reading database … 10% (Reading database … 15% (Reading database … 20% (Reading database … 25% (Reading database … 30% (Reading database … 35% (Reading database … 40% (Reading database … 45% (Reading database … 50% (Reading database … 55% (Reading database … 60% (Reading database […]

Changing the tab widget design in QT

I have been searching for a way to alter the standard tab widget in QT off and on for about 2 weeks. Does anyone know how to do this? My goal is for it too like similar to the picture posted   Asked By – user3878223        Read Answers     0   

QTableView issue with resizeEvent()

I have an object that inherits QTableView and overrides the resizeEvent() method to set the widths of the table columns to a percantage of the available space if the table as a whole is resized. Code is as follows: void DDUTableView::resizeEvent(QResizeEvent* ev) { int num_columns = NUM_ELEMENTS(COLUMN_WIDTHS); if (num_columns > 0) { int width = […]

Available / Busy status button widget for android

I’ve tried to find examples on the Internet as well as other solutions but have not found. I was thinking to try to get help here. The plan was to do so, that is one of the two widgets “available” status, and the other “busy” status. If, for example, pressing the “busy” status upon key […]

Redefinition different basic types => typedef

After to have been aware of the persons who had the same problem than mine, I still get this error : error C2371: ‘ST_ELLIPSE’ : redefinition; different basic types see declaration of ‘ST_ELLIPSE’ C2371: ‘ST_VECTEURS’ : redefinition; different basic types see declaration of ‘ST_VECTEURS’ ‘ST_ROI’ : redefinition; different basic types see declaration of ‘ST_ROI’ ‘ST_CONVERSION’ […]

How to authenticate delphi rest server with XMLHttpRequest?

I need help here. I’ve created a basic Delphi rest template using the wizard and setup a simple authentication method using the AuthenticationManager. procedure TWebModule1.DSAuthenticationManager1UserAuthenticate( Sender: TObject; const Protocol, Context, User, Password: string; var valid: Boolean; UserRoles: TStrings); begin valid := (user = ‘username’) and (password = ‘password’) end; Now I need to pass both […]

Integrating my own middleware into Qt GUI application

I have some piece of C code(some part of android middleware). Now all I want to do is to integrate this middleware into Qt GUI application. With my Qt end product I should be able to select required features from my middleware and output new middleware with only selected features. Didnot found any relevant Question […]

Cant launch QtCreator debugger since XCode update to version 6

Xcode updated itself to version 6 and now I can’t launch QtCreator in debug mode. Does anyone know how to solve this?   Asked By – Nuno Santos        Read Answers     0   

How to validate QlineEdit in order to allow to write a string only or allow to write numbers only

I have a QLineEdit. I want when the user enters data in that field allows only to enter the numbers, or allows only to enter the text string, and so on. I know the method to do that and that by using void QLineEdit::setValidator (const QValidator * v), but I don’t know how to use […]

How to push values to QML property variant two dimensional array – dynamically?

This is what I have tried: import QtQuick 2.0 Rectangle { property variant twoDimTempArray: [[]] property variant oneDArray: [1,2,3] MouseArea { anchors.fill: parent onClicked: { twoDimTempArray.push (oneDArray) twoDimTempArray[0].push (oneDArray) twoDimTempArray[0][0] = oneDArray[0] console.log (twoDimTempArray) } } } They all results in []. How to push values in QML property variant two dimensional array?   Asked […]

Next Page »