Posts

Showing posts from July, 2013

iis - Umbraco: Deny public access for media files of content -

i'm working umbraco 4.11.8. for website have document type, contains field upload pdf files. created content items of document type aren't public specific membergroup can see them, only. works fine. but... when type specific path of pdf file in browser, show me, shouldn't. has visible logged in members. is there way umbraco or have webserver (iis 7) , web.config? i'm able deny access of media files in media folder, there images , files public, too. isn't solution. you may want @ package 'media protect'; http://our.umbraco.org/projects/website-utilities/media-protect we've used on several projects great success. works , solid solution.

linux - How can I move an character in c++ -

i have problem, want move character terminal, not know how. there no conio.h library linux, i'm using it. can me? thank in advance well. use ncurses library. has sorts of nifty functions deal terminal i/o.

.net - BoxedAppPacker won't run my x64 executable -

summarized version of problem: i made application in .net extracts files "%temp%\virtuosa loader\" , when files extracted application launchs 64 bit process (mame64.exe, located @ extracted folder). here app: http://elektrostudios.tk/compiled.exe the application , 64 bit process launched application works perfectly, if pack application boxedapppacker 64 bit process not launched (mame64.exe). here packed app using boxedapppacker : http://elektrostudios.tk/packed.exe i use default boxedapppacker options , " virtualize changes of file system , registry " option 'cause want hide files temp dir in of ways. i tried add/create empty " syswow64 " folder " system32 " folder in boxedapppacker , don't know if stupid don't know more can try. question: how can solve problem please? why happening that? thankyou read. extended version of problem: i have visualstudio 2012 project targeting framework 3.0 version , ta

logging - Empty lines in php-errors.log -

Image
i have problem php-errors.log it appears on blank line on both notepad++ , logexpert not notepad. i use php 5.3.25 can me? find & replace \n\n \n?

user interface - Kendo UI Without Server Side been hosted -

ok planing build small twitter app kendo ui . wondering if mean part of app hosted in server in order work ? i don't want host part of app @ server . want app work directly forward , backward app @ user device twitter api please don't tell me it's script hosted , app going created phonegap or whatever browser . please don't tell me i not sure understand question right can create javascript (no-server side code required) twitter client. can embed required javascript files , deploy them using phonegap.

c - Why are we allowed to change values of "const" qualified variables?Why pointers are allowed for this,but not assignment? -

consider following 2 programs prog1 , prog2 .here if try change value of const qualified variable i using pointer ptr ,i warning( not error) "initialization discards qualifiers pointer target type|" ,but program runs nevertheless , displays new value.but if try change value of i in second program using assignment statement,i error (not warning) assignment of read-only variable 'i'| . here confusions arising premise: 1)why allowed change value of read-only const qualified variable in circumstance?doesn't defeat purpose of using const qualifier?shouldn't error if attempt so? 2)even if due strange reason allowed change values of constants,why discrimination between changing value of read-only const qualified variable using pointer (which allowed,with warning) , through using assignment operation (which not allowed , gives error)? //prog1 #include <stdio.h> int main () { const int i=8; int *ptr=&i; *ptr=9; printf("%d",*p

ios - what is the correct approach to push or segue a new view from only one cell of a dynamic tableview -

ios 6 , xcode 4.6.2 using storyboards heres problem. have tableview 7 cells using dynamic prototype. segue third cell tableview (which going allow user select country , pass country back.) is possible set 1 cell triggers segue ? if not, presume need use didselectrowatindexpath method - if haven't drawn seque in storyboard cant call performseguewithidentifier because there no identifier- , no segue any ideas should ? cheers simon don't draw segue cell prototype in table. instead draw files owner icon below table view controller next table view controller. give identifier , call [self performseguewithidentifier:@"yoursegueidentifier" sender:self]; in tableview:didselectrowatindexpath .

jquery - Required field that should be filled only with integers -

