w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Ratings query - percentage of ratings for specified id over ratings for ALL ids
You could try this solution: DECLARE @try_id INT; SET @try_id=2; SELECT r.try_id, SUM(r.rating) AS ratings_per_try, SUM(SUM(r.rating)) OVER() AS ratings_overall, SUM(r.rating)*1.0 / NULLIF(SUM(SUM(r.rating)) OVER(), 0) AS percent_try FROM Table r GROUP BY r.try_id

Categories : SQL

Displaying Individual User Ratings (letsrate gem)
Hope it will be help for you: Please add this method in the helper:- def rating_for_user(rateable_obj, rating_user, dimension = nil, options = {}) @object = rateable_obj @user = rating_user @rating = Rate.find_by_rater_id_and_rateable_id_and_dimension(@user.id, @object.id, dimension) star = options[:star] || 5 stars = @rating ? @rating.stars : 0 disable_after_rate = options[:disable_after_rate] || false readonly=false if disable_after_rate readonly = current_user.present? ? !rateable_obj.can_rate?(current_user.id, dimension) : true end content_tag :div, '', "data-dimension" => dimension, :class => "star", "data-rating" => stars, "data-id" => rateable_obj.id, "data-classname" => rateable_obj.class.name, "data-disable-after-rate" => disable_

Categories : Ruby On Rails

wp8 get icons of all apps installed on the device
You can't do that. There is no API for that. The app you provided was developed by Samsung for it's devices only. That's why they have an access to special hidden API's and abilities. Also, you question is not very unique.

Categories : C#

