Posts

Showing posts from April, 2015

ruby on rails - Uploading files using remote:true and remotipart + carrierwave gems -

i want make remote file upload via remotipart + carrierwave. problem upload works, seems uploaded usual html. or uploaded via ajax, appropriate js file not called. have form_for remote:true, , corrseponding controller method create. since form submitted js, create.js.erb used. <% if @syllabus.errors.present? %> $('#syllabus-errors').html('<%= escape_javascript(render 'layouts/error_messages', object: @syllabus) %>'); <% else %> alert("ds"); $('#modal-body').html(<%= escape_javascript(render 'layouts/thanks') %>); $('#syllabus-errors').html(""); <% end %> logs show this: (0.1ms) begin transaction (0.1ms) rollback transaction rendered layouts/_error_messages.html.erb (1.0ms) rendered syllabuses/create.js.erb (12.0ms) it kinda strange error_messages rendered earlier create.js.erb, error_messages being rendered inside create.js.erb. i resolved probl

javascript - trying to figure out how to load a fucntion after an onclik even -

<!doctype html> <html> <head> <script src="jquery-2.1.3.js"></script> <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" type="text/css" href="webpage.css"> <style type="text/css"> #mycanvas {left: 500px; top:500px; border: 2px solid black;} </style> <title>canvas basics</title> </head> <body> <canvas id="mycanvas" width="750" height="250"> </canvas> <br> <span id="count">3</span>seconds <button id="next">play</button> </body> </html> <script type="text/javascript"> var can; var ctx; var finish=false; function rannum(max) { return math.ceil(math.random()*max)+1; } window.onclick= function() { (function

c++ - Optimising data-structures so that they take advantage of virtual memory -

i know how optimise data-structures in opencv (the mat type specifically) able leverage operating systems built in memory/virtual memory management. for full context please read q , here - otherwise situation summed have large collection of mats * i'll need access arbitrarily , rapidly . main complication full amount of data above amount of ram available. (*conceptually data recursively defined 3d array of 3d arrays, let's not muddy water confusion!) rather build own lru cache , ram-hungry , inefficient 'page' addressing strategies access it, i'd rather let os me. i think concepts, when comes actual implementation i'm twiddling thumbs: is generic c++ consideration, or need address @ opencv level? is simple making granularity of of data close (but not over) 4kb? (see solution here 4kb motivation) how mat(s) saved, accessed , represented on disk? (is how memory-mapping involved?) is generic c++ consideration, or need address @ op

sql server - SQL - How to insert values while checking condition based on another table? If null generate new ID -

i given task use cursor duplicate tables. (don't ask me why or suggest me use other way cause that's part of requirement of task given) set ansi_nulls on go set quoted_identifier on go alter procedure [dbo].[duplicatecompanyinfo] @comp_companyid nvarchar(80) begin set nocount on; declare @companyid nvarchar(30), @personid nvarchar(30), @personlinkid nvarchar(30), @addresslinkid nvarchar(30), @addressid nvarchar(30), @phonelinkid nvarchar(30), @phoneid nvarchar(30), @persphonelinkid nvarchar(30), @persphoneid nvarchar(30) exec @companyid = crm_next_id 5 exec @personid = crm_next_id 13 exec @addressid = crm_next_id 1 -- add company insert company ( comp_companyid, comp_primarypersonid, comp_primaryaddressid, comp_name, comp_type, comp_status, comp_createdby, comp_createddate, comp_updatedby, comp_updateddate, comp_timestamp, comp_secterr, comp_website ) select @companyid, @pe

python - Read each line in a text file, store the values in a list, and compute scores -

read each line in text file, store values in list, , compute scores the best approach problem list functions need task. typical example is: read file. read list. take list , each string delimited space. store string array. ... then go python website , lookup how each function. example: input , output function in python: https://docs.python.org/2/tutorial/inputoutput.html also, can function asking google. google point answers questions: q: how find mean of list? a: finding average of list if enough times, able write problem solves problem listed. good luck!

javascript - How do I add a value to a list with button click? -

i'm having trouble using appendchild function... here's code <!doctype html> <html> <body> <form oninput="x.value=((parsefloat(winning_number.value)%(parsefloat(total_key_value.value)*100*2))/(parsefloat(total_key_value.value)*2)).tofixed(2)"> <input type="number" id="winning_number" value="" placeholder="winning number"> ~ <input type="number" id="total_key_value" value="" placeholder = "total (keys)"> = <output name="x" for="winning_number total_key_value"></output>% </form> <button type="submit" onclick="document.getelementbyid("container").appendchild(li);">submit</button> <ol id="list"></ol> </body> </html> i enter 2 numbers , calculates result using formula. how can make button add x value list once clicked? also, wa