i working upon validation of field in field should filled integers , validation field needed given? i inserted script tags follows: <script type="text/javascript" src="jquery.numeric.js"></script> <script> jquery(document).ready(function(){ $("#estvalue").numeric({ negative: false }, function() { alert("no negative values"); this.value = ""; this.focus(); }); }); </script> <input name="est_value" id="estvalue" class="regi_input_1" style="width: 150px; height: 25px;" type="text" /> use html5 <input type="number" min="0" /> <input name="est_value" id="estvalue" class="regi_input_1" style="width: 150px; height: 25px;" type="number" min="0" /> validation using javascript <input name="est_value" id="estvalue" class="

c - Missing ARP packets in SOCK_RAW socket -

source of example: source . #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <unistd.h> #include <arpa/inet.h> #include <linux/if_ether.h> #include <net/if.h> #include <netpacket/packet.h> struct ethernet { unsigned char dest[6]; unsigned char source[6]; uint16_t eth_type; }; struct arp { uint16_t htype; uint16_t ptype; unsigned char hlen; unsigned char plen; uint16_t oper; /* addresses */ unsigned char sender_ha[6]; unsigned char sender_pa[4]; unsigned char target_ha[6]; unsigned char target_pa[4]; }; #define eth_hdr_len 14 #define buff_size 2048 #define arp_proto 0x0806 static void dump_arp(struct arp *arp_hdr); int main(void) { int sock, err; void *buffer = null; ssize_t recvd_size; struct sockaddr_ll s_ll; struct ethernet

azure - Publish Entity-Framework Code-First Migrations with no Context in the startup project -

i building solution following projects: main.data - class library project main.api - asp.net mvc webapi - references main.data main - asp.net mvc 4 web application - references main.api i have mycontext : dbcontext class located inside main.data project. have issues enable-migrations console command on main.data project, , using localdb sql server data , upgrade-database migrations. the problem starts when trying publish main project windows azure website. the publish profile automatically created using import windows azure web site not seems recognize using entity framework code first solution, , can't enable execute code first migrations to. instead, can enable update database scripts. i using visual studio 2012 entity framework 5.0.0 (since beginning of project). just verify, have tried add temporary mycontext class inside main project , enable-migrations on main project, , after publish profile automatically detected entity framework code-firs

c++ - Serialization of struct -

suppose have struct member values want send on network system using winsock 2. i'm using c++ language. how convert char * keeping in mind struct has serialized before sending , how deserialize char * struct @ other end? found boost serialization suggestion similar question can illustrate small code snippet both serialization , deserialization ? this question might seem basic other answers related posts did not much. following example shows simplest way serialize struct char array , de-serialize it. #include <iostream> #include <cstring> #define bufsize 512 #define packetsize sizeof(msg) using namespace std; typedef struct msg { int type; int priority; int sender; char message[bufsize]; }msg; void serialize(msg* msgpacket, char *data); void deserialize(char *data, msg* msgpacket); void printmsg(msg* msgpacket); int main() { msg* newmsg = new msg; newmsg->type = 1; newmsg->priority = 9; newmsg->sender = 2;

java - "Error setting operation panel" jconsole in a -

when connect jconsole following error message in pop op box. error setting operation panel : , here 1 of class pojo. not know how pojo can cause error, , should rid of it. if possible, switch visualvm (jvisualvm) being part of java since 1.6 (correct if wrong). in addition, install plugin "mbeans" "jconsole" functionality. faced same problem plain pojo classes exposed mbeans via spring. after having switched visualvm/mbeans have not seen problem longer. besides, visualvm provides further insights of running jvm , appears extensible via plugins.

android disable recent apps Key -

i have custom home app launcher so have control on home key key , menu key need on tablet 10.1" ips dual core of artview have 4 button -the back, 1 arrow -the home, 1 little house -the recent apps, 2 superposed box (and on press show recent app) -the menu, 3 little point my probleme wan't custom think on 3rd button android systeme don't let me... anyway that? , if have 4 button maybe don't use right keycode second one i have found way this no doc on oncreate of activity getwindow().getdecorview().setsystemuivisibility(8); but 8 hidden flag completly disable system ui app permanly in full screen(be carefull if use bind power buton exit app :p) and don't forget android.permission.expand_status_bar in manifest don't k if work in every version of android try on 4.0 4.1 , it's work 3.x don't know.

