Posts

Showing posts from 2015

How to understand 2 main() functions after using uftrace to profile the C++ program? -

i trying uftrace profile following simple c++ program: #include <iostream> class { public: a() {std::cout << "a created" << std::endl;} ~a() {std::cout << "a destroyed" << std::endl;} }; int main() { a; return 0; } the profile result this: # uftrace a.out created destroyed # duration tid function 2.026 [ 4828] | __cxa_atexit(); [ 4828] | main() { [ 4828] | __static_initialization_and_destruction_0() { 89.397 [ 4828] | std::ios_base::init::init(); 0.768 [ 4828] | __cxa_atexit(); 93.029 [ 4828] | } /* __static_initialization_and_destruction_0 */ 94.425 [ 4828] | } /* main */ [ 4828] | main() { [ 4828] | a::a() { 11.104 [ 4828] | std::operator <<(); 10.825 [ 4828] | std::basic_ostream::operator <<(); 24.514 [ 4828] | } /* a::a */ [ 4828] | a::~a() { 0.978 [ 4828] |

plot - When plotting a curve in R, a piece of the curve gets cut off, not sure why -

i trying plot formula. x approaches 0 right, y should approaching infinity, , curve should going upwards close y-axis. instead gets cut off @ y=23 or so. my_formula = function(x){7.9*x^(-0.5)-1.3} curve(my_formula,col="red",from=0 ,to=13, xlim=c(0,13),ylim=c(0,50),axes=t, xlab=na, ylab=na) i tried play from= parameter , , got needed when put from=-4.8 have no idea why works. in fact x doesn't less 0, , from/to should represent range of x values, they? if explain me, amazing! thank you! by default, curve chooses 101 x-values within (from, to) range, set default value of n argument. in case means there aren't many values close enough 0 show full behaviour of function. increasing number of values plotted n=500 helps: curve(my_formula,col="red",from=0 ,to=13, xlim=c(0,13),ylim=c(0,50),axes=t, xlab=na, ylab=na, n=500)

android - The ListView is showing duplicate data -

this how display listview, i'm not sure whether correct method or not showing listview this. problem listview have duplicate data when "condimentdescription" having more 1 data, following code, kindly advise. the listview show this, not want. this want public list<orderlist> getorderlist() { list<orderlist> orderlist = new arraylist<orderlist>(); try { string selectquery = "select t2.id,t2.productcode,t2.price,t2.qty,t3.description,t4.condimentdescription tempcs t1 \n" + "left outer join tempcsdetail t2 on t1.docno=t2.docno\n" + "left outer join mproduct t3 on t2.productcode=t3.code \n" + "left outer join tempcscondiment t4 on t2.seqno=t4.seqno"+ "where t1.docno=" + tablepagedocno + "\n"; sqlitedatabase db1 = db.getreadabledatabase();

c# - How can i get a specific GameObjects to array without using FindGameObjectsWithTag? -

in first script clone gameobjects: using system; using unityengine; using random = unityengine.random; using system.collections; using system.collections.generic; using system.linq; public class cloneobjects : monobehaviour { public gameobject objecttocreate; public int objectsheight = 3; [hideininspector] public gameobject[] objects; // tracking properties change private vector3 _extents; private int _objectcount; private float _objectsize; private list<gameobject> clonelist = new list<gameobject>(); /// <summary> /// how far place spheres randomly. /// </summary> public vector3 extents; /// <summary> /// how many spheres wanted. /// </summary> public int objectcount; public float objectsize; public static float largestsize = 0; // use initialization void start() { clone(); //objects = gameobject.findgameobjectswithtag("cl

SQL: Split string by delimiter multiple times into new columns -

i have ids , corresponding strings this: id place 234 usa_ny_buffalo i want split place string 3 strings each own column: id country state city 234 usa ny buffalo when try splitting string this: select id, split(place,"_") mytable i id place 234 usa 234 ny 234 buffalo is possible split string first "_", split second string again " _ " ? if string have country,state , city try like. select substring_index('usa_ny_buffalo', '_', 1) country, substring_index(substring_index('usa_ny_buffalo', '_', 2), '_', -1) state, substring_index(substring_index('usa_ny_buffalo', '_', 3), '_', -1) city;

java - Comparing Json Template with JSON Response -

(the following has been edited make understandable.) we want compare actual json object expected json object, complication json objects may contain other json objects. using net.sf.json api this. have tried following approaches: we have tried json objects' keys lists (to preserve keys' order) , indexes of keys in lists. we have tried adding (flattening) keys , values in json objects pair of map objects. in case, had problems duplicate keys in nested json objects. addressed making values in map lists of values json objects. after discussion team, need modify approach follows: (the following has not been edited ...) now wanna compare key , values in result json , expected json (must need check format) while traversing each key in result json parallelly want check same(key , value) in expected json. first of all, if preserving order of keys in json objects because order important meaning of json, abusing json. json specs make clear order of key in js

