Posts

Flask-SQLAlchemy + create_all() failed on many-to-many relationship creation -

Flask-SQLAlchemy + create_all() failed on many-to-many relationship creation - i have next application structure: run.py |->app |->models |-> user.py (declares role-to-user relationship table , user model) |-> role.py (declares role model) |-> main.py (contains initialization , required imports) |-> extensions (here sqlalchemy variable declared imported later) when trying create initial db construction next way: from app.models import * app.extensions import db app.main import myapp #app initialized packages assets, db, security, etc. myapp.test_request_context(): db.create_all() i've got exception: noreferencedtableerror: foreign key associated column 'users_to_roles.user_id' not find table 'users' generate foreign key target column 'id' i tried dow next way: @app.before_first_request def initialize_database(): db.create_all() with no success i tried move role same file user m...

VBScript XCopy to local disk not working -

VBScript XCopy to local disk not working - i trying develop simple script copies files specific drives. the script following: check physical drive letter if drive exists re-create files. if no drive move step 2. check network drive letter if drive exists re-create files. if no drive move step 3. create new network mapping copy files drive when network drive exists, or network mapped drive created via script xcopy commands works perfectly. problem step 1 , local drive exists, no files copied drive after calling xcopy. here code: strlocaldrive = "e:" strremoteshare = "\\127.0.0.1\c$\program files (x86)\myfolder\edrive" bolfoundexisting = false source = "c:\program files (x86)\myfolder\edrive\*" destination = "e:\" ' check parameters passed create sense if right(strlocaldrive, 1) <> ":" or left(strremoteshare, 2) <> "\\" 'wscript.echo "usage: cscript mapdrive.vbs drive filesh...

svn - Does crucible integrate with teamcity -

svn - Does crucible integrate with teamcity - does crucible integrate teamcity?if not peer code review tool can used teamcity continuous integration? also have question.... gerrit work subversion? saw reitveld had back upwards subversion gerrit has back upwards svn? crucible doesn't integrate straight teamcity, however, jira (atlassian's issue tracker) integrates quite nicely both teamcity , crucible/fisheye. here resources farther reading: jira + crucible integration jira plugin teamcity linking jira teamcity integrating jira fisheye also, no, gerrit supports git. this comment suggests rietveld alternative svn. svn teamcity gerrit atlassian-crucible

How can I generation sine function faster in c -

How can I generation sine function faster in c - is there anyway in can compute sine function faster in c.when generate sine waveform 16,384 samples taking me 3.96 seconds , want less 1 sec. give below logic used sine wave , taking 4 seconds compute.i tried optimization of code of no help. someone please help me out int i; float f,temp = (2 * m_pi) /16384 for(i=0;i<16384;i++) { f = sin(temp * i); } there's no reason have compute f more once, ever. if performance critical, hardcode array of values source. c

html - CSS issue with Opera browser -

html - CSS issue with Opera browser - i have simple page: 5 rows (4 rows explicitly defined height [header, bredcrumb, trademark, footer], 1 row set 100% [content]) display on web page. however, css renders in firefox, chrome, net explorer , safari. opera hates me , adds scrollbar. how construction css fits 5 browsers, without adding scrollbar browser? html: <html> <head> </head> <body> <div class='header'> </div> <div class='breadcrumb'> </div> <div class='content'> <div class='panels'> <div class='panel-a'> </div> <div class='panel-b'> </div> <div class='panel-c'> </div> </div> </div> <div class='trademark'> </div> <div class='footer'> </div> </body> </html> css: div.header, div.breadcrumb, div.content, div.trademark, div.footer { display: table-row;...

c# - Windows phone 8 How to add border to item in itemscontrol -

c# - Windows phone 8 How to add border to item in itemscontrol - i'm new windows phone , have stuck in days. what need list border on each items. first seek utilize listbox ,which easy add together border item using listbox.itemcontainerstyle ,but found items in listbox alter color while tab on it,so searching prevent,at lastly found available solutions in answer,but take reply not working on windows phone, , answers says create listbox disabled work.so set ishittestvisible false, cause buttons in item disabled. so came itemscontrol @ last,it has no itemcontainerstyle property in windows phone every result googled says that.i tried set border in template didn't work @ all. this issue driving me crazy,any suggestions please! why not define itemtemplate? can specify how each item should look. example: <listbox.itemtemplate> <datatemplate> <border> <textblock text="{binding title}" fontsize="18...

In Rails while using the `where` method, how to match only the year and month? -

In Rails while using the `where` method, how to match only the year and month? - normally, select records same date utilize : bronze.where(regdate: date.new(2014,03,03)) how can utilize select year , month? for month be: date = # set date here bronze.where(regdate: date.beginning_of_month...date.beginning_of_month + 1.month) analogically year. ruby-on-rails ruby-on-rails-4