Posts

r - How to make part of rmarkdown document without section numbering? -

Image
i have rmarkdown document (.rmd) want knit pdf document. number_sections has been put 'yes' , toc 'true'. how can add appendix sections appear in table of contents don't have section number? here example .rmd code. how can let appendix , appendix b numberless sections , let them appear in table of contents @ same time? --- title: "test" author: "test test" geometry: margin=1in output: pdf_document: keep_tex: yes latex_engine: xelatex number_sections: yes toc: yes toc_depth: 3 header-includes: - \usepackage[dutch]{babel} - \usepackage{fancyhdr} - \pagestyle{fancy} - \fancyfoot[le,ro]{this fancy foot} - \usepackage{dcolumn} - \usepackage{here} - \usepackage{longtable} - \usepackage{caption} - \captionsetup{skip=2pt,labelsep=space,justification=justified,singlelinecheck=off} subtitle: test test test fontsize: 12pt --- # start # second ```{r results="asis",eval=true,echo=false,message=false, error=false, warn...

c# - How do I create a class with SQL connection and query functions and calling it to my windows form buttons? -

i want create class has sql connection , functions (like insert, select, delete queries) , want call forms (buttons , etc.) i don't know if it's possible or not or maybe there ways on doing so... i've done research , come code on class sql connection , i'm not sure if it's correct. thank in advance. i'm beginner , want learn more on c#. any type of response appreciated. thank you sorry bad english using system.data.sqlclient; class sqlconnclass { public static sqlconnection getconnection() { string str = "data source=localhost;initial catalog=kwem;integrated security=true;"; sqlconnection conn = new sqlconnection(str); conn.open(); return conn; } you close! may want take `conn.open()' out of method can open query. (remember close or put in using statement!) public static void updatedb(string valtoupdate) { sqlconnection conn = getconnection(); using (conn) { ...

xml - geotools : Could not find element declaration for -

i don't find solution of issue. try create kml file using geotools. i 'm stuck : <dependency> <groupid>org.geotools.xsd</groupid> <artifactid>xsd</artifactid> <version>${geotools.version}</version> </dependency> <dependency> <groupid>org.geotools.xsd</groupid> <artifactid>gt-xsd-kml</artifactid> <version>${geotools.version}</version> </dependency> <dependency> <groupid>org.geotools.xsd</groupid> <artifactid>gt-xsd-core</artifactid> <version>${geotools.version}</version> </dependency> and java source code have common example : final encoder lencoder = new encoder(new kmlconfiguration()); final fileoutputstream lfileoutputstream = new fileoutputstream(outputfile); lencoder.setind...

ios - Show swrevealviewcontroller over main view controller -

the default behavior(shadow) of swrevealviewcontroller makes appear main view controller on top of menu. there way reverse behavior menu appears on top of main view controller? swrevealviewcontroller doesn't have behaviour. can try library has looking for: https://github.com/jonkykong/sidemenu

Java Binary Tree Main Method -

i've got class node class node{ int val; node parent; node left; node right; public node (int val){ this.val = val; } } and have few methods: public class tree{ public node root = null; void insertnodesorted(node x, node tree) { if (x.val < tree.val) { if (tree.left == null) { tree.left = x; } else insertnodesorted(x, tree.left); } else { if (tree.right == null) { tree.right = x; } else insertnodesorted(x, tree.right); } } // end insertnodesorted void deletenodesorted(node x) { if (root == null) return; else root = deletenodesorted(x, root); } node deletenodesorted(node x, node tree) { if (x.val < tree.val) tree.left = deletenodesorted(x, tree.left); else if (x.val > tree.val) tree.right = deletenodesorted(x, tree.right); else tree = replacenodesorted(...

If I have an application registered with Azure AD, how do i leverage the Schools REST API? -

if have application registered azure ad, how best leverage schools rest api? i think there few things can't reconcile within docs, bear me. specifically, there permission level allows me request data rest endpoint? @ moment i'm requesting basic permissions (user.read) seems according school data sync district has register , share sis information. leads me believe user cannot grant such permission, , instead application has granted permission 'district'. if district finds app in azure marketplace grant permission or can have situation using app found in azure marketplace haven't granted sds permission? also, can 'id' https://graph.microsoft.com/v1.0/me used query schools rest api? how query student/teacher information signed in user? reading docs seems have traverse tree of schools, school, students, specific student. thanks!

JavaScript closure inside loops – simple practical example -

var funcs = []; (var = 0; < 3; i++) { // let's create 3 functions funcs[i] = function() { // , store them in funcs console.log("my value: " + i); // each should log value. }; } (var j = 0; j < 3; j++) { funcs[j](); // , let's run each 1 see } it outputs this: my value: 3 value: 3 value: 3 whereas i'd output: my value: 0 value: 1 value: 2 what's solution basic problem? well, problem variable i , within each of anonymous functions, bound same variable outside of function. what want bind variable within each function separate, unchanging value outside of function: var funcs = []; function createfunc(i) { return function() { console.log("my value: " + i); }; } (var = 0; < 3; i++) { funcs[i] = createfunc(i); } (var j = 0; j < 3; j++) { funcs[j](); // , let's run each 1 see } ...