Posts

Showing posts from April, 2015

How to have multiple variable function work with vectors -

i'm having trouble dealing scilab functions ; have output in form of 1x6 vector, , i'd have simple way make work 6 variable function. v = [1,2,3,4,5,6] ; function z=f(a,b,c,d,e,f) ... endfunction f(v) //returns error thank scilab doesn't have direct analogue of python's fcn(*v) function call interpret entries of v multiple arguments. if want able call function either fcn(1,2,3,4,5,6) or v = 1:6; fcn(v) , you'll need add clause beginning: function z=fcn(a,b,c,d,e,f) if argn(2)==1 [a,b,c,d,e,f] = (a(1),a(2),a(3),a(4),a(5),a(6)) end // rest of function z = a+b+c+d+e+f endfunction now v=1:6; fcn(v) returns 21, fcn(1,2,3,4,5,6) does. the condition argn(2)==1 checks if function received 1 parameter instead of expected 6; if case, assumes vector. if vector doesn't have enough elements (6) tuple assignment, error thrown.

javascript - requirejs + angularjs code structure split in different files -

i'm using requirejs , angular , i'm trying create application structure allows me split every controller/services/directives etc in different files. structure i'd achieve: src/ components/ navigation/ index.js module.js navigationcontroller.js navigationservice.js in module.js i'd this: define(['angular', './navigationservice', './navigationcontroller'], function (angular, navigationservice, navigationcontroller) { 'use strict'; return angular.module('myapp.navigation', []) .controller('navigationcontroller', navigationcontroller) .service('navigationservice', navigationservice) }); and having controller/service definition defined in separated js file. the issue don't know how define these files. i've tried syntax: //navigationservice.js define( function() { this.donavigation = function () { console.log(...

What files are needed for a release build with Qt Creator? -

this question has answer here: how deploy qt application on windows? 1 answer i compiled standard qt widget project (desktop qt 5.4.0 msvc2013 32 bit) release build qtcreator 3.3.0 on windows 7 32 bit , put qt libraries in same folder (qt5core.dll, qt5gui.dll, icudt53,dll, icuin53.dll, icuuc53.dll) , when start program error (roughly translated) "... doesn't work anymore" appears. when same thing debug release , put appropriate debug libaries in folder works. what have make differently release build? thanks in advance help! a. try deploy application using the windows deployment tool found in qtdir/bin/windeployqt.exe . automatically puts necessary files in application directory. open command prompt , add path qt directory , it's bin folder path variable : set path= path\to\qt\bin next run windows deployment tool applicatio...

javascript - XHR State Error when readyState is as expected -

