Posts

file - How to avoid individual casting to byte during initialization of byte array in Java -

i using byte array store text file outside of filesystem. it looks this: private static final byte[] cdrives = new byte[] { (byte)0xe0, 0x4f, (byte)0xd0, 0x20, (byte)0xea, 0x3a, 0x69, 0x10, (byte)0xa2, (byte)0xd8, 0x08, 0x00, 0x2b, 0x30, 0x30, (byte)0x9d, (byte)0xba, (byte)0x8a, 0x0d, 0x45, 0x25, (byte)0xad, (byte)0xd0, 0x11, (byte)0x98, (byte)0xa8, 0x08, 0x00, 0x36, 0x1b, 0x11, 0x03, (byte)0x80, 0x53, 0x1c, (byte)0x87, (byte)0xa0, 0x42, 0x69, 0x10, (byte)0xa2, (byte)0xea, 0x08, 0x00, 0x2b, 0x30, 0x30, (byte)0x9d ... ... ... }; is there way avoid casting (byte) better visual interpretation? i don't mind using other data type, need able build inputstream out of , fastest way if possible. (for example storing text file string variable not best way...) well 1 simple approach use base64 - perform conversion on class initialization, take performance hit once: private static final byte[...

angularjs - Bower issue with Grunt serve -

i'm trying work on angular project school. having little bit of confusion in set problem , can't find issue online. i've installed grunt, bower, , yeoman , seemed install when ran "grunt serve", tutorial states should able open local host webpage served command completes , i'm not sure if it's because of error displays: "cannot find keep bower packages."

javascript - Z-index is broken -

why #opacwall covers #moviechoose ? <div id="moviechoose" style="width: 50px;height: 50px;background: #f2c249;border: none;position:absolute;left:50px;top:50px;z-index:1;border-radius:130px; display: none;"></div> jquery: $('.circlemenubutton').click(function(){ $('#moviechoose').show(200); $('<div/>', { 'id':'opacwall', 'style':' width: 100%;height: 100%;background: black;border: none;position:fixed;left:0%;top:0%;z-index:0;opacity:0.6' }).appendto('body'); }); here working demo of think you're trying https://jsfiddle.net/mzg1v0q5/ using jquery-2.1.3 people confused z-index, recommend reading article understand it: http://www.smashingmagazine.com/2009/09/15/the-z-index-css-property-a-comprehensive-look/ the key piece of information (in opinion) because z-index work on element position property has been explicitly set abso...

c# - MVC 4: View is not rendered with the correct data from a List<> in the Model -

having pretty tricky asp.net mvc bug (using mvc4). i've tried strip down code make example clear possible i have model //this mvc model public class customcolumnconfiguration //stripped down "problem" property { public customcolumnconfiguration() { columns = new list<columnconfig>(); } public list<columnconfig> columns { get; set; } } //mvc model contains list of these public class columnconfig { public columnconfig() { name = ""; alias = ""; order = 0.0; } public string name { get; set; } public string alias { get; set; } public double order { get; set; } public bool isenabled { get; set; } } here snippet razor view <tbody> @for (int = 0; < model.columns.count; i++) { <tr> <td>column @(i+1)</td> <td>@html.textboxfor(x => x.columns[i].name)</td> <td>@html.textboxfor(x => x...

excel - Trying to create a range from a set of values -

Image
so have range of cells contains list of cell addresses. column b & c show block of information starts , ends. column d states whether start of combination of tables, end of combination, or whether it's single table. so having difficulty combining answers b & c form combined range. in picture, column e shows start a170 , end a596. (i don't think necessary tbh) need make range containing a170:a543, a548:a554, etc. , needs dynamic. these should create based on values in column d. i'm looking in vba, if it's easier in excel formulas, that's okay too. can give me hints how accomplish this? brain mush. you can create small user defined function (aka udf) stitch non-contiguous cell ranges textual representations of respective addresses. can return range native worksheet function uses cell range sum function or counta function (to use 2 simple examples). function makenoncontiguousrange(startrngs range) dim rng range, runion range...

javascript - JQuery Autocomplete Widget - Up & Down Arrow Keys not working -

i new jquery , going through snippet of code of larger application (which have outsourced). snippet jquery widget autocomplete results. on html page, have search box. when user enters keystrokes, search performed (for places , events) on our database , results shown in un-ordered list. results show fine. however, hoping scroll through results using down , arrow key not seem work. opening developer tools in chrome, when press down key following error reported uncaught typeerror: cannot read property 'value' of undefined jquery-ui.min.js:8 the relevant widget code follows $.widget("custom.catcomplete", $.ui.autocomplete, { _rendermenu: function(ul, items) { ul.addclass('search-box'); var = this; var = 0; var j = 0; var index = 0; $.each(items, function(index, item) { if (item.space && == 0) { ul.append('<h4><i class="fa fa-car fa-fw">...

jquery - How do I run a form with Html+AngularJS inside a While of PHP? -

this angularjs works charm, if this: <html> <head> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script> </head> <body ng-app="ctrljs"> <a href='#' data-toggle='modal' data-target='#mlmid'>cobacing</a> <div class='modal fade' id='mlmid' tabindex='-1' role='dialog' aria-labelledby='mymodallabel' aria-hidden='true'> <div class='modal-dialog'> <div class='modal-content'> <div class='modal-body'> <form method='post' action='' name='myform' ng-controller='formctrl'> nomor id member c2g: <br> ...