List out the installed apps android
Try this: public class AppList extends Activity { private ListView lView; private ArrayList results = new ArrayList(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); lView = (ListView) findViewById(R.id.list1); PackageManager pm = this.getPackageManager(); Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); List list = pm.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED); for (ResolveInfo rInfo : list) { results.add(rInfo.activityInfo.applicationInfo .loadLabel(pm).toString()); Log.w("Installed Applications", rInfo.activityInfo.applicationInfo .loadLabel(pm).toString()); } lView.setAdapter(new ArrayAdapte

Categories : Java

Android get all Apps installed on certain First Install Dates
Second answer in this question can help you with finding the date. If date is yesterday, include the app in your list.

Categories : Android

How to get installed applications in Android and no system apps?
final PackageManager pm = getPackageManager(); List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA); Using PackageInfo: private boolean isSystemPackage(PackageInfo packageInfo) { return ((packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } Using ResolveInfo: private boolean isSystemPackage(ResolveInfo resolveInfo) { return ((resolveInfo.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } Using ApplicationInfo: private boolean isSystemPackage(ApplicationInfo applicationInfo) { return ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } This filters the system package. See this question. Credits: Nelson Ramirez and Kenneth Evans.

Categories : Android

How to run external, downloaded yet not installed apps on Android?
You can use Android's class loaders (in this particular case probably the PathClassLoader) to dynamically load classes at runtime without installing them. Take a look at e.g. https://github.com/Rookery/AndroidDynamicLoader to see how this can be implemented. Plugin apk's might not even need something that complicated but can just communicate via Intents sent to exported activities and posted back results. You can use PackageManager (http://developer.android.com/reference/android/content/pm/PackageManager.html) to query for which intents activities are registered.

Categories : Android

NoClassDefFoundError on apps that doesn't have newrelic installed
One possible solution: you may not be seeing the 'libs' directory appearing in your other applications in Eclipse. To fix this, just refresh the project (it's in the right-click menu) and the 'libs' directory will show.

Categories : Android

Returning a set of installed applications without system apps
Check out the comment from @Wand Maker for this question: How to get installed applications in Android and no system apps? I think you need to use PackageManager to find out all the apps that support intent-filter with action "android.intent.action.MAIN" and category "android.intent.category.LAUNCHER" – Wand Maker Jul 6 at 15:23 You can do this by using PackageManager.queryIntentActivities (http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent, int)) E.g. Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); List<ResolveInfo> activities = getPackageManager().queryIntentActivities(intent, 0);

Categories : Java

Android: Determine category of installed apps
No, because apps don't have categories. Apps don't need to be installed through google play, the categories on other stores won't be the same. It may never have been installed from a store to begin with- I sideload apps all the time written by myself or friends. Th concept doesn't exist. Not to mention Google Play categories are pretty bad- things frequently don't fall into one or the other, the descriptions are vague, and they're way too broad- they need at least 2 or 3 levels of subcategories to make them halfway usable.

Categories : Android

Is it fine to change code in installed apps in django
I think you should be fine, as long as you stay away from editing your models, all you are going to do is change 'the way your app works'. If you do edit your models you may have to remove the database and re-sync it.

Categories : Django

Get list of installed apps using Client Object Model
I only know about SharePoint Online 2013 but for that, the apps are listed in a special SharePoint site: https://<tenancyname>.sharepoint.com/sites/AppCatalog You should be able to connect to the list there using CSOM or REST. Not sure that answers your question but maybe it gives some pointers?

Categories : Sharepoint

Does the PayPal REST API Support Desktop/Installed Apps?
REST simply uses HTTP methods to access APIs, so it shouldn't matter whether you have a desktop app. As long as your app can make REST API calls and parse the JSON response, you should be able to use the PayPal REST API.

Categories : Paypal

Django - Dynamically include JS/CSS based on installed apps
You can follow the django admin framework approach. In your base template have an extra section for style and javascript. Based on some condition you can insert the new files. For Example: Define these two blocks in your base template {% block extracss %}{% endblock %} {% block extrajs %}{% endblock %} If you want to add a js or css based on some condition, you can add a check inside {% block extracss %} {% if new_app_installed %} # Insert your CSS {% else %} # Default {% endif %} {% endblock %} You can also check if your plugin app is installed and pass this context variable from view to template. from django.conf import settings if "new_app" in settings.INSTALLED_APPS: is_new_app_installed = True

Categories : Django

Can't copy authorization code when doing oauth for installed apps in phonegap webview
Seems to be a bug in chrome for android https://code.google.com/p/chromium/issues/detail?id=251235

Categories : Android

Through Google Apps Script get all user information on a spreadsheet of a google apps domain
Some of what you are looking for is best requested via the Admin SDK. You may want to also check out other Google Data APIs in more detail, you could put together some good reporting tools. Many of the APIs can be used in Google Apps Script by using the UrlFetch service. There's an OAuth flow built in that service that is quite nice for OAuth 1 flows, and it's not too bad to create a decent Google OAuth 2 flow with UrlFetch as well. Then you can make authenticated requests to those APIs and handle the responses accordingly with Apps Script.

Categories : Google Apps Script

How do you accept a value from a user (textbox) and create a Site (when user hits Submit button) using Google Apps Script and UI Services?
Look at this line: var domain = SitesApp.getActiveSite().getUrl(); You're need to obtain a domain, e.g. example.com, but this line will yield a URI containing google's domain, and a resource path (that contains your domain). Example: https://sites.google.com/a/example.com/mySite/ ^^^^^^^^^^^ When you attempt to create a new site, it cannot be found as a domain. You need to strip the result of getUrl() down to just the domain name. If you're the Domain administrator, you can use this instead: var domain = UserManager.getDomain(); Ordinary domain users don't have access to the UserManager Service, so they would need to parse the site URL to extract their domain. I suggest using parseUri by Stephen Levithan to handle the task: var uri = parseUri(SitesApp

Categories : Javascript

How do I run a user-installed Ruby gem as a different user?
You need to let Ruby know where its gems are installed. The environment GEM_HOME controls this, so you can do something like this: export GEM_HOME=/home/user/.gem/ruby/1.9.1 $GEM_HOME/bin/jekyll help

Categories : Ruby

How to get android play store installed apps packages through android code?
You should use getInstallerPackageName, it retrieves the package name of the application that installed a package. This identifies which market the package came from: http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstallerPackageName%28java.lang.String%29 For the Play Store, you should check if it comes from com.android.vending!

Categories : Android

If user dosen't have Google Drive authority, Google Apps Script couldn't get active user email with "Session.getActiveUser().getEmail()"
It depends on who has access to your app - is it you alone, anyone or anyone, including anonymous. If it is set to anyone or anyone, including anonymous, have you logged in to your gmail account when you visit the google site.

Categories : Google Apps Script

Use a module installed by another user
According to the PyFITS documentation, it looks like the actual modules are installed in lib/python or possibly lib/python<version>/site-packages (depending on the flags they used for the install) under the top-level PyFITS install directory. So, normally you'd want to do something like this: sys.path.append(r'/otheruser/code/pyfits/lib/python') # Might be sys.path.append(r'/otheruser/code/pyfits/lib/python2.7/site-packages') # or something similar import numpy import pyfits If you are able to read the contents of the directory you appended and its subdirectories, you should be good to go. However, as I mentioned in my comment on your original question, you might want to edit your question to include the actual code you're using to do this, since any problem might be easier to

Categories : Python

How to find installed user of msi?
(If you have a sid, you can find out the user name, why not?) But the best way, if the msi is yours, is to save that information during the setup in a registry value, or .ini file you can read out later. There are two properties, "LogonUser", and "USERNAME", the latter is the user really installing. If you have no influence on the msi itself, I am not sure, if it is so easy. Interpreting sids seems a good way then. Nevertheless: The standard way is to use the API routines MsiGetProductInfo() or MsiGetProductInfoEx(). You can google in MSDN. But I am not sure if they always contain information if these data were not registered during setup dialog. So maybe they are empty after a silent install if there was no registration dialog? I have never used them to find the user who has installed

Categories : Wix

How to list npm user-installed packages?
One way might be to find the root directory of modules using: npm root /Users/me/repos/my_project/node_modules And then list that directory... ls /Users/me/repos/my_project/node_modules grunt grunt-contrib-jshint The user-installed packages in this case are grunt and grunt-contrib-jshint

Categories : Node Js

/.rbenv/versions/ doesn't exist for user installed 1.8.7-p374
You obviously have set RBENV_VERSION in your environment, e.g. in your ~/.bashrc (look for export RBENV_VERSION=1.8.7-p374), but that particular Ruby version is not installed. To proceed, first remove that export line and secondly install Ruby 1.8.7 like so: $ rbenv install 1.8.7-p374

Categories : Ruby

How can I use adb to uninstall all 3rd party user apps?
What seems to be the problem? If you have busybox installed - it can be done with this one-liner: adb shell "pm list packages -3 | busybox awk -F: '{print $2}' | busybox xargs sh /system/bin/pm uninstall {} ;" Without busybox you can do iterate through the package list on the PC side: adb shell "pm list packages -3" | sed 's/package:(.*) /1/' | xargs -I '{}' adb uninstall {}

Categories : Android

Ratings bar css
To calculate the proportions of likes would be: 100*likes/(likes+dislikes) As for the first question, why couldn't you just set the background color of .meter-slim to be red for example?

Categories : CSS

OS-X & IZPack: user friendly ways to run installer on OS-X computers with NO Java installed
Since it's a Mac, I can think of 2 ways to skin this cat. Using the Mac wrapper from launch4j. Link: http://sourceforge.net/projects/launch4j/files/launch4j-3/3.1.0-beta2/ This will prompt the user to download the JRE if it is not present or embed the JRE to the installer. Downloading a portable version of a JRE for Mac and create your own Application.app folder that can execute the installer Note that in any case, you must have a JRE to run the installer which will make your installer fatter or will prompt the user for action.

Categories : Java

Bluepill - installed in user RVM - project specific gemset - how to run with sudo without password?
use wrappers and aliases: namespace :bluepill do task :setup do run "rvm alias create #{application} #{rvm_ruby_name_evaluated}" run "rvm wrappers #{application} --no-links bluepill" end end so after this task bluepill is available via #{rvm_path}/wrappers/#{application}/bluepill which will be always the same even if you change ruby version, so it can be added to sudoers for preserving path: deploy ALL=(ALL) NOPASSWD: /home/my_user/.rvm/wrappers/my_app/bluepill and then the tasks can use: sudo #{rvm_path}/wrappers/#{application}/bluepill ... it is important to note here that the wrapper takes care of loading rvm environment because it was lost by invocation of sudo ... but this is just a detail ;)

Categories : Ruby On Rails

Detect whether a user has removed my app from his facebook apps
Alright, so it looks like the permissions are bound to the Session object at creation and no request to confirm them is made when you call getPermissions. What this means is that you can have the out of sync state you're describing where your access token is no longer valid, but your application doesn't know that. I assume what is happening is that you're getting a FacebookRequestError in your postStatusUpdate() method. You should check for this error in your callback and then put the login logic into that method.

Categories : Android

Asana User oauth authenticatication in ios apps
We don't have official iOS examples, but in general OAuth on Asana tries to be as close to "typical" as possible. Check out another SO question, http://stackoverflow.com/questions/5374570/whats-the-best-ios-oauth2-framework, for help with iOS and OAuth 2.0, between that and the developer docs https://asana.com/developers/documentation/getting-started/authentication I hope you find what you need, but if you run into specific issues please share them! In the long-term we're hoping to have a proper iOS SDK to make this easier, but given constrained resources I wouldn't hold your breath on that.

Categories : IOS

CSS Ratings Bar on the same line
You'll want to give them a display:inline-block, this lets you set the width and the height of them. See What is inline block for more details. Also, if you want to get rid of the space between the elements, see Fighting the Space Between Inline Block Elements. Personally I like setting the font size, messing around with comments or structuring the markup is nasty.

Categories : CSS

Android FacebookSDK login with native Facebook app installed asks for permissions even after the user have already given them
Thats probably because you got a signature mismatch between your app (which I assume is in debug mode) and your facebook app associated to your appID. Basically you should make sure that: The signature of your android app that use the facebook sdk is added to the facebook app dashboard you can easily get your app signature by using keytool or by adding this code in your activity's onCreate method : @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); try { PackageInfo info = getPackageManager().getPackageInfo( getPackageName(), PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray())

Categories : Android

Authenticate Google Apps Script user via HTTP
You are going to have to do a little leg work on this one. Firstly, when you publish your apps script, make sure to change the "who has access to the app" to something like "only myself". Then you need to see what happens when you try to hit that URL from an external service without authenticating. There may be some help from the error codes you are likely to receive. I imagine you can then use the following documents to Authenticate for Google Services IN GENERAL. Then you will most likely have to pass a sessionID or Accesskey of some sort. I only have a brief understanding of OAuth, but I do imagine that you may be able to set up a more permanent connection between your other server and your particular Google Apps Script. I hope this helps. Jacob

Categories : Google Apps Script

Using a Cloud SQL back end in a multi-user Apps Script
Yes, this is the expected behavior. The library being owned by a different user does not really matter. The cloud-sql jdbc connector only authorize connections if the effective user can edit the database. To workaround this you have turn this "library" into a webapp, running as you and shared to anyone, even anonymous. That accepts queries and commands to your database via HTTP parameters (either GET or POST). This webapp will return the results using ContentService on any of text formats available. I guess the easiest one is JSON, since you can work with regular js objects on Apps Script and then just JSON.stringify and JSON.parse to make the communication. To make things easier you could then make a library to access to this webapp, abstracting the UrlFetch calls and parameters you hav

Categories : Google Apps Script

Domain User Authentication in Windows Store Apps?
I was looking for this answer too. I discovered that you have to go to the package.appxmanifest and check off Enterprise Authentication and then you can use CredentialCache.DefaultNetworkCredentials in your app to get the username, but not the password.

Categories : Authentication

Google Apps Script formatDate using user's time zone instead of GMT
You can directly get the spreadsheet Time Zone like this : var addedDate = sheet.getRange(1,1).getValue(); var addedTime = Utilities.formatDate(addedDate, SpreadsheetApp.getActive().getSpreadsheetTimeZone(), "hh:mm a"); See doc here but Google Apps Script uses these formats if you want to choose it yourself : http://joda-time.sourceforge.net/timezones.html

Categories : Javascript

Google App Engine remote_api for sharing user accounts across apps
I think this is a good use for the new modules feature. https://developers.google.com/appengine/docs/python/modules/ But if you don't want to use modules you'll need to create web services for communicating between apps.

Categories : Python

Average Score of all ratings in comments
From glancing at your code it seems the average rating should already be available. Is there a specific problem you're running into trying to access that data...? Is it not there, incorrect, are you getting php errors? More info please.

Categories : PHP

Count and Percentage of skill ratings
Since you have your different roles in different columns, to get a compact query, you either need dynamic sql or a complex pivot. Hence, I've opted for just copy and paste because I don't think the complexity is worth the 4 roles you have. I've named your query T for the example. with roles as ( select VP as Name, 'VP' as Role, Skill, Rating from t where VP is not null union all select AVP as Name, 'AVP' as Role, Skill, Rating from t where AVP is not null union all select Director as Name, 'Director' as Role, Skill, Rating from t where Director is not null union all select Supervisor as Name, 'Supervisor' as Role, Skill, Rating from t where Supervisor is not null ), counts as ( select Name, Role, Skill ,count(case when rating = 1 then 1 else NULL end) as

Categories : Sql Server

creating star ratings in mobile web site
I use this library for a star rating system on my web app. http://wbotelhos.com/raty It only requires jQuery, and is really easy to use.

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.