i writing javascript program requires significant usage of xhr methods. using asynchronous style. core of have. global = {}; global.xhr = {}; global.xhr.requestqueue = []; global.xhr.responsequeue = []; xhr = new xmlhttprequest(); xhr.first = true; xhr.onreadystatechange = function() { //console.log(this.readystate); if(this.readystate == 4) { if(this.first) { this.first = false; global.carouselitems = parseint(this.responsetext); global.onslidecountreceived(); } else { global.xhr.responsequeue.push({status: xhr.status, responsetext: xhr.responsetext}); if(global.xhr.requestqueue.length > 0) { xhr.open("get", global.xhr.requestqueue[0]); global.xhr.requestqueue.shift(); } } ...

How to get real quotient in python 2 -

since division operator "/" returns floor quotient. when numerator or denominator minus number, operator "/" not return real quotient. -1/3 returns -1 rather 0. how can real quotient? try this, a = 1 b = 3 print -(a / b)

vb.net - To remove last line of a richtextbox -

i need remove last line of richtextbox. tried several ways. nothing worked. please me for t = len(texto) 0 step -1 if mid(texto, t, 1) = vbcr c = c + 1 'texto = mid(texto, 1, t - 1) don't end if ' if c = 2 exit next richtextbox2.text = left$(texto, t - 1) dim lastline integer = ubound(richtextbox2.lines) if lastline > -1 dim newlines() string integer = 0 lastline if < lastline redim preserve newlines(i) newlines(i) = richtextbox2.lines(i) end if next richtextbox2.lines = newlines end if

java - Recycler view inside a Custom Compound view -

i need create recyclerview inside custom view. following code: public class citysinglepagegridview extends linearlayout { context context ; view mview ; recyclerview recyclerview ; recyclerview.layoutmanager layoutmanager ; recyclerview.adapter adapter; public citysinglepagegridview(context context, attributeset attrs) { super(context, attrs); this.context = context ; layoutinflater inflater; inflater = (layoutinflater) context .getsystemservice(context.layout_inflater_service); mview = inflater.inflate(r.layout.module_city_single_page_gridview,this,true); recyclerview = (recyclerview) mview.findviewbyid(r.id.cardlist); recyclerview.sethasfixedsize(true); layoutmanager = new linearlayoutmanager(context); recyclerview.setlayoutmanager(layoutmanager); adapter = new citycardviewadapter(); recyclerview.setadapter(adapter); } } the problem when run application nothing shows in custom view, w...

PHP: how to used a class function? -

i'm quite new , having trial , test creating class , objects. here's script: <?php class testingm { private $t; public function __construct($file) { $this->t = fopen($file, 'rb') } } $test = new testingm; $s = new file($_get['n']); ?> the script says warning: missing argument 1 testingm::__construct(), called in how can provide value $file variable? can guide me? try $test = new testingm($_get['n']);

uiscrollview - pan and scroll in a zoomed in collectionView xcode -

i have app opens in uicollectionview. can zoom in want able pan , forth , scroll , down see collectionview cells go outside view when zoomed in. how that. have create uiviewcontroller , have scrollview inside of , put collectionview inside scrollview. as created uicollectionview , put cell inside of , applied pinch zoom collection view. can't work if add scrollview. i put collectionview inside scrollview , got working.

c# - Get Reports for next 10 days in single database hit -

i want fetch count status next 10 days in single database hit using linq in c#. eg: table : task coulmun: id status duedate value 1 new jan 1 2013 value 2 new jan 3 2013 value 3 in progress jan 1 2014 value 4 completed jun 21 2016 now want fetch report next 10 days today stating : no of records in each status. records count before today date should part of today date , tomorrow date should count of particular day. how can achieve in single database hit. don't want query db again n again 10 times . expected result: date jun 20 jun 21 jun22 jun 23 jun24 jun 25...... new 2 0 0 0 0 0 inprg 1 0 0 0 0 0 complt 0 1 0 0 0 0 solution tried : sql query: select count (taskid) , statuscode, duedate task dateadd(day, datediff(day, 0, duedate), 0) between cast('2013/06/08' date) , cast('2013/06/18'...

c# - desktop notification using javascript in windows form -

Image
i new , creating simple application in click button , notification on desktop should displayed. doing in windows form c# the error " nullreferenceexception unhandled i have 1 button notify in form1. have tried this: form1.cs public form1() { initializecomponent(); this.load += new eventhandler(form1_load); webbrowser1.documentcompleted += new webbrowserdocumentcompletedeventhandler(webbrowser1_documentcompleted); webbrowser1.scripterrorssuppressed = true; } private void btnnotify_click(object sender, eventargs e) { webbrowser1.document.invokescript("notifyme"); } private void form1_load(object sender, eventargs e) { string currentdirectory = directory.getcurrentdirectory(); webbrowser1.navigate(path.combine(currentdirectory,"htmlpage1.html")); } private ...

Cannot obtain DBObject for transient instance, save a valid instance first with grails and mongodb -

cannot obtain dbobject transient instance, save valid instance first. i using grails 2.2.1 , mongodb 1.2.0. there domain below. class person{ static mapwith = "mongo" static hasmany = [categories:category , address:address]; string firstname; string lastname; string emailid; int age; string contactnumber; string sex; byte [] personimage; string identity; static constraints = { identity nullable: true , inlist:["driving license"] , unique: true; emailid email: true , unique: true contactnumber unique: true } } when going save giving error.

PHP PostgreSQL Query Issue -

i have been trying convert pg_connect query pdo pg_connect give me errors. below query have throwing error. <?php if (!empty($_get)) { $searchfilters = array( "name" => "data.name || ' ' || data.lastname ilike " . $dbh->quote("%".getvar("name")."%"), "room" => "data.room = " . $dbh->quote(getvar("room")), "activity" => "data.activity = " . $dbh->quote(getvar("activity")), "date1" => "data.dob > " . $dbh->quote(getvar("date1")), "date2" => "data.dob < " . $dbh->quote(getvar("date2")), "date3" => "data.joindate > " . $dbh->quote(getvar("date3")), "date4" => "data.joindate < " . $dbh->quote(getvar(...

rust - Renaming a crate with a hyphen doesn't compile anymore -

this no longer compiles: extern crate "my-crate" my_crate1; what's new syntax? did not find searching. dashes in extern crate names can replaced underscores. example should be extern crate my_crate my_crate1; or if want underscored name, using following work extern crate my_crate;

cordova - Meteor + Polymer + Vulcanize + Android = Clunky UI -

we have simple mobile application written using polymer on meteor. there handful of pages , each contains few elements. no fancy animations (beyond polymer built in animations) or large data sets. when running on web browser, site runs smoothly. when running on mobile device, ui feels slow , polymers animations sluggish , less responsive. how start profiling problem? expected running on mobile device? leads help... thank you!

ios - Trouble with creating a popover withs storyboard in Xcode -

i cannot create popover storyboard. settings follows: github repo: https://github.com/li354886/iosprojects/tree/v1.1/testpopover viewed video: https://www.youtube.com/watch?v=j5xfmpxlwzq popover view controller behaves modal. make sure app universal. won't see popovers, default, on iphone-only app. (you can see them in ios 8, work, default won't.)

java - What to use in failures and error case: WebApplicationException vs Response? -

i working on rest service , confuse in case of failures/errors should use response or webapplicationexception ? below example using response return 400 bad request error message along json response went wrong. @get @path("/data") @produces(mediatype.application_json) public response getdata(@context uriinfo uriinfo) { string client = getclientid(); if (client == null || client.isempty()) { return response.status(httpservletresponse.sc_bad_request) .entity("{\"error\": \"client id null or empty\"}").build(); } // code , return succesfull response return response .status(httpservletresponse.sc_ok) .entity(resp.getresponse()).build(); } what right thing here? if need use webapplicationexception how can use return 400 bad request error message along json response in particular case, whether to return response or throw mapped exception, matter of preference. t...

javascript - jQuery .each deep selecting -

i traversing complex dom, have repetitive html structure i using each feature in jquery $('.row').each(function (index, object) { $(object).find('label[for="duedate"] > .input-group > input:first').text(); } i trying use above code start traversal getting undefined in results. a sample of html follows <div class="row"> <div class="form-group ml-sm mr-sm"> <label class="control-label" for="duedate">due date</label> <div class="input-group"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> </span> <input "type="text" data-plugin-datepicker class="form-control" readonly="readonly" required> </div> </div> </div> </div> i wanted trav...

How can I keep a session between the frontend (angularjs) and the backend (java or c#)? -

i developing web application angularjs in frontend , java or c# backend, , i'll use rest communication. my doubt is: how can keep session between frontend , backend? tools show use? i have found oauth , j2ee container authentication, options have? is there library or job in transparent way, 'hides' complexity, don't need manipulate cookies? thanks in advance. your session management , security implementation remains same non angular apps. if it's java suggest using spring security. have many options authentication, , can protect rest urls simple configuration.

batch file - Type command not working in Windows command prompt -

correct me if i'm wrong, type command supposed display contents of text file in windows command prompt. whenever use type command display text file, output only: unable initialize device prn the command used is: type c:\users\matthew\desktop\hello.txt i don't know why it's doing , can't seem figure out. if me, appreciated. "unable initialize device prn" odd error, must using old version of dos attempting use printer. means you're either using print command, or you're trying type confusing type command , returning error. set /p text=<type c:\users\matthew\desktop\hello.txt echo "%text%" && pause

python 2.7 - How to decode ascii from stream for analysis -

i trying run text twitter api through sentiment analysis textblob library, when run code, code prints 1 or 2 sentiment values , errors out, following error: unicodedecodeerror: 'ascii' codec can't decode byte 0xc2 in position 31: ordinal not in range(128) i not understand why issue code handle if analyzing text. have tried code script utf-8. here code: from tweepy.streaming import streamlistener tweepy import oauthhandler tweepy import stream import json import sys import csv textblob import textblob # variables contains user credentials access twitter api access_token = "" access_token_secret = "" consumer_key = "" consumer_secret = "" # basic listener prints received tweets stdout. class stdoutlistener(streamlistener): def on_data(self, data): json_load = json.loads(data) texts = json_load['text'] coded = texts.encode('utf-8') s = str(coded) content = s.decode(...

How to convert varchar date to datetime in MySQL -

how can convert following date format datetime format in mysql? right stored varchar. should use python script, or there inbuilt mysql function complete it? 27 07 (2009), 10:38 pm, like this select str_to_date('27 07 (2009), 10:38 pm', '%d %m (%y), %l:%i %p'); here specifiers: https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format if original text contains trailing comma, match in pattern select str_to_date('27 07 (2009), 10:38 pm,', '%d %m (%y), %l:%i %p,'); if want update column, can run update statement like: update mytable set dateat = str_to_date(dateat, '%d %m (%y), %l:%i %p,') and don't forget alter field varchar datetime

view - ANDROID STUDIO: Where is the picture taken with Camera API stored locally? (NOT IN SD CARD) -

when run function in camera api mcamera.takepicture(null, null, mpicture) i wonder picture "stored", , how can access it. dont mean stored in saved in sd card, kinda stored in variable. the picture "frozen" on screen after take picture function. want "frozen" picture bitmap, dont know how. or view, matter. please me that? friendly regards, mathias carlsen i wonder picture "stored", it not stored @ all. how can access it the byte[] of jpeg handed camera.picturecallback ( mpicture in above code snippet). the picture "frozen" on screen after take picture function it more preview stopped, until start again. i want "frozen" picture bitmap, dont know how. it should equivalent actual picture taken. welcome register preview callbacks preview frames handed you.

postgresql csv copy unquoted newline found in data -

i have csv data in excel, , i'm importing postgresql. i'm opening excel csv file notepad editor (have tried notepad, wordpad , notepad++) , copying/pasting remote desktop connection linux machine. i'm using import statement within database: copy ltg_data '/home/keene/ltg_db/ltg_outbreak_jun9_15.csv' (format csv, header); i error: error: unquoted newline found in data hint: use quoted csv field represent newline. context: copy ltg_data, line 175320 here's link csv file i'm using: http://greenandtheblue.com/ltg_outbreak_jun9_15.csv i've researched issue lot , tried lot of things , must missing simple. appreciated. the file linked doesn't appear have cr-lf line endings, suspect potentially issue since you're coming windows host. might try removing carriage returns using sed : sed 's/\r//' ltg_outbreak_jun9_15.csv ltg_outbreak_jun9_15-nocr.csv then copy resulting ...-nocr.csv file.

c# - EPPlus export model to Excel: System.NullReferenceException -

i have mvc view correctly displays model. have been asked put export excel function on page, heard epplus , gave try. this site thought had job. after making changes fit needs, developed this. when tested functionality in view, worked. clicked html actionlink , excel file saved correctly. public void exporttoexcel(ienumerable<fourcourseaudit> audit) { string pathuser = environment.getfolderpath(environment.specialfolder.userprofile); string pathdownload = path.combine(pathuser, "documents"); fileinfo newfile = new fileinfo(pathdownload + "\\myexport.xslx"); using (var excelfile = new excelpackage(newfile)) { var worksheet = excelfile.workbook.worksheets.firstordefault(x=>x.name=="sheet1"); if (worksheet == null) { worksheet.workbook.worksheets.add("sheet1"); } worksheet.cells["a1"].loadfromcollection(collection:audit, printheaders:true); excelfile.save(); }...

python - Why is single int 24 bytes, but in list it tends to 8 bytes -

here looking at: in [1]: import sys in [2]: sys.getsizeof(45) out[2]: 24 in [3]: sys.getsizeof([]) out[3]: 72 in [4]: sys.getsizeof(range(1000)) out[4]: 8072 i know int in python growable (can bigger 24 bytes) objects live on heap, , see why object can quite large, isn't list collections of such objects? apparently not, going on here? this size of object - excluding objects contains : >>> d = range(10) >>> sys.getsizeof(d) 152 >>> d[0] = 'text' >>> sys.getsizeof(d) 152 >>> d ['text', 1, 2, 3, 4, 5, 6, 7, 8, 9] the size of list 1000 elements, in case, 8072 bytes each integer object still 24 bytes. list object keeps track of these integer objects they're not included in size of list object.

python - Transforming a text from first-person to third-person -

i transform big string - written in first-person perspective - third-person one. such as: i happy. went swimming pool friend. to he happy. went swimming pool friend. i've searched library (any language - python preferred) could not find any. does such libraries exist? if there no such library, idea following: use simple regular expression change 'i' 'he' use nltk grammar check text , correct verbs can fit third-person does seems 'proper' solution?

c# - Treeview search results flat list -

Image
how can make list on right populate items meet search criteria? i'm not asking literal code necessarily, general guidance on how so. i've written code populate list on left c#, supplying directory populate list from. not clear on how list populate correctly when using search field @ top. should call function researches directory files based on search criteria? or store initial file list in variable , search within populate list? using system.io; using system.linq; using system.text; using system.threading.tasks; using system.windows.forms; namespace directorybrowser { public partial class form1 : form { public form1() { initializecomponent(); listdirectory(treeview1, @"c:\windows"); } public void listdirectory(treeview treeview, string path) { treeview.nodes.clear(); var rootdirectoryinfo = new directoryinfo(path); treeview.nodes.add(createdirector...

cocos2d x - Undefined reference to functions in CCGLViewImpl for Ubuntu in codeblocks -

i trying build cocos2-dx based project in code blocks. use ubuntu 14. got following errors game_dir/samplegame/cocos2d/cocos/platform/desktop/ccglviewimpl-desktop.cpp:287: undefined reference glfwseterrorcallback' game_dir/samplegame/cocos2d/cocos/platform/desktop/ccglviewimpl-desktop.cpp:348: undefined reference to glfwwindowhint' game_dir/samplegame/cocos2d/cocos/platform/desktop/ccglviewimpl-desktop.cpp:360: undefined reference glfwcreatewindow' game_dir/samplegame/cocos2d/cocos/platform/desktop/ccglviewimpl-desktop.cpp:361: undefined reference to glfwmakecontextcurrent' game_dir/samplegame/cocos2d/cocos/platform/desktop/ccglviewimpl-desktop.cpp:364: undefined reference glfwsetcursorposcallback' game_dir/samplegame/cocos2d/cocos/platform/desktop/ccglviewimpl-desktop.cpp:365: undefined reference to glfwsetscrollcallback' game_dir/samplegame/cocos2d/cocos/platform/desktop/ccglviewimpl-desktop.cpp:368: undefined reference glfws...

c# - Score not changing when collision occurs -

i have been trying score work correctly when player collides 1 of collectibles score not seem change when collision occurs, not sure why happening. in collectible have this: class blueball : obj { public blueball(vector2 pos) : base(pos) { position = pos; spritename = "blueball"; solid = false; score = 0; } public override void update() { if (!alive) return; player player = checkcollisionagainst<player>(); if (player != null) { score = score + 20; alive = false; } i drawing in game1 class with: spritebatch.drawstring(font, "score: " + score.tostring(), scorepos, color.white); so if player collides blueball, 20 should added score , blueball should disappear, disappear score not change, why this? at moment declaring score in game1 class public int score , vector2 scorepos position it. initialize score score = 0; , loa...

c++ - Qt OpenGL transform feedback buffer functions missing -

i've been following tutorial series learning opengl, , current tutorial i'm trying involves creating particle systems using opengl transform feedback buffer. in application i've been using qt version 5.4.2 simple 2d interface design, 3d rendering since seems have plethora of classes working opengl. everything going smoothly point, despite having access opengl functions version 4.3, still seem missing functions using transform feedback buffer , according opengl wiki have been core functions since version 3.0. i have done quick research , found old news items , blog posts in 2012 possibly supporting such features in future, can't find relevant since then. in past i've seen people figure out ways access other functions qt wrappers haven't directly implemented, i'm unsure of how on own. so, in nutshell, how can make use of opengl transform feedback buffer , other similar functions in qt 5.4.2? i hate stuck @ point because wrapper isn't fin...

regex - Split string on [:punct:] except for underscore in R -

i have equation string variables in string equation variables in r workspace. replace each variable numeric value in r workspace. easy enough when variable names don't contain punctuation. here simple example. x <- 5 y <- 10 yy <- 15 z <- x*(y + yy) zaschar <- "z=x*(y+yy)" vars <- unlist(strsplit(zaschar, "[[:punct:]]")) notvars <- unlist(strsplit(zaschar, "[^[:punct:]]")) varsvalues <- sapply(vars[vars != ""], fun=function(aaa) get(aaa)) notvarsvalues <- notvars[notvars != ""] paste(paste0(varsvalues, notvarsvalues), collapse="") this yields "125=5*(10+15)" , great. however, love option use underscores in variable names can use "subscripts" variable names. using these strings in math mode in r markdown. so need [:punct:] excludes _ . tried using [\\+\\-\\*\\/\\(\\)\\=] rather [:punct:] , approach couldn't split on minus sign. there way preserve _ ? ...

Applying navigation drawer throughout the app in Android? -

i had app developed 2 years back, want add navigation drawer app, problem in app there 15 activities, need apply navigation drawer 15 activities? or there best way implement this.? navigation drawer items common whole app. can suggest me best way implement this. a way can it, since navigation drawers list fragments, create list fragment , recall same fragment in activities want in. can using xml layout editor place fragment in layout. having many activities, however, makes lot of work (especially if app designed multiple sizes , each activity has layout).

r - Reading from .csv file giving me a vector, not a dataframe? -

i new r , struggling import data .csv file. specifically, trying pull 31 responses, "1", "2", "3", , "4" .csv file. data under header q21 so tried doing: c <- mydata["q21"] #because (mydata$21) gave "$ operator invalid atomic vectors response but returned [1] na i looking 31 integer responses. no idea i'm doing wrong. appreciate , on feet language. edit: str(mydata) yields chr "/users/charles/documents/work/survey/csv/acme_company.csv" i did use read.csv(mydata) , produced everything, seemed have column headings q20. when typed in c <- mydata$q21 (that typo wrote before), got: error in mydata$q21 : $ operator invalid atomic vectors mydata[1:3,] error in mydata[1:3, ] : incorrect number of dimensions is.data.frame(mydata) [1] false colnames(mydata) null mydata[, "q21"] error in mydata[, "q21"] : incorrect number of dimensions so don...

Save form input into file to be extracted with Node-Red -

i'm trying create page, of node-red, shows feed (extracted search results of dribbble) of images. i'm far can show items dribbble pre-set query. search results (feed) should variable, in such way can choose tags. however, can't seem find way save tags interested in. let's have page contains <input> , whatever fill in , send saved to, let's say, interestingitems.html. how save 'sent' items file? either javascript or node-red. i wouldn't mind using localhost:1880/add?=<query want add list> instead of form input . might easiar, think of. look @ http input node in post mode, function read in form values, can store in global context generating interestingitems page using mustache template.

decorator - How to add attribute to python *class* that is _not_ inherited? -

i need able set flag on class ( not on instance of class) not visible subclass. question is, possible, , how if is? to illustrate, want this: class master(someotherclass): __flag__ = true class child(master): pass ... hasattr(master, "__flag__") should return true master false child . possible? if so, how? don't want have explicitly set __flag__ false in every child. my initial thought define __metaclass__ , don't have luxury of doing because master inherits other classes , metaclasses don't control , private. ultimately i'm wanting write decorator can like: @hide_this class master(someotherclass): pass @hide_this class child(master): pass class grandchild(child): pass ... cls in (master, child, grandchild) if cls.__hidden__: # master, child else: # grandchild you close: class master(someotherclass): __flag = true class child(master): pass two leading underscores without trailing ...

asp.net - ComponentArt: How do I DataFromat a ComponentArtGrid -

hi trying make datafield, routingnumber, can formated string. each row of grid has http://myurl.com/handleincomingcall.ashx?call=123 , 123 routing number , " http://myurl.com/handleincomingcall.ashx?call= " string/ so far have code not seem work. <componentart:gridcolumn formatstring="http://twilio.liquidus.net/handleincomingcall.ashx?call={0}",datafield="routingnumber" headingtext="url" /> i have tried displaying routing number without url in front , works fine. there can make work?

ios - How to make SWRevealViewController slide "over" the main view controller not "push" it out? -

i'm using swrevealcontroller swift , working how suppose tweak little. when bring out menu, either sliding or pressing button, new view comes out while pushing main view controller side. what have slide on main view controller main view controller stays new view controller sliding on top of it. does make sense? example can think of on reddit news app android. slide out menu doesnt effect main view controller slides out on top of it. (i know different in android) is possible while using swrevealviewcontroller class? what you're trying isn't expected behavior of swrevealviewcontroller , require low level coding tweak animation way you're describing. however i'd recommend using pod instead https://github.com/jonkykong/sidemenu . it's updated version , can see provides several animations choose from, 1 you're looking slide in . it's documented.

ruby - Creating a object with nested form rails -

i have 3 tables: members, meetings, meeting_has_members. models are: member.rb class member < activerecord::base has_many :meeting_has_members has_many :meetings, through: :meeting_has_members accepts_nested_attributes_for :meeting_has_members accepts_nested_attributes_for :meetings meeting.rb class meeting < activerecord::base has_many :meeting_has_members has_many :members, through: :meeting_has_members accepts_nested_attributes_for :meeting_has_members accepts_nested_attributes_for :members meeting_has_member.rb class meetinghasmember < activerecord::base belongs_to :member belongs_to :meeting what i'm trying is, while creating meeting, able add members it, , when submitted, create relation meeting_has_member. table meeting_has_members have 2 columns: member_id, meeting_id. thats meeting_controller: meeting_controller.rb class meetingscontroller < applicationcontroller before_action :set_meeting, only: [:show, :edit, :updat...

How do I use the StackedAreaSeries in the WinRT XAML Toolkit -

Image
i have been trying out charting controls in winrt xam toolkit ( https://winrtxamltoolkit.codeplex.com ). i able find examples , cobble working line graph, hoping able make stacked area chart. unfortunately al have managed single dot in corner of blank rectangle. lets have data alice , bob on has date , balance. want see graph this:- so can make single set of lines using following xaml , works. <charting:chart height="400" width="800"> <charting:chart.series> <charting:lineseries title="alice" itemssource="{binding dataforaliceplusbob}" independentvaluepath="date" dependentvaluepath="balance" /> <charting:lineseries title="bob" itemssource="{binding dataforbob}" independentvaluepath=...

node.js - Categories not found, Meteor subscription -

so, i'm looking have contents of categories collection of meteor application available @ times entire app. had read somewhere can specifying null first parameter (instead of name) meteor.publish function. i used following code: // categories meteor.publish(null, function() { return categories.find(); }); when launch app, following error application starting (the above segment of code in <app>/server/publications/global.js ): exception sub id undefined referenceerror: categories not defined @ [object object].meteor.publish.meteor.users.find.fields.username [as _handler] (app/server/publications/global.js:8:12) @ maybeauditargumentchecks (packages/ddp/livedata_server.js:1617:1) @ [object object]._.extend._runhandler (packages/ddp/livedata_server.js:950:1) @ [object object]._.extend._startsubscription (packages/ddp/livedata_server.js:769:1) @ packages/ddp/livedata_server.js:1437:1 the weird thing is, says publication seems work fine. mongol repo...

web - Angular2 - Bootstrap v3 datetimepicker issue in FF and IE -

i rather new clientside web development , learning how work typescript, angular2(0.27) , bootstrap. know angular2 still in heavy development, ran issue, of not sure (technology) causing it. problem has bootstrap v3 datetimepicker. more info on widget in particular can found here: https://eonasdan.github.io/bootstrap-datetimepicker/ the issue in firefox (latest) , ie11 browser, popup datetimepicker not appear, if datetimepicker code (html&js) inside angular2 application html, while in google chrome works fine. ff , ie11 work fine when put code in index.html body directly. this widget html use: <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <div class='input-group date' id='datetimepicker1'> <input placeholder="raw" type='text' class="form-control" /> ...