MySQL pivot table -

if have mysql table looking this: company_name action pagecount ------------------------------- company print 3 company print 2 company print 3 company b email company b print 2 company b print 2 company b print 1 company print 3 is possible run mysql query output this: company_name email print 1 pages print 2 pages print 3 pages ------------------------------------------------------------- companya 0 0 1 3 companyb 1 1 2 0 the idea pagecount can vary output column amount should reflect that, 1 column each action / pagecount pair , number of hits per company_name . i'm not sure if called pivot table suggested that? this is pivot table. a nice tutorial on how achieve can found here: http://www.artfulsoftware.com/infotree/qrytip.php?id=78 i advise reading post , adapt solution needs. update af

angularjs - Angular Routing does not work -

my angular routing not working (clicking link not cause route change): var smu72app = angular.module("smu72app", [ "ngroute" ]). config(function ($routeprovider, $locationprovider) { $routeprovider .when("/", { templateurl: "/templates/home.html", controller: 'smu72controller' }) .when("/objects", { templateurl: "/templates/objects.html", controller: 'smu72controller' }) .when("/object/:id", { templateurl: '/templates/object.html', controller: 'smu72controller' }) .otherwise({ redirectto: "/" }); $locationprovider.html5mode(true); }); that's main page hold ng-view (cutted bit better reading): <!doctype html> <html ng-app="sm

"non-www to www" and "https" rewrite rule in web.config but not localhost ASP.NET MVC -

i have following rewrite rule in web.config of asp.net mvc 5 project: <rule name="redirect example.com www.example.com , enforce https" enabled="true" stopprocessing="true"> <match url="(.*)" /> <conditions logicalgrouping="matchany"> <add input="{http_host}" pattern="^[^www]" /> <add input="{https}" pattern="off" /> </conditions> <action type="redirect" url="https://www.example.com/{r:1}" appendquerystring="true" redirecttype="permanent" /> </rule> the rule redirects non-www www , http https (so http://example.com/hey redirect https://www.example.com/hey ) , works fine. works on localhost , , can't seem able work around — i've tried negation rules , regular expressions containing | can't seem able find correct combinations. approaching wrong way?

c# - Entity Framework not Saving Changes into Database -

i'm puzzled why code not working, should save changes database after loops when place savechanges method inside loop, saves record database outside doesn't save anything? it's 300 ~ 1000 records static bool lisready = false; static bool sacclready = false; static void main(string[] args) { logger("starting services"); connectdblis().wait(); connectdbsaccl().wait(); thread.sleep(1000); if (lisready & sacclready){ //start logger("services ready"); startexport().wait(); } } static async task<bool> startexport() { lis lisdb = new lis(); nrlsaccl saccldb = new nrlsaccl(); var gettestorders = await lisdb.test_orders.tolistasync(); logger("services starting"); foreach (var in gettestorders.where(x => x.entry_datetime.value.year == 2016)) {

php - How to create a new array with keys based on calculated values of another array? -

i have array $post of following format $post[0] = [ 'id' => '103', 'date' => '2016-04-17 16:30:12', 'desc' => 'content description' ]; $post[1] = [ 'id' => '102', 'date' => '2016-04-17 12:30:12', 'desc' => 'content description' ]; $post[2] = [ 'id' => '101', 'date' => '2016-04-17 10:30:12', 'desc' => 'content description' ]; $post[3] = [ 'id' => '100', 'date' => '2016-04-16 08:30:12', 'desc' => 'content description' ]; i use strtotime(date) $post unique array key, , create: $summary['day-of-2016-04-17'] = [ 'counts' => '3' ]; $summary['day-of-2016-04-16'] = [ 'counts' => '1' ]; where counts number of occurrence of

amazon web services - OpsWorks Stack - Load-based instances scaling UP and DOWN based on cloudwatch alarms -

we have opsworks stack 2 24x7 instances. 4 time-based instances. 2 load-based instances. our issue load-based instances. we've spent great deal of time creating meaningful-to-our-service cloudwatch alarms. thus, want load-based instances in our stack come when particular cloudwatch latency alarm in alarm state. see in load-based instance configuration, can define cloudwatch alarm bringing instance(s) , can define cloudwatch alarm bringing instance(s) down. thing is, when select specific cloudwatch alarm want use trigger up, removes cloudwatch alarm being selected trigger down. why? specifically, want our latency alarm (we'll call "oh crap things slowing down" cloudwatch alarm) trigger load-based instances start when in alarm state. then, want "oh crap things slowing down" cloudwatch alarm trigger load-based instances shutdown when in ok state. rad if load-based instances waited 15 minutes after ok state of alarm before shutting down. the "oh

