Posts

css - Fixed table layout overflow to the side -

problem i have fixed width table (which must be) , 1 of cells contains text long fit within it, overflows outside cell right. i need have table cells' text aligned right. i ideally don't want change of markup. what i'm looking for i'm in need of finding someway (text in example) "longlonglong" overflow left on other previous cells , maintain it's aligned right state. code html <table width="120"> <tr> <td width="30">text</td> <td width="30">text</td> <td width="30">text</td> <td width="30">very longlonglong text</td> </tr> </table> css td { text-align: right; border: 1px solid black; vertical-align: top; } table { border: 1px solid red; table-layout: fixed; } example http://jsfiddle.net/xareyo/evkgz/ thankyou time. see http://jsfiddle.net...

c# - Static string using File.ReadAllText -

i attempting use file.readalltext static readonly string. issue compiling .netz , when program starts looks string , if not found nasty exception. possible around using if/else somehow? usually have popup messagebox or in label stating file not found.using .netz if file not found error message , program not start. this static string used throughout program static readonly string config = file.readalltext("config.ini"); i using .netz include dll. rather doing inline declaration, move work static constructor. becomes trivial add try/catch blocks handle error cases see fit: public class myclass { static readonly string config; static myclass() { try { config = file.readalltext("config.ini"); } catch (filenotfoundexception) { //do else //use default configuration? //report user? //crash , burn? } } } note there many re...

javascript - Highcharts data plugin decimal separator -

if got highcharts 3 data plugin read values table. not problem english because of . decimal separator. in dutch table uses , decimal separator. graph don't show because of data plugin can't see 5,5 same 5.5. this javascript code: <!-- language: lang-js --> $('#grafiek620').highcharts({ chart: { type: 'bar' }, credits: { enabled: false }, data: { table: document.getelementbyid('datatable620') }, title: { text: jquery('#datatable620').data('labeltitle') }, xaxis: { labels: { rotation: 0 }, title: { text: jquery('#datatable620').data('labelx') } }, yaxis: [{ min: 0, title: { text: jquery('#datatable620').data('labely') }, labels: { rotation: 0 } }, { opposite: true, title: { text: jquery('#datatable620').data(...

node.js - Are there any good patterns for controlling flow based on sequences of events in Node? -

in node it's easy create evented architecture. if have client of streaming api (via socket.io) don't control, , client needs react differently based on varying sequences of events. example of 2 different sequences: first order placed > 2nd order placed first order placed > first order hit trade > 2nd order placed so far using transform streams , i'm thinking of creating complicated custom logic buffers desired messages when need , acts upon them, wanted know if there best practices deal kind of situation. thanks the idea define set of objects define event sequences , when first event matches, copy sequence , pop elements of array until have no more elements. if encounter event doesn't match, reset current buffer. var events = [ { sequence : ['event 1', 'event 2', 'event4'] handler: firstsequencehandler }, { sequence : ['event 3', 'event 2'] handler: secondsequencehandler } ]; subscribe event...

php - $_COOKIE suddently does not return any value -

i have have problem code used run 6 month , yesterday page went blank! after debug found cause $_cookie. have cookie variable : $_cookie['company']; used return number doesn't return nothing. have no idea why did happened! didn't change thing in file.. can cause cookie not return value anymore? any idea appreciated thanks sounds cookie in web browser expired. login page somewhere on site reset it.

asp.net mvc 3 - Partial View vs Json In MVC3 -

i using mvc3 razor new stuck below point. in code giving ajax call using jquery json passing array of selected list on button click on controller side , performing opration there , trying call "partial view" can not see contents of partial view on page(not got render). can on this. jquery code: $(function () { $('#btnadd').click(function () { var selectedlist = []; $("#ddlsupplementalcalculationlist option:selected").each(function (i, selected) { var $this = $(this); selectedlist.push({ id: $this.val(), value: $this.text() }); }); getcalculationlistgrid(selectedlist) }); }); function getcalculationlistgrid(selectedlist) { $.ajax( { url: "addselectedlist/supplementalpricing", type: "post", datatype: "json", traditional: true, data: {selectedli...

jquery - mouseenter same item on mouseleave -

i have edited script act need it.. i need #currentitem mouseenter on page load, mouseleave when item triggers mouseenter (so not overlap). i have problem works intended. apart when mouseleave #currentitem need dropdown stay visible. time not visible (or mouseenter) when mouseenter other menu items. i have created jsfiddle current item 'about us' menu: http://jsfiddle.net/qfs84/2/ $(document).ready(function(){ $("#currentitem a").trigger('mouseenter'); }); $(".submenu").mouseenter(function(){ $("#currentitem").trigger('mouseleave'); }); $(".submenu").mouseleave(function(){ $("#currentitem a").trigger('mouseenter'); }); any appreciated. i've made progress on issue helps little. http://jsfiddle.net/z2zmz/5/ $('#currentitem').mouseout(function(){ $("#currentitem > a").trigger('mouseenter'); }) this biggest problem looking events happened...