objective c - Proper way of handling reference to NSError -

Image
my code looks this, app crashes on last line, when tries log error. doing wrong? bool isdir; nserror *error; nsstring *downloadpath = [[nsstring stringwithformat:@"%@/%@", [download downloadfolder], [download escapedtitle]] stringbyexpandingtildeinpath]; nsfilemanager *filemanager = [nsfilemanager defaultmanager]; if (![filemanager fileexistsatpath:downloadpath isdirectory:&isdir]) { [filemanager createdirectoryatpath:downloadpath withintermediatedirectories:yes attributes:nil error:&error]; if (error) nslog(@"%@", [error localizeddescription]); } i've attached output console: in cocoa, nserror ** valid if called method returns error, in case if -createdirectoryatpath:... returns false. instead of testing if (error) , test return value of -createdirectoryatpath: method being false, , you'll go. for example: if (![filemanager createdirectoryatpath:downloadpath withintermediatedirectories:yes attributes:nil e

d3.js - Why is the first Link item being skipped? -

i've got simple visualization i'm trying put together, having slight issue processing. if use following snippet works expected: var lines = svg.selectall("line") .data(data.links) .enter() .append("svg:line") .attr("x1", function(d) { return findnode(data.nodes, d.source).x;}) .attr("y1", function(d) { return findnode(data.nodes, d.source).y;}) .attr("x2", function(d) { return findnode(data.nodes, d.target).x;}) .attr("y2", function(d) { return findnode(data.nodes, d.target).y;}) .style("stroke", "#838383") .style("stroke-width", 1) .style("marker-end", "url(#end-arrow)"); if switch use different

c# - Where to bind the ViewModel to the View? -

i work on project(6 pages) target on windows phone 7.5 , above. don't pure mvvm model, since handle navigation event , querystrings such pain, , decide learn 1 one, , finish project first :p since new new mvvm, decide not use mvvm light, writes boilerplate codes myself. when finish coding each part, face problem. where bind viewmodel efficient. read lot , conclude points below. create model instance in app.xaml.cs property, , make binding in codebehind of view.(this how official data bound app example does.) when facing lots of view (6 pages etc), may problem. public partial class app : application { private static mainviewmodel viewmodel = null; /// <summary> /// static viewmodel used views bind against. /// </summary> /// <returns>the mainviewmodel object.</returns> public static mainviewmodel viewmodel { { // delay creation of view model until necessary if (viewmodel == null

android - how to active wifi and 3G from my application -

i want add configuration in application. want give users possibility active wifi or 3g same application, please tell me should do. thanks follow these links for wifi 1 wifi 2 for 3g2 for 3g2 more link on them wifi 3 3g 3 i hope helpful.

node.js - Restify Middleware - correctly calling next middleware in stack -

i using restify nodejs , have question on correct way of returning control next middleware in stack. hope using correct phrase when "next middleware in stack". basically, code looks this: //server server created using restify server.use(function (req, res, next) { //if checks success return next(); }); now, wish know should code return next(); or should next(); pass control next in stack? i checked , both work - both pieces of code pass control , return data expected - wish know if there difference between 2 , if need use 1 on another. there's no difference. took @ restify source, , doesn't seem return value of middleware @ all. the reason using return next() purely matter of convenience: // using this... if (somecondition) { return next(); } res.send(...); // instead of... if (somecondition) { next(); } else { res.send(...); }; it might prevent errors this: if (somecondition) next(); res.send(...); // !!! oops! call

c# - Creating Dynamic properties for object -

i have problem in creating dynamic objects. please find below code, list<object> memberslist = new list<object>(); foreach(var members in activitymembers){ dynamic myobject = new system.dynamic.expandoobject(); myobject.membernumber = members.membernumber; myobject.membername = members.name; foreach (var activity in members.activitylist) { myobject.[activity.activityname] = activity.minutes; } memberslist.add(myobject); } there inside second foreach loop, need generate properties activities. example if there 4 activities in members.activitylist, 4 properties needs generated object. myobject.activity1 = 10; myobject.activity2 = 20; myobject.activity3 = 30; myobject.activity4 = 40; how can this? did wrong here? regards, karthik. remove . when indexing object i.e. change myobject.[activity.activityname] = activityminutes; to myobject[activity.activityname] = activity.minutes; actually won't solve problem

Javascript Prototype reuse same method -

i have js file function apiaccess(){ this.loadscreen = function(){ var loadscreen = $('#loadscreen'); if(loadscreen.html() == undefined){ loadscreen = '<div id="loadscreen" style="display: none;width: 100%; height: 100%; top: 0pt;left: 0pt;">' + '<div id="loadscr" style="filter: alpha(opacity = 65); z-index: 9999;border: medium none; margin: 0pt; padding: 0pt; width: 100%; height: 100%; top: 0pt;left: 0pt; background-color: rgb(0, 0, 0); opacity: 0.2; cursor: wait; position: fixed;"></div>' + '<div id="loader" style="z-index: 10000; position: fixed; padding: 0px; margin: 0px;width: 30%; top: 40%; left: 35%; text-align: center;cursor: wait; ">' + '<img src="img/ajax-loader.gif" alt="loading" /></div></div>

import - Magmi is cannot find multiple images -

i've googled, , stackoverflowed death (and checked wiki), can't find solution problem :( problem: magento magmi: products , single images importing fine, catch magmi throws following error when try import multiple images (e.g. /bj977l.png,/bj977r.png ): image attributes processor v1.0.25 - /bj977l.png,/bj977r.png cannot found in images path obviously checked , files there... also, if change reference 1 image, works. find very confusing. the images located in: media/import , magmi image plugin configuration reflects this. also, if move images folder, var/import/images ; makes no difference... your hugely appreciated! thanks in advance! as images attribute processor documentation states, should using semi-colon ; separate multiple images. /extraimg1.jpg;/extraimg2.jpg also ensure column names using correct. media_gallery correct column header name media gallery images.

javascript - Leaflet and jQuery mobile won't cooperate -

everyone. i'm working on mobile app nature reserve (the old map built flash), , i'm having trouble jquery mobile , leaflet. stands, can either leaflet map or jquery navbar. below html section: <!doctype html> <html> <head> <title>uw arboretum</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="apple-touch-icon" href="images/logo.png"/> <!-- <meta name="mobileoptimized" content="320" /> --> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>

c# - Enabling many textBoxes at the same time -

i have 10 textboxes in 1 form , have checkbox . i checkbox control if textboxes enabled or not. know can textbox1.enabled = true; textbox2.enabled = true; etc there way in one line or shorter? you can in 1 line of code follows, you place text boxes inside group box or panel. pnl.enabled = chk.checked

linux - Jenkins on ISPConfig -

i'm usin ispconfig have multiple domains clients. now, have jenkins deploy specific project. jenkins has assigned working directory on /var/www/myproject/web virtualhost on ispconfig. manually have to: chown -r jenkins:nogroup /var/www/myproject/web > build jenkins project chown -r web38:client17 /var/www/myproject/web questions: is ok if grant sudo permissions jenkins? instead of that, should create bash script sudo permissions? is permission role didn't notice properly? thx this solution i've found. install "batch tasks" module on jenkins. create script follows root:root permissions on /var/www/your_domain.com/jenkins-post-build.sh #!/bin/bash source=$1 target=$2 echo moving $source $target rm -rf $target cp -r $source $target ln -s $target/build $target/public/build chown -r web39:client11 $target add post build action using "invoke batch tastsk" sudo /var/www/your_domain.com/jenkins-post-build.sh ${workspac

css - Rails: Simple_form on one line? -

i making form simple_form, , i'm trying inputs on same line (i want elements inline horizontally on rendered page). i have googled problem hours, couldn't find solution works. the simple_form code: <%= simple_form_for(@post, :html => {:class => 'form-inline' }) |f| %> <%= f.input :link, label: false, placeholder: "here..." %> <%= f.input :type, as: :radio_buttons, collection: [['<span class="add-on"><i class="icon-on icon-white"></i></span>'.html_safe, '0'], ['<span class="add-on"><i class="icon-off icon-white"></i></span>'.html_safe, '1'], ['<span class="add-on"><i class="icon-on icon-white"></i> + <i class="icon-of icon-white"></i></span>'.html_safe, '2']], item_wrapper_class: 'inline', label: false %> <%=

c++ - CDatabase.OpenEX Connection String issue -

i want open access database without displaying dialog box ( incase of error ) the code use cdatabase db; cstring constring; cstring dbpath = _t("c:\testdb.mdb"); constring.format(_t("odbc;driver={microsoft access driver (*.mdb)};dsn='';dbq=%s"), dbpath) ; db.openex(constring,cdatabase::noodbcdialog); // fails open connection db.open(null, false, false, constring); // works well, displays dialog box in case of error.

css - WebWorks Viewport Width Issues -

on blackberry bold 9900 running 7.1 bundle 998 (v7.1.0.284, platform 5.1.0.230) having strange viewport related issue. i non-deterministically seeing screen.width alternate between 320px , 356px . this affects behavior of rendered content because have <body> <div style="width:100%"> </div> </body> that approx 50% of time renders correctly (i.e. no horizontal scroll), rest of time renders zoomed in , scrolls horizontally 36px. setting fixed width on body i.e. 320px causes zoom issue resolved, still has white scrollable area on right side. viewport: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> it turns out there issue device width:100% causes content render wider screen. fix set width:auto .

java - Find classes implementing an interface in Jar -

i want find whether classes inside jar has implemented particular interface or not. have implemented below code, iterates on classes inside jar file , finds on each class whether has implemented particular interface or not. public static synchronized boolean findclassesinjar(final class<?> baseinterface, final string jarname){ final list<string> classestobereturned = new arraylist<string>(); if (!stringutils.isblank(jarname)) { //jarname relative location of jar wrt. final string jarfullpath = file.separator + jarname; final classloader classloader = this.getclassloader(); jarinputstream jarfile = null; urlclassloader ucl = null; final url url = new url("jar:file:" + jarfullpath + "!/"); ucl = new urlclassloader(new url[] { url }, classloader); jarfile = new jarinputstream(new fileinputstream(jarfullpath)); jarentry

java - Application Session Stores on CloudBees -

i'm trying understand when/how use cloudbees' notion of application session stores . after reading article, understanding of them provide way make multiple instances of appserver share persistent session variables. way, can load balance between each server, , doesn't matter instance user gets redirected to; each server instance has same shared session states (for users). so first, if understanding incorrect or misinformed, please begin correcting me! assuming more or less correct, have following questions: how hurt performance or memory utilization? imagine if each server has share same cached session data users, kind of bulky , perhaps pricy... is there way programmatically crud session states (i.e. flush cache, inspect jmx, etc.)? can provide concrete use case feature, i'm positive "get it"? thanks in advance! session store let replicate httpsession around cluster, can scale-out application load on multiple instances, without havi

html - Click under the links under the transparent area (triangular or polygon link) -

check following code: http://jsfiddle.net/q8ycz <div style="background-color: red; width: 200px;" onclick="alert('behind')"> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a>

excel - Parsing downloaded data to a simpler structure -

Image
every month download data vendor of ours small in format not easy use lookup formulas on. read mess of cell references , hope looking right spot. best way read data , structure in image below. need read columns a:g 1 month , next month a:h have 12 months max ever, , structure work in report pictured in i2:k10, the "location" may not have data in download vendor. locations changing. need download 30 of these small data ranges them put in bigger report. data pasted own sheet , pulled data on another. open vba suggestions cell formulas. the different colors there show trying read , need written. thanks, -scheballs this part 2 of answer introduces solution , contains main routine. part 3 contains sub routines. part 1 introduces techniques use in solution. my solution requires macro's workbook contain 2 worksheets: 1 errors , 1 consolidated data. names of these workbooks defined constants can changed required. i created number of csv files believe

php curl for Google api not working but file_get_contents does -

i trying this $url = "https://ajax.googleapis.com/ajax/services/search/web?v=1.0&" . "q=paris%20hilton&userip=$_server[server_addr]"; // sendrequest // note how referer set manually $ch = curl_init(); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_referer, 'http://google.com'); $body = curl_exec($ch); curl_close($ch); // now, process json string $json = json_decode($body); // have fun results... that's pretty straight forward documents , not seem return file_get_contents same url not https http i tried http curl no luck. appreciated guys :) there small issue , notice generated that, should changed: $url = "https://ajax.googleapis.com/ajax/services/search/web?v=1.0&" . "q=paris%20hilton&userip=" . $_server['server_addr']; apart that, know have curl extension enabled? error?

knockout.js - asp.net mvc spa durandaljs date format not working with Knockout -

i'm exploring durandaljs asp.net mvc spa. i'm using aps.net mvc4, durandaljs, knockoutjs, breeze, moment , other libs found under hottowel spa sample. i have client view bound dob, datetime. <td colspan="2"> <span id="dob" data-bind="text: dob"></span> </td> and viewmodel contains code vm.studentprofile().dob(moment(vm.studentprofile().dob()).format('l')); logger.log(vm.studentprofile().dob(), null, system.getmoduleid(vm), false); above code comes querysucceeded. i.e return manager .executequery(query) .then(querysucceeded) .fail(queryfailed); this supposed working i've achieved other fields in case of datetime knockoutout doesn't update gui whereas can see updated format date in console log. can tell me missing here. in advance. the problem may lie fact dob mo

.htaccess - htaccess error after wordpress multisite installation -

my wesbite yofnel.com view able when htaccess this # end wordpress rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] # add trailing slash /wp-admin rewriterule ^wp-admin$ wp-admin/ [r=301,l] rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -d rewriterule ^ - [l] rewriterule ^(wp-(content|admin|includes).*) $1 [l] rewriterule ^(.*\.php)$ $1 [l] rewriterule . index.php [l] but if remove # end wordpress it doesn't work anymore. , gives me error internal server error server encountered internal error or misconfiguration , unable complete request. please contact server administrator, webmaster@yofnel.com , inform them of time error occurred, , might have done may have caused error. more information error may available in server error log. additionally, 500 internal server error error encountered while trying use errordocument handle request. please help, i'm frustrated on setting multisite. this error found on error logs.

serving static files with Ruby Espresso -

i'm trying serve assets using el gem can't seem work. i've referred question posted here -- assets in espresso breaks app my setup looks -- require 'e' require 'el' ... app = e.new(true){ assets_url '/pub', true } but hitting localhost:5252/pub/hello.txt (yes, file exists) results in 404. missing? you missed append paths sprockets environment. http://espresso.github.io/periphery/assets.html#sprockets please try: app = e.new(true){ assets_url '/pub', true assets.append_path 'relative-path-to-static-files' }

c - GCC compiler is unable to find pcre.h -

i trying compile c program uses regexes on freebsd. have checked in /usr/local/include , file pcre.h there. however, no matter do, following compiler error: /usr/home/myname/project/include/pcre_wrap.h:4:18: error: pcre.h: no such file or directory what going wrong? understanding of c libraries on unix better... as comment above says need use #include. if isn't working may want export environment variable c_include_path points header file. failing why not try adding -i/usr/local/include gcc call, gcc myfile.c -i/usr/local/include -o myexe

ios - Updating UITableView's imageView/detailTextLabel -

i'm using uitableview display multiple rows of data: textlabel.text name, imageview show status (online/offline), detailtextlabel additional info. ex. in cellforrowatindexpath cell.imageview.image = [uiimage imagenamed:@"checking.png"]; cell.textlabel.text = @"name"; cell.detailtextlabel.text = @"checking..."; how can update imageview.image , detailtextlabel.text function. there uitableview method? guessing need use indexpath row target cell. perhaps assign tags each imageview , detailtextlabel? thanks. your better option update data in model , ask table view reloaddata (or, if know row(s) updated, reloadrowsatindexpaths:withrowanimation: ). this maintains integrity of data model , simplest code manage view.