Posts

c# - How to get the log file location/name from Spring.Net Common Logging -

c# - How to get the log file location/name from Spring.Net Common Logging - i trying receive lastly line of message inserted log file (using spring.net mutual logging). first step retrieve name of file little tricker expected cant find relevant properties/cast this. i've found few articles of how retrieve filename given log4net file reader nil starting spring.net mutual logging class. after have received filename, utilize reverse file reader retrieve lastly name. wondering peoples thoughts reading in file whilst it's potentially beingness written mutual logging / log4net? you should able open file reading while still open writing logging infrastructure, i'm bit worried plans read "last" line. between point find need open file , point manage open file read else can write entry log file, making potentially hard line want assuming 'last' line in log. am right in assuming kind of way respond error status , acquire correlated lo...

javascript - JSDB for Android (and other mobile OS) -

javascript - JSDB for Android (and other mobile OS) - i love simplicity of jsdb develop windows program. want develop programme android. think useful if there jsdb equivalent mobile os (android start). any of know jsdb equivalent mobile os? thanks! javascript android sdk

java - Why are there compile errors when accessing an Enum from the main method? -

java - Why are there compile errors when accessing an Enum from the main method? - so i'm little bit confused i've never used enum before. want utilize enum in main method. reason, can't (i maintain getting errors anytime seek status s; in main). can phone call testingenum method main , of course of study works... 100% sure using enum way plain wrong. tell me how i'd go using in main properly? if seek do: status s; in main method, error - "connot find symbol status s;" background: new java , enums... class myclass { public status s; public enum status { status_open(1), status_started(2), status_inprogress(3), status_onhold(4), status_completed(5), status_closed(6); private final int status; status(int stat) { this.status = stat; } public int getstatus() { homecoming this.status; } } private void setstat...

c# - How to get a flattened list from nested class List? -

c# - How to get a flattened list from nested class List<T>? - i have question using these same examples - question focused on different issue. given next classes: [xmlroot] public class family { [xmlelement] public list<person> person; } public class person { [xmlattribute("member")] public membertype fellow member { get; set; } [xmlattribute("id")] public int id { get; set; } [xmlelement] public string surname { get; set; } [xmlelement] public string forename { get; set; } [xmlelement("person")] public list<person> people; } public enum membertype { father, mother, son, girl } if family has method defined such: public ienumerable<person> find (func<person, bool> predicate) { // how selectmany flatten list? foreach (var p in family.person.selectmany(p => p)) { if(pre...

ruby on rails 3 - Loading feeds / entries getting undefined method 'entries' for 0:fixnum error -

ruby on rails 3 - Loading feeds / entries getting undefined method 'entries' for 0:fixnum error - i trying load feeds blog resulting in error in title mentioned. the error message: nomethoderror (undefined method `entries' 0:fixnum): app/controllers/pages_controller.rb:6:in `home' this how i'm doing: i created file in lib folder called blog_feeds.rb , contains following: module blogfeeds require 'feedzirra' def load_feeds feeds = feedzirra::feed.fetch_and_parse('http://blog.shigotodoko.com/feed') end end and line #6 error is: @feeds = load_feeds.entries note error occurs sometimes, not always. so, thought what's going wrong here? thank you! when fetching feed, feedzirra homecoming http status code instead of object containing feed entries, if http fetch results in error (i.e. not 200 or 3xx). in order handle status gracefully, check type of object fetch_and_parse wrapping in like: unless feeds.is...

ios - how to play sound by AVAssetReader -

ios - how to play sound by AVAssetReader - i using avassetreader individual frames video file. know how can play sound mp4 file. the homecoming value of method [player play] false, there no sound play, why thanks. create avassetreader nsurl *url = [nsurl fileurlwithpath:[[nsbundle mainbundle] pathforresource:@"zhang" oftype:@"mp4"]]; avurlasset *avasset = [[avurlasset alloc] initwithurl:url options:nil]; avassettrack *track1 = [[avasset trackswithmediatype:avmediatypeaudio] objectatindex:0]; nsmutabledictionary *dic2 = [nsmutabledictionary dictionarywithobjectsandkeys:[nsnumber numberwithint:kaudioformatlinearpcm], avformatidkey, [nsnumber numberwithint:16],avlinearpcmbitdepthkey, [nsnumber numberwithbool:no],avlinearpcmisbigendiankey, [nsnumber numberwithbool:no],avlinearpcmisfloatkey, [nsnumber numberwithbool:no],avlinearpcmisnoninterleaved, nil]; o...

jquery - Wrap content in a Div with javascript without iframe refreshing -

jquery - Wrap content in a Div with javascript without iframe refreshing - basically want wrap content on page in div. i can using wrap function in jquery issue have few iframes in content contain advertising , when wrap content refreshes iframes. from can tell because behind scenes cloning content wrapped new div. html <div class="content"> <iframe src="http://something.com/ads"></iframe> </div> js $(content).wrap('awesome_container'); ideally slot in open div tags before content div , few close div tags afterwards can't seem add together divs page without adding close tags. does know of way around issue? cheers instead of removing html or making re-create of it, see if can desired result using jquery's detach() allow whatever events have associated element , children still function afterwards. may plenty preserve iframe object instead of killing off. var orphan = $(selector).detach() ...