Posts

java - String has access to entire text file -

i working on java project loosely simulates search engine converting gettysburg address text file linear-linked list of word objects contain string of word , line position. compare these against hash table of ignorable words , insert considerable words binary search tree number of appearances recorded if duplicates occur. i have hashing function , of tree-adding parts down having issue can't seem figure out regarding input: when reading gettysburg address using bufferedreader.readline(), after cleansing string of punctuation string seems contain entire text file though instantiated line = br.readline(). here first few lines of getty.txt: four score , 7 years ago our fathers brought forth, upon this continent, new nation, conceived in liberty, , dedicated proposition men created equal. engaged in a i have attached code below context. private static objectlist getwords(string filename) throws ioexception { bufferedreader br = new bufferedreader(new filereader(fil...

python - AWS - DJANGO - Error in formatting: OperationalError: fe_sendauth: no password supplied -

i have setup django app on aws beanstalk postgresql 9.4.7. database settings follows; if 'rds_db_name' in os.environ: databases = { 'default': { 'engine': 'django.db.backends.postgresql_psycopg2', 'name': os.environ['rds_db_name'], 'user': os.environ['rds_username'], 'password': os.environ['rds_password'], 'host': os.environ['rds_hostname'], 'port': os.environ['rds_port'], } } i have installed psycopg2. aws application installation completed when opened index page received following error. exception type: runtimeerror exception value: error creating new content types. please make sure contenttypes migrated before trying migrate apps individually. further digging exception page found error **variable** my_list **value** error in formatting: operationalerror...

objective c - build Libidn for Apple TV -

i working in chat application apple tv. , using https://github.com/robbiehanson/xmppframework . its working in simulator not in apple tv. getting error message, ld: in /users/c/documents/kasi/v-appletv/vertv/xmpp/vendor/libidn/libidn.a(nfkc.o), building tvos, linking in object file built ios, architecture arm64 clang: error: linker command failed exit code 1 (use -v see invocation) how build libidn tvos? have tried downloading libidn , compiling library tvos ? i don't know how compile tvos, this should give clue. need use appletvos.platform instead of iphoneos.platform of course , maybe change other values too.

Need to archive teamcity build configuration of test -

please me! need archive configuration of 1 test, not hole project, how can this! can archive hole project not test, need archive config of test! teamcity 8.0.1! if have archive 1 configuration of build, have create new 1 project , copy config of build new project, , after that: administration->projects->on project @ right side click on more , archive project!

ios - AFNetworking Send JSON as a parameter for POST request -

i gone several answers same question...but unable figure out issue..i getting error * terminating app due uncaught exception 'nsinvalidargumentexception', reason: '* +[nsjsonserialization datawithjsonobject:options:error:]: invalid top-level type in json write' my code is: nsdictionary *logindict=[[nsdictionary alloc] initwithobjectsandkeys:password.text,@"password",username.text,@"username",nil]; nserror *error; nsdata *jsondata = [nsjsonserialization datawithjsonobject:logindict options:nsjsonwritingprettyprinted error:&error]; if (jsondata) { nsstring *jsonstring = [[nsstring alloc] initwithdata:jsondata encoding:nsutf8stringencoding]; } else { nslog(@"got error: %@", error); } afhttprequestoperationmanager *manager = [afhttprequestoperationmanager manager]; manager.requestseria...

apache - How to serve DASH video (MPEG-DASH and HLS) over a web sever -

i doing small research project test dash streaming on low bandwidth mobile connections in india. i have aws machine can upload video , package mpeg-dash , hls streaming , create mpd , m3u8 files. but unable serve video. i have tried apache , node.js. told placing folder contains mpd nad m3u8 files video chunks should able stream video. i not sure doing wrong. there special configuration need server mpeg-dash video ? if there tutorial/blog/github project point me towards, brilliant. tia. you not need server side application. if using aws simple s3 bucket behind cloudfront trick nicely, without ec2 needed @ all. ensure have cors , crossdomain.xml in place. stefen lederer posted blog set up. also, use browsers developer mode catch failed requests , console errors might give pointers why not working you.

android - Detect installed languages for offline recognition -

it possible determine via code language packages installed on device? tried this: intent detailsintent = new intent(recognizerintent.action_get_language_details); sendorderedbroadcast(detailsintent, null, new languagedetailschecker(), null, activity.result_ok, null, null);   public class languagedetailschecker extends broadcastreceiver { private list<string> supportedlanguages; @override public void onreceive(context context, intent intent) { bundle results = getresultextras(true); if (results.containskey(recognizerintent.extra_supported_languages)) { supportedlanguages =results.getstringarraylist(recognizerintent.extra_supported_languages); log.d("tag","languages: " + supportedlanguages); } } } however, output shows me tons of languages, while have en_uk, en_us , es_es installed. idea? if have root(sorry), can way: public static boolean isoffline...