Posts

uml - Difference between software design and modeling and software analysis -

what basic difference between : modeling - software design , software analysis . software analysis step analyse software , create use case diagram, , software design preparation coding step, contains class diagram , others, prepared requirement specifications , helps in specifying hardware , system requirements , helps in defining overall system architecture, there following 6 phases in every software development life cycle model requirement gathering , analysis design implementation or coding testing deployment maintenance

php - Multiple jQuery AJAX calls conflicts? -

i trying create simple shopping cart using ajax , php. everything works should 1 thing doesn't work time , seems fails execute. (it works 3 times out of 5). to explain issue please take @ code bellow: jquery(document).ready(function() { //////////////////////lets run our add cart feature using ajax ////////////// $(function(){ $('.form1').on('submit', function(e){ $( "#preloader" ).fadein( 850 ); // prevent native form submission here e.preventdefault(); // whatever want here $.ajax({ type: $(this).attr('method'),// <-- method of form url: $(this).attr('action'), //url: "cart.php", data: $(this).serialize(), // <-- serialize fields string ready posted php file beforesend: function(){ }, success: function(data){ $( "#preloader" ).fadeout( 850 ); ...

javascript - Multiple values from redis with nodejs -

i've been trying figure out how achieve nodejs , redis: var var1 = redisclient.get("foo"); var var2 = redisclient.get("bar"); if (var1 && var2) { do_something(); } else { do_something_else(); } i know redis calls asynchronous repeating like: var var1, var2; redisclient.get("foo", function(err, data) { var1 = data; redisclient.get("bar", function(err, data) { var2 = data; if (var1 && var2) { do_something(); } else { do_something_else(); } } }); doesn't feel right every time want access 2 variables. you can use async library control flow: async.parallel([ function(done) { redisclient.get("foo",done); }, function(done) { redisclient.get("bar",done); } ], function(err, result) { /...

sql - Cannot insert multiple lines in Sqlite using C# -

i know simple question cannot find answer can me. i'm using c# in order connect sqlite database , insert data. here code : private void opendb() { this.m_handle = new sqliteconnection("data source=" + m_filename + ".sqlite3;version=3;"); this.m_handle.open(); } private void closedb() { this.m_handle.close(); } private void createdb() { this.opendb(); string query = "create table streamingurl ([url] varchar(255) not null, [daterequest] text not null);"; sqlitecommand command = new sqlitecommand(query, this.m_handle); command.executenonquery(); this.closedb(); } public void addstreamingurl(string url) { this.opendb(); string query = "insert streamingurl (url, daterequest) values ('" + url + "', datetime('now', 'lo...

magento set drop down as readonly not working -

i need set drop down readonly. put as; <select readonly="readonly" name="name" > <option>1</option> <option>2</option> <select> but not working. since readonly, can change drop down value. please help.thank you. the select tag doesn't have readonly attribute. have disabled . the problem disabled form inputs don't included in post / data. to around this, add hidden input same name , value.

javascript - Play audio file on the server side using ElFinder -

i trying play .mp3 file on server side using elfinder. have created 2 instances of elfinder. how should play file 1 of instances on server side? here code handlers : { select : function(event, elfinderinstance) { var selected = event.data.selected; if (selected.length>0) { var filenamex=elfinderinstance.file(selected[0]).name; console.log(filenamex); var path=elfinderinstance.path(selected[0]); console.log(path); if(filenamex.indexof(".mp3") == filenamex.length - 4) { console.log("mp3 file"); } } } }, lang : 'en', customdata : {answer : 42}, rememberlastdir :false, debug:true })...

java - Design pattern for interface that determines order of method invocation -

i want create java interface number methods. want user of interface able invoke methods in sequence or order define. instance buyticket() should not called before reserveticket() . q: there design pattern or tips on how go this? i considered: a) interface wrapped, showing next possible method. each invocation of method returns new operation can called after it, , on. so reserveticketoperation has public buyticketoperation execute(); then buyticketoperation has public renderticketoperation execute(); b) use kind of context state machine records position of execution using enums , has factory obtaining next operation. any thoughts or suggestions appreciated. thanks my immediate feeling: don't @ all pattern. if inner logic of methods requires them always call them in order; exposing implementation detail make easy use interface wrong. meaning: instead of trying somehow force "client code" adhere specific order should design interf...