How to create a registry that allows the Silverlig

Question:I need to know how can I create a registry that allow the Silverlight applications access to camera and mic.Scenario:I have a Silverlight application that start the WebCam, before it works it shows a Silverlight dialog asking if the user allows t

Login session timeout

:I would like to set a timeout for the login session of x minutes. I have created a SessionListener:public class SessionListener implements HttpSessionListener { @Override public void sessionCreated(HttpSessionEvent event) { event.getSession(

How open default gallery app

:I know it is asked before and I have tried: Intent intent = new Intent(Intent.ACTION_PICK);intent.setType("video/*, images/*");startActivity(intent);But in my Samsung S2 it opens the gallery in selection mode (if I click an item it closes the gallery

How to efficiently parsing large xml files on iOS in order to store the content in SQLite ?

:I'm using libxml2′s DOM parser in my iPhone app to parse a XML file with a hundred thousand lines. I store the content retrieved into a SQLite database. However, this process takes several minutes to complete, too much to be user friendly. My feeling is

How to get a field of a foreign key Model appear in a Django-Serializer?

:I am building a Django application that exposes a REST API by which users can query 2 of my application's models. I'm following the instructions here.My two models are:The Django User model from django.contrib.authThe model shown below.class Profile(mo

CGAL static_cast failing

:For my thesis I am using some CGAL code written by another student a year ago. I cannot get it to build, however.The function that is giving errors is the following:std::set originatingCurves(PL_Arrangement arrangement, VertexHandleSet vert

PHP PDO Transaction with nested PHP check

:i have to do 2 MySql-queries:SELECT id FROM X WHERE [...]INSERT [...]The second query should only be executed, if the first query returns an correct id.Is it possible, to mix PHP conditions between both queries?Eg.try{ $dbh->setAttribute(PDO::ATTR_

Get country code based on user's current location Android

:I have already tried out the following code to get country code nameTelephonyManager tm = (TelephonyManager)getActivity().getSystemService(getActivity().TELEPHONY_SERVICE); String countryCodeValue = tm.getNetworkCountryIso();But I guess this does

How to analyze a string in java to make sure that it has both letters and numbers? [closed]

:I need to analyze a string in JAVA to find out if it has both letters and numbers. So this is what I have so far.The variable pass is a String of maximum 8 characters/numbers that is inputted by the user. if(pass.matches("[^A-Za-z0-9]")){System.out.pri

jquery height returning px not vh

:Soo, Im working on an html-editor and setting vh values to div's. But when I try to use $(id).height(); or $(id).css("height"); it is always returning px value and not the vh. This should not be a problem, but I was planing on making is to a user coul

Permission is only granted to system apps in Android Manifest

:While i am inserting this permission in manifest it shows error " Permission is only granted to system apps"Actually i used this permission for developing application based on Oauth2 token. But i cant enable this permission. Can any Help me? 1:MODI

jQuery .on click works only the first time for dynamic elements

:I have a widget that inserts dynamically into the web page using ajax and putting its own jquery in the header, everything works fine.but when in that widget I paste some extra scripts to add some dynamically added elements waiting on user input, they do

Relational Query in Parse

:I have 4 classes in Parse. I am using JavaScript.1) Rangoli - Main item objects2) Categories - List of all categories3) Users - List of all users4) ItemCategories - List of categories that each items are assignedBelow is the structure of all classes.Now

Getting ipad device information using safari web browser

:We have an web application which users access from the iPad safari web browser.We want certain kind of analytic about the users.I want to know what information can i get through the safari browser about the user`s iPad.Can i access1) iOS version installe

Elasticsearch with mutilple search criteria

:I am try to build a full text search engine using elasticsearch. We have a application which has conferences running across the globe. We have the future and past conferences data. For a POC we have already loaded the conferences details into elasticsear

Correct Way to Add byte Variables into byte Arrays

:What I am trying to do is get input from the user and store it in a byte array. Please note, I must store var1 variable in a byte array and not a list.Console.Write("Enter a number: ");byte var1 = byte.Parse(Console.ReadLine());byte[] byteArray = new b

Can I link multiple contacts to one by programming on WP8.1?

:In People Hub, user can link multiple contacts to one. Here I want to ask if there is a way or API to made it by programming? 1:I find a way, that is you can create some contacts with the same name and the same phonenumbers, the People Hub will link t

Why function execution is completed before I click on OK button in an Alert android?

:When I want to retrieve a value from an Alert box in android, it returns before I click on OK is the function I made:public String enterSecretCode(){ AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle("Secret Cod

MVC3, Unity Framework with multiple configurations

:We have a multi-company capable site which requires unique business logic for each company. We are using constructor dependency injection in our controllers, but would need to swap the unity container being used based upon a user's company. I was thin

custom authentication with devise for an API

:so i have a little tricky combination hereCompany has many UsersUser belongs to CompanyThe User is managed for authentication with deviseclass User < ActiveRecord::Base belongs_to :company devise :database_authenticatable, :registerable, :recoverable,

Unwanted backslash added to file saved by java method

:In my spring project, one of my service classes has this method to save a file named in disk:public void create_properties(String maquina, String usuario, String senha) { System.out.println("create_properties"); Properties pro

What does `sort -t' ' -rn +2 -3` do in this pipeline?

:I have below code snippet written by someone but I don't understand what sort -t' ' -rn +2 -3 aux|tr -s ' '|cut -f1-3,11 -d' '|grep $USER|sort -t' ' -rn +2 -3|cut -f2 -d' '|head -5Especially +2 and -3 options. I know -r is for reverse

Filter Chain not autowiring into my custom filter class

:I am implementing a custom filter by extending UsernamePasswordAuthenticationFilter and overriding the requiresAuthentication method. However, in that method, I need to have access to the filter chain. Therefore I autowired it in. However, when trying to

Why does my form in Django save successfully except for one field?

:my form in is then passed to this method in my, if I go into python shell and print objects from MyProfile, all of the fields show values except for nearbyzips, which shows None. As you can see below, I am trying to manually assign a v

Behat works fine but PhantomJS fails on dropdown menu when trying to click

:Gherkin below works fine with behat but when I use PhantomJS I get error on When I follow "Profile" line below:Note: The element is a dropdown menu from bootstrap so it toggles after click.Error:Exception thrown by (//html/.//a[./@href][(((./@id = 'Pr

 6379    1 2 3 4 5 6 7 8 9 10 Next Last