Posts

Fine-uploader in iOS and iPad -

i checked if fineuploader worked on ipad, , mostly, ipad gets single file "image.jpg" returned, every file that's uploaded keeps overwriting previous file. (or uploads 1 file) in case, can behavior fixed on either chrome or safari on ipad? we using library uploaded images different business requirement , works dream. developing one. krishna here code: i creating endpoint dynamically , uploading files different folders. getting uploaded other platform except ios. $(document).ready(function () { $('#s3-fileuploader').fineuploader({ request: { endpoint: '', inputname: 'filename', forcemultipart: true, paramsinbody: true, params: {}, }, faileduploadtextdisplay: { mode: 'custom', maxchars: 40, responseproperty: 'error', enabletooltip: true }, cors: { expected: t...

c# - Format a double to two digits after the comma without rounding up or down -

i have been searching forever , cannot find answer, none of them work properly. i want turn double 0.33333333333 0,33 or 0.6666666666 0,66 number 0.9999999999 should become 1 though. i tried various methods like value.tostring("##.##", system.globalization.cultureinfo.invariantculture) it returns garbage or rounds number wrongly. please? basically every number divided 9, needs displayed 2 decimal places without rounding. i have found nice function seems work numbers 9.999999999 beyond starts lose 1 decimal number. number 200.33333333333 going display 200 instead of 200,33. fix guys? here is: string truncate(double value, int precision) { string result = value.tostring(); int dot = result.indexof(','); if (dot < 0) { return result; } int newlength = dot + precision + 1; if (newlength == dot + 1) { newlength--; } if (newlength > result.length) { newlength = result.length;...

ios - UITableView Mix of Static and Dynamic Cells? -

i know cannot mix static , dynamic cell types in single uitableview couldn't think of better way describe issue. i have several predetermined cells fixed content, have unknown number of cells dynamic content sits in middle. want table this: fixed fixed fixed dynamic dynamic dynamic dynamic dynamic fixed fixed so how recommend approach in cellforrowatindexpath method? thanks. as stated can't mix static , dynamic cells. however, can break content different data arrays correspond each group. break table difference sections , load data correct array in cellforrowatindexpath:. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellid = @"cellid"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellid forindexpath:indexpath]; switch (indexpath.section) { case 0:{ cell.textlabel.text = self.arrayofstaticthings1[indexpath.row]; ...

c# - What does Button.PerformClick do? -

i know might trivial question, wondering whether there advantage of calling button.performclick rather invoking click event of button directly. msdn documentation says: generates click event button. does mean same thing calling click event of button or there other special advantage? an external caller knows nothing of subscribed events cannot call click handler - , events not allow obtain information subscribers. method allows separation of concerns, external callers can "play nice". additionally: it ensures polymorphism on virtual method applied it applies rules - example: button disabled if know event-handler, , aren't using polymorphism, , don't care whether disabled, , don't need worry event-handlers don't know - means : call event-handler method.

chrome extension - alternative to externally_connectable? -

it seems externally_connectable feature allows website communicate extension still in dev channel , not yet stable. there other ways allow specific website communicate extension, while wait feature become stable? how have chrome extension developers traditionally done it? thanks rob w pointing me in direction of html5 messaging. benefit of other chrome extension developers, i'm writing general problem trying solve , solution worked in end. i making chrome extension can control music playback on tab via popup player. when user clicks on play/pause/etc on popup player, extension should able convey message webpage , response stating whether action accomplished. my first approach inject content script music player page. problem is, though, content scripts operate in "sandbox" , cannot access native javascript on page. therefore, content script pretty useless (on own), because while receive commands extension, not effect change on webpage itself. one thing w...

jQuery $.post function not hitting the server? failed error response -

i'm trying access control processor has built in web server. based on specific values programmed controller able trigger actions through website resides on built in server using jquery or js. i'm having issue though jquery post command. when use goggle's rest plugin works , response. ideas? function getvariablevaluesbyname(name) { $.post("http://10.10.254.11/rpc/", { method: "getvariablevaluesbyname", param1: name, encoding: "2" }).done(function (data) { data = string(data); var info = data.responsetext; alert(info); }).fail(function (data) { data = string(data); alert("error " + data) }).always(function (data) { data = string(data); alert("just in case " + data); }); } some additional examples last function example assumes i've created xmlhttp object. function getvariablevaluesbyname(name) { $.ajax({ type: ...

ransack - Rails page search form: default parameters -

i have 2 rails sites, bargain stock funds ( http://www.bargainstockfunds.com ) , doppler value investing ( http://www.dopplervalueinvesting.com ). bargain stock funds has search feature allows users obtain list of funds meeting criteria. (the url http://www.bargainstockfunds.com/funds .) doppler value investing has search feature allows users obtain list of stocks meeting criteria. (the url http://www.dopplervalueinvesting.com/stocks/ .) both sites use ransack gem provide search feature , kaminari gem paginate results. is there way can configure search engines pre-loaded criteria set? bargain stock funds, want search engine pre-configured exclude funds load_front or load_back value greater 0.0%, , want results sorted respect value of pcf parameter. doppler value investing, want search engine pre-configured exclude funds pass_legit value of false or pass_quality value of false, , want results sorted respect value of dopeler_pb parameter. these pre-configured settings sa...