javascript - Show Countdown after button click -

i have code html <div id="container"> <a href="#container">show content</a> <div id="content">i content!</div> </div> how when click show content echo countdown (12s) before show <div id="content">i content!</div> give me example work. thanks edit: example updated show elements when countdown starts , hide them when countdown ends. when user clicks on link, counttoshow function invoked. initialy hidden 'ads' element shown command adselement.style.display = '' (which removes display: none style specified inline). when countdown ends ( remainingseconds === 0 ), hide 'ads' element again setting adselement.style.display = 'none' . here example using setinterval function possibility specify countdown time. function counttoshow(timeinseconds) { var countdownelement = document.getelementbyid('countdown'); var contentel

dnx - Building multiple assembly project with CoreCLR and dnu -

what's best practice building coreclr/dnx project comprised of multiple assemblies? would there project.json each assembly , each need manually built using custom script or can existing build tools walk these dependencies , build itself? are there examples of projects this? usually, each assembly == nuget package == project.json. a example of solution multiple assemblies mvc . the asp.net team uses korebuild , internal (but public) orchestrate build. idea calls dotnet/dnu build/pack/publish on projects. korebuild looks projects under src , test , , samples . both dnu , dotnet it's easy build entire project graph: dnu supports globbing patterns can somethig dnu build src/** , figure out graph in folder. dotnet knows compiled before don't need care. call dotnet build on each project , rebuild it's dependencies if necessary.

android - Failed to sync Gradle project with databinding lib -

recently i'm learning mvp pattern , databinding after android studio being upgraded ver2.0. , find sample helping me understand these. title can't gradle successfully. gaving message in monitor like "error: not find com.android.databinding:library:1.1. required by: todoapp:app:unspecified" website https://github.com/googlesamples/android-architecture/tree/todo-databinding i've done lot search problem still... p.s:i trying add code databinding { enabled=true } other branch can sync before...and of course become failed after... ...and failed message s similar "error: failed resolve: com.android.databinding:library:1.1" i can use databinding part in own project. , version 2.0 ...the .gradle 2.10 thx lot helping... now can use project. find point change gradle version in build.gradle file in root . likeversion 2.1.0-alpha5 , cause problem. after compare own project, change 2.0.0 , it's works well~

bitmap - Android 6 capture intent not writing file immediatly -

i'm developing app requires user take picture. create file saving image. call intent this: if (takepictureintent.resolveactivity(getpackagemanager()) != null) { // create file photo should go file photofile = null; try { photofile = createimagefile(); } catch (ioexception ex) { // error occurred while creating file toast.maketext(formactivity.this, "no se pudo crear el archivo", toast.length_short).show(); } // continue if file created if (photofile != null) { takepictureintent.putextra(mediastore.extra_output, uri.fromfile(photofile)); startactivityforresult(takepictureintent, action_image_capture); } } and then, want read file. this bitmapfactory.options options = new bitmapfactory.options(); options.injustdecodebounds = false; options.inpreferredconfig = bitmap.config.rgb_565; options.indither = true; b = bitmapfactory.decodefile(new file(mcurrentphotopath).getabsolutepath(),

android - invalid LOC header -

i'm trying build project in android studio, gives me error: gradle 'myproject' project refresh failed error:cause: invalid loc header (bad signature) other answers in suggest delete corrupted jars gradle can download them again. issue error have doesn't point jar. furthermore, have android.jar , rt.jar jars listed in external libraries part of project, , work fine other projects. is there way solve issue? thank you! after trying many changes in project, found answer issue. when going build log output @ idea.log , found line: not create instance of tooling api implementation using specified gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-all.zip'. i updated distributionurl @ gladle/wrapper/gradle-wrapper.properties to: distributionurl=https\://services.gradle.org/distributions/gradle-2.10-all.zip now apk built properly.

php - Laravel 5.1 returns wrong config value -

i have custom laravel config file called config/alfresco.php. file special file keep alfresco config connection. here like: <?php /* |-------------------------------------------------------------------------- | cmis browser url |-------------------------------------------------------------------------- | | address of alfresco server | */ // http://<another ip>:9080/alfresco/api/-default-/public/cmis/versions/1.1/browser 'cmis_browser_url' => 'http://192.168.1.5:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser', /* |-------------------------------------------------------------------------- | cmis browser user |-------------------------------------------------------------------------- | | alfresco username credential | */ 'cmis_browser_user' => 'admin', i tried config's value calling following: config::get('alfresco.cmis_browser_url'); however, seems return wrong value. in case, is: http://<anoth

jquery - Multiple Twitter's Bootstrap 2.x carousels on same page with different sizes -

i'm wanting have 'long thin' carousel page header, , 'conventional' dimensioned carousel in body of page. each has different positional elements in css, example long, thin one: .carousel .item { height: 156px; } .carousel img { position: absolute; top: 0; left: 0; min-width: 100%; height: 156px; } the conventional one: .carousel .item { height: 500px; } .carousel img { position: absolute; top: 0; left: 0; min-width: 100%; height: 500px; } if try change .carousel .carousel2 1 instance, doesn't work (presumably, name required create carousel, changing ruins it!) is there way - or need implement other jquery slider? use unique id each carousel instead of .carousel class. b.e. id="mycarousel1", id="mycarousel2", etc. see also: https://stackoverflow.com/a/10521804/1596547 . start carousal via javascript like: $('#mycarousel1, #mycarousel2').carousel(); apply css rules on id's lik

java - error: package org.junit does not exist -

i keep getting these errors when trying run ant file. [javac] compiling 8 source files c:\users\faradayscage\git\mancala\build [javac] c:\users\faradayscage\git\mancala\src\tests\boarddatatest.java:1: error: package org.junit not exist [javac] import static org.junit.assert.assertequals; [javac] ^ [javac] c:\users\faradayscage\git\mancala\src\tests\boarddatatest.java:1: error: static import classes , interfaces [javac] import static org.junit.assert.assertequals; [javac] ^ [javac] c:\users\faradayscage\git\mancala\src\tests\boarddatatest.java:2: error: package org.junit not exist [javac] import org.junit.test; [javac] ^ [javac] c:\users\faradayscage\git\mancala\src\tests\boarddatatest.java:8: error: cannot find symbol [javac] @test this ant build file <project name="mancala" default="fullbuild" basedir="."> <description> build file mancala program

javascript - DOM event chaining not working -

so, hints why not working? i'm trying both input fields ('pagamento' , 'parcelas') @ preset if 'boleto' radiobox selected, ('1' , 'mercadopago', respectively, , again user input if 'cartão' radiobox selected. function boleto() { if(document.getelementbyid('tipodepagamento').checked==true){ document.getelementbyid('pagamento').value = 'mercadopago'; document.getelementbyid('pagamento').disabled = true; document.getelementbyid('parcelas').value = '1'; document.getelementbyid('parcelas').disabled = true; } else{ document.getelementbyid('pagamento').disabled = false; document.getelementbyid('parcelas').disabled = false; } } <div class="col-md-6"> <label class="radio-inline"> <input type="radio" name="tipodeconta"

reporting services - Check if a field exists in parameters select value -

i have dataset brings in distinct values of column 'a' of table 'b' , these form select values parameter 'param_a'. in addition have main dataset brings in data table 'b' , contains column 'a' 'field_a'.i not want alter main dataset , hence using tablix filter filter out result set of main dataset. tablix filter supposed performing below functionality : expression: fields!field_a.value in (parameter!param_a.value) or fields!field_a.value null boolean operator : "=" value : true but unable use operator 'in'. gives me error.could please me out this? i used 'instr' operator eliminated possibility of using 'in' operator: iif(instr(join(parameters!project.value,","),fields!project_name.value)>0, true,false) this helped me!

javascript - smart table no event is getting fired on setting the value through ng-model -

html <input type="checkbox" value="" ng-model="filterprivatedoccheckbox" ng-click="dl.filterprivatedocument(filterprivatedoccheckbox, $event)"> <input st-search="target" class="input-sm form-control" type="search" ng-model="dl.documenttarget" /> angularjs function filterprivatedocument(val, event) { self.documenttarget = (val ? 'private' : ''); } when click on checkbox , set value in textbox (which hidden), problem there no event fire after setting value in text box , hence smart table not filter data. how can solve problem in smart table ?? any appreciated !! thanks this code function filterprivatedocument(val, event) { self.documenttarget = (val ? 'private' : ''); } should $scope.filterprivatedocument(val, event) { self.documenttarget = (val ? 'private' : ''); } you should bind $scope property wa

c# - A generic error occurred in GDI+ when trying to save image -

i trying save webform image using code: using system.drawing.printing; using system.drawing; using system.drawing.imaging; protected void btntopdf_click(object sender, eventargs e) { capture("d://screenshot.jpg");//path save captured files } public static void capture(string capturedfilepath) { bitmap bitmap = new bitmap (system.windows.forms.screen.primaryscreen.bounds.width, system.windows.forms.screen.primaryscreen.bounds.height); graphics graphics = graphics.fromimage(bitmap system.drawing.image); graphics.copyfromscreen(25, 25, 25, 25, bitmap.size); bitmap.save(capturedfilepath, imageformat.jpeg);//error bitmap.dispose(); graphics.dispose(); } i getting a generic error occurred in gdi+. stacktrace [externalexception (0x80004005): generic error occurred in gdi+.] system.drawing.image.save(string filename, im

ruby - Unable to correct problems, you have held broken packages -

i trying install ruby on docker container , following this 1 build container. when build new image error response the following packages have unmet dependencies: libgdbm-dev : depends: libc6-dev not going installed or libc-dev e: unable correct problems, have held broken packages. command '/bin/sh -c set -ex && builddeps=' bison libgdbm-dev ruby ' && apt-get update && apt-get install -y --no-install-recommends $builddeps && rm -rf /var/lib/apt/lists/* && curl -fsl -o ruby.tar.gz "http://cache.ruby- lang.org/pub/ruby/$ruby_major/ruby-$ruby_version.tar.gz" && echo "$ruby_download_sha256 *ruby.tar.gz" | sha256sum -c - && mkdir -p /usr/src/ruby && tar -xzf ruby.tar.gz -c /usr/src/ruby --strip-components=1 && rm ruby.tar.gz && cd /usr/src/ruby && { echo '#define enable_path_check 0'; ec

git - How to merge my uncommitted files with the changes from the repository, within the same branch? -

i have 1 file, say, index.html. i change line 1000-1200 on file. coworker, working on same branch me, commit changes on line 600-800 before had chance commit , push. when tried push commit, github desktop mac said head on repo greater head, need pull first. when tried pull, github deskop told me changes on index.html overwrite changes. i use github, 1 week. never happens when used svn tortoisesvn in past. tried merge changes first uncommitted files, , if can't, show me conflicted lines are, , lines should decided taken version. don't have option in github desktop. don't understand how in git console. so, how that? you must stash local changes, pull remote changes , unstash local changes onto updated working tree. any conflicts between changes , remote changes show when git stash pop . git stash git pull git stash pop

Show external icons in my iOS app -

does ios have way of displaying icons belonging other apps, eg. app icons of apple's built-in apps (eg. apple's icon "mail" app) app icons of other apps (eg. app icon google's "hangouts" app) other icons in apple's built-in apps (eg. apple's icon "print" action) the purpose mimic "send via messages" in safari, et. al. alternative making copies of icons , update them whenever updated creator (not fun). no, can't use other app's icons build custom view, can use uiactivityviewcontroller seems need.

javascript - BlockUI is not displaying on Bootstrap modal -

bootstrap uiblock not showing on bootstrap modal.. can able display on normal page whenver tried block ui on modal not showing on top of modal instead, showing below of same modal. possible display on top of modal.. this block ui code $.blockui({ message: '<img src="images/activity.gif" style="width:50px;"/>', css: { backgroundcolor: 'transparent', color: '#000', basez: '2000', border: '0 none', theme: 'true' } }); <div id="udateleadmodal" class="modal animated bouncein" tabindex="-1" role="dialog" aria-labelledby="mymodallabel3" aria-hidden="true"> <!-- dialog --> <div class="modal-dialog modal_dialog_edit" style="overflow-y: scroll; max-height:850%;"> <!-- content --> <div class="modal-content modal_content_edit"> <!-- header -->

How to encrypt a stringbuilder message using AES algorithm in java -

i have stringbuilder message appended "||" symbol.(ex: hi||how||are||26 04 2016||finish) have encrypt message , send server using aes , decrypt same @ server side. can me out in solving this? you can encrypt , decrypt this: public class aes { public static byte[] encrypt(string key, string initvector, string value) { try { ivparameterspec vector = new ivparameterspec(initvector.getbytes("utf-8")); secretkeyspec secretkey = new secretkeyspec(key.getbytes("utf-8"), "aes"); cipher cipher = cipher.getinstance("aes/cbc/pkcs5padding"); cipher.init(cipher.encrypt_mode, secretkey, vector); byte[] encrypted = cipher.dofinal(value.getbytes()); system.out.println("encrypted string: "+ base64.encodebase64(encrypted)); return base64.encodebase64(encrypted); } catch (exception ex) { ex.printstacktrace();

jquery - HTML JavaScript dynamic canvas components -

i want html5 page combo box selecting components “circle, rectangle, square, polygon, triangle” , combo box selecting coordinates,the pictures need redrawn on screen based on selected component , coordinates given onclicking button drawimage. you can in jquery example onchange event when user select item first list, vuillez change values ​​of second list, after can draw images jquery or kinetic js example

javascript - how can I hide the row of fixed data table with certain data from response -

i have nested data, parent rows , child rows in fixed data table. want hide child rows (identified property non null parentid) initially. parent row have link (show more) when clicked show hidden children of parent row. assuming order of rows like: parent 1 row child row1 of parent 1 child row2 of parent 1 child row3 of parent 1 ... child rown of parent 1 parent 2 row ... ... parent n row has tried nested fixed data table? appreciated.

ember.js - EmberJS: Load a teaser of a model for a list, full model for detail view -

anyone figure out how partially load model 1 view, load entire model another? for example: /* projects, want id , name returned server. each project monster, don't want data each project. */ app.projectsroute = ember.route.extend({ model: function () { return app.project.find(); } }); /* project detail, we'd want entire model returned server. embedded records , all. */ app.projectroute = ember.route.extend({ }); the closest thing find this: https://stackoverflow.com/a/14183507/1125563 in can this: app.projectroute = ember.route.extend({ setupcontroller: function(controller, model) { if (model.get('isteaser')){ model.reload(); } } }); in workaround, have computed property isteaser checks few things determine if i've partially loaded it. other being little messy, deal breaker here it's transitioning route partially loaded model , after it's loaded, stuff kind of in-el

algorithm - How to normalize elliptic fourier coefficients? -

Image
i'm writing program find elliptic fourier coefficients (efc) of closed planar curve, , have trouble coefficients normalization. the closed planar polyline p described set of points m_points: m_points[i][0] keeps xi-coordinates, m_points i keeps yi-coordinates. start form 0 m_num_points-1. the efc of polyline calculated algorithm (coefficients in efd array). // calc accumulated curve length, delta x, , delta y dt[0] := 0; dx[0] := 0; dy[0] := 0; tp[0] := 0; t := 0; i:=1 p.m_num_points-1 begin va := vectoraffinesubtract(p.m_points[i], p.m_points[i-1]); dt[i] := vectorlength( va ); dx[i] := p.m_points[i][0] - p.m_points[i-1][0]; dy[i] := p.m_points[i][1] - p.m_points[i-1][1]; tp[i] := tp[i-1] + dt[i]; t := tp[i]; end; tpi := t / (2*pi*pi); pit := pi*2 / t; // find elliptic fourier coefficients // first := 0; cn := 0; i:=0 p.m_num_points-1 begin := + (p.m_points[i][0] + p.m_points[i-1][0]) * dt[i] / 2; cn := cn + (p.m_points[i][1] + p.m_p

c# - Displaying Checked column Values in Datagridview checkbox showing data in another form Datagridview -

Image
i have 1 datagridview( datagridview1 contains datagridview2 column header) in have 1 checkboxcolumn, called dgvckb , in datagridview1 . when uncheck dgvckb in row data of row should not shown in datagridview2 ( datagridview2 connected database(localhost)). 1st form datagridview is : 2nd form datagridview is : my coding this: form1 coding private void customized_column_load(object sender, eventargs e) { datagridview1.columncount = 2; datagridviewcheckboxcolumn dgvckb = new datagridviewcheckboxcolumn(); dgvckb.valuetype = typeof(bool); dgvckb.name = "chk"; dgvckb.headertext = "vis."; datagridview1.columns.add(dgvckb); datagridview1.columns[0].name = "column"; datagridview1.columns[1].name = "column size"; string[] row = new string[] {"date", "103" }; datagridview1.rows.add(row); row = new string[] {"time", "103" }; datagridview1.rows.a