Posts

Showing posts from September, 2015

Issue with mongodb document limit -

i using mongodb 3.0.2 , when run "top" command : > db.runcommand( { top: 1 } ) i got following error message: 2015-06-01t16:36:52.886+0900 e query error: error: { "$err" : "bsonobj size: 46060490 (0x2bed3ca) invalid. size must between 0 , 16793600(16mb)", "code" : 10334 } @ error () @ dbquery.next (src/mongo/shell/query.js:259:15) @ dbcollection.findone (src/mongo/shell/collection.js:189:22) @ db.runcommand (src/mongo/shell/db.js:58:41) @ (shell):1:4 @ src/mongo/shell/query.js:259 it means can't monitor longer, doesn't it? can guys show me way out, please. some additional info: db size: 143.996gb - wiredtiger enable. replication set enable. no profiling.

javascript - OpenShift + Diet.js -

trying simple diet.js server running on openshift (free plan) server never starts (runs fine locally). domain ( http://twilio-levelout.rhcloud.com/ ) returns 503 , logs throw: events.js:72 throw er; // unhandled 'error' event ^ error: listen eacces here's code: var server = require('diet'), app = server(); var server_ip_address = process.env.openshift_nodejs_ip || '127.0.0.1'; var server_port = process.env.openshift_nodejs_port || 3000; app.get('/', function ($) { $.end('hello world!'); }); app.listen("http://" + server_ip_address + ":" + server_port); the server runs default example , simple express app not above. any ideas? the access error means not using proper port or trying bind interface have no access to, when tried example, did not work on local machine. the problem in example app.listen should appear before app.get. your example should this: var server

php - phpexcel not converting my html table tag -

this code using phpexcel $objphpexcel = new phpexcel(); $objphpexcel->setactivesheetindex(0); $objphpexcel->getactivesheet()->setcellvalue('a1', $message); $objphpexcel->getactivesheet()->settitle('sheet 1'); /*header('content-type: application/vnd.ms-excel'); header('content-disposition: attachment;filename="name_of_file.xls"'); header('cache-control: max-age=0');*/ $objwriter = phpexcel_iofactory::createwriter($objphpexcel, 'excel5'); $objwriter->save('test.xls'); i commented header because downloads using browser. $message contains <style> .td_font{ display: block; line-height:1px; } .header{ font-size:0.8em; display: block; text-align:center; font-weight:bolder;

javascript - FullCalendar today-button: date instead of text // issue with the lang -

i want show current date instead of fixed text in today-button. >> irismediainfo3.lili.de development-website working on. not find option in docs, searched in moment.js-docs , found: moment().format(); and used in fullcalendar this: buttontext: { next: '>', nextyear: '>>', prev: '<', prevyear: '<<', today: moment().format("mmmm yyyy") }, the result good, in english. fullcalendar should multilingual, tried combined with moment.locale(string); first try: buttontext: { next: '>', nextyear: '>>', prev: '<', prevyear: '<<', today: moment().locale('de').format("mmmm yyyy") }, but there no changes. thought moment.js maybe access lang-files of fullcalendar.

java - How to add new Lookup into DefaultGazetteer programatically -

i want add new lookup loaded defaultgazetteer programatically. if add string via file, works perfectly any welcomed. thanks string test="hello@code=555.5@code_asociated_description=world@code1=@code2=@code3=@code4=@code5=@code6=@code7="; gazetter.add(test, new lookup("glossary.lst", "test", "test", "en")); thelist.add(new gazetteernode(test, "@")); this add lookup only: lookup l = new lookup("glossary.lst", "major", "minor", "en", "annottype"); l.features = new hashmap<>(); l.features.put("somefeaturename", "some value"); gazetter.add("string found", l); this update linear definition ( .def & .lst files): lineardefinition ld = gazetter.getlineardefinition(); //add .lst record linearnode ln = new linearnode("glossary.lst", "minor", "major", "en"

java - How to pass args when calling one method from another -

i have written following code create key pair, store private key locally, , read private key file. when try call methods saveprivatekey(); , retrieveprivatekey(); testdata(view view) error says (string[]) cannot applied (). want able call both of above mentioned functions in testdata(view view); public class encryptionactivity extends actionbaractivity { private static final string tag = encryptionactivity.class.getsimplename(); textview textpublickey; textview textprivatekey; button buttontest; textview privatekey; integer n; string filename = "privatekey"; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_encryption); // output keys screen textprivatekey = (textview)findviewbyid(r.id.textprivatekey); textprivatekey.setmovementmethod(new scrollingmovementmethod()); // textpublickey = (textview)findviewbyid(r.id.textpublickey); } private void asymmetricalgori

bash - Best practices on setting exit status codes -

when implementing own scripts, best practice exit different exit codes different failure scenarios? or should return exit code 1 failure , 0 success providing reason on stderr? providing descriptive error message stderr fine , interactive users, if expect scripts used other scripts/programs, should have distinctive error codes different failures, calling script make informed decision on how handle failure. if calling program not wish handle different failures differently check return code against > 0 - don't assume case.

Android: sharing the Facebook page post -

i'm creating android app , need integrate facebook functions in app. among them need share facebook page posts. try use native share button. https://developers.facebook.com/docs/sharing/android but can't achieve sharing of page post. when try share page post can share page. for example, try share post https://www.facebook.com/arsenaltheprideofengland/posts/863092823730119 and result sharing of page https://www.facebook.com/arsenaltheprideofengland i read graph api docs sharing , discover it's not possible use sharing. is possible @ share facebook page post using custom android app?

database - php wikipedia (change information in div) -

does know how can make wikipedia website -change information , send mail -can changed if logged i think can make script "only changing when logged" self, need begin. dont know how can make script web-stars <div>this information, if logged, can change me , send change emailadress</div> <input type="button" name="changediv" valuee="change" /> yes! need install script http://www.mediawiki.org/wiki/mediawiki on host. it's php script wich copy of wikipedia template.

ios - How to retrieve user's friend list and show in TableView with swift -

i'm using parse , i'm able save user's friend user added in current user's object don't know how retrieve current user's friend list , show them in tableview how can list current user's object , display in tableview parse in swift. (my app doesn't have facebook @ all). appreciated. thank you edit: op posted code in comments, formatted question: var query = pfuser.query(); var currentuser = pfquery(classname:"user"); currentuser.wherekey("currentuser", equalto: pfuser.currentuser()) currentuser.findobjectsinbackgroundwithblock { (objects:[anyobject]!, error:nserror!) -> void in if error == nil { self.tableview.reloaddata() } i've managed save friend user added in pfrelation can't manage show user list in tableview.my tableview didn't show username of current user account you may want check post on parse.com, explains how findobjectsinbackgroundwithblock: works: https://w

javascript - Calculate total for selected items in a table -

i have 3 tables each multiple rows. need find way calculate total of columns. each row has checkbox, when checked, need able add rows values total. i have this, adding totals each column, can not work out how when checkbox selected total updated, , if deselected removed total. table example... <table class="transfer-group-table table table-hover tablesorter"> <thead> <tr> <th>name</th> <th>invoice #</th> <th>invoice amount</th> <th>order status</th> <th>payment menthod</th> <th>service fee</th> <th>funding fee</th> <th>delivery date</th> <th>transfer amount</th> <th></th> </tr> </thead> <tbody> <tr id="2942"> <td> <p>a company ltd</p> </td> <td

operating system - Random access alternative to named pipes -

is there way create "file" (i.e. point in file system) can opened program regular file, reading/writing go program instead of disk? named pipe seems meet requirements, except allows serial file access. i interested in *nix type systems, curious hear of such system on os/file system. here implementation: demon.c: #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <unistd.h> #include <fcntl.h> #include <assert.h> #include <string.h> #include <errno.h> void map_file(const char *f) { int fd = open(f, o_creat|o_rdwr, 0666); if (fd < 0) { perror("fd open error\n"); exit(-1); } char *addr = (char *)mmap(null, 10, prot_read | prot_write, map_shared, fd, 0); if (addr == map_failed) { exit(-1); } int i; (i = 0; != 10; ++i) { addr[i] = '0' + i; } while (1) { (i = 0; != 10; ++i) { if (addr[i

Identifying and highlighting a blank row in Excel VBA -

scenario: each row contain 23 columns; 20 contain user populated data , last 3 autogenerated through vba. while running if vba code identifies first 20 columns of row blank cells whole row declared blank , highlighted. i have been able write following code: each rng in range("a1:a" & lastrow) rng if .value < 1 msgbox "blank cell found" blnkcnt = 0 each mycl in range("a" & activecell.row & ":t" & activecell.row) mycl if .value < 1 blnkcnt = blnkcnt + 1 end if end next mycl if blnkcnt = 20 lcount = lcount + 1 .entirerow.interior .colorindex = 6 .pattern = xlsolid .patterncolorindex = xlautomatic end end if end if end next rng if lcount > 0 msgbox "data contains blank row(s): " & lcount end else msgbox "no blank rows" end if

angularjs - Form Submission in Modal Window and Refresh Content of a Tab -

i have 2 tabs: list.brands , add.brand: <script type="text/ng-template" id="list.brands"> <table class="table table-striped table-bordered bootstrap-datatable datatable datatable" id="datatables_table_0" aria-describedby="datatables_table_0_info" ng-controller="brandsctrl"> <input type="text" ng-model="searchbox"> <thead> <tr> <th><tags:label text="brandid"/></th> <th><tags:label text="name"/></th> <th><tags:label text="isactive"/></th> <th></th> </tr> </thead> <tbody> <tr id="actionresult{{$index + 1}}&q

java - Why GraphicsContext uses methods with double params? -

i'm moving swing javafx. wondered why graphicscontext uses methods double params. example fillrect(double x, double y, double w, double h) unlike swing has methods drawrect(int x, int y, int width, int height) . should calculations in double? drawrect in inherited graphics uses int specify co-ords & size. the graphics2d object on other hand, capable of dealing graphics values lie 'between whole pixels'. compensate typically render dithered pixel (part way between drawing , bg color) @ parts of rendering has deal fractions of pixel. should calculations in double? yes! double values equal integer rendered might expect graphics method - sharp, clean lines. if boundary of shape ever falls between whole pixels, color dithered.

mysql - Java DatabaseMetaData.getSchemas() returns empty ResultSet, expected non-empty ResultSet -

trying understand going on here. databasemetadata returning empty result set, sql query same not. not major issue using second code example work around. databasemetadata dmd = this.connection.getmetadata(); resultset rs = dmd.getschemas(); while (rs.next()){ // empty result set } expected non-empty result set. resultset rs = this.connection.preparestatement("select schema_name information_schema.schemata;").executequery(); while (rs.next()){ // non-empty result set expected results } expected non-empty result set , got it. as far can tell mysql jdbc driver considers catalog, not schema. should use getcatalogs instead (and everywhere use it, need use catalog parameter, not schema parameter). the getschemas method in connector/j returns empty result set: public java.sql.resultset getschemas() throws sqlexception { field[] fields = new field[2]; fields[0] = new field("", "table_schem", java.sql.types.char, 0); fie

c# - Xamarin PCL library and Sqlite data storage -

i'm developing cross platform application xamarin android, ios , windows phone. i'm creating pcl library contains business logic including calls rest api. seem work fine, however, need store bits of information in persistent space, such api authentication keys etc, , figured might use sqlite this, seems supported on 3 platforms. the problem i'm running system.data , mono.data.sqlite don't seem available within context of pcl project. even if pcl library can't, or doesn't, link required assemblies, should @ least able use references (through using ) in pcl library, right? mean, should able have application responsible creating database connection , use dependency injection inject connection library. seems can't make references in code system.data , mono.data.sqlite @ all. how abstract data layer in pcl library xamarin android, ios , windows phone? [1] http://developer.xamarin.com/guides/ios/advanced_topics/system.data/ i recommend usi

android - Checkbox not working properly on listview -

i made listview db , added onitemclicklistener. when click on item take me next activity , show full detail of item. added checkbox on listview checks item. problem when click on checkbox wont work, when click on item, starts next activity , after it, when go listview , try again click on checkbox, item checkbox works , other 1 doesn't work. when select second item listview , go checkbox works. checkbox works on item @ least 1 time click. have idea of causing problem? here's java: public class datalistactivity extends activity { listview listview; sqlitedatabase sqlitedatabase; fooddbhelper fooddbhelper; cursor cursor; listdataadapter listdataadapter; listdataadapter dataadapter = null; button button; dataprovider dataprovider; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_no_title); setcontentview(r.layout.data_l

zend framework2 - postgresql RETURNING in zf2 table gateway -

how 1 add returning clause in insert via table gateway ? insert users (name, age) values ('liszt', 10) returning id; $dataarray = array('name'=> 'liszt','age' => 10); $this->tablegateway->insert($dataarray); $userid = $this->tablegateway->lastinsertvalue; another method : $userid = $this->tablegateway->getlastinsertvalue();

javascript - Directive scope variable -

i using directive 3 consecutive time in html page, scope variable passing different @ every time taking scope variable third directive ?, example first time, <my-dir is-active=true></my-dir> sec time, <my-dir is-active="true"></my-dir> third time, <my-dir is-active="true" is-action="true"><my-dir> js: angular .module('app') .directive("mydir", function(){ scope:{ isactive:'@', isaction:'@' }, controller:[function('$scope'){ $scope.isaction ? doaction() : doactive(); function doaction() { console.log('in action'); } function doactive() { console.log('in active'); } }] }) here @ every time getting "in action" log 3 time ? should 1 time not passing "isaction" scope directive first 2 time ? i pretty sure issues syntax errors. if correct seems work correctly. plunker .directive("myd

MySQL: ternary IF(expr, if, else) with CAST -

why does select if(mytimestamp null, null, mytimestamp) fixed_date return null (as expected), but select if(mytimestamp null, null, cast(mytimestamp char)) fixed_date returns '0000-00-00 00:00:00'? i need latter 1 returning me null, that's why i'm asking. how do that? edit: mytimestamp timestamp. have expected both statements return null, if mytimestamp = null. in case, timestamp must converted char, because frontend expects way (it's little more complicated, actually). solution : had set 'mytimestamp' not nullable (and defaultint '0000-00-00...'. setting nullable, works expected (returning null). sorry, fault. thanks, bernhard

mysql - Check for maximum amount of records in a period -

i've got table "date" column (timestamp). i'm trying achieve check if after inserting row there no more 3 records contained in single 24 hours period, example: i have records following dates: 1. 2015-05-31 23:14:00 2. 2015-06-01 02:07:00 3. 2015-06-01 15:16:00 so shouldn't able to insert row date of (for example) 2015-06-01 16:01:00 or 2015-06-01 01:01:00 should able add records dates of (for example): 2015-06-01 23:50:00 , 2015-05-31 01:05:00 . how can achieve this? there little trick can achieve problem purely sql set @date = '2015-05-31 1:14:00'; insert tbldate(inputdate) select @date ( ( select count(*) c tbldate t1 inner join tbldate t2 t1.inputdate <= t2.inputdate , t2.inputdate <= t1.inputdate + interval 24 hour , t1.inputdate between @date - interval 24 hour , @date group t1.inputdate ) union (select 0 c)

c - Random Behaviour with the format specifier -

i encountered strange behaviour following code: int main() { float a=7.9999999; int b=5; printf("%d %f",a,b); } now expected o/p of form of 7 , 5.00000 giving me random values? know kind of stuff should avoided learning perspective? why getting random value above snippet? you're passing objects of types not correspond format specifiers. undefined behaviour (ub). 1 manifestation of ub print seemingly random garbage standard output. cannot expect particular outcome program ub. your expectation misplaced.

Check if a variable is an integer in PHP -

this question has answer here: checking if variable integer in php 11 answers i doing pagination script , want give users ability control how many results shown in 1 page. doing through use of variable, this: example.org/articles.php?count=10 . problem variable must integer or code spits out random errors, of contains information user should not seeing. here code: // checks if there variable (this part works fine) if (isset($_get["count"])) { if (!empty($_get["count"])) { $page_rows = $_get["count"]; } else { $page_rows = $page_rows_default; } } else { $page_rows = $page_rows_default; } // checks if variable interger // if not, offending value replaced 0 // (it doesn't work) if(is_int($page_rows) == false) { $page_rows = 0; } from experimentation code can tolerate zeros , negative integers, f

Getting Syntax error when pass date and time in javascript due to colon(:) and space( ) -

i getting syntax error in javascript while pass date , time parameter due colon(:) , space( ) ex : onclick=popup(02/06/2015,07**:**12:00,53970,scn,chb,jpr,02/06/2015 **strong text**07**:**12:00,20); onclick = popup('02/06/2015','07:12:00',53970,'scn','chb','jpr','02/06/2015 07:12:00',20); pass them strings. and since using these url parameters, please encode them using encodeuricomponent urlparam = encodeuricomponent(urlparam);

playframework 2.0 - Deploy Play! 2.2.x on java based shared hosting -

currently, i'm planning deploy play! 2.2.x app on shared hosting service. since it's cheaper deploy on cloud heroku. i don't have experience on deploying app on java shared hosting, tomcat , jetty. however, know tomcat , jetty, need convert app war file. also, know play! 2.2.x doesn't support war file deployment. so, mean couldn't deploy app on shared hosting, http://www.jvmhost.com/ ? or if could, tomcat or jetty useless? you can use play2war plugin play 2.2.x https://github.com/play2war/play2-war-plugin/ current versions: play 2.2.x : 1.2 play 2.3.0 -> 2.3.1 : 1.3-beta1 (scala 2.10 & 2.11) play 2.3.2+ : 1.3-beta3 (scala 2.10 & 2.11)

What is the difference between SequenceType and CollectionType in swift? -

please explain difference between sequencetype , generatortype , collectiontype in swift programming language. also, if implementing own data structure advantage of using sequencetype , generatortype or collectiontype protocols? generatortype ( iteratorprotocol in swift 3 ): generators can give next element of sequence, if there no element returns nil . generators encapsulates iteration state , interfaces iteration on sequence. a generator works providing single method, namely – next() , returns next value underlying sequence . following classes adopt generatortype protocol: dictionarygenerator , emptygenerator , more here . sequencetype ( sequence in swift 3 ): sequence represent series of values. sequence type can iterated for...in loop. essentially sequence generator factory; knows how make generators sequence. following classes adopt sequencetype protocol: nsarray , nsdictionary , nsset , more . collectiontype ( collection in swift

postgresql - Django ManyToMany reverse query with specific key -

i have 2 tables. first, basic user table. , second table called section. def user(models.model): ... is_teacher = models.booleanfield(default=false) ... def section(models.model): ... teachers = models.manytomanyfield(user, related_name="teachers") students = models.manytomanyfield(user, related_name="students") is_active = models.booleanfield(default=true) ... i student users (identified in user table is_teacher=false ) know can done user.objects.filter(is_teacher=false) . i also active section(s) each user. but, @ moment, can't seem set of sections users. i've tried: students = user.objects.filter(is_teacher=false) s in students: print s.section_set.all() but i'm getting error user object has no section_set . i'm guessing because section has 2 many many relationships user table (teachers , students), have specify relationship more (to follow students 1 not teachers one). i'm not sure how

java - Issue reading email body when email has attachments? -

i found nice code read email inbox email server, code works fine, have couple issues: i need capture message body of each email, when email has attachment, receive string javax.mail.internet.mimemultipart@100363 , or com.sun.mail.util.base64decoderstream@14e8cee , instead of body message. if email plain text , have no attachments, works fine. seems not 1 problem, have been reading on web can't find solution. i ignore attachments when size exceed 4 mb. below class, appreciate comments. it's important novice programmer in java. in advance ! import java.io.file; import java.io.fileoutputstream; import java.io.ioexception; import java.io.inputstream; import java.util.properties; import javax.mail.address; import javax.mail.bodypart; import javax.mail.flags; import javax.mail.folder; import javax.mail.message; import javax.mail.messagingexception; import javax.mail.multipart; import javax.mail.nosuchproviderexception; import javax.mail.part; import javax.mail.passwordau

Android ProgressBar onclick -

i have progress bar want click on , move progress point clicked. i have pb = (progressbar) v.findviewbyid(r.id.progressbar); pb.setonclicklistener(new progressbar.onclicklistener() { public void onclick(view v) { // } } basically want behave seekbar, need use progress bar because using circular progress bar, , code have visually fits needs. cheers, i went custom seekbar https://github.com/jesusm/holocircleseekbar/blob/master/lib/src/main/java/com/jesusm/holocircleseekbar/lib/holocircleseekbar.java this circular seekbar, per requirements

Using Gmail API to update website when receiving an email -

new programming on web bear me. i've figured out oauth2.0 (the authorization protocol used gmail) used applications site given permission information in site b (in case gmail) user x. i trying create website updates when receive email specific sender. so, not using of website users' email information. i'm using own. cannot seem figure out (or understand @ high level) how permanently give website access gmail account without doing kind of user authentication on myself. high-level process giving website permanent authentication? let me know if can make clearer. thank in advance! i've never done trying do, may find useful answers here :) getting e-mail id of sender while fetching mails gmail i hope helps if not i'm sorry. :) update: after reading link little bit more there parts of getting sender. can write code compare sender implementing need link. :)

windows - Why does carriage return come before new line -

there lots of questions asking correct order of carriage return , new line characters on windows (it's \r\n ) have not found real explanation why case. \n new line character, , \r carriage return. so, if have \r first, returns cursor beginning of current line - , \n afterwards, wouldn't logically insert \n @ beginning of current line , move current line down 1 instead of creating line after? i mean understand when writing these file doesn't matter, when parsing/reading , outputting text, seems backwards me. the order homage typewriter days. early mechanical printers slow return carriage in time took process 1 character. therefore time spent sending line feed not wasted (often several more characters had sent ensure carriage return had happened before sending printing character). why carriage return sent first. link: http://en.wikipedia.org/wiki/carriage_return

ios - Running code in app regardless of view -

i want app trigger action when iphone's orientation changes, regardless of user in app. i'm using if (([[uidevice currentdevice] orientation] == uideviceorientationlandscapeleft) || ([[uidevice currentdevice] orientation] == uideviceorientationlandscaperight)) { } to check orientation of device. where put code run if orientation changes? in app delegate, register uideviceorientationdidchangenotification notification. then in selector notification, can perform if check. - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(orientationchange) name: uideviceorientationdidchangenotification object:nil]; // else had in method } - (void)orientationchange { if (([[uidevice currentdevice] orientation] == uideviceorientationlandscapeleft) || ([[uidevice currentdevice] orientation] == uideviceori

json - Set multiple values -

given file { "[global]": { "current": "", "hash": "" } } i output: { "[global]": { "current": "alpha", "hash": "bravo" } } i have working command: jq '."[global]".current="alpha" | ."[global]".hash="bravo"' example.json however rather not have repeat ."[global]" part. tried command returns part of input: $ jq '."[global]" | .current="alpha" | .hash="bravo"' example.json { "current": "alpha", "hash": "bravo" } the multiplication of objects recursively merges two. can merge [global] object object new values. string values on rhs used in result. ."[global]" *= { current: "alpha", hash: "bravo" } addtion work here too, multiplication more useful, particularly nested

Results UNDEFINED in SQL query and php -

i new when comes php, sql , still learning, trying last 4 string value of column value telephone numbers: (7258787) trying display last 4 string search query full 7 string (8787) base on have read substring(column_name, -4) result last 4 strings right. codes returns undefined, can enlighten me this? if (isset($_get['telephone'])) { $data = "%".$_get['telephone']."%"; $sql = 'select telephone, substring(telephone,-4)from employee'; using this: $sql = 'select * employee telephone ?'; will result correct value of 7258787 result whole string(telephone numbers) type on search box thank in advance this whole code: this not answer whole script, (credits israel barragan) in database have employee table , columns 'id', 'name', 'telephone', , 'email' <?php header('content-type: application/json'); require_once 'connectiondb.php'; $conn = dbconnect(); $ok = t

angularjs - Ionic iOS header padding removal -

Image
i getting problem in ionic project. i have seen been mentioned before, none of solutions have worked including making fullscreen etc. because want keep statusbar onscreen. can achieved? there fix. have use ionic.platform.fullscreen(true, true); in $ionicplatform.ready function. , add <preference name="statusbaroverlayswebview" value="false"/> in config.xml file. lastly make sure index.html file has meta tag <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

javascript - Responsive navbar collapsing animation with AngularStrap -

i'm trying recreate collapsible bootstrap responsive navbar angularstrap. here plunker : <div class="navbar navbar-inverse"> <div class="container" bs-collapse start-collapsed="true"> <div class="navbar-header"> <button class="navbar-toggle" type="button" bs-collapse-toggle> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div bs-collapse-target> <ul class="nav navbar-nav"> <li> <a href="#">link</a> </li> <li> <a href="#">link</a> </li> </ul> </div> <

Can you call Python from Excel in instances of Excel other than the first? -

this question calling python excel. in vba you'd runpython("import mymodule; mymodule.my_function()") in python have like, from xlwings import workbook, sheet, range def my_function(): wb = workbook.caller() # create reference calling excel file range('a1:c3').clear_contents() # clear cells my question work first instance of excel. in event have 2 instances open, , you're trying run code in second instance, raised exception saying, "can't establish connection! make sure calling workbook active 1 , opened in first instance of excel." so seems designed work on first instance. there way around this? can identify instance you're in in python script? user hoping run vba macros call excel across multiple instances. in principle, xlwings can deal 2 instances. however, depending on security settings, might treat files downloaded internet or stored on network drive unsecure , "sandbox" them. the

python - Trying to capture data from twitter hashtag feeds using tweepy -

when running server following error valueerror @ / view hashtrack.views.index didn't return httpresponse object. returned none instead. request method: request url: http://127.0.0.1:8000/ django version: 1.8.2 exception type: valueerror exception value: view hashtrack.views.index didn't return httpresponse object. returned none instead. exception location: c:\python34\lib\site-packages\django\core\handlers\base.py in get_response, line 151 python executable: c:\python34\python.exe python version: 3.4.3 python path: ['c:\\users\\torjeli\\tweesh', 'c:\\python34\\lib\\site-packages\\setuptools-15.2-py3.4.egg', 'c:\\python34\\lib\\site-packages\\distribute-0.6.49-py3.4.egg', 'c:\\python34\\lib\\site-packages\\cython-0.22-py3.4-win32.egg', 'c:\\python34\\lib\\site-packages\\scrapy-0.24.6-py3.4.egg', 'c:\\python34\\lib\\site-packages\\six-1.9.0-py3.4.egg', 'c:\\python34\\lib\\site-packages\\cssselect-0.9.1-py

MS ACCESS SQL Join Syntax -

i can query run if remove join, once add join, following error: run-time error '3135': syntax error in join operation sourcedb = "c:\sourcedb.accdb" sql = "select e1.lid " & _ "from (eventlog e1 in '" & sourcedb & "'" & _ "left join eventlog e2 on e2.lid = e1.lid)" any advice on might doing wrong try changing code following: sourcedb = "c:\sourcedb.accdb" sql = "select e1.lid " & _ "from [" & sourcedb & "].[eventlog] e1 " & _ "left join eventlog e2 on e2.lid = e1.lid"

sublimetext3 - Sublime Text 3: how to create a build system? -

i m ros user. framework define working directory: $ mkdir -p ~/catkin_ws/src $ cd ~/catkin_ws/src // here create c++ packages and let system compile packages typing following: $ cd ~/catkin_ws/ $ catkin_make but means should keep @ least 1 more console open, call command: $ catkin_make which compiles @ once packages ve written in working directory. since m using sublime text 3 write software want able call function sublime went through tutorial many times, still don't understand how can create building system. i tried following: { "path": "~/workspace_ros", "cmd": ["catkin_make"] } but following error message: [errno 2] no such file or directory: 'catkin_make' [cmd: ['catkin_make']] [dir: /home/will/workspace_ros/src/flight_system/src/include] [path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games] [finished] i tried following options: path shell

java - MongoLab Connection Issues in Android App Using MongoDB Async Driver 3.0.2 -

simply put can't connect. i've followed documentation , seem getting lots of errors. errors 05-31 15:26:24.062 15970-15970/com.example.android.slidingtabsbasic w/dalvikvm﹕ vfy: unable resolve static method 18243: ljavax/management/objectname;.quote (ljava/lang/string;)ljava/lang/string; 05-31 15:26:24.062 15970-15970/com.example.android.slidingtabsbasic w/dalvikvm﹕ vfy: unable resolve static method 17794: ljava/lang/management/managementfactory;.getruntimemxbean ()ljava/lang/management/runtimemxbean; 05-31 15:26:24.092 15970-15970/com.example.android.slidingtabsbasic w/org.bson.objectid﹕ failed process identifier jmx, using random number instead java.lang.noclassdeffounderror: java.lang.management.managementfactory @ org.bson.types.objectid.createprocessidentifier(objectid.java:502) @ org.bson.types.objectid.<clinit>(objectid.java:460) @ com.mongodb.connection.clusterid.<init>(clusterid.java:47) @ com.mo