Skip to content

Instantly share code, notes, and snippets.

View mayank33's full-sized avatar

Mayank Agrawal mayank33

  • IIIT HYDERABAD
  • India
View GitHub Profile
rashad@lsi:/var/repos$ cat hgweb.config
[web]
style = gitweb
allow_push = rashad,rajan
push_ssl = false
allowbz2 = yes
allowgz = yes
allowzip = yes
[paths]
/ = /var/repos/**
#!/usr/bin/env python
#
# An example CGI script to export multiple hgweb repos, edit as necessary
# adjust python path if not a system-wide install:
#import sys
#sys.path.insert(0, "/path/to/python/lib")
# enable importing on demand to reduce startup time
from mercurial import demandimport; demandimport.enable()
rashad@lsi:~$ ls
02-07-2013 gdal httpd lsiviewer-v2 ossim-debian-files.tar.gz public_html redmine_embedded_video vrgeo
data grass local new_deb_files packages rashad.key sources_lsiviewer_github wgis.cpp_jun_2015
ext.tar grass-debian_new lsiviewer ossim-debian-files pg.cpp redmine-2.0 v2 wt
rashad@lsi:~$ cd /var/repos
rashad@lsi:/var/repos$ ls
hgweb.config hgweb.config~ hgwebdir.cgi hgwebdir.fcgi lsiviewer ossimVector vrgeo vrgeo_resources workspace
rashad@lsi:/var/repos$
for (std::vector<std::string>::iterator it=list.begin(); it != list.end(); ++it)
{
std::cout<<(((mod->findById("Main")))->findById(d))->text()<<std::endl;
}
@mayank33
mayank33 / pstream output
Created July 6, 2016 16:44
pstream output
Load result: No error
Cleaning up temporary files...
Starting GRASS GIS...
__________ ___ __________ _______________
/ ____/ __ \/ | / ___/ ___/ / ____/ _/ ___/
/ / __/ /_/ / /| | \__ \\_ \ / / __ / / \__ \
/ /_/ / _, _/ ___ |___/ /__/ / / /_/ // / ___/ /
\____/_/ |_/_/ |_/____/____/ \____/___//____/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task SYSTEM "grass-interface.dtd">
<task name="v.buffer">
<description>
Creates a buffer around vector features of given type.
</description>
<keywords>
vector, buffer, area, circle, geometry, line, grow, shrink
</keywords>
<parameter name="input" type="string" required="yes" multiple="no">
/home/mayank/Dropbox/Github/webgrass/src/MenuItem.cpp: In constructor ‘MenuItem::MenuItem(std::string)’:
/home/mayank/Dropbox/Github/webgrass/src/MenuItem.cpp:3:33: error: no matching function for call to ‘Wt::WMenuItem::WMenuItem()’
MenuItem::MenuItem(std::string k)
^
/home/mayank/Dropbox/Github/webgrass/src/MenuItem.cpp:3:33: note: candidates are:
In file included from /home/mayank/Dropbox/Github/webgrass/src/MenuItem.h:17:0,
from /home/mayank/Dropbox/Github/webgrass/src/MenuItem.cpp:1:
/usr/include/Wt/WMenuItem:344:3: note: Wt::WMenuItem::WMenuItem(bool, const Wt::WString&)
WMenuItem(bool separator, const WString& text);
^
MenuItem *item1 = new MenuItem(menu_items_menu_items_menuitem_node.child_value("command"));
nextLevel->addItem(item1);
item1->triggered().connect(this, &MainUI::click);
MenuItem.h
#include <stdlib.h>
#include <fstream>
#include <iostream>
pugi::xml_node menu_items_menu_node = menu_items_node.child("menu");
while( menu_items_menu_node ) {
/* submenu creation */
Wt::WPopupMenu *nextLevel = new Wt::WPopupMenu();
firstLevel->addMenu(menu_items_menu_node.child_value("label"), nextLevel);
/* iteration over second occurance of items */
pugi::xml_node menu_items_menu_items_node = menu_items_menu_node.child("items");
while ( menu_items_menu_items_node ) {
/* iteration over internal occurance of menuitem */
pugi::xml_node menu_items_menu_items_menuitem_node = menu_items_menu_items_node.child("menuitem");
@mayank33
mayank33 / Menu
Created June 17, 2016 11:41
Menu
#include <stdlib.h>
#include <fstream>
#include <iostream>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem.hpp>
#include <Wt/WContainerWidget>
#include <Wt/WHBoxLayout>