Posts

java - ArrayList and array: Why do they have different max lengths? -

according these questions so: list max size array max length the max length of array integer.max_value - 5 , whereas max size of list integer.max_value when @ arraylist , wrapper around array. how can wrapper allow length longer of array under hood?

jquery - functions does not run -

i want know problem in code : i want div fade in but id don't know why doesn't run want. hope me. <!doctype html> <html> <head> <title> site </title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"> </script> <script type="text/javascript"> $(document) .ready (function() { $("#frame").fadein(3000); }); </script> <style type="text/css" media="all"> * {margin:0 auto; padding:0;} body {background:#333;} #myframe {width:500px; height:300px; background:#006699;font:50px tahoma; text-align:center; color:#fff; line-height:100px;} </style> </head> <body> <div id="myframe"> site . <br /> site. </div> </body> </html> css: #myframe{ ... d...

c# - Getting data from an xml file based on array from another query from another xml file -

i have xml file table student , below structure. <?xml version="1.0" encoding="utf-8"?> <studentmodules> <student student_id="001"> <module id="m001" /> <module id="m002" /> <module id="m003" /> <module id="m004" /> </student> <student student_id="002"> <module id="m005"/> <module id="m006" /> <module id="m007"/> <module id="m008" /> </student> then have file modules , below structure <?xml version="1.0" encoding="utf-8"?> <moduleschedule> <moduletimetable module_id="m001" modulename="module name 1"> <slot day="monday" time="09:30"/> <slot day="tuesday" time="14:30"/> <slot day="fridayday" time=...

how to compile and run android application using a batch file and not IDE? -

how can compile , run android application using batch file , not other ide? possible do? , if possible, can teach me how make batch file? don't have idea it, know how run id using eclipse ide. thank you. from android doc , i'll add debug mode: debug mode for immediate application testing , debugging, can build application in debug mode , install on emulator. in debug mode, build tools automatically sign application debug key , optimize package zipalign. to build in debug mode: open command-line , navigate root of project directory. use ant compile project in debug mode: ant debug creates debug .apk file inside project bin/ directory, named -debug.apk. file signed debug key , has been aligned zipalign. each time change source file or resource, must run ant again in order package latest version of application. to install , run application on emulator, see following section running on emulator. how run befor...

javascript - Load items with ajax in div's -

i'm using following javascript load items in a few div's: <script> $.ajax({ url: 'load.php?type=diva', cache: false, success: function(data){ $('#diva').html(data); } }); $.ajax({ url: 'load.php?type=divb', cache: false, success: function(data){ $('#divb').html(data); } }); </script> html: <div id="diva"> <!-- load diva item here --> </div> <div id="divb"> <!-- load divb item here --> </div> i'm looking (and think) there's better way this. similar this: 1 function div's, automatically loads items in (multiply) div's: function loaditem(<div id>) { $.ajax({ url: 'load.php?type=<div id>', cache: false, success: function(data){ $('<div id>').html(data); ...

algorithm - Permutation of all the characters when few characters are always together -

i trying obtain permutation of characters in string lets 'kiran'. can use : perms('kiran') this returns permutation of character in string factorial(5)=120. now, looking obtain, permutation of string when characters 'ira' together. the answer factorial(3) = 6. i write module returns permutation of characters, 'ira' together. any idea how programmatically obtain in matlab? thanks x={'k','ira','n'} %one permutation per row y=x(perms(1:numel(x))) %concatinate rows y=arrayfun(@(x)[y{x,:}],1:size(y,1),'uniformoutput',false)

c++ cli - Unable to use dynamic_cast with generics -

i have generic class client has single type parameter. type parameter reference type derived base . declare class below: generic <class t> t : base, gcnew() public ref class client { t val; void setval(base ^bval){ val = dynamic_cast<t>(bval); // error c2682: cannot use 'dynamic_cast' convert 'base ^' 't' } }; why compile error when using dynamic_cast convert base 1 of derived classes? expecting cast compile fail @ runtime (by returning nullptr ) in case argument of incorrect type. try dynamic_cast <t^> . pointers have cast other pointers, handles other handles, , forth.