Posts

asp.net mvc - JQUERY GET operation not working -

i'm having trouble following jquery script $('#extra_data').append('<div id="tabs-' + (tab_length + 1) + '"></div>'); $.get(url, function(data) { $('#tabs-' + (tab_length + 1)).html(data); }); my trouble $.get(..) operation doesn't return results - although when using firebug shows ajax call expected. any clues? thanks. controller <httppost()> _ function getpartialview() actionresult if (request.isajaxrequest()) return view("pvtest") else return view() end if end function i've filtered request if ajax. can pass object partial view. jquery <script type="text/javascript"> $(document).ready(function() { $.ajax({ type: 'post', url: 'home/getpartialview', data: {}, datatype: 'json', beforesend: function(xmlhttprequest) { ...

.net - need help in linq -

i need in linq from refoffence in ref_offencecodes join offencecodematrix in inf_offencecodematrixes on refoffence.offencecodeid equals offencecodematrix.offencecodeid refoffence.code=="1909" select new {offencecodematrix.standardpenaltyunits * offencecodematrix.standarddollaramount } i need muliplication of standardpenaltyunits , standarddollaramount result. please debug query. well, 1 problem you're trying create anonymous type multiplication operation, you're not specifying name. why using anonymous type @ all? try: from offencecode in ref_offencecodes join codematrix in inf_offencecodematrixes on offencecode.offencecodeid equals codematrix.offencecodeid offencecode.code=="1909" select codematrix.standardpenaltyunits * offencecode.standarddollaramount however, it's hard tell what's wrong provided failing code, without indication of way in it's failing. final line was problem, may not have been one.

working with dropdownlist in asp.net c# -

i have 2 dropdownlist in asp.net c#, 1 has 2 items in it('ok' 'pk') , other 1 bound database field , has 158 items in it. i want remove 2 items second list when user selects 'ok' , keep original list when user selects 'pk'. how can it?? have bound second list database there property can hide values in list?? first, dropdownlists have remove option. like ddl.items.remove(ddl.items.findbyvalue("value")); another way not select items list. refers question "hide" database values after retrieving. take use dropdownlists below: dropdownlist1.datasource =ds.tables[0]; // list of items retrieved db if display subset of table retrieve records need database using whatever db connection options have. instance after user selected ok use pseudo code below: // full list allitems = db.getallitems(); selecteditems = allitems.where(p => p.itemid != itemid1 || itemid2); dropdownlist1.datasource = selecteditems; and rest ...

join - the role of index in performance in mysql -

why defining index mysql tables increase performance in queries haveing join? if interested in specific topic in book, go of book , find alphabetically in index. index tells page number(s) topic discussed. jump straight pages interested in. much, faster reading whole book. it's same in database. index means can jump joining rows instead of scanning every row in table looking match. have @ how clustered index works ( http://msdn.microsoft.com/en-us/library/ms177443.aspx ). can have 1 of per table. this artical explains how non clustered index works ( http://msdn.microsoft.com/en-us/library/ms177484.aspx ). can have many of them want. both of these articles microsoft sql server, theory behind indexes same across relational database management systems. indexes have associated cost. every time insert/update performed on table, effected index(es) may have updated also. , of course indexes take space - not issue of us. need balance performance benefits of faster jo...

java - Operational Transform Implementation (not javascript) -

i'm looking implement multi-user operational transform plain-text based changes on server-side on web-site. is there non-javascript implementation can recommend? consider google-diff-match-patch - diff, match , patch libraries plain text: "the diff match , patch libraries offer robust algorithms perform operations required synchronizing plain text." diff: compare 2 blocks of plain text , efficiently return list of differences. diff demo match: given search string, find best fuzzy match in block of plain text. weighted both accuracy , location. match demo patch: apply list of patches onto plain text. use best-effort apply patch when underlying text doesn't match. patch demo available in java, javascript, c++, c#, objective c, lua , python. regardless of language, each library features same api , same functionality. versions have comprehensive test harnesses. you can find here .

CREATE INDEX in SQL Server 2008 not result in "visible index" -

Image
i using sql server 2008 express. in db in question, there 1 schema: dbo. if run following script: create unique index ix_clientsocialtypes_cover on clientsocialtypes(clientid, socialtypeclassid, [source]) include (urlid); ... executes ok, cannot see index when go db diagram , view indexes table. further, "includes" field grayed out, when specify non-clustered index (hence use of script). any ideas? where trying see index? did refresh database diagram after creating index? update: ok, seems in diagram editor, cannot define included columns (always grayed out - in full ssms, on sql server 2008 r2 dev edition). but in table designer (right-click on (your table name) > indexes > new index in object explorer), it's totally visible , usable....

java - Horizontal and vertical scrollbar in Android with tablelayout? -

please me if know how add both scrollbar. first of clear all. added both scroll bar in tablelayout main problem m using dynamic data filling tablerow. so, if there 1 record horizontal scroll view top after data. want show horizontal in bottom , show vertical. prashant use code.. <scrollview android:id="@+id/scrllvwno1" android:layout_width="fill_parent" android:layout_height="fill_parent"> //textview //button </scrollview> </linearlayout>