Posts

conflict either by updating the version of the google-services plugin or updating the version of com.google.android.gms to 8.3.0 -

i want use play services 8.4.0 in project giving me error can ?i want use play services 8.4.0 in project giving me error can ? app.gradle compile 'com.google.android.gms:play-services:8.4.0' project.gradle classpath 'com.android.tools.build:gradle:2.0.0-alpha1' classpath 'com.google.gms:google-services:1.5.0-beta2' dependencies { classpath 'com.android.tools.build:gradle:2.0.0-alpha3' classpath 'com.google.gms:google-services:2.0.0-alpha3' } apply plugin: 'com.google.gms.google-services'

PyYAML with Python 3.x -

i've problem using yaml (pyyaml 3.11) library in python 3.x. when call import yaml following error: python 3.4.3+ (default, oct 14 2015, 16:03:50) [gcc 5.2.1 20151010] on linux type "help", "copyright", "credits" or "license" more information. >>> import yaml traceback (most recent call last): file "<stdin>", line 1, in <module> file "/home/mlohr/python-libs/yaml/__init__.py", line 2, in <module> error import * importerror: no module named 'error' error file located in yaml directory, __init__.py yaml use absolute imports. guess that's problem, i#'m not sure. in http://pyyaml.org/wiki/pyyamldocumentation#python3support short path (supposed) python 3 support, i'm not sure if i'm using wrong way. the same issue occurs (that's way found problem) when using python 3 python scripts using yaml. with python 2.7 , 2.6 works without problems. any ...

python - Unable to validate my app on Django -

i reading django documentation , created first app using command: python manage.py startapp books and modified models.py file mentioned in book. from django.db import models class publisher(models.model): name = models.charfield(max_length=30) address = models.charfield(max_length=50) city = models.charfield(max_length=60) state_province = models.charfield(max_length=30) country = models.charfield(max_length=50) website = models.urlfield() class author(models.model): first_name = models.charfield(max_length=30) last_name = models.charfield(max_length=40) email = models.emailfield() class book(models.model): title = models.charfield(max_length=100) authors = models.manytomanyfield(author) publisher = models.foreignkey(publisher) publication_date = models.datefield() then added newly created app 'books' installed_apps list in settings.py file. added 'mysite.books' list , python manage.py validate returned following err...

sql server - How to select the records without duplicating form inner join tables -

from query how can records without duplicate value. need values, if name table , account table c should view when dates field maximum. select a.name , a.dates , b.da , a.id , b.client , b.[address] , b.[city] , b.[state] , b.dot , b.score , b.pay , b.code , b.[country] inner join c on a.account = c.account inner join b on [a].name = b.name c.users = 00 , b.act = 1 order a.dates use distinct ? select distinct a.name , a.dates , b.da , a.id , b.client , b.[address] , b.[city] , b.[state] , b.dot , b.score , b.pay , b.code , b.[country] inner join c on a.account = c.account inner join b on [a].name = b.name c.users = 00 , b.act = 1 order a.dates

linux - Unix: replace variable in file a with value in file b -

i have 2 files in linux, in file there variables these: ${version} ${software_producer} and values of these variables stored in file b: version=1.0.1 software_producer=luc now how can use command replace variables in file values in file b? sed able task? thanks. a simple bash loop suffice: $ cat file 'a' has variable ${version} , has also: ${software_producer} $ cat b version=1.0.1 software_producer=luc $ cat script.bash #!/bin/bash while read line || [[ -n "$line" ]] key=$(awk -f= '{print $1}' <<< "$line") value=$(awk -f= '{print $2}' <<< "$line") sed -i 's/${'"$key"'}/'"$value"'/g' done < b $ ./script.bash $ cat file 'a' has variable 1.0.1 , has also: luc $

android - How to handle GCM Notifications when different GCM notifications receive -

i using gcm notification in app.i parse data in " onmessagereceived " method unique "url" corresponding gcm message.when receive single notification every thing fine,but when receive multiple notifications problem occurs when tap notification last received notification url loads. public void onmessagereceived(string from, bundle data) { string message = data.getstring("message"); string country = data.getstring("country"); string url = data.getstring("url"); string description = data.getstring("description"); string id = data.getstring("id"); } i url gcm notification intent intent = new intent(this, detailview.class).putextra("url", url); taskstackbuilder stackbuilder = taskstackbuilder.create(this); stackbuilder.addparentstack(mainscreen.class); stackbuilder.addnextintent(intent); pendingintent pendingintent= stackbuilder.getpendingintent( 0, pendingint...

nsautoreleasepool - PyObjc autorelease pool -

edit: advice. i'm still not clear on how autorelease pools handled. here's actual code: import platform, time if (platform.system().lower() == "darwin"): appkit import nsspeechsynthesizer foundation import nsautoreleasepool [class's init function] def __init__(self): if (platform.system().lower() != "darwin"): raise notimplementederror("mac os x speech not available on platform.") self.ve = nsspeechsynthesizer.alloc().init() [function throws errors normally] def say(self,text,waitforfinish=false): pool = nsautoreleasepool.alloc().init() self.ve.startspeakingstring_(text) if (waitforfinish == true): while (self.ve.isspeaking() == true): time.sleep(0.1) del pool if load python console , merely import module, fails traceback: traceback (most recent call last): file "<stdin>", line 1, in <module> file "audio/__init__.py", line 5, in <m...