python - Is there an machine learning algorithm that combines classification and regression into one -

i have data set , wherein want predict component , along components need predict proportions seems me classification+regression. there python library that? there deep learning method ? understand task can done in 2 separate step there way combine these operations. the solution format expect prediction must get class : 34% class b : 46% class u : 20% assuming classes exist z, , composition may have increase or decrease in number of classes. latent class regression the problem describing can solved latent class regression, or cluster-wise regression, or it's extension mixture of generalized linear models members of wider family of finite mixture models, or latent class models. it's not combination of classification (supervised learning) , regression per se, rather of clustering (unsupervised learning) , regression. basic approach can extended predict class membership using concomitant variables, makes closer looking for. in fact, using latent class models c

replication - Agents on Author Dialog Options in AEM -

Image
i not able understand use case when can use ntlm domain, ntlm host, ssl,allow expired certs been used. any appreciated. ntlm microsoft's implementation of kerberos protocol. used when author , publishers have 1 or more of following conditions valid: not on same windows domain. don't share common ad provider. kerberos ports (for eg. 88) blocked. windows server being accessed via ip address rather it's host name. ntlm challenge-response protocol these ntlm host , domain names parameters used protocol identify client (which author server in case) along user name , password. in reality, never use in linux environment , use in modern windows network have better ad security options (like trusted domains , subnets). ssl options there workaround in situations publisher's https certificate has expired , want continue replication. assuming own publisher server in network, trust publisher server's identity , ignore expired certificated until renew

How to add new class with existing class dynamically using Jquery/Javascript -

i need 1 help. need add 1 new class along existing class using jquery/javascript. explaining code below. <div class="fynd-space-itms"> <div class="col-sm-3"> <a href="javascript:void(0)" class="item-exhibitation maploc" onclick="keepsection();">ram</a></div> <div class="col-sm-3"> <a href="javascript:void(0)" class="item-parking maploc" onclick="keepsection();">raj</a></div> <div class="col-sm-3"> <a href="javascript:void(0)" class="item-offices maploc" onclick="keepsection();">ray</a> </div> </div> here need when user click on onclick event 1 new class add along existing class. suppose user clicked on ram , after clicking new class i.e-active add , total class name item-exhibitationactive maploc , same others i.e-item-parkingactive maploc,item-officesactiv

docker - Verbose logging in Kubernetes deployment file -

iam new kubernetes , want know 'v' in following mean ? spec: containers: - args: - -v=9 it seems me denotes verbose logging , there documentation same regarding various levels of logging avbl values arg v can take ? kubernetes uses glog . available values 1-4, denoted in this doc

html5 - light slider issue 1920px resolution -

