Posts

python - AttributeError : 'module' object has no attribute 'index' -

i'm going through official tutorial provided on django's documentation site, , have encountered attributeerror. here's code i'm working : 'polls' name of application. views.py from django.http import httpresponse def index(request): return httpresponse("hello, world. you're @ poll index.") \polls\urls.py from django.conf.urls import patterns, url polls import views urlpatterns = patterns('', url(r'^$', views.index, name='index') ) urls.py from django.conf.urls import patterns, include, url django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # examples: # url(r'^$', 'mysite.views.home', name='home'), url(r'^blog/', include('blog.urls')), url(r'^polls/', include('polls.urls')), url(r'^admin/', include(admin.site.urls)), ) error: attributeerror @ /polls 'module' object has...

c# - Cannot use a boolean variable from another script Unity3d -

i have code makes object rotate, , working ok if call within script. scripta public class ship : monobehaviour { private bool torotate=false; public void enemyrotate() { torotate = true; debug.log("er "+ torotate); } void update () { if (torotate) { transform.rotatearound(player.transform.position, vector3.forward, 100 * time.deltatime); } } if call enemyrotate within scripta, sure enough rotation, , debug log shows variable has been set true. if call function this: script b public class projectile : monobehaviour { public ship ship_object; void start(){ ship_object=gameobject.addcomponent<kanaship> (); } void callfunction(){ ship_object.enemyrotate() } } if call callfunction, debug log saying variable has been set true, rotation animation not working @ all. have tried different variants of cannot figure out im doing wrong. have used public boo...

ios7 - what does middle guard protection failed %d mean? -

when build app actual iphone debug area shows this: [allocator] middle guard protection failed %d [allocator] allocator invalid, falling malloc it shows 2nd line total of 30 times. have no idea means or how fix it. not show when build simulator. i having issues getting state preservation work using storyboards , restoration id's , have feeling has memory issue it's dumping memory , therefore no app restoration. basically, when go app shows me last screen on second , goes root page. anyway, i'd fix malloc stuff can @ least rule out culprit, plus don't want have issue memory in general... i've been googling couple of weeks , can't find anything! looks it's issue crashlytics framework. have same issue, , commenting api call: [crashlytics startwithapikey:api_key]; removes warning.

javascript - Typescript error runtime error: Cannot read property 'prototype' of undefined when extending -

so i'm getting above error in console. it's caused _super being undefined when it's passed __extends (in generated .js ). here's test code can used reproduce error: //this entirety of file test.ts module test { export class test1 { public name: string; public number: number; constructor() { } } } then in separate file have class inherits one: /// <reference path="test.ts" /> module test { export class test2 extends test1 { constructor() { super(); } } } the <reference path... shouldn't needed (and isn't), added see if helped (it didn't). the files included in correct order ( test.ts test2.ts ) via bundleconfig (running or without optimisations doesn't have effect). i being giant noob, haven't slightest clue i've messed up. other instances of problem i've found online folks using command line compiler combine multiple typescr...

Executing a python script -

i biologist trying run particular script ( http://www.ricediversity.org/tools/code/plumage%20script%202%20f2%20populations.zip ) on data-set. have installed python 3.4, panda 0.14.0 , numpy dependecies on windows 7 laptop instructions demand. data set in excel file. how go forth applying script data? have no experience python scripts/ program. thank time. python plumage2_for_f2.py -h should give usage information. (being on windows, invoking plumage2_for_f2.py not work on unixoid system, sure preface commands python , above.) file (as supplied -i option) have csv (comma-separated values), can export excel (i not know current version of excel, should save as, or export).

jquery - During the ajax call url get distrubs -

i have following url var url ="cruuntest/contactgrabber/getdata?code=4/8kxuru8wyruzruypeexo9wom0boi.yvd5wc6y5riwenp6uapfm0h6lj2rjqi" and doing $.ajax({ type: "post", url: url, success: function (obj) { $contactimporter.createcontactgridmodel(obj); }, error: function (xhr, ajaxoptions, thrownerror) { alert('error = ' + xhr.responsetext); } }); but redirects http://localhost:80/cruuntest/contactgrabber/index/cruuntest/contactgrabber/getdata?code=4/8kxuru8wyruzruypeexo9wom0boi.yvd5wc6y5riwenp6uapfm0h6lj2rjqi i not know why? have hosted application on iis 8. when running code wihout hosting in iis works fine. you running ajax call page: /cruuntest/contactgrabber/index and appends query url: /cruuntest/contactgrabber/index (appended here, seeing) you need start '/' start of url, this: /cruuntest/contactgrabb...

html - How can I hide with CSS only? -

i have below code in document don't control. have option upload 1 custom css file overrides. how can accomplish this? rid of vendor link on our site. css, have set tricky. <div style="display:block !important;text-align: center !important; padding: 15px; visibility:visible !important; opacity:1 !important; height:auto !important; width:auto !important; op:auto !important; bottom:auto!important; left:auto !important; right:auto !important;"> <a href="http://vendorsite.com" target="_blank" style="display:inline !important; font-size: 11px !important; visibility:visible !important; position:relative !important; opacity:1 !important; height:auto !important; width:auto !important; top:auto !important; bottom:auto!important; left:auto !important; right:auto !important;"> powered vendor site </a> </div> no, not possible pure css, !importants declared in html override css, unless ...