Posts

Showing posts from May, 2014

angularjs - Can i populate specific form when a item is selected from the combobox -

when select item combobox, want populate appropriate form user input. possible? e.g. if user selects 'address' combo box, want populate form address fields else if user selects phone, want populate form enter phone details. you should able detect selected option in combobox , load appropriate form inside div. <select ng-model="combo"> <option value="address">address</option> </select> <div id='form-area'></div> <script> // inside angularjs controller if($scope.combo === 'address') { $('form-area').html('form code here...'); } </script>

android - What is return value of Locale.getDefault() if two locales are set? -

with localelist apis, there rule on of added locales returned locale.getdefault() ? documentation localelist mentions localelist.getdefault() - "the result guaranteed include default locale returned locale.getdefault() , not @ top of list." not clear locale returned locale.getdefault() . there option of ordering locales priority. return value of locale.getdefault() is primary locale set on device.

Java Switch Case Error -

i'm here trying switch case send data jtable althoug runs case x, doesn't send table. put code here , apreciate if guys me. function switch case private void gerar(int x) { defaulttablemodel model = (defaulttablemodel) jtable1.getmodel(); model.setrowcount(0); connection conn = null; statement stmt = null; switch (x) { case 1: system.out.println("case 1"); jtable1.setmodel(new javax.swing.table.defaulttablemodel( new object[][]{}, new string[]{ "utilizador", "password" } ) { boolean[] canedit = new boolean[]{ false, false }; public boolean iscelleditable(int rowindex, int columnindex) { return canedit[columnindex];

c# - DataSet Saving Changes -

Image
i have visual studio c# forms project. in project smartcon.mdf. can see below dataset created. for reason data not saving. when add player dataset code follows. smartcondataset.playersrow newplayer = mydata.players.newplayersrow(); newplayer.id = guid.newguid().tostring(); newplayer.guid = newguid; newplayer.firstseen = datetime.now; newplayer.kills = 0; newplayer.deaths = 0; newplayer.totalscore = 0; mydata.players.addplayersrow(newplayer); smartcondataset.namesrow newname = mydata.names.newnamesrow(); newname.id = guid.newguid().tostring(); newname.name = name; newname.playerid = newplayer.guid; newname.active = 1; mydata.names.addnamesrow(newname); //update database mydata.acceptchanges(); why isn't data saving database? update: can confirm data getting added dataset, not transfering database. update 2: may need connection string database???? update 3: var playertableadapter = new smartcondatasettableadapters.playerstableadapter(); smartcondataset.pl

macros - VBA Powerpoint How to know which shape is clicked during a presentation -

in powerpoint can link command button macro. but in powerpoint 2013 such macro cannot have parameters; in popup list link button macro subroutines without parameters visible. (in previous versions of powerpoint possible link button sub dosomethingto(osh shape) osh shape clicked) in subroutine (macro) want know shape clicked. this still works in ppt 2013 , later public subroutines. when assign macro action setting, won't see private subroutines or subs @ in modules private (ie, have option private module @ start).

r - plot bipartite graph created with Networkx using igraph -

i have trouble reading bipartite matrix in igraph. created bipartite graphs using networkx , exported them biadjacency matrix: bipartite.biadjacency_matrix(graph[i],row_order=bipartite.sets(stockgraph[i])[0], column_order=bipartite.sets(stockgraph[i])[1],format='csr') then import 10x10 matrix in r using igraph : data <-readmat("graphtomatlab1.mat") data1 <- data$graphtomatlab[[1]][[1]] graph <- graph_from_adjacency_matrix(data1, mode="undirected") here sparse matrix: data1 10 x 10 sparse matrix of class "dgcmatrix" [1,] 1 . . . . . . . . . [2,] . . . . 1 . . . . . [3,] . . 1 . . 1 . . . . [4,] . . . . 1 . 1 1 . . [5,] . . . . . . . . . 1 [6,] . . 1 1 . . 1 . 1 . [7,] . . 1 1 1 2 . . . . [8,] . . 1 . . 1 . . . . [9,] . . 1 1 . . . 1 . . [10,] . 2 . . . . . . . . graph igraph u--- 10 21 -- + edges: [1] 1-- 1 2-- 5 2--10 2--10 3-- 3 3-- 6 3-- 7 3-- 8 3-- 9 4-- 5 4-- 6 4-- 7 4-- 8 4-- 9 5

c++ - I want to input character and integers by scanf into a structure -

ok, i'd input one-letter character , 3 numbers structure using scanf, , want print 4 of them using function prints it. everytime run errors saying can't run it, or prints right except character part, go blank.. possibly wrong this?? #include <stdio.h> struct score { char a; float x, y, z; }; void main(void) { void avg(char *a, float x, float y, float z); char a1 = 'b'; float x1 = 0, y1 = 0, z1 = 0; printf("enter alphaber\n"); fflush(stdin); scanf_s("%c", &a1); printf("enter 3 numbers (ex:1,2,3)\n"); fflush(stdin); scanf_s("%f,%f,%f", &x1, &y1, &z1); struct score s1 = { a1, x1, y1, z1 }; avg(s1.a, s1.x, s1.y, s1.z); } void avg(char *a, float x, float y, float z) { printf("%c (%f,%f,%f) \n", a, x, y, z); } the signature of avg() wrong. first argument should not char* char . because hate msvc-specific code, code sh

database - How to get data fulfilling two conditions in excel? -

Image
i working on excel data sheet exampled below.my aim cell value fulfills 2 conditions. .........a............b...............c................d ======= ======= ======= ======= 1.......id......sales......response 2...... n01.... 122....... positive 3...... n02.... 151....... positive 4...... n03.... 123....... negative 5...... n04.... 124....... positive 6...... n05.... 154....... negative 7...... n06.... 162....... negative 8...... n07.... 124....... positive 9...... n08.... 108....... positive 10.....n09.... 137........ negative 11.....n10.... 109........ negative now want maximum sales value response positive . here first condition i want maximum sales value , second the response positive . want such record using formulas only.so please if know. try: =max(if(c2:c11="positive",b2:b11)) this array formula commit pressing ctrl + shift + enter . see image reference:

node.js - How to get database name in oracle db in node js without query using connection object -

how database name in oracle db node js var oracledb = require('oracledb'); oracledb.getconnection( { user: 'c##root', password: 'root', connectstring: 'localhost:1521/orcl' }, function (err, connection) { if (err) { console.log('error while connect oracledb :' + err.stack); return; } else { console.log("database connected") connection.execute("insert person (name) values ( :name) ", ['doe'], function (err, result) { if (err) { console.error(err); return; } else { console.log("value sucessfully added database: " + "'database name here'") } }); } }); i want name of database when each time execute particular query. see how find oracle service n

SML: Error: operator and operand don't agree [tycon mismatch] -

i'm trying write sml function has 2 argument, first int , second list of lists. objective insert first argument onto front of every list in second arguemnt. example, append_to_front(1,[[3,4],[6,8],[]]) should return [[1,3,4],[1,6,8],[1]] . i have code: fun append_to_front(a:int, l:int list list) = if l = [] [] else a::hd(l)::append_to_front(a, tl(l)); and error message: error: operator , operand don't agree [tycon mismatch] . why? the cons operator :: has type 'a * 'a list -> 'a list , is, requires element on left , list on right. moreover, right-associative, i.e., a::b::c = a::(b::c) . in case, a has type int , b , c both have type int list . consequently, second use of :: isn't well-typed, because has list on both sides. use list concatenation @ in place instead.

hadoop - Resource Manager UI is throwing 500 Internal server Error -

i have cluster 1 master , 1 slave. cluster working fine , started following error due resource manager ui not loading up: http error 500 problem accessing /cluster. reason: internal_server_error caused by: java.lang.nullpointerexception @ org.apache.http.client.utils.urlencodedutils.parse(urlencodedutils.java:235) @ org.apache.hadoop.security.token.delegation.web.servletutils.getparameter(servletutils.java:48) @ org.apache.hadoop.security.token.delegation.web.delegationtokenauthenticationhandler.managementoperation(delegationtokenauthenticationhandler.java:170) @ org.apache.hadoop.security.authentication.server.authenticationfilter.dofilter(authenticationfilter.java:502) @ org.apache.hadoop.yarn.server.security.http.rmauthenticationfilter.dofilter(rmauthenticationfilter.java:84) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1212) @ org.apache.hadoop.http.httpserver2$quotinginputfilter.dofilter(httpserver2.ja

ios - Alamofire not working (Swift/Xcode 8) -

Image
i getting following errors when trying import alamofire project (cocoapods isn't working me, have manually import it). anyway, i'm using xcode 8 , swift 2.3, , i'm getting these errors: update: cleaned xcode, downloaded latest version of alamofire , restarted computer. now, xcode seems giving me conflicting errors (pictures reference) thanks! as of september '16, need use following in podfile: pod 'alamofire', :git => 'https://github.com/alamofire/alamofire.git', :tag => '3.5.0' pointing swift2.3 branch no longer works, branch has been deleted. tag '3.5.0' points last revision on master supports swift 2.3.

html - Sending Checkbox and Text Input Values to URL String with Javascript -

i have list of products, each individual product has checkbox value products id e.g. "321". when products checkbox checked (can more 1 selected) require value collected. each product have input text field defining qty e.g "23" , require qty value collected. qty text input should collected if checkbox checked , qty text value greater 1. plan collect these objects, put them in loop , turn them in string can display results. so far have managed collect checkbox values , put these string i'm not sure how collect additional text qty input values without breaking it. understanding document.getelementsbytagname('input') capable of collecting both input types looking input tags, need work out how collect , loop through both checkboxes , text inputs. it suggested use 2 if statements accomplish i'm new learning javascript i'm not entirely sure how go it. did try adding if statement directly below first (like in php) seemed break assume wrong. her

php - Weird Codigniter query escaping -

issue string in active record statement gets escaped when string contains combination of words 'or' , 'like'. here code use $this->db->select('id'); $this->db->where('phrase', $phrase); $this->db->from('phrases'); $ret = $this->db->get(); this works normal strings fail when $phrase encounters string 'click on event or booking code use.' 'or' , 'like' present words. resulting query like select `id` `phrases` `phrase` = 'click on event or `booking code you` `would` use.' i can't disable escaping comes handy other strings. i think need add third parameter clause escape values. $this->db->select('id'); $this->db->where('phrase', $phrase, false); $this->db->from('phrases'); $ret = $this->db->get(); from manual : where($key[, $value = null[, $escape = null]]) parameters: $key (mixed) – name of field

How to remove duplicate columns (content) in data.table R? -

how remove duplicate columns data.table? (keeping 1 of them) i know there other questions duplicate columns check duplicate column names not content, what want columns different names same content. regards this common task in feature engineering. following code chunk developed myself , community on kaggle purpose: ##### removing identical features features_pair <- combn(names(train), 2, simplify = f) # list column pairs toremove <- c() # init vector store duplicates for(pair in features_pair) { # put pairs testing temp objects f1 <- pair[1] f2 <- pair[2] if (!(f1 %in% toremove) & !(f2 %in% toremove)) { if (all(train[[f1]] == train[[f2]])) { # test duplicates cat(f1, "and", f2, "are equals.\n") toremove <- c(toremove, f2) # build list of duplicates } } } then can drop whichever copy of duplicates want. default use version stored in temporary object f2 , remove them this: train <- train[,!to

reporting services - "Expand All" button in a drill down report canceling another feature -

i have main report shows bar chart sales per country. once click on country bar, drill down report shows (+/-) list of countries toggled country name, clicked country expanded, while others collapsed. i asked client add "expand all" button allow them expand countries detail @ once. however, when added button, first functionality lost. in initialtogglestate expression of toggle textbox country used: =iif(fields!country_id.value=parameters!param_country_id.value or parameters!paramexpandorcollapse.value = "expand" ,true, false) could have both functionalities working without 1 canceling other?

jQuery Event Delegation input type keyup blur -

$('#item_code_wrapper').on('keyup blur', '#item_code', function(){ if( $(this).val() != ""){ $.ajax({ url : "../item/code/" + $(this).val(), success: function(data){ if (data.success == 'false') { $('#item_description option').removeattr('selected'); }else{ $('#item_description option:eq(' + data.item_id + ')').attr('selected', true); } } }); } }); this 1 works if copy , paste code. points option item id , remove selected if data success false. again, if manually type item code , has matching id changes option selected doesn't point particular option.

Variable tick length in highcharts -

Image
i need create column chart x-axis ticks in image below: one long tick every hour one short tick every 30 one shorter tick every 15 minutes i managed have 2 different lengths ticklength , minorticklength can see fiddle https://jsfiddle.net/depsir/pso8yya7/ is there way add third tick length? i'm thinking of labels.formatter tick lengths, other option appreciated i think 1 of possible solutions change every second minorticks path, little bit longer. can change inside load , redraw event callback functions. var makecustomticks = function(chart) { var ind, d, newd, additionallength = 8; highcharts.each(chart.xaxis[0].getminortickpositions(), function(p, i) { if (i % 2 === 0) { d = chart.xaxis[0].minorticks[p].mark.d; ind = d.lastindexof(' '); length = parsefloat(d.substring(d.lastindexof(' '), d.length)) + additionallength; newd = d.substring(0, d.lastindexof(' ') + 1) + length;

Simple producer-consumer example C# Dictionary -

i make first steps in parallel programming. wrote simplest code, result confused. code takes top 10 recent items producer-consumer pattern. 1 consumer , 1 producer. 2 consumers in works better, incorrect too. public static void producerconsumer(string path) { var capacity = 50000; var collection = new blockingcollection<string>(capacity); var dict = new dictionary<string, int>(); var tasks = new list<task<dictionary<string, int>>>(); var producer = task.factory.startnew(() => { parallel.foreach(file.readlines(path), (line) => { collection.add(line); }); collection.completeadding(); }); (int = 0; < 1; i++) { var consumer = task.factory.startnew<dictionary<string, int>>(() => { var localdict = new dictionary<string, int>(); wh

c# - EF Cascade delete when child property maps to SQL View -

we have following model: public class company { public int id {get; set; } public string name {get; set; } public companyrepresentative companyrepresentatives {get; set; } } public class companyrepresentative { public int id {get; set; } public string representativenames {get; set; } } companyrepresentative sql view , mapped using fluent api: modelbuilder.entity<company>() .hasoptional(q => q.companyrepresentatives) .withoptionalprincipal() .map(q => q.mapkey("companyid")); the problem when deleting company ef attempting update companyrepresentative setting companyid null fails because view. we have tried changing mapping to: modelbuilder.entity<company>() .hasoptional(q => q.companyrepresentatives) .withoptionalprincipal() .map(q => q.mapkey("companyid")) .willcascadeondelete(false); ...which had no effect. is there way tell ef not try , update property when deleting?

http - CORS - why is the following example of a cross origin request allowed? -

given following request headers: ** general request url:http://0.1.2.3:4040/path/to/image.png request method:get status code:200 ok remote address:0.1.2.3:4040 ** request headers accept:image/webp,image/*,*/*;q=0.8 accept-encoding:gzip, deflate, sdch accept-language:en,en-us;q=0.8 cache-control:no-cache connection:keep-alive cookie:jsessionid=4iszpyyzk50qa07h4fez8g20 host:10.2.2.23:4040 pragma:no-cache referer:http://localhost:3000/?mandator=xyz user-agent:mozilla/5.0 (macintosh; intel mac os x 10_11_5) applewebkit/537.36 (khtml, gecko) chrome/51.0.2704.103 safari/537.36 how come browser allows response without 'access-control-allow-origin' header, , doesn't throw cors exception? ** response headers http/1.1 200 ok server: nginx/1.4.6 (ubuntu) date: wed, 06 jul 2016 09:36:14 gmt content-type: image/png transfer-encoding: chunked connection: keep-alive expires: sun, 22 jan 2017 09:36:14 gmt update: origin of request localhost:3000

html - Angular Material FAB button will not resize -

i building simple webapp, using angularjs , angular material. using cpuple <md-button class="md-fab">hi</md-button> , them quite large. had made width, height equal 400px. screen gets smaller shrink down size of 115px on smallest screen. have tried bunch of things current solution making bunch of different buttons , applying ng-show them when screen size. this solution works repetitive , when change 1 thing button need 5 times. there better solution issue? my html code below: html <!--width >= 1280px--> <div hide show-gt-md flex="100" class="md-padding" layout="row" layout-align="space-between"> <div flex="33"> <md-button flex style="height: 400px; width: 400px; background-color: #0b97c4; " class="answerbuttons md-fab" aria-label="eat cake"><h1 class="headertext">pepsi</h1></md-button> </div> &l

android - I can't show Manifest.permission.CALL_PHONE in runtime permission -

i'm implementing runtime permissions in app can't show permission call_phone. need show 2 permission, read_contact , call_phone. can show read_contact not call_phone permission. i'm using avd emulator test it. some apreciate! this code: callpesmission.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { requestcallphonepermission(); } }); contactpesmission.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { requestcontactspermission(); } }); private void requestcontactspermission() { string locationpermission = manifest.permission.read_contacts; int haspermission = contextcompat.checkselfpermission(getactivity(), locationpermission); string[] permissions = new string[] { locationpermission }; if (haspermission != packagemanag

c# - Create query "sum" mutiples columns in Nhibernate -

need create query query on (nhibernate) c#, add more 1 column. example in pure sql: select sum(col1 + col2 + col3 + col4) tabela first made way: table table = null; session.queryover<table>(() => tabela) .select(projections.sum<table>(t => t.col1)) .select(projections.sum<table>(t => t.col2)) .select(projections.sum<table>(t => t.col3)) .select(projections.sum<table>(t => t.col4)) but way each column , generates 4 columns, add , generate column only. it's simplier: table table = null; session.queryover<table>(() => tabela) .select(projections.sum<table>(t => t.col1 + t.col2 + t.col3 + t.col4))

Multipy usage of Cache-Control header -

is possible add more once cache-control header? setting effective if see following headers? cache-control: no-cache, no-store, private cache-control: no-cache is setting accumulative? from rfc 7230, 3.2.2. field order : a recipient may combine multiple header fields same field name 1 "field-name: field-value" pair, without changing semantics of message, appending each subsequent field value combined field value in order, separated comma. this request treated same as: cache-control: no-cache, no-store, private, no-cache note in rfc 7234, 4.2.1. calculating freshness lifetime : when there more 1 value present given directive (e.g., 2 expires header fields, multiple cache-control: max-age directives), directive's value considered invalid. i believe example give valid but, example: cache-control: max-age=0 cache-control: max-age=3600 would invalid.

Generic User for Excel Connection String -

is possible have generic user reference in data connection string of excel data connection? i have external reference workbook share colleagues, , in collaboration software use there path each user's synced folder, such as: c:\users\"username"\.... is there prompt similar %userprofile% use in instance? here full connection string example: dsn=excel files;dbq=c:\users\"username"\...\file.xlsx;defaultdir=c:\users\"username"\...;driverid=1046;maxbuffersize=2048;pagetimeout=5; to generate c:\users\username use: environ("homedrive") & environ("homepath") see environ function , windows apis & wscript @ daily dose of excel - path documents in vba

c# - Handling the SelectedIndexChanged event handler in DataGridViewComboBoxCell -

i have 2 related issues here derived class. i trying add selectedindexchanged event handler. getting called: class datagridviewcolourcomboboxcell : datagridviewcomboboxcell { public override void initializeeditingcontrol(int rowindex, object initialformattedvalue, datagridviewcellstyle datagridviewcellstyle) { // set value of editing control current cell value. base.initializeeditingcontrol(rowindex, initialformattedvalue, datagridviewcellstyle); datagridviewcolourcomboboxeditingcontrol ctl = datagridview.editingcontrol datagridviewcolourcomboboxeditingcontrol; // use default row value when value property null. if (this.value == null) { ctl.selectedindex = (int)this.defaultnewrowvalue; } else { ctl.selecteditem = find(this.value.tostring()); try { ctl.selectedindexchanged -= new eventhandler(selectedindexchanged);

How to clear data in listview and load new data in listview in android on swipe to refresh? -

i have list view add data server in first hit add 5 data , when scroll down add more 5 data server , have swipe refresh on pull down swipe clears data , add 5 data server , again next hit add 5 more same when scroll down .problem right have load more button want replace progress bar @ bottom of listview , when swipe down refresh add more 5 data first time , when on second swipe can't how can archive problem. code:- private int m_n_defaultrecordcount = 5;// intiallly record count 5. private int m_n_deafalutlastcount = 0;//initally lastcount 0. private swiperefreshlayout mswiperefresh; private button btnloadmore; private progressbar m_progressbar; private progressdialog m_dialog; @override public void oncreate(@nullable bundle savedinstancestate) { super.oncreate(savedinstancestate); toast.maketext(getactivity(), "login successfully", toast.length_short).show(); } @nullable @override public view oncreateview(layoutinflater inflater, viewgroup container, bu

java - How can I develop this kind of Button -

Image
this button has outer white rong , inner grey background. inner background contains image (tickmark) , text (apply). i able make shape (below). i using shape in drawable (button.xml): <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <size android:height="85dp" android:width="90dp"/> <solid android:color="@color/grey"/> <stroke android:color="@color/white" android:width="4dp"></stroke> </shape> </item> <item android:drawable="@drawable/checkmark_filled" android:bottom="20dp" android:left="20dp" android:right="20dp" android:top="20dp"/> </layer-list> and using imageview use shape <imageview andr

ios - how to convert string date to nsdate using formatter? -

i follow stackoverflow answer , write code don't know happen.it won't work. plz,any 1 can solve me. use fooling code.... nsmutablearray *moviedate; nsarray *temp1 = [_dicupcomingmovie objectforkey:@"results"]; (nsdictionary *temp2 in temp1) { nsdateformatter *formatter = [[nsdateformatter alloc]init]; nsstring *datestring = [temp2 valueforkey:@"release_date"]; //nsdate *mydate = [[nsdate alloc]init]; [formatter setdateformat:@"dd mmm,yyyy"]; nsdate *date = [formatter datefromstring:datestring]; nslog(@"%@",date); [moviedate addobject:date]; nslog(@"%@",moviedate); } so it. above code not work mydate object still nil i believe datestring doesn't match format specified. see nsdateformatter complete example.

How to call Python function in Java -

this python code: class mypythonclass: def table(nb): = 0 while < 10: print(i + 1, "*", nb, "=", (i + 1) * nb) += 1 i need know how call using pythoninterpreter. in java use processbuilder create child process , capture standard output. here's example: import java.io.bufferedreader; import java.io.inputstreamreader; import java.io.ioexception; class callpython { public static void main(string[] args) throws ioexception, interruptedexception { processbuilder pb = new processbuilder("python", "/path/to/your/script.py", "10"); process p = pb.start(); char[] readbuffer = new char[1000]; inputstreamreader isr = new inputstreamreader(p.getinputstream()); bufferedreader br = new bufferedreader(isr); while (true) { int n = br.read(readbuffer); if (n <= 0) break; sy

haskell - Nixos configuration: `environment.systemPackages` cannot find haskellPackages -

i can find haskell packages via nix-env : nix-enf -f "<nixpkgs>" -qap -a haskellpackages ... yet when try , install them using environment.systempackages in /etc/nixos/configuration.nix : environment.systempackages = pkgs; [ haskellpackages.haskellplatform ]; i error: error: attribute 'haskellplatform' missing, @ /etc/nixos/configuration.nix:54:5 any ideas? intending on using xmonad , want haskell dev'. haskellplatform has been removed update ghc 7.8.2, see mailing list thread more details. you should able install package found via nix-enf -f "<nixpkgs>" -qap -a haskellpackages environment.systempackages . searching haskellpackages.haskellplatform nix-env should result in same kind of error during rebuild: nix-env -f "<nixpkgs>" -qap -a haskellpackages.haskellplatform error: attribute ‘haskellplatform’ in selection path ‘haskellpackages.haskellplatform’ not found any valid haskell packa

java - Some queries causes BBDD Closed connection -

i have web app deployed on jboss eap 6 uses hibernate access sql server database. every time specific register error: com.microsoft.sqlserver.jdbc.sqlserverexception: connection closed search other register works fine. restarting jboss seems solve problem. can register data without problem. what causing exception register? should focus on code? on network? on datasources definition? on db configuration? there many reasons, offten: look @ code, maybe call close() method check out connection string (ntlmv2?) check out ms sql server , setting, db servers looking not active sessions , closing them.

Best way to place some data directly below the "Detail 1 Bar" in jasper reports -

Image
i'm designing report template using ireport tool. the requirement have table full of data , @ end (just after last row of data) displaying totals of data. so far designed below. but still don't know whether it's correct put data in column footer or not. and i'm using isignorepagination="true" there won't pages single page of data large amount of data records. is there way can have pagination back. can't remove isignorepagination="true" because there gap between detail bar , column footer if there less data display , if there multiple pages column footer data display each page. (i need totals display after table data) is there way achieve this. usually column footer set directly on page footer, have seen. the option float column footer , if set true , let column footer float directly under detail bar , not anchored on page footer (see more here ).

c# - Division in double variable returning always zero -

i trying perform division , multiplication between 2 values , save them in double variable. multiplication working fine division returning 0 ? why ? here code : double max_load =(convert.todouble(ddl_gene_desc.selectedvalue)*0.8)*(80/100); i checked using breakpoint multiplication fine (80/100) returning 0. can 1 please me ? thanks in advance. the result of 80/100 (both integers) 0. change 80.0/100.0

java - IntelliJ 14 keeps switching encoding to UTF-8 -

i have project encoded in iso-8859-1 (an historic choice can't change). i set ide, intellij 14.1.1 ultimate, in iso-8859-1 everywhere : my encoding setting (my code in folder specificaly set in iso-8859-1) the encoding.xml looks good: <?xml version="1.0" encoding="utf-8"?> <project version="4"> <component name="encoding" defaultcharsetforpropertiesfiles="windows-1252"> <file url="file://$project_dir$" charset="iso-8859-1" /> <file url="file://$project_dir$/mydir" charset="iso-8859-1" /> <file url="file://$project_dir$/mydir/...aspecificjavafilethativetroublewith.java" charset="iso-8859-1" /> <file url="project" charset="iso-8859-1" /> </component> </project> my .idea not on commited on git because it's not standard ide. but when work on file, intellij keeps swi

php - modal, button on modal executing many time -

i trying send data on button on modal using jquery, first time working when click second time execute twice , third time execute 3 times, want execute button once, wrong exactly? modal `<div id="modal" class="modal fade" role="dialog"> <div class="modal-dialog"> <div class="modal-content modal-sm"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">product</h4> </div> <div class="modal-body"> <label>quantity</label> <input type="text" class="form-control" id="qty" value=""> <label>note:</label> <input type="text" class="form-control" id="note" value="">

c - printing structure element in gdb -

(gdb) p/d &(((pcm_pkt_t*)0)->rx_timestamp) $12 = 236 what print? print size of rx_timestamp or value? offline analysis netbsd kernel. here address of member of structure located @ address 0 (the ((pcm_pkt_t*)0) ). have offset of member inside structure (member offset address of member - start address of structure 0 here).

java - RecyclerView space between items expanding when scrolling -

Image
i finished recyclerview android application , when testing out, found strange bug don't understand. when activity launches, items in recycler view positioned in recyclerview @ correct distances. however, once start scrolling move apart each other until 1 item visible @ once, , have scroll distance equivalent of screen before seeing next item. here bug looks like: before scrolling on activity lunch after scrolling recycleview if have idea might causing this, appreciated. here recyclerview code activity: private arraylist<string> imagesurllistthumb, imagesurllistfull = new arraylist<string>(); private recycleradapter recycleradapter; private string urlrecyclerthumb = ""; private recyclerview recyclerview; private imageview imgcurrecyclerview; imagesurllistthumb = produit.getimgurlthumbmul(); recycleradapter = new recycleradapter(getapplicationcontext(), imagesurllistthumb); recyclerview = (recyclerview) findviewbyid(r.id.cont