Image
i using lightslider plugin when using keyboard "ctrl -" added white gap space , 1920px resolutions right click white added white gap space body me. please visit site: http://brasilplay.streamrepublic.com/brasilplay_web01/ , screen shot: <script> $(document).ready(function() { $("#content-slider").lightslider({ loop:true, keypress:true }); $("#content-slider1").lightslider({ loop:true, keypress:true }); $("#content-slider2").lightslider({ loop:true, keypress:true }); $('#image-gallery').lightslider({ gallery:true, item:1, thumbitem:9, slidemargin: 0, speed:500, auto:true, loop:true, onsliderload: function()

php - Display ... in pagination -

i have pagination issue. pagination work fine. want display started 3 page after want display (....) , @ last point want display last page. here code: <?php $videocount= 1000; $page = (!isset($_get['page']))? 1 : $_get['page']; $prev = ($page - 1); $next = ($page + 1); /* max results per page */ $max_results = 50; /* calculate offset */ $from = (($page * $max_results) - $max_results); $last = $from + $max_results; /* query api total results.*/ //$total=107; $total_results = $videocount; $total_pages = ceil($total_results / $max_results); if($page==$total_pages ){ $last=$total_results ; }else{ $last=$last; } $pagination = ''; /* create prev link if there 1 */ if($page > 1) { $pagination.= '<li> <a href="?&page='.$prev.'"> <span class="prevbtn"><i class="fa fa-caret-left"></i> previous</span> </a></li>'; } /* loop through total pages */

ios - Apple Rejected New Version of App -

hi can maybe me figure out issue is, my second version of app compiled xcode 8.2 installed on macbook , week made three changes app. 1) added image view 2) modified method uploads images server 3) compiled latest xcode but rejected following message we unable install app on ipad air. uirequireddevicecapabilities key in info.plist set in such way app not install on ipad air . in info.plist file there no uirequireddevicecapabilities ( see attached info.rar file plist file). i ran application on iphone 5s , worked, ran on vs simulators (ipad air 2, , ipad air) ipad air 2 ran easily, ipad air hanged @ splash screen (i doing no processing there), closed, if click on app icon again hang again third time clicked on app opened without issues here info.plst https://pastebin.com/bhscwvdr i using xamarin.ios 10.8 on windows 10 , using xcode 8.3 on mac mini os 10.3 edit 1: ipad air simulator working normal after restarted laptop, runs smoothly everytime

javascript - Pulling Data from a 3rd Party Webpage for an IOS app -

i'm trying pull data single webpage don't host, , parse ios app. can pull data page or need access source code or backend stuff? i'm new sort of thing, unclear on how or begin. this webpage: https://studentaffairs.psu.edu/currentfitnessattendance/

Access 2016 Processes not being killed during Automation but same works for Access 2013/10/07 -

we have access automation software opening instance of ms access 2016 using com , fetching data of tables/reports etc access database. once done, close ms access database - calling database.close() assigning null value referenced variables calling closecurrentdatabase() of access application object finally calling quit() method of access application object assigning null value access application referenced variables calling gc.collect() & gc.waitforpendingfinalizers() in separate thread. doing of above kills ms access 2013 instances fails ms access 2016. processes linger on time , keep consuming ~50 mb ram , ~10% cpu though our automation completed , our code has quit. find these processes killed time later. this lingering on of processes causing high cpu / ram usage issues find more 50 instances open. is there known issue in ms access 2016 while closing or connect post activity (like connect server , send data) when application.quit called. would appreciate a

angularjs - Why do I get undefined for this Angular scope? -

