Posts

Why can't use the newly installed TensorFlow library using python 3? -

this question has answer here: 'library not loaded: @rpath/libcudart.7.5.dylib' tensorflow error on mac 3 answers i upgraded python 3.5 , trying use tensorflow. followed instructions https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html , installed tensorflow gpu enabled: # mac os x, gpu enabled, python 3.4 or 3.5: $ export tf_binary_url=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0rc0-py3-none-any.whl however, when tried using tensorflow threw strange error: >>> import tensorflow traceback (most recent call last): file "<stdin>", line 1, in <module> file "/users/user/path/venv2/lib/python3.5/site-packages/tensorflow/__init__.py", line 23, in <module> tensorflow.python import * file "/users/user/path/venv/lib/python3.5/site-packages/tensorflow/python/__ini...

html - ng-show through controller is not working -

i have page 3 elements. first search bar, second search result area , third form. here use case like, default search bar , form div showing , hiding search result div. if enter keys on search bar client data , want hide form bar , show search bar result. in search var result if click 1 of item(client) hide search result , show form div. , want fill clicked client name in form field, new in angularjs please me out. <ion-view title="client details" id="page5" ng-init="issearch=false;isform=true;" style="background-color:#f1f8e9;"> <ion-content padding="true" class="has-header"> <label class="item item-input"> <i class="icon ion-search placeholder-icon"></i> <input type="search" ng-model="str" ng-change="searchbyname(str)" placeholder="search client"> </label> <ion-list ng-show="{{issearch}}" ...

python - Error when updating function-based views to class-based views in Django Rest Framework -

i've been in process of running through tutorials on django rest framework build simple todo list app. when transitioned function-based view class-based view, started getting stack trace django , http calls started failing. i'm using virtualenv isolate dependencies, , using python 3.5.2. anyone have ideas what's going on, or how resolve error? i'm chalking configuration error or version mismatch, i'm not sure start. /views.py: from django.http import http404 list.models import list list.serializers import listserializer rest_framework.views import apiview rest_framework.response import response rest_framework import status class listsview(apiview): """ list lists. """ def get(self, request, format=none): lists = list.objects.all() serializer = listserializer(lists, many=true) return response(serializer.data) ... /urls.py from d...

Teamspeak 3 PHP Framework Client ID -

i'm searching whole day , can't find how client id if have teamspeak name user. my current code (just works identity id): function tsverification($verification) { require_once("../ts3phpframework-master/libraries/teamspeak3/teamspeak3.php"); $ts3_virtualserver = teamspeak3::factory("serverquery://serveradmin:xxxxxx@xxx.xxx.xxx.xx:10011/?server_port=9987&nickname=poker"); $client = $ts3_virtualserver->clientgetbyuid("$verification"); $ts3_virtualserver->clientpoke($client, "poke message"); } i found solution myself: function tsverification($verification) { require_once("../ts3phpframework-master/libraries/teamspeak3/teamspeak3.php"); $ts3_virtualserver = teamspeak3::factory("serverquery://serveradmin:xxxxxx@xxx.xxx.xxx.xx:10011/?server_port=9987&nickname=poker"); if (substr($verification, -1, 1) == "=" && strlen($verification...

mysql - Hibernate allow foreign key to be one of many classes? -

i'm trying implement hashtag functionality in database, allowing me assign hashtag different classes. possible have foreign key inside tags class, 1 of many different classes (article, video, image)? mean having discriminator column. e.g @entity @table(name="tags") public class tags { private string tagname; // hashtag name; e.g cool-photo private <article, video, photo> relatedobject; private string type; // can either article, video, photo } in example i'd able run simple query: select t.* tags t type = 'article' , tagname = 'tag-searching-for' inner join article on t.relatedobject = a.articleid; this return bunch of <type-requested> objects type requested (in case, articles)! is there built in way of doing hibernate or have build own solution (which im happy do, i'd rather check see if theres concret 1 first). there 2 ways, can use super entity - inheritance. create taggable , new super en...

WSO2 Publisher/Store api-manager.xml config GatewayEndpoint with gateway clustering -

if have multiple gateway worker nodes, how can config gatewayendpoint? i read post of setup gateway endpoint , case has 1 gateway worker node. had nginx node before wso2 clustering, need display final endpoint url in store end users. serverurl, can config url: " https://mgt.gw.devzone.com/services/ " . <apigateway> <environments> <environment type="hybrid" api-console="true"> <name>production , sandbox</name> <description>this hybrid gateway handles both production , sandbox token traffic.</description> <serverurl>https://<api-gateway-host>:9443/services/</serverurl> <username>${admin.username}</username> <password>${admin.password}</password> <gatewayendpoint>http://<api-gateway-host>:8280,https://<api-gateway-host>:8243</gatewayendpoint> ...

javascript - Issues with if-statement adding players with `is-inactive` class to input -

problem the maximum number of players each position is: 2 out of 4 goalies 6 out of 15 defencemen 12 out of 31 forwards i've gotten point i'll click on hockey player , name gets added input field in form, if have 2 goalies selected, ie has class of is-active , click on 1 of other 2 unselected players default is-inactive class, name still added input when there should only 2 goalies max. , unfortunately, case defencemen , forwards too. goal when starredgoaltenders === maxgoaltenders or starreddefencemen === maxdefencemen or starredforwards === maxfowards names of players do not have not been selected of specific position , not have is-active class should not added input in form. scripts.js function countselected() { $(".player").on("click", function(){ // checks if maximum number of players have been selected // if so, return false , nothing // if not, class toggle `is-inactive` `i...