Posts

python - How to output a multi-index DataFrame in latex with pandas? -

i trying output multi-index dataframe in latex output using python , pandas. far, have this: import pandas pd l = [] in ['1', '2', '3']: b in ['first', 'second']: c in ['one', 'two']: x = 3.2 s = pd.series({'a':a, 'b':b, 'c':c, 'x':x}) l.append(pd.dataframe(s).transpose()) df = pd.concat(l, ignore_index=true) df = df.set_index(['a', 'b', 'c']) print(df) print(df.to_latex()) however, not have expected output. x b c 1 first 1 3.2 2 3.2 second 1 3.2 2 3.2 2 first 1 3.2 2 3.2 second 1 3.2 2 3.2 3 first 1 3.2 2 3.2 second 1 3.2 2 3.2 \begin{tabular}{llll} \toprule & & & x \\ \midrule 1 & first & 1 & \\ 2 & second & 2 & 3.2 \\ \bottomrule \end{tabular} is bug or ...

ios - Best practices to ensure Core Data can persist throughout development cycle -

i'm working on core data ios application. i've experienced few cases database has become out of sync model, due error (editing active xcdatamodel accident instead of creating new version). has resulted in loss of data beta-testers update bad version , experience app crashes. way know how recover these crashes delete , re-install app. what best practices ensure beta-tester's data never lost again? doing following: versioning xcdatamodel (editor->add model version) enabled automigration: nsdictionary *options = [nsdictionary dictionarywithobjectsandkeys: [nsnumber numberwithbool:yes], nsmigratepersistentstoresautomaticallyoption, [nsnumber numberwithbool:yes], nsinfermappingmodelautomaticallyoption, nil]; what other tips have been accrued more experienced core data developers? there way recover core data model out-of-sync cases? creating new model version time change model is way ...

c# - log4net: different info colors for different types -

i have log4net , want have different info colors different types (for 2 special types) in same assembly. possible? if possible should do? thanks in advance. update: appender supposed coloredconsoleappender. i think looking for <log4net> <appender name="common" type="log4net.appender.coloredconsoleappender"> <filter type="log4net.filter.loggermatchfilter"> <loggertomatch value="custom1" /> <acceptonmatch value="false" /> </filter> <filter type="log4net.filter.loggermatchfilter"> <loggertomatch value="custom2" /> <acceptonmatch value="false" /> </filter> <layout type="log4net.layout.patternlayout"> <conversionpattern value="%date [%thread] %-5level %logger [%property{ndc}] - %message%newline...

Operating a GitHub pull request on Android Studio -

i can't manage find simple way initiate merge pull request in android studio, else concerning github quite implemented. way have found enter console instruction give on github in git shell, , switch android studio after merge. did miss simpler way ? you can go in vcs menu, choose git, branches. after selecting branch pull request, click on merge.

encryption - Passing Personally Identifiable Information in Google Products -

i new developer , built site google ads ( www.freemics.com ) the other day got email google following message: "it has come our attention passing identifiable information (pii) google through use of 1 or more of google's advertising products -- dfp, adsense, and/or doubleclick adexchange." i believe has using pass data in url without encrypting it. dont know has ads. never altered of code. can give me more information this. using encryption when passing data in resolve this? thanks!! when adsense ad unit runs on site, ad request sent google. ad request includes request url header contains url of page serving ad. such, if url contains unencrypted pii, data passed on google. google has best practices complying policy.

api - Get Alfresco document nodeRef and versionNodeRef together -

i'm using alfresco community 5.0b. have web application uses alfresco document store. each time create new document or update existing version of document, want store in application database document id , version id. call upload document: post /alfresco/service/api/upload works great in returns noderef of newly created document, doesn't return version noderef. that, need call: get /alfresco/service/api/version?noderef={noderef} is there way both pieces of information in single call?

Reading a pdf file created using iText in java -

i using itext libraries create pdf files using java, file created , opens using adobe, when try read java.io.filenotfoundexception: errecord.pdf (the system cannot find file specified) fileinputstream input = null; file file = new file("errecord.pdf"); system.out.println(file.canread()); input = new fileinputstream(file); file.canread() returns false, there way read file or make readable using itext? i used getabsolutefile() , path wrong.. used absolute path file file = new file("c:/users/rawan/workspace-luna/prototype_3/errecord.pdf"); and worked fine