i use factory create objects particular module angular.module("mymodule").factory('myentity', .... and module accepts generated 'myentity' injected dependency: angular.module("mymodule").controller('myproductctrl', [ '$scope', 'myentity', '$rootscope', 'myapiservice' ... the module has following subscriber function used subscribe entity inside module this: myentity.subscribe(function(otherentity) { $scope.myreference = otherentity; }); at runtime, above $scope.myreference assigned expected object it's value when first module loaded ... , i've added function onto scope inside same module: $scope.mymodulefunction = function (product) { if (myreference.yadda) { ... } } ... above '$scope' undefined @ point function called via directive (in fact it's undefined once web page has been displayed). why might case?

c++ - Why wide variations of runtime exists when running UnionFind in Windows and Mac OS? -

recently attended courses data structure, learned performance of quickunion better quickfind when connecting 2 elements. when testing same code in gcc, windows 10 instead of mac os x, teacher's machine, got entirely different result of runtime didn't know why. here code of quickfind. #ifndef inc_03_quick_union_unionfind1_h #define inc_03_quick_union_unionfind1_h #include <cassert> using namespace std; namespace uf1 { class unionfind { private: int *id; int count; public: unionfind(int n) { count = n; id = new int[n]; (int = 0; < n; i++) id[i] = i; } ~unionfind() { delete[] id; } int find(int p) { assert(p >= 0 && p < count); return id[p]; } bool isconnected(int p, int q) { return find(p) == find(q); } void unionelements(int p, int q) {

file - How to detect if a filename exists (with any extension) in android -

i want return true if filename exists regardless extension. using following method: file file = new file(environment.getexternalstoragedirectory() + images/","filename.*"); if(file.exists()) { return true; } there jpg file in directory, if search "filename.jpg", returns true, in case of "filename.*" returns false. is there way return true if filename same extension? try file imagefolder = new file(environment.getexternalstoragedirectory() + "images/"); file[] listoffiles = imagefolder.listfiles(); (file file : listoffiles) { if (file.isfile()) { string[] filename = file.getname().split("\\.(?=[^\\.]+$)"); //split filename it's extension if(filename[0].equalsignorecase("filename")) // file exists ever want } }

node.js - Searching for public folder in routes path -

whenever different route visited other root, express not able find public folder containing stylesheets , javascript files, instead searches assets inside route path. appreciated. error when visiting http://localhost:3000/users/login/ gives - get /users/login/stylesheets/bootstrap.css 404 14.872 ms - 10418 /users/login/stylesheets/style.css 404 7.134 ms - 10418 /users/login/javascripts/bootstrap.js 404 57.890 ms - 10418 /users/login/javascripts/bootstrap.js 404 5.326 ms - 10418 app.js var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieparser = require('cookie-parser'); var bodyparser = require('body-parser'); var app = express(); // modules var hbs = require('hbs'); var defaultlogger = require('express-logger'); var index = require('./routes/index'); var users = require('./routes/users')

angularjs - ng-class multiple condition in on statement -

i need check if 2 things true decide class. have been trying find solution because believe should pretty common problem. maybe i'm searching wrong things. i want have 2 conditions in 1 statement, if called? i've tried similar things this: ng-class="{'in-behalf-of-background-color' : parameters.username == quote.inbehalfof } ,{'not-in-behalf-of-background-color' : ((parameters.username != quote.inbehalfof) && (quote.inbehalfof != 'null'))}" as can see want check parameters.username != quote.inbehalfof , if quote.inbehalfof != null in same condition. possible? try code; you want multiple condition define 1 object , define conditions key value pair {key1:value1, key2: value2} ng-class="{'in-behalf-of-background-color' : parameters.username == quote.inbehalfof, 'not-in-behalf-of-background-color' : ((parameters.username != quote.inbehalfof) && (quote.inbehalfof)) }"

Converting VB. Net to C# .Net -

this question has answer here: c# code find exact date difference in vb [duplicate] 2 answers i'm having trouble converting vb.net c#.net. there datediff() function in code, , i'm having trouble find equivalent function in c#. code in vb below: 'if differnce between , files header date >1 (day,week or year) if datediff(sdateinterval, dfiledate, now) >= 1 return true 'file on write necessary else return false 'file on write not necessary end if datediff doesn't exist in c#, subtract 2 dates: datetime date1 = somevalue; datetime date2 = someothervalue; timespan difference = date2 - date1; so can retrieve, example, difference.totalseconds . see msdn page more information. if want maintain same interval functionality, there's nothing stop referencing microsoft.visualbasic , using method do: dateandtime.dat

data.table fread() sometimes crashes the R session -

data.table fread() crashes r session when reading tab-separated or csv files. happens deterministically depending on input file. > fread('c:/temp/single_cell_ia.txt', verbose = true) input contains no \n. taking filename open file opened, filesize 0.000099 gb. memory mapping ... ok detected eol \n (no \r afterwards), unix , mac standard. positioned on line 1 after skip or autostart line autostart , not blank searching last non-blank ... line 1 detecting sep ... [r session crashes here] files give problems fread() can read read.delim() or read.csv() without problems. have performed number of tests tab-separate file , observed following: problem solved: open in excel (make no changes) , save again tab-separated text file replace text in header other text of different length using sed command under unix replace text in header other text of different length using search --> find --> replace menu in notepad++ under windows problem not solved: make co

c++ - Volume of irregular piece of pie -

Image
imagine cut piece of pie known fixed height (h). cut in such way upper arc has angle a1 , bottom arc has angle a2. however, know upper arc has 2 radii (r1 , r2) , bottom arc has 2 different radii (r3 , r4). these 4 radii not connected anyhow each other (might elliptic axis, might total random). technically, if not thinking pies, have 2 polygons (with same number of points), mass centers bit different each other. taking 2 points upper polygon, assume form local elliptic arc 2 radii , angle a1. (the other arc same polygon have different radii values , angle). can take 2 points lower polygon correspond 2 points of upper polygon (typically, using index values) , form lower local elliptic arc angle , radii values. thus question how calculate volume of piece? again, 2 upper radii (r1 , r2), 2 bottom radii (r3 , r4), fixed height (h) , 2 angles (a1 , a2). note: centers of upper , bottom parts (essentially, polygons) might different. thanks in advance help this approximation

javascript - Jquery UI Progressbar filling reduced progress -

$.get('jobs', { }, function (responsetext) { rt = json.parse(responsetext); console.log(rt); (i = 0; < rt.length; i++) { $("#jobs").append("<tr><td><div id='progressbar"+i+"' class='progressbar'></div></td></tr>"); pval = (rt[i][2] / rt[i][1]) * 100; $("#progressbar"+i).progressbar({ value: pval, max: 100 }); } }); i have written code make progressbar on td of each row of table. when doing 1 row worked fine, after i've added multiple rows in db, values not coming accurate. when value of pval is 100, filling 1/4th of progress bar. i unable replicate issue. may want edit post , include more details, example data, , errors generated console. i created following test: https://jsfiddle.net/twisty/0v4q5a8z/ html <div class="ui

java - Unexpected url in case of signature base string of woocommerce api through okhttp client -

the url generate signature get&http%3a%2f%2fprojectrepo.net%2fscoop%2fwp-json%2fwc%2fv2%2forders&oauth_consumer_key%3dck_2f53925cb6d2c8f96407f09f67f5f118d01ed80e%26oauth_signature_method%3dhmac-sha1 the string without utf encoding is get&http://----.net/----/wp-json/wc/v2/orders&oauth_consumer_key=----&oauth_signature_method=---- the problem when url passed through okhttp client generate signature,the "unexpected url" error shown on log. request request = new request.builder() .url(signaturebasestring) .build(); response response = null; response = client.newcall(request).execute(); what wrong? can't okhttp client used generate signature url utf encoded required generate signature? got solution. the code generating signature in android given follows mac mac = null; mac = mac.getinstance("hmac-sha1"); string secret = oauthconsumersecretkeystringvalue+"&";

the 13th column can't display in kendo grid? -

it more 13 columns in kendo grid, find 13th column content hidden. this, 13th column content blank the code here, demo columns: [ { field: "priority", title: 'col13', headerattributes: {style: "text-align: center;font-weight: bolder"}, attributes: {style: "text-align: center;"} }, { field: "priority", title: 'col14', headerattributes: {style: "text-align: center;font-weight: bolder"}, attributes: {style: "text-align: center;"} } ]

jquery - Creating Image path for Image in Storage firebase -

Image
in database, have kind of information images. able data database. unable make image path these values. image stored on storage. can please point me right direction? that, image present in storage's images/ directory, how can make full image path using given path in image?

Improving audio quality when using virtual audio cable with Skype -

i have installed virtual audio (vac) cable on computer able share audio when watching youtube video other people on skype. seems work sound both mic , video starts breaking when turn on video. sound ok without video , can hear video sound fine through vac. i believe problem may related setting eg bit rate don't know audio setting figure out what's wrong , how fix it.

database - Laravel 5.x how to set admin user authorize to create user -

i want create user called "headmaster" can create other users (teacher) in laravel 5.x project. can use library in laravel because told me can use middleware ? show me method , using library, not neccessary code! sorry bad english manually you can use library permissions zizaco/entrust after follow instructions have crud routes users (of course need write model , controller them aswell) route::group(['prefix' => 'admin', 'middleware' => ['role:admin']], function() { route::get('/', 'admincontroller@users'); route::get('/', 'admincontroller@createusers'); }); automatically i suggest use voyager admin panel have many cool features. bepends on want panel might useful. if crud users suggest manually.

python 2.7 - Three-term Gaussian fit to data in pyROOT -

Image
i tried fit three-term gaussian function data using following code: import root #from root import tf1 import numpy np data = np.loadtxt('v_lambda_n.dat') r = data[:, 0] v = data[:, 1] graph = root.tgraph() in range(len(v)): graph.setpoint(i, r[i], v[i]) def myfunc(x, p): return p[0]*np.exp(-(x/p[1])**2) + p[1]*np.exp(-(x/p[2])**2) + p[2]*np.exp(-(x/p[3])**2) func=root.tf1("func", myfunc, 0.0e-15,4e-15, 4) func.setparameters(-1.0, -1.0, 1.0, 1.0) graph.fit(func) canvas = root.tcanvas("name", "title", 1024, 768) graph.getxaxis().settitle("r") # set x-axis title graph.getyaxis().settitle("v") # set y-axis title graph.draw("ap") i got following error: typeerror: none of 2 overloaded methods succeeded. full details: tfitresultptr tgraph::fit(const char* formula, const char* option = "", const char* goption = "", double xmin = 0, double xmax = 0) => not convert argument

python - Kivy App works well on my PC(linux) but on my phone the .apk crash before starting -

i've posted adb logcat below: 04-07 09:56:38.338 4817 7429 activitymanager: start u0 {act=android.intent.action.main cat=[android.intent.category.launcher] flg=0x10200000 cmp=org.test.weather/org.renpy.android.pythonactivity (has extras)} uid 10037 on display 0 04-07 09:56:38.349 3695 4174 d audio_hw_primary: enable_snd_device: snd_device(78: vi-feedback) 04-07 09:56:38.349 3695 4174 d audio_hw_primary: enable_audio_route: usecase(21) apply , update mixer path: spkr-vi-record 04-07 09:56:38.376 3695 4174 d audio_hw_primary: enable_audio_route: usecase(1) apply , update mixer path: low-latency-playback 04-07 09:56:38.401 4817 10577 activitymanager: start proc 12803:org.test.weather:python/u0a137 activity org.test.weather/org.renpy.android.pythonactivity 04-07 09:56:38.404 12803 12803 art : late-enabling -xcheck:jni 04-07 09:56:38.600 12803 12803 w resourcetype: no package identifier when getting value resource number 0x00000000 04-07 09:56:38.605 12803 12803 v pyt

java - Cognos SDK to get Database layer information for a data item -

i working cognos sdk last few weeks. can able data item names, expression details cognos xml reports. need database layer information underlying db table , db field info of columns used in reports. there sdk available that? if not, please provide guidance that. thanks support. you can query content store database search through raw xml. can useful getting list of reports reference specific data source or column. here example of querying cognos content store lives on oracle database. replace 'cognos_cs' name of schema have content store saved under. select cmbase.name objname, cmo.pcmid, cmc.name classname, props7.spec cognos_cs.cmobjects cmo join cognos_cs.cmobjnames_base cmbase on cmo.cmid = cmbase.cmid join cognos_cs.cmclasses cmc on cmo.classid = cmc.classid left join cognos_cs.cmobjprops7 props7 on cmo.cmid = props7.cmid cmo.classid in (10, 37) , upper(spec) '%[sales detail]%' order cmo.pcmid;

xamarin.ios - Xamarin ios : Is there any maximum limit to the height that can be returned from GetHeightForRow method for UITableView? -

i using uitableview in xamarin.ios. height of cells returned on basis of text. , if text extremely long , height returned more 8000 , text not displayed in cell , empty blank space displayed. is there limitation height cell can return ?

bash - Sync from dir1 and dir2, and keep the two directory same -

i want sync source directory local directory, used use command: rsync -av /path1/dir1 /path2/dir2 , add contents of dir1 dir2. however, want keep dir1 , dir2 same. not hope else can add files dir2 without using rsync command (means want delete other contents not belongs dir1 when sync dir1 dir2) thanks! according the documentation : --delete delete files don’t exist on sender so, following should work: rsync -av --delete /path1/dir1 /path2/dir2

api - How to reuse header definitions in RAML 1.0 -

i have raml 1.0 specification define multiple resources. each of resources have same set of headers. what constructs of raml need use declare headers once , reuse them in various resource definitions? for e.g. /read/records: post: description: api reading records queryparameters: table_name: string headers: authorization: displayname: authorization description: basic authentication base 64 encoded string type: string required: true tenant-id: displayname: tenant-id description: tenant id multi-tenant environments type: string required: true content-type: displayname: content-type description: either xml or json type: string required: true /adjust/records: post: description: api editing records headers: au

jquery - DataTable responsive display certain columns -

Image
i using datatables along responsive , facing issues while trying display columns. table layout this: i need display 'column 1', 'column3', 'column 7', 'column 8', 'column 10' , hide others( these should displayed expand control @ end of each row ). js: $( 'table' ).datatable( { order: [ [ 0, "asc" ] ], responsive: { details: { type: 'column', target: 'tr' } }, columndefs: [ { classname: 'control', orderable: false, targets: -1 } ] } ); this jsfiddle . suggestions! to show specific columns in responsive datatable, need add class controls in th of table, follow: <table class="table table-hover table-striped"> <thead> <tr> <th class="all">column 1</th> <th class="none&qu

How do I have to format a choice in ResourceBundle? -

how have format entry in resourcebundle values less 0, 0 , greater 0? tried way: my.key = data ''{1}'' {0,choice,0>{0,number,integer} not modified|0#successfully modified|0<{0,number,integer not modified}! but java.lang.illegal argumentexception. i use messageformat way: int status = init instance -1 / 0 / 1... mf.format(new object[]{status, name});

java - How to limit the number of digits before/after/ a decimal point and also overall with regex? -

i'm trying check numeric value has specific amount of digits. there shouldn't more 19 digits overall there shouldn't more 17 digits before decimal point (integer part) there shouldn't more 4 digits after decimal point (fractional part) there can decimal point or not there can preceding + or - or not valid examples: 1 1.0 .0 12345678901234567.12 +12345678901234567.12 -12345678901234567.12 123456789012345.1234 +123456789012345.1234 -123456789012345.1234 invalid examples 1234567890123456.1234 //because there 20 digits 123456789012345678.1 //because there more 17 digits before decimal point 1.12345 //because there more 4 digits after decimal point i have tried examples this tutorial can't them work how i'd to. think have troubles understanding how use aheads/arounds since part won't i'd to: @test public void testtutorialcode() { //min two, max 4 digits whole expression pattern p = pattern.compile("\\a(?=(?: