Posts

r - How to solve the issue of fread txt with EOF? -

i trying read climate station info ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-stations.txt . however, since first row not populated (last 2 cols missing) , 5th column contains spaces, unable complete reading with: fread('ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-stations.txt',sep=) it returns error message: expected sep (' ') new line, eof (or other non printing character) ends field 5 when detecting types point 0: age00135039 35.7297 0.6500 50.0 oran-hopital militaire how apply fread correctly on reading txt file? thank you!

javascript - C++ server require ajax call to connect twice -

i have created simple c++ http server accept post request , parses data. #pragma comment (lib, "ws2_32.lib") // #pragma comment (lib, "mswsock.lib") #define default_buflen 4096 #define default_port "8080" class chttp { public: chttp() { recvbuflen = default_buflen; iresult = wsastartup(makeword(2, 2), &wsadata); if (iresult != 0) { printf("wsastartup failed error: %d\n", iresult); } zeromemory(&hints, sizeof(hints)); hints.ai_family = af_inet; hints.ai_socktype = sock_stream; hints.ai_protocol = ipproto_tcp; hints.ai_flags = ai_passive; iresult = getaddrinfo(null, default_port, &hints, &result); if (iresult != 0) { printf("getaddrinfo failed error: %d\n", iresult); wsacleanup(); } } int init() { listensocket = socket(result->ai_family, result->ai_so...

html - Github Pages website favicon not showing -

i'm hosting website using github pages. connected cloudflare website because of ssl. when added favicon.ico website , following code in <head> make favicon show up, still doesn't show up. can do? <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> (english not native language) edit: seems other people can see favicon, except me. why?

java - Get a object's list from a store procedure with MyBatis -

i list procedure using object list argument this: estado.java public class estado{ private string code; private string name; ... } estadolist.java public class estadolist{ private list<estado> estados; ... } query.xml ... <resultmap type="estado" id="resultestado"> <result property="code" column="c_code" /> <result property="name" column="c_name" /> </resultmap> <parametermap type="estadolist" id="paramestadolist"> <parameter property="estados" jdbctype="cursor" mode="out" resultmap="resultestado"/> </parametermap> <select id="getestados" parametermap="paramestadolist" statementtype="callable"> {call pkg.pr_estados(?)} </select> ... estadodao @override public list<e...

Make text appear above background in HTML + CSS -

hi first webpage i've made , i'm trying display gif backrgound , make text appear above that.. works fine except can't seem display text above gif background.. can see in source code have 1 heading , 3 paragraphs, knows how fix this? <!doctype html> <html> <head> <link rel="icon" href="http://www.iconarchive.com/download/i91751/icons8/windows-8/systems-linux.ico" type="image/x-icon"/> <title>firstwebpage</title> <style> body{ /* use gif background */ background-image: url('http://images.eurogamer.net/2015/articles/1/8/7/1/5/3/2/san-francisco-subway-system-hacked-passengers-get-free-rides-148033947612.gif'); background-position: relative; background-size: cover; } </style> <audio autoplay loop> <source src="seffelinie.mp3" type="audio/mp3"> </head> <body> <div align="...

XCode Multithreading does not work in Visual Studio 2015 -

i have written c++ opencv trackers multi threads. on building program xcode find 3 cpu cores being used , speed of tld tracked increases 50 %. however when build same project in visual studio using same code multi threads 1 cpu core utilized , tracker speed doesn't increase. there ain't difference between multi threads , single thread sequential program. i don't know why happens , how initialize threads in visual studio 2015.

ios - How to format text like a blockquote within a UITextView -

Image
i trying familiarize myself coretext , started making own note taking application. i have regex in place in conjunction attributedstrings , trying mimic functionality of stackoverflow text box typing in now. i have of common things like: bold italics headers emphasis blocks but struggling make block quote / code block. something breaks own line , creates box goes edge no matter how long text is. and changes background color is possible strictly using attributedstrings? i've seen old examples html / css injected hoping accomplish using special nsattributedstringkey combination. yes, it's possible. here's sample playground in swift 3: import uikit import playgroundsupport let richtext = nsmutableattributedstring() let chunk0 = nsattributedstring(string: "but struggling make block quote / code block.\n\n") richtext.append(chunk0) let paragraphstyle = nsmutableparagraphstyle() paragraphstyle.headindent = 20 // note settin...