Posts

Showing posts from February, 2012

Access a shared calendar (such as a meeting room via Office 365 REST API) -

i'm using office 365 rest api access account's calendars. i'd access calendars account has access to, in particular meeting rooms calendars appearing in "other calendars" section in office 365 interface. for now, if query " https://outlook.office365.com/api/v1.0/me/calendars " endpoint, got calendars own, not meeting rooms calendars. any clue on how them (via office 365 rest api) ? the rest api doesn't support access other user's calendars when logging in user. can use client credentials model grant app access calendars in organization , access them way.

android - Load bitmap in recyclerView from internalStorage with Asynctask -

i'm working in android app need downloading png web , showing in recyclerview. downloading part works fine same save in internal storage. problem display, when load in asynctask in onbindviewholder, isn't fluid..... , on avd have exception resources not closed. paste adapter : public class myadapter extends recyclerview.adapter<myadapter.myviewholder>{ private static final string tag = "myadapter"; private list<item> listitem = null; public myadapter(list<item> listitem) { this.listitem = listitem; } @override public myviewholder oncreateviewholder(viewgroup parent, int viewtype) { // log.d(logtag, "view group " + parent); view v = layoutinflater.from(parent.getcontext()).inflate(r.layout.item_row, parent, false); return new myviewholder(v); } @override public void onbindviewholder(final myviewholder holder, int position) { //log.d(logtag, " bind " + position + " holder " + holder); final

Load HTML file and force UTF8 with PHP -

i accessing external url specific content of xpath. i tried several different ways achieve this, of them end presenting little problem. after big research, way: i create stream context open file right headers: utf-8 $opts=array('http' => array('header' => 'accept-charset: utf-8, *;q=0')); $context=stream_context_create($opts); $html=file_get_contents($url,false,$context); then, inside class, created domdocument object, load fetched html string, follows: $this->dom->loadhtml(mb_convert_encoding($html, 'html-entities', "utf-8"), libxml_html_noimplied | libxml_html_nodefdtd); it works fine in every case, strip away complex characters, á, ó, ç, etc.. example : " gobierno marroquí para " turns " gobierno marroqu para " i tried loading html plain text prefix <?xml encoding... , works fine, have issues further htmlpurifier operations. any kind of information appreciated, not looking task me, r

java - Extract Blob value and pass to Controller in Spring MVC (without using hibernate) -

is there way extract blob file (an oracle) db , pass controller in spring mvc without using hibernate ? the following table structure: desc project_storage; project_id number(38) file_name varchar2(20) documents blob alias varchar2(50) file_type varchar2(50) my code of follows : @requestmapping(value = "/downloadfile.htm", method = requestmethod.get) @responsebody public void downloadfile(modelmap model,httpservletrequest request,httpservletresponse response,@requestparam map<string,string> parameters) { object objarray2[]=new objec map<string,object> file=user.getbyid(objarray2, "select * project_storage project_id = 63 "); log.info("the record retrieved : "+file); //the record retrieved : {project_id=63, file_name=mat.png, documents=[b@1edef76, alias=null, file_type=image/png} try {file file2=(file)file.get("documents&

mysql - How to make this eav query horizontal -

i want choose below table records have ( property_id=18 , property_value=78) , (property_id=19 , property_value=113) in table results record id = 12 . link image of table. here mysql query : select distinct `product`.* , productmeta.property_id, productmeta.property_value `shop_products` `product` left join `shop_categories` `category` on (`product`.`category_id` = `category`.`id`) left join `shop_product_metas` `productmeta` on (`product`.`id` = `productmeta`.`product_id`) `product`.`category_id` = (26) , (`product`.`price` * (1 - (`product`.`off`/100)) ) >= '100' , (`product`.`price` * (1 - (`product`.`off`/100)) ) <= '5000000' , ( ( ((`productmeta`.`property_id` = 18) , (`productmeta`.`property_value` = '77')) or ((`productmeta`.`property_id` = 18) , (`productmeta`.`property_value` = '78'))

c# - groupBy query Error -

we trying return query in viewbag , en error of: the key switch type of reading method , groupby , not comparable basic database provider . this our controller: public viewresult index(string sortorder, string searchstring, decimal searchprice = -1) { viewbag.namesortparm = string.isnullorempty(sortorder) ? "namedesc" : ""; viewbag.productsortparm = sortorder == "namep" ? "namepdesc" : "namep"; viewbag.companysortparm = sortorder == "names" ? "namesdesc" : "names"; var customers = s in db.customers select s; if (!string.isnullorempty(searchstring)) { customers = customers.where(s => s.name.toupper().contains(searchstring.toupper()) || s.namep.toupper().contains(searchstring.toupper())); } if (!searchprice.eq

javascript - Binding src in embed does not work in chrome -

i'm using angularjs build web page it's working fine in ie , firefox when tried in chrome stop working. i'm wondering why not working in chrome , if there possible workaround. html <div data-ng-controller="documentcontroller"> <embed src={{documentid}} height="600" width="100%"/> </div> javascript (function(){ var document = angular.module('document', []); document.controller('documentcontroller', ['$scope', '$routeparams', function($scope, $routeparams){ $scope.title = 'document'; $scope.documentid = "document/" + $routeparams.documentid; }]); })(); edit error http error 404 problem accessing /%7b%7bdocumentid%7d%7d. reason: not found document global variable in browser environment ( docs ) , know can't overridden (maybe in old browsers). try choose name module prevent bad situations.

c# - Intersection of List of List -

i have list of lists looks following public class filteredvm { public int id { get; set; } public string name { get; set; } public string number { get; set; } } list<list<filteredvm>> groupedexpressionresults = new list<list<filteredvm>>(); i intersect lists within list based upon id's, whats best way tackle this? here's optimized extension method: public static hashset<t> intersectall<t>(this ienumerable<ienumerable<t>> series, iequalitycomparer<t> equalitycomparer = null) { if (series == null) throw new argumentnullexception("series"); hashset<t> set = null; foreach (var values in series) { if (set == null) set = new hashset<t>(values, equalitycomparer ?? equalitycomparer<t>.default); else set.intersectwith(values); } return set ?? new hashset<t>(); } use following comparer: publi

regex - Redirect by removing last two letters -

so been trying figure 1 out in htaccess. have duplicated posts looking this: http://test.se/bank/test-b/ http://test.se/bank/test-b-2/ i redirect posts ending -2 first url. ive got code far: options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / rewriterule ^-2/(.*)$ /$1 [l,r=301]` your regex not right want grab before -2 not after it: options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / rewriterule ^(.+?)-2$ /$1 [l,r=301]

How to convert List<T> to HashSet<T> in C#? -

this question has answer here: convert array hashset<t> in .net 5 answers i have list has duplicates of objects. solve that, need convert list hashset (in c#). know how? make sure object's class overrides equals , gethashcode , can pass list<t> hashset<t> constructor . var hashset = new hashset<yourtype>(yourlist); you may see: what best algorithm overridden system.object.gethashcode?

Uploading file in PHP returns nothing when file size is big -

<?php //max size of 2 mb define('max_file_size','2000000');//2 mb $allowed_file_types=array('image/jpg','image/png','image/jpeg'); //var_dump($_files['file_to_upload']); if($_server['request_method']=='post'){ if(isset($_post['action'])){ if($_post['action']=='upload_image'){ //if($_files['file_to_upload']['error']){ //} if(isset($_files['file_to_upload'])){ $file_arr=$_files['file_to_upload']; $check=false; echo $file_arr['type']; //for allowing image type foreach($allowed_file_types $type){ if($file_arr['type']==$type){ $check=true; } } if($check){ //checking size limit if($file

node.js - Document update error while inserting views dynamically in cloudant couchdb -

i using nosql database(cloudant-couchdb) first time , has been going far. stuck these 2 problems: i trying add views dynamically. able add first view, errors while trying insert more views stating document update conflict . how 'update' since inserting new view everytime , not updating it? is possible pass parameter in map function? - if(doc.name == somevariable) ? here code below: app.put("/listsections", function(req, res) { var module = req.body.name; var obj = {}; obj[module] = { "map": function (doc) { if (doc.name == "developer") { //emit } } }); db.insert({views: obj}, '_design/section', function (error, response) { if (error) { console.log("error: " + error); } console.log("module: " + module ); } ); my approach wrong. found creating multiple views bad practice. created 1 (general) view, , passed queries

Google Webservices API equivalent to the Places search box -

i results example here of places search box cannot figure web services api , configuration give me same output including partial results provided autocomplete. autocomplete api not seem return type of results search box can. allows lot more capability can find in single web service configuration. there single endpoint can call replicate same results search box? autocomplete , searchbox 2 different things, query results see them in searchbox must send requests query autocomplete webservice

python - Adding an attribute to Class Meta of Built in model -

can add attribute class meta of auth.user model of django without extending model ? no cannot. extending shouldn't problem unless have deal lot of references django's user model. substituting custom user model

Is it possible to access the Google Spreadsheets API via an Google API Service account? How to do so in PHP? -

i using google php api service account manipulate google clouddns records this: $permisson = 'https://www.googleapis.com/auth/ndev.clouddns.readwrite'; $client = new google_client(); $client->setapplicationname("foo"); $credentials = new google_auth_assertioncredentials( $googleapiserviceaccount, array($permission), file_get_contents($googleapikeyfile) ); $client->setassertioncredentials($credentials); if ($client->getauth()->isaccesstokenexpired()) { $client->getauth()->refreshtokenwithassertion($credentials); } $accesstoken = $client->getaccesstoken(); [..] is possible use similar scheme google apps spreadsheets access? use $permission , kind of api have enable in google developer console? please note: aware of fact easy access api via oauth2 - looking way access via service account. regarding permission part: $permissions = array( "https://spreadsheets.google.com/feeds", "https:/

html - JavaScript Pass button id to an asp.net hiddenfield -

i got silly question question stated,the failed code shown below: <script type="text/javascript"> function hisenlarge(id) { var parent = id; document.getelementbyid('hiddenfield1').value = parent; } </script> html: <button type="button" id="kkkk" onclick="hisenlarge(this.id)"></button> <asp:hiddenfield id="hiddenfield1" runat="server" value=""/> vbcode protected sub commentbutton_click(sender object, e eventargs) handles commentbutton.click dim c_id string c_id = hiddenfield1.value.tostring document.getelementbyid('hiddenfield1').value = parent; this not html hiddenfield1 .so should reference clientid document.getelementbyid('<%=hiddenfield1.clientid %>').value= parent;

objective c - ScreenCapture on OS X Retina -

i trying screen capture on os x. solution works on macbook pro. facing problems on retina displays. i try current resolution using cgdisplaypixelshigh/cgdisplaypixelswide . returns correct resolution (the 1 see in preferences) on retina image returned cgdisplaycreateimage gives image of double resolution. this code using int activedisplay; size_t screenx, screeny; activedisplay = cgmaindisplayid(); screeny = cgdisplaypixelshigh(activedisplay); screenx = cgdisplaypixelswide(activedisplay); cgimageref image = cgdisplaycreateimage(activedisplay); is there way capture image of resolution seeing in preferences in retina displays? can 1 explain why happening?

c++ - Overload resolution and partial template ordering -

consider simple pair of function templates. template <typename t> void foo(t& ) { std::cout << __pretty_function__ << '\n'; } template <typename c> void foo(const c& ) { std::cout << __pretty_function__ << '\n'; } if call foo non-const argument: int = 4; foo(i); the t& overload preferred based on [over.ics.rank]/3.2.6, since deduced reference int& less cv -qualified deduced reference const int& . however, if call foo const argument: const int ci = 42; foo(ci); the const c& overload preferred because "more specialized" based on [over.match.best]/1.7. rules determine this? understanding synthesize type c (call it, m ) , try perform deduction on foo(m) - succeed (with t == m ). it's rvalue cause deduction fail - how compiler know has choose rvalue in synthesis step? disclaimer: types consider types of parameters. types/value categories/etc. of actual arguments pass

sql - Convert Data from Columns to Rows -

this question has answer here: sql server : columns rows 5 answers i have table data 1 below. id full name apples mangoes grapes 1 name1 15 19 13 2 name2 11 16 15 3 name3 12 18 11 4 name4 16 20 11 5 name5 14 19 13 6 name6 19 15 18 i wanted convert this. id full name fruits values 1 name1 apples 15 1 name1 mangoes 19 1 name1 grapes 13 2 name2 apples 11 2 name2 mangoes 16 2 name2 grapes 15 3 name3 apples 12 3 name3 mangoes 18 3 name3 grapes 11 4 name4 apples 16 4 name4 mangoes 20 4 name4 grapes 11 5 name5 apples 14 5 name5 mangoes 19 5 name5 grapes 13 6 name6 apples 19 6 name6 mangoes 15 6 name6 g

java - org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] -

iam parsing json using org.json in java . json list like: [ { "id": "f187b01b145c4171b66d4a2ecabb8f44" }, { "id": "a5e66b7462e24924a03e89f0619a2398" }, { "id": "2fb3627360db4ab78a0b3f27527b1983" } ] i fetch data java code : jsonobject json = new jsonobject(response.getentity(string.class)); jobs[] obj = new gson().fromjson(json.tostring(), jobs[].class); system.out.println(obj.tostring()); but gives exception : exception in thread "main" org.json.jsonexception: jsonobject text must begin '{' @ 1 [character 2 line 1] @ org.json.jsontokener.syntaxerror(jsontokener.java:433) @ org.json.jsonobject.<init>(jsonobject.java:197) @ org.json.jsonobject.<init>(jsonobject.java:324) @ br.usp.icmc.teste.connectionrestclient.getsaucelabsgetjobs(connectionrestclient.java:80) @ br.usp.icmc.teste.testeprincipal.main(testeprincipal.java:9) why did not recognized json

DataStax Devcenter , Cassandra Connection Fails -

i have setup amazon ami linux instance in aws ec2 , updated cassandra database 2.0.16 2.1.7. connection using cqlsh (localhost) working fine , want connect remotely devcenter for that: have changed few thing in cassandra.yaml configuration file start_native_transport: true rpc_address:0.0.0.0 rpc_broadcastaddress:0.0.0.0 after : try restart cassandra service error:cassandra dead pid file exists so can't able test connection devcenter 1.3.1 , cassendra 2.1.7 according documentation, when set rpc_address 0.0.0.0, must set broadcast_rpc_address setting value other 0.0.0.0. it sounds trying set them both 0.0.0.0, isn't valid. also don't find parameter called "rpc_broadcastaddress" in documentation, perhaps trying set broadcast_rpc_address wrong name. for 1 documentation says this: broadcast_rpc_address - (default: unset) rpc address broadcast drivers , other cassandra nodes. cannot set 0.0.0.0. if blank, set value

html - Why is my table not respecting my fixed COL width? -

i have table: http://jsfiddle.net/fere_tzau/7pwn48zf/ . want resolve : keep table-layout: fixed property add fixed value first col <col width="100"> . if add fixed value <col> have sort of percent width.(calendar blocks courses should have fixed width, lets 150px ). but using table-layout:auto fixed width works. ( table looks messed ). i want first <col> fixed in width. maybe answer here cant find it, maybe want not possible. thanks. you can use tr > :first-child {width:100px;} select first column cells , apply width or other attribute.

wildfly - HQ224037: cluster connection Failed to handle message - See more at: https://developer.jboss.org/message/934562#934562 -

we seeing below error in hornetq cluster configurations. 2015-06-25 07:11:45,425 error (thread-0 (hornetq-client-global-threads-1606034117)) [org.hornetq.core.server] hq224037: cluster connection failed handle message: java.lang.illegalstateexception: cannot find binding jms.queue.icp.enterprisef191140e-154d-11e5-aba6-29ed79c6c396 on clusterconnectionimpl@1994957667[nodeuuid=44207bc3-154e-11e5-a8b5-2752befdd59f, connector=transportconfiguration(name=http-connector, factory=org-hornetq-core-remoting-impl-netty-nettyconnectorfactory) ?port=8080&host=apsed3096&http-upgrade-enabled=true&http-upgrade-endpoint=http-acceptor, address=jms.queue.icp, server=hornetqserverimpl::serveruuid=44207bc3-154e-11e5-a8b5-2752befdd59f] @ org.hornetq.core.server.cluster.impl.clusterconnectionimpl$messageflowrecordimpl.doconsumercreated(clusterconnectionimpl.java:1426) [hornetq-server-2.4.5.final.jar:] @ org.hornetq.core.server.cluster.impl.clusterconnectionimpl$messageflowrecordimpl.handle

.htaccess - Redirect every request from https to http in codeigniter -

my htaccess looks : rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule .* index.php/$0 [pt,l] rewritecond %{https} on rewriterule (.*) https://%{http_host}%{request_uri} [r=301,l] if user opens url https://example.com . should redirect http://example.com . but when open url https://example.com gives this webpage not available . i tried 1 more code redirect https http in config.php: if($_server['https']) { $host = $_server['http_host']; $request_uri = $_server['request_uri']; $good_url = "http://" . $host . $request_uri; $config['base_url'] = $good_url; header( "http/1.1 301 moved permanently" ); header( "location: $good_url" ); exit; } none of them works. your .htaccess code incorrect. the code used (shown below) says, "if https on, redirect https version," not want.

mysql - select distinct id with their latest activity -

i have mysql table structure follows: id activity 6298 2015-06-25 11:39:35 11141 2015-06-25 11:24:52 11141 2015-06-25 11:24:10 15048 2015-06-25 11:23:08 i want ids , latest activity : so above example want this: id activity 6298 2015-06-25 11:39:35 11141 2015-06-25 11:24:52 15048 2015-06-25 11:23:08 at moment have programatically go through each id , latest activity : for each nextid in ids : select * mytable id= nextid order added desc limit note: the table huge because each id has many activity(s). question: so question if there better way of doing it? example 1 single query return me each id latest activity. just grouping. there no shorter/better way. minimal statement this: select id, max(activity) activity tablename group id

jquery - Javascript onchange function doesn't change div -

this question has answer here: javascript onchange function doesn't work 3 answers so don't know how to go having onchange function populate div radio button connected since i'm not familiar how javascript works tried pasting html in javascript....the tables radio button supposed populate connected div check boxes while view radio button supposed have div empty. codepen http://codepen.io/markbond/pen/jdozaw?editors=101 btw done in bootstrap javascript: function changeselection() { if (document.getelementbyid("selectiontables").checked) { document.getelementbyid("dropdownmenuselect").innerhtml = "tables"; document.getelementbyid("populatecheckboxes").innerhtml = ""; } else { document.getelementbyid("dropdownmenuselect").innerhtml = "views"; d

binary - Convert bit sequence to uint32_t in c++ -

user specifies register (lfsr) length integer parameter function, example enters number 5. need initialize 5-bit length lfsr 1 bits (for length 5 11111 ) , seed mask in format uint32_t - 5-length register 0x0001f . what best way mask 0x0001f 5 bit length register when user enters length of register integer number 5? to generate mask of n bits (where n < 32): uint32_t mask = (1u << n) - 1u; explanation: consider example n = 5: 1u << n = 1u << 5 = 0000 0000 0000 0000 0000 0000 0010 0000 = 0x20 then subtract 1 , get: 0000 0000 0000 0000 0000 0000 0001 1111 = 0x1f

javascript - Interactive pie Chart that works on Safari -

please check following link:- http://developerz.in/wheel/index.html i need same wheel should work on safari. right coded in flash. have tried using html , css3. , complicated using jquery , javascript. please suggest ways. please consider gradients @ end of slices. slow animation effect on hover. i appreciate time.

javascript - maintain sequence of a Ul Li list -

i have ul li list has option sort , move elements , down. requirement once user sorts elements in desired fashion want able save sequence in db well. is possible me array contains id li , index of position of li . eg. in case, when value = 9 , index should 0, value = 11, index = 1 etc. sample html rendered is: <ul id="ul_li_subcategories" style="width:200px;" class="chargecapturetable margin0"> <li sequence="1" title="category 1" class="liellipsis" value="9"><a href="#"><span class="viewicons delfacename _delete fl"></span>category 1</a></li> <li sequence="2" title="category 3" class="liellipsis" value="11"><a href="#"><span class="viewicons delfacename _delete fl"></span>category 3</a></li> <li sequence="4" title="

python - Why does the None is getting appended in the list -

in code below,i want leaf elements dict. group_children_map={'mould': ['yeast'], 'living organism': ['animal', 'plant', 'mould'], 'animal': ['lion', 'tiger', 'cat', 'dog'], 'plant': ['tulsi', 'hibiscus', 'aloe vera']} print group_children_map node='living organism' leaf_list=[] def find_leaf(node): try_leaf=group_children_map.get(node) if try_leaf none: #print node return node else: print try_leaf,"list" l in try_leaf: #print l leaf_list.append(find_leaf(l)) find_leaf(node) print leaf_list expected output: ['lion', 'tiger', 'cat', 'dog', 'tulsi', 'hibiscus', 'aloe vera', 'yeast'] actual result: ['lion', 'tiger', 'cat', 'dog', none, 'tulsi', 'hibiscus', 

c# - Quiz with polish and english months -

i'm doing simple quiz getting question "how called month xxx in polish?". i've done array list months, random taking month list, don't know how can check if typed month correct. ideas? here code i've done far; random random = new random(); string[] miesiac = { "styczeŃ", "luty", "marzec", "kwiecieŃ", "maj", "czerwiec", "lipiec", "sierpieŃ", "wrzesieŃ", "paŹdziernik", "listopad", "grudzieŃ" }; //months in polish string randommonth = (miesiac[random.next(12)]); console.writeline("cześć, proszę powiedz mi jak jest " + randommonth + " po angielsku."); string answer = console.readline(); and here stuck because not know how check if answer going correct or not. know have array list months in second language not know how check them because it's gonna random. you

track iOS mobile installs from Facebook ad -

Image
i have created app on facebook , add set app , integrated sdk in xcode, configure plist , relevant code below in appdelegate:- - (void)applicationdidbecomeactive:(uiapplication *)application { [fbsdkappevents activateapp]; } - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { return [[fbsdkapplicationdelegate sharedinstance] application:application didfinishlaunchingwithoptions:launchoptions]; } - (bool)application:(uiapplication *)application openurl:(nsurl *)url sourceapplication:(nsstring *)sourceapplication annotation:(id)annotation { return [[fbsdkapplicationdelegate sharedinstance] application:application openurl:url sourceapplication:sourceapplication annotation:annotation]; } on facebook under app there menu: status & review menu pending app details menu left pending (red icon pending

How to Create Only Edges Through OrientDb ETL -

i have csv file, having id1 , id2. id1 , id2 vertex of 2 different classes. want make edge between id1 , id2. can achieved etl? can add edge configuration of transformers achieve this. i assume, that the 2 classes a , b a has id1 b has id2 the class of edge atob a , b instances present in db the atob.csv like aid,bid a1,b1 a2,b2 a2,b3 then following etl config do { "source": { "file": { "path": "...\atob.csv" } }, "extractor": { "csv": { } }, "transformers": [ { "merge": { "joinfieldname": "bid", "lookup": "b.id2", "unresolvedlinkaction": "warning" } }, { "vertex": { "class": "b" } }, { "edge": { "class": "atob", "joinfieldname": "aid", "lookup&

javascript - FullCalendar total count for each day -

i have show total count of events each day in full calendar. conditions, count next month's day shown in current month. please me required condition. have seen other posts too. in vain this current code: head .js( lib_path + 'lib/jquery-ui.min.js', 'lib/fullcalendar.min.js', function() { $('#calendar_container',el).fullcalendar({ events: '/core/api/events', eventrender: function (event, element, view) { if(view.) { var year = event.start.getfullyear(), month = event.start.getmonth() + 1, date = event.start.getdate(); } var result = year + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date); $(element).addclass(result); var ele = $('.fc-day'+ date +''),count=$('.' + result).length; $(ele).find('.viewmore').remove(); $('.fc-event').hide();

Java GUI Swing programming -

i beginner . can have multiple layouts in single jframe? want make tic-tac-toe project in java , add gui it, apart 3x3 grid, want jlabel , jbutton. how can build grid add menus , radio buttons? layout should use? you must deal containers , layouts . in containers can add many children want , layouts associated containers provide way graphically arrange children. containers provide logical aggregation. layouts provide graphical appearance aggregation. you need have container (main) in there toolbar containing labels , buttons , container (secondary) grid inside. in such case, there 3 containers : 2 panels , toolbar. toolbar has own layout, have specify layouts panels. in main 1 border layout seems appropriate (on north toolbar, in center panel/grid). in secondary panel grid layout should trick buttons inside.

Update field in multiple rows of slickgrid -

my grid (in dataview) contains field "num", shows row number. when delete row, row numbers no longer contiguous. need update field rows have contiguous numbering. (like in excel, if delete data in row 5, row number 5 doesn't disappear - data shifts). question : how mass-update field rows? (if there quicker alternative - please let me know). for particular case, can leverage row indexing used grid dynamically render row numbers via formatter column option. ( slickgrid examples ) the following code provides delete capability dynamic row numbering. 1 important consideration use of slick.dataview requires batching multi-row deletes. <link rel="stylesheet" type="text/css" href="http://mleibman.github.io/slickgrid/slick.grid.css"> <link rel="stylesheet" href="http://mleibman.github.io/slickgrid/examples/examples.css" type="text/css"/> <script src="http://code.jquery.com/j

jquery - Call Javascript function when HTML table finishes loading -

i loading html table through django: {% m in pays %} <tr> <td><center>{{ m.bid }}</center></td> <td><center>{{ m.pdate }}</center></td> <td><center>{{ m.punt }}</center></td> </tr> after table has necessary rows filled up. want call function makes datatable. function inittable(){ $('#pt').datatable(); } right now, initalizing when form submits. causes try , load on empty table. want initalize after table loads whether put script after table {% m in pays %} <tr> <td><center>{{ m.bid }}</center></td> <td><center>{{ m.pdate }}</center></td> <td><center>{{ m.punt }}</center></td> </tr> {% endfor %} &