Search Results

Search found 269 results on 11 pages for 'pp'.

Page 3/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Gtk, Trying to set GtkLabel text color (gtkrc).

    - by PP
    Hi all, I have written one small gtkrc file and I am trying to set Text color for GtkLabel, but it is not working out following is the rc file. style "my-theme-label" { xthickness = 10 ythickness = 10 bg[NORMAL] = "#ffffff" bg[ACTIVE] = "#ffffff" bg[PRELIGHT] = "#ffffff" bg[SELECTED] = "#ffffff" bg[INSENSITIVE] = "#ffffff" fg[NORMAL] = "#ffffff" fg[INSENSITIVE] = "#ffffff" fg[PRELIGHT] = "#ffffff" fg[SELECTED] = "#ffffff" fg[ACTIVE] = "#ffffff" text[NORMAL] = "#ffffff" text[INSENSITIVE] = "#434346" text[PRELIGHT] = "#ffffff" text[SELECTED] = "#ffffff" text[ACTIVE] = "#ffffff" base[NORMAL] = "#000000" base[INSENSITIVE] = "#00ff00" base[PRELIGHT] = "#0000ff" base[SELECTED] = "#ff00ff" base[ACTIVE] = "#f39638" } widget_class "*<GtkLabel>" style "my-theme-label" My application uses 2 rc files and I have added my rc file using gtk_rc_add_default_file( rcfile ); but this style is not getting set to GtkLabel. Also i tried to create different style for same type of widgets. as follows but in some cases it works and in some it does not work. style "my-button-style-black" { ... } style "my-button-style-white" { ... } widget "*.MyWhiteButton" style "my-button-style-white" widget "*.MyBlackButton" style "my-button-style-black" GtkButton *button = gtk_button_new_with_label("Test"); gtk_widget_set_name(button, "MyWhiteButton"); Is it right? It is not working out. Is it because I am using 2 rc files? Thanks, PP.

    Read the article

  • Puppet - Possible to use software design patterns in modules?

    - by Mike Purcell
    As I work with puppet, I find myself wanting to automate more complex setups, for example vhosts for X number of websites. As my puppet manifests get more complex I find it difficult to apply the DRY (don't repeat yourself) principle. Below is a simplified snippet of what I am after, but doesn't work because puppet throws various errors depending up whether I use classes or defines. I'd like to get some feed back from some seasoned puppetmasters on how they might approach this solution. # site.pp import 'nodes' # nodes.pp node nodes_dev { $service_env = 'dev' } node nodes_prod { $service_env = 'prod' } import 'nodes/dev' import 'nodes/prod' # nodes/dev.pp node 'service1.ownij.lan' inherits nodes_dev { httpd::vhost::package::site { 'foo': } httpd::vhost::package::site { 'bar': } } # modules/vhost/package.pp class httpd::vhost::package { class manage($port) { # More complex stuff goes here like ensuring that conf paths and uris exist # As well as log files, which is I why I want to do the work once and use many notify { $service_env: } notify { $port: } } define site { case $name { 'foo': { class 'httpd::vhost::package::manage': port => 20000 } } 'bar': { class 'httpd::vhost::package::manage': port => 20001 } } } } } That code snippet gives me a Duplicate declaration: Class[Httpd::Vhost::Package::Manage] error, and if I switch the manage class to a define, and attempt to access a global or pass in a variable common to both foo and bar, I get a Duplicate declaration: Notify[dev] error. Any suggestions how I can implement the DRY principle and still get puppet to work? -- UPDATE -- I'm still having a problem trying to ensure that some of my vhosts, which may share a parent directory, are setup correctly. Something like this: node 'service1.ownij.lan' inherits nodes_dev { httpd::vhost::package::site { 'foo_sitea': } httpd::vhost::package::site { 'foo_siteb': } httpd::vhost::package::site { 'bar': } } What I need to happen is that sitea and siteb have the same parent "foo" folder. The problem I am having is when I call a define to ensure the "foo" folder exists. Below is the site define as I have it, hopefully it will make sense what I am trying to accomplish. class httpd::vhost::package { File { owner => root, group => root, mode => 0660 } define site() { $app_parts = split($name, '[_]') $app_primary = $app_parts[0] if ($app_parts[1] == '') { $tpl_path_partial_app = "${app_primary}" $app_sub = '' } else { $tpl_path_partial_app = "${app_primary}/${app_parts[1]}" $app_sub = $app_parts[1] } include httpd::vhost::log::base httpd::vhost::log::app { $name: app_primary => $app_primary, app_sub => $app_sub } } } class httpd::vhost::log { class base { $paths = [ '/tmp', '/tmp/var', '/tmp/var/log', '/tmp/var/log/httpd', "/tmp/var/log/httpd/${service_env}" ] file { $paths: ensure => directory } } define app($app_primary, $app_sub) { $paths = [ "/tmp/var/log/httpd/${service_env}/${app_primary}", "/tmp/var/log/httpd/${service_env}/${app_primary}/${app_sub}" ] file { $paths: ensure => directory } } } The include httpd::vhost::log::base works fine, because it is "included", which means it is only implemented once, even though site is called multiple times. The error I am getting is: Duplicate declaration: File[/tmp/var/log/httpd/dev/foo]. I looked into using exec, but not sure this is the correct route, surely others have had to deal with this before and any insight is appreciated as I have been grappling with this for a few weeks. Thanks.

    Read the article

  • puppet variables

    - by Joey Bagodonuts
    I am trying to use variables in my modules manifest.pp with little luck class mysoftware($version="dev-2011.02.04b") { File { links => follow } file { "/opt/mysoftware": ensure => directory } file { "/opt/mysoftware/share": source => "puppet://puppet/mysoftware/air/$version", recurse => "true", } } This does not seem to be working when I assign this to a node via the nodes.pp file. I am running puppetmaster 2.6.4 puppetd clients are 0.25

    Read the article

  • How to access variables in an erb-subtemplate in puppet?

    - by c33s
    example.pp $foo = 'bar' $content = template('mymodule/maintemplate.erb') maintemplate.erb <% bar = foo + "extra" %> foobar = scope_function_template(['mymodule/subtemplate.erb']) subtemplate.erb <%# here i want to access the variable bar %> <%= bar %> there is the function <%= scope.lookupvar('::bar') %> is there a kind of parent::bar in erb templateing, or can i pass some variables to the subtemplate, or can i only access the outer variable (of the .pp file) with ::foo

    Read the article

  • Dumping mod_perlified variables--what's the local namespace?

    - by Kev
    I have a mod_perl script: use strict; use warnings FATAL => 'all'; use 5.010001; my $face = 'ugly'; use Data::Dump qq(pp); die pp($ModPerl::ROOT::ModPerl::Registry::C_3a_www_test_2epl::face); It dies undef at C:/www/test.pl line 8. I was expecting "ugly" at C:/www/test.pl line 8. If instead I die pp(%ModPerl::ROOT::ModPerl::Registry::C_3a_www_test_2epl::); ...after restarting the service to clear any cached variables, face is not even listed. I could have sworn this code was working the last time I used it...I wrote a whole die hook around this way of naming local variables so that I could get at certain local variables to dump debug information. What's the local namespace?

    Read the article

  • How to return the output of a recursive function in Clojure

    - by Silanglaya Valerio
    Hi everyone! I'm new to functional languages and clojure, so please bear with me... I'm trying to construct a list of functions, with either random parameters or constants. The function that constructs the list of functions is already working, though it doesn't return the function itself. I verified this using println. Here is the snippet: (def operations (list #(- %1 %2) #(+ %1 %2) #(* %1 %2) #(/ %1 %2))) (def parameters (list \u \v \w \x \y \z)) (def parameterlistcount 6) (def paramcount 2) (def opcount 4) (defn generateFunction "Generates a random function list" ([] (generateFunction 2 4 0.5 0.6 '())) ([pc maxdepth fp pp function] (if (and (> maxdepth 0) (< (rand) fp)) (dotimes [i 2] (println(conj (generateFunction pc (dec maxdepth) fp pp function) {:op (nth operations (rand-int opcount))}))) (if (and (< (rand) pp) (> pc 0)) (do (dec pc) (conj function {:param (nth parameters (rand-int parameterlistcount))})) (conj function {:const (rand-int 100)}))))) Any help will be appreciated, thanks!

    Read the article

  • Real thing about "->" and "."

    - by fsdfa
    I always wanted to know what is the real thing difference of how the compiler see a pointer to a struct (in C suppose) and a struct itself. struct person p; struct person *pp; pp->age, I always imagine that the compiler does: "value of pp + offset of atribute "age" in the struct". But what it does with person.p? It would be almost the same. For me "the programmer", p is not a memory address, its like "the structure itself", but of course this is not how the compiler deal with it. My guess is it's more of a syntactic thing, and the compiler always does (&p)->age. I'm correct?

    Read the article

  • Passing arguments stored in a file when running projects in Netbeans

    - by oderebek
    My problem is that I can't remember how I can pass the arguments when running a project in netbeans. There is not enough documentation on web if anybody could help it would be highly appreciated. Here is what I know, you can change the run configurations under run Set Project Configuration Default Configuration there there is a entry space where zou can enter the arguments to be passed. I have a file called "AsciiShop.java" which to be runned and I need to pass the arguments stored in a file called "asciishop-A04-PP.i1". When I am using terminal or cmd.exe I can run the program with java AsciiShop < asciishop-A04-PP.i1 and it works perfect. I want to be able to the same on netbeans. I have placed the file in the default working directory which contains src and bin folders. What should I write in the arguments entry field on the project configurations window, so that it works same like java AsciiShop < asciishop-A04-PP.i1

    Read the article

  • Better ways to print out column names when using cx_Oracle

    - by philipjkim
    Found an example using cx_Oracle, this example shows all the information of Cursor.description. import cx_Oracle from pprint import pprint connection = cx_Oracle.Connection("%s/%s@%s" % (dbuser, dbpasswd, oracle_sid)) cursor = cx_Oracle.Cursor(connection) sql = "SELECT * FROM your_table" cursor.execute(sql) data = cursor.fetchall() print "(name, type_code, display_size, internal_size, precision, scale, null_ok)" pprint(cursor.description) pprint(data) cursor.close() connection.close() What I wanted to see was the list of Cursor.description[0](name), so I changed the code: import cx_Oracle import pprint connection = cx_Oracle.Connection("%s/%s@%s" % (dbuser, dbpasswd, oracle_sid)) cursor = cx_Oracle.Cursor(connection) sql = "SELECT * FROM your_table" cursor.execute(sql) data = cursor.fetchall() col_names = [] for i in range(0, len(cursor.description)): col_names.append(cursor.description[i][0]) pp = pprint.PrettyPrinter(width=1024) pp.pprint(col_names) pp.pprint(data) cursor.close() connection.close() I think there will be better ways to print out the names of columns. Please get me alternatives to the Python beginner. :-)

    Read the article

  • Which field is explain telling me to index?

    - by shady
    I don't understand what this explain statement is saying. Which field needs an index?. The first line to me is confusing because ref is null. Here's the query I'm using: SELECT pp.property_id AS 'good_prop_id', pr.site_number AS 'pr.site_number', CONCAT(pr.site_street_name, ' ', pr.site_street_type) AS 'pr.partial_addr', pr.county FROM realval_newdb.preforeclosures AS pr INNER JOIN realval_newdb.properties_preforeclosures AS pp USE INDEX (mee_id) ON (pr.mee_id = pp.mee_id) INNER JOIN listings_copy AS lc ON (pr.site_number = lc.site_number) AND (lc.site_street_name = CONCAT(pr.site_street_name, ' ', pr.site_street_type)) WHERE lc.site_county = pr.county LIMIT 1; Can anyone help me optimize this query?

    Read the article

  • ColdFusion Timeout Error

    - by Jason
    I have a scheduled task that runs once a day that builds an XML file that I pass off to another group. Recently the amount of data has greatly increased and is now causing the task to time out (I think). I have tried to optimize my script as much as possible but with no luck. It times out long before an hour and I don't get any kind of ColdFusion error. Instead I get a "This page cannot be found" after it runs. Could this be a timeout someplace other than Coldfusion? Is there a more efficient way to build this XML file? select PersonID, FirstName, LastName from People select d.DepartmentID, DepartmentName, pd.PersonID from Department d inner join PersonDepartment pd on d.DepartmentID = pd.DepartmentID select PaperID, PaperTitle, PaperDescription, pp.PersonID from Paper p inner join PersonPaper pp on p.PaperID = pp.PaperID select DepartmentID, DepartmentName from getDepartments where PersonID = #getPeople.PersonID# select PaperID, PaperDescription from getpapers where PersonID = #getPeople.PersonID# #getPeople.PersonID# #getPeople.Firstname# #getPeople.LastName# #getPersonDepartments.DepartmentID# #getPersonDepartments.DepartmentName# #getPersonPapers.PaperID# #getPersonPapers.PaperDescription# Done!

    Read the article

  • How to use unlinked result of linq?

    - by user46503
    Hello, for example I'm trying to get the data from database like: using (ExplorerDataContext context = new ExplorerDataContext()) { ObjectQuery<Store> stores = context.Store; ObjectQuery<ProductPrice> productPrice = context.ProductPrice; ObjectQuery<Product> products = context.Product; res = from store in stores join pp in productPrice on store equals pp.Store join prod in products on pp.Product equals prod select store; } After this code I cannot transfer the result to some another method because the context doesn't exist more. How could I get the unlinked result independent on the context? Thanks

    Read the article

  • Pixel Perfect Collision Detection in Cocos2dx

    - by Happybirthday
    I am trying to port the pixel perfect collision detection in Cocos2d-x the original version was made for Cocos2D and can be found here: http://www.cocos2d-iphone.org/forums/topic/pixel-perfect-collision-detection-using-color-blending/ Here is my code for the Cocos2d-x version bool CollisionDetection::areTheSpritesColliding(cocos2d::CCSprite *spr1, cocos2d::CCSprite *spr2, bool pp, CCRenderTexture* _rt) { bool isColliding = false; CCRect intersection; CCRect r1 = spr1-boundingBox(); CCRect r2 = spr2-boundingBox(); intersection = CCRectMake(fmax(r1.getMinX(),r2.getMinX()), fmax( r1.getMinY(), r2.getMinY()) ,0,0); intersection.size.width = fmin(r1.getMaxX(), r2.getMaxX() - intersection.getMinX()); intersection.size.height = fmin(r1.getMaxY(), r2.getMaxY() - intersection.getMinY()); // Look for simple bounding box collision if ( (intersection.size.width0) && (intersection.size.height0) ) { // If we're not checking for pixel perfect collisions, return true if (!pp) { return true; } unsigned int x = intersection.origin.x; unsigned int y = intersection.origin.y; unsigned int w = intersection.size.width; unsigned int h = intersection.size.height; unsigned int numPixels = w * h; //CCLog("Intersection X and Y %d, %d", x, y); //CCLog("Number of pixels %d", numPixels); // Draw into the RenderTexture _rt-beginWithClear( 0, 0, 0, 0); // Render both sprites: first one in RED and second one in GREEN glColorMask(1, 0, 0, 1); spr1-visit(); glColorMask(0, 1, 0, 1); spr2-visit(); glColorMask(1, 1, 1, 1); // Get color values of intersection area ccColor4B *buffer = (ccColor4B *)malloc( sizeof(ccColor4B) * numPixels ); glReadPixels(x, y, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buffer); _rt-end(); // Read buffer unsigned int step = 1; for(unsigned int i=0; i 0 && color.g 0) { isColliding = true; break; } } // Free buffer memory free(buffer); } return isColliding; } My code is working perfectly if I send the "pp" parameter as false. That is if I do only a bounding box collision but I am not able to get it working correctly for the case when I need Pixel Perfect collision. I think the opengl masking code is not working as I intended. Here is the code for "_rt" _rt = CCRenderTexture::create(visibleSize.width, visibleSize.height); _rt-setPosition(ccp(origin.x + visibleSize.width * 0.5f, origin.y + visibleSize.height * 0.5f)); this-addChild(_rt, 1000000); _rt-setVisible(true); //For testing I think I am making a mistake with the implementation of this CCRenderTexture Can anyone guide me with what I am doing wrong ? Thank you for your time :)

    Read the article

  • ASSIMP in my program is much slower to import than ASSIMP view program

    - by Marco
    The problem is really simple: if I try to load with the function aiImportFileExWithProperties a big model in my software (around 200.000 vertices), it takes more than one minute. If I try to load the very same model with ASSIMP view, it takes 2 seconds. For this comparison, both my software and Assimp view are using the dll version of the library at 64 bit, compiled by myself (Assimp64.dll). This is the relevant piece of code in my software // default pp steps unsigned int ppsteps = aiProcess_CalcTangentSpace | // calculate tangents and bitangents if possible aiProcess_JoinIdenticalVertices | // join identical vertices/ optimize indexing aiProcess_ValidateDataStructure | // perform a full validation of the loader's output aiProcess_ImproveCacheLocality | // improve the cache locality of the output vertices aiProcess_RemoveRedundantMaterials | // remove redundant materials aiProcess_FindDegenerates | // remove degenerated polygons from the import aiProcess_FindInvalidData | // detect invalid model data, such as invalid normal vectors aiProcess_GenUVCoords | // convert spherical, cylindrical, box and planar mapping to proper UVs aiProcess_TransformUVCoords | // preprocess UV transformations (scaling, translation ...) aiProcess_FindInstances | // search for instanced meshes and remove them by references to one master aiProcess_LimitBoneWeights | // limit bone weights to 4 per vertex aiProcess_OptimizeMeshes | // join small meshes, if possible; aiProcess_SplitByBoneCount | // split meshes with too many bones. Necessary for our (limited) hardware skinning shader 0; cout << "Loading " << pFile << "... "; aiPropertyStore* props = aiCreatePropertyStore(); aiSetImportPropertyInteger(props,AI_CONFIG_IMPORT_TER_MAKE_UVS,1); aiSetImportPropertyFloat(props,AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE,80.f); aiSetImportPropertyInteger(props,AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_LINE | aiPrimitiveType_POINT); aiSetImportPropertyInteger(props,AI_CONFIG_GLOB_MEASURE_TIME,1); //aiSetImportPropertyInteger(props,AI_CONFIG_PP_PTV_KEEP_HIERARCHY,1); // Call ASSIMPs C-API to load the file scene = (aiScene*)aiImportFileExWithProperties(pFile.c_str(), ppsteps | /* default pp steps */ aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes aiProcess_Triangulate | // triangulate polygons with more than 3 edges //aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space aiProcess_SortByPType | // make 'clean' meshes which consist of a single typ of primitives 0, NULL, props); aiReleasePropertyStore(props); if(!scene){ cout << aiGetErrorString() << endl; return 0; } this is the relevant piece of code in assimp view code // default pp steps unsigned int ppsteps = aiProcess_CalcTangentSpace | // calculate tangents and bitangents if possible aiProcess_JoinIdenticalVertices | // join identical vertices/ optimize indexing aiProcess_ValidateDataStructure | // perform a full validation of the loader's output aiProcess_ImproveCacheLocality | // improve the cache locality of the output vertices aiProcess_RemoveRedundantMaterials | // remove redundant materials aiProcess_FindDegenerates | // remove degenerated polygons from the import aiProcess_FindInvalidData | // detect invalid model data, such as invalid normal vectors aiProcess_GenUVCoords | // convert spherical, cylindrical, box and planar mapping to proper UVs aiProcess_TransformUVCoords | // preprocess UV transformations (scaling, translation ...) aiProcess_FindInstances | // search for instanced meshes and remove them by references to one master aiProcess_LimitBoneWeights | // limit bone weights to 4 per vertex aiProcess_OptimizeMeshes | // join small meshes, if possible; aiProcess_SplitByBoneCount | // split meshes with too many bones. Necessary for our (limited) hardware skinning shader 0; aiPropertyStore* props = aiCreatePropertyStore(); aiSetImportPropertyInteger(props,AI_CONFIG_IMPORT_TER_MAKE_UVS,1); aiSetImportPropertyFloat(props,AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE,g_smoothAngle); aiSetImportPropertyInteger(props,AI_CONFIG_PP_SBP_REMOVE,nopointslines ? aiPrimitiveType_LINE | aiPrimitiveType_POINT : 0 ); aiSetImportPropertyInteger(props,AI_CONFIG_GLOB_MEASURE_TIME,1); //aiSetImportPropertyInteger(props,AI_CONFIG_PP_PTV_KEEP_HIERARCHY,1); // Call ASSIMPs C-API to load the file g_pcAsset->pcScene = (aiScene*)aiImportFileExWithProperties(g_szFileName, ppsteps | /* configurable pp steps */ aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes aiProcess_Triangulate | // triangulate polygons with more than 3 edges aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space aiProcess_SortByPType | // make 'clean' meshes which consist of a single typ of primitives 0, NULL, props); aiReleasePropertyStore(props); As you can see the code is nearly identical because I copied from assimp view. What could be the reason for such a difference in performance? The two software are using the same dll Assimp64.dll (compiled in my computer with vc++ 2010 express) and the same function aiImportFileExWithProperties to load the model, so I assume that the actual code employed is the same. How is it possible that the function aiImportFileExWithProperties is 100 times slower when called by my sotware than when called by assimp view? What am I missing? I am not good with dll, dynamic and static libraries so I might be missing something obvious. ------------------------------ UPDATE I found out the reason why the code is going slower. Basically I was running my software with "Start debugging" in VC++ 2010 Express. If I run the code outside VC++ 2010 I get same performance of assimp view. However now I have a new question. Why does the dll perform slower in VC++ debugging? I compiled it in release mode without debugging information. Is there any way to have the dll go fast in debugmode i.e. not debugging the dll? Because I am interested in debugging only my own code, not the dll that I assume is already working fine. I do not want to wait 2 minutes every time I want to load my software to debug. Does this request make sense?

    Read the article

  • Excel data into PowerPoint slides

    - by nqw1
    I have already found some helpful sites but I'm still unable to do what I want. My Excel file contains few columns and multiple rows. All the data from one row would be in one slide but data from different cells in that one row should go to a specific elements in PP slide. At first, is it possible to export data from an Excel cell into a specific text box in PP? For example, I would like to have all data from the first column of each row go to a Text box 1. Let's say I have 100 rows so I would have 100 slides and each slide would have Text bow 1 with correct data. Text box of slide 66 would have data from the first column of row 66. Then all data from the second column of each row would go to a text bow 2 and so on. I tried to do some macros with bad success. I also tried to use Word outlines and export them into PP (New slide - Slides from Outline) but there seems to be a bug since I got 250 pages of gibberish. I had only two paragraphs and both had one word. First paragraph used Heading 1 style and second paragraph used Normal style. Sites what I have found, use VB and/or some other programming language to create slides from Excel sheets. I have tried to add those VB codes into my macros but none of them hasn't worked so far. Probably I just don't know how to use them correctly :) Here's some helpful sites: VBA: Create PowerPoint Slide for Each Row in Excel Workbook Creating a Presentation Report Based on Data Question in Stackoverflow I use Office 2011 on Mac. Any help would be appreciated!

    Read the article

  • How to write re-usable puppet definitions?

    - by Oliver Probst
    I'd like to write a puppet manifest to install and configure an application on target servers. Parts of this manifest shall be re-usable. Thus I used define for defining my re-usable functionality. Doing so, I've always the problem that there are parts of the definition which are not re-usable. A simple example is a bunch of configuration files to be created. These file must be placed in the same directory. This directory must be created only once. Example: nodes.pp node 'myNode.in.a.domain' { mymodule::addconfig {'configfile1.xml': param => 'somevalue', } mymodule::addconfig {'configfile2.xml': param => 'someothervalue', } } mymodule.pp define mymodule::addconfig ($param) { $config_dir = "/the/directory/" #ensure that directory exits: file { $config_dir: ensure => directory, } #create the configuration file: file { $name: path => "${config_dir}/${name}" content => template('a_template.erb'), require => File[$config_dir], } } This example will fail, because now the resource file {$config_dir: is defined twice. As far as I understood, it is required to extract these parts into a class. Then it looks like this: nodes.pp node 'myNode.in.a.domain' { class { 'mymodule::createConfigurationDirectory': } mymodule::addconfig {'configfile1.xml': param => 'somevalue', require => Class ['mymodule::createConfigurationDirectory'], } mymodule::addconfig {'configfile2.xml': param => 'someothervalue', require => Class ['mymodule::createConfigurationDirectory'], } } But this makes my interface hard use. Every user of my module has to know, that there is a class which is additionally required. For this simple use case the additional class might be acceptable. But with growing module complexity (lots of definitions) I'm a bit afraid of confusing the modules user. So I'd like to know is there a better way to handle this dependencies. Ideally, classes like createConfigurationDirectory are hidden from the user of the modules api. Or are there some other "Best Practices"/Patterns handling such dependencies?

    Read the article

  • Referencing groups/classes from Puppet dashboard in my site manifest

    - by Banjer
    I'm using Puppet Dashboard as my ENC and I'm not sure how to reference or use class and group classifications from /etc/puppet/manifests/site.pp. I have two groups defined in the dashboard: CentOS6 and SLES11. What should my site.pp look like if I want to include a certain list of modules in the CentOS6 group and a certain list of modules in the SLES11 group? I'm trying to do something like this: # /etc/puppet/manifests/site.pp node basenode { include hosts include ssh::server include ssh::client include authentication include sudo include syslog include mail } node 'CentOS6' inherits basenode { include profile } node 'SLES11' inherits basenode { include usrmounts } I have OS-specific case statements within my modules, but there are some modules that will only be applied to a certain distro. So I suppose I have two questions: Is this the best way to apply modules/resources in an OS-specific manner? Or does the above make you want to vomit? Regardless of #1, I'm still curious as how to reference classes, groups, and nodes from Dashboard within my manifests. I've read the External Nodes doc, but I'm not seeing how they correspond to manifests. Thanks all.

    Read the article

  • VirtualHost on WAMPSERVER not working

    - by Martin C
    I currently have WAMPSERVER 2.2 set up on my PC. I'm trying to set up a new host called pplocal.local I made the changes in httpd.conf to uncomment this: Include conf/extra/httpd-vhosts.conf Then, I edited httpd-vhosts.cong and I added the following: NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "E:/wamp2/www/" ServerName localhost </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "E:/wamp2/www/pp/" ServerName pplocal.local <Directory "E:/wamp2/www/pp/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> CustomLog "E:\wamp2\logs\pplocal-access.log" common ErrorLog "E:\wamp2\logs\pplocal-error.log" Im my windows 'hosts' file I added: 127.0.0.1 localhost 127.0.0.1 pplocal.local Then, I restarted apache. If I type localhost in my browser I get the files at E:/wamp2/www/ If I type pplocal.local in my browser I get the files at E:/wam2/www/ instead of those at E:/wamp2/www/pp/ I have followed several tutorials and can't see what I'm doing wrong. I'm new to editing the files associated with apache so any advice is appreciated. Thanks

    Read the article

  • Puppet : How to override / redefine outside child class (usecase and example detailled)

    - by alex8657
    The use case i try to illustrate is when to declare some item (eq mysqld service) with a default configuration that could be included on every node (class stripdown in the example, for basenode), and still be able to override this same item in some specific class (eg mysql::server), to be included by specific nodes (eg myserver.local) I illustrated this use case with the example below, where i want to disable mysql service on all nodes, but activate it on a specific node. But of course, Puppet parsing fails because the Service[mysql] is included twice. And of course, class mysql::server bears no relation to be a child of class stripdown Is there a way to override the Service["mysql"], or mark it as the main one, or whatever ? I was thinking about the virtual items and the realize function, but it only permits apply an item multiple times, not to redefine or override. # In stripdown.pp : class stripdown { service {"mysql": enable => "false", ensure => "stopped" } } # In mysql.pp : class mysql::server { service { mysqld: enable => true, ensure => running, hasrestart => true, hasstatus => true, path => "/etc/init.d/mysql", require => Package["mysql-server"], } } # Then nodes in nodes.pp : node basenode { include stripdown } node myserver.local inherits basenode { include mysql::server` # BOOM, fails here because of Service["mysql"] redefinition }

    Read the article

  • How do I copy/clone a dynamic disk in Windows 7?

    - by PP
    I have some dynamic disks (or "partitions" but they are not really partitions) that I want to copy onto spare hard drives. I tried using gpartd (and fdisk for that matter) from a linux live disc. All it saw was hard drives with only one partition encasing the whole hard drive. So gpartd/fdisk is incapable of identifying the dynamic "partitions" and allowing me to copy them. Any tools that can be used to clone/copy a dynamic "partition"? (I'm open to commercial software suggestions if they can do the job).

    Read the article

  • Debian Squeeze Upgrade Breaks Apache SSL

    - by PP
    I upgraded my Debian from Lenny to Squeeze. BIG MISTAKE. Now I get: [Tue Feb 08 16:34:57 2011] [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0) littered throughout /var/log/apache2/error.log. How to fix? Looking through a mess of forums it is easy to see that Apache changed the way it reads configurations around 2.2.13. Great. But not great for me or the millions of other web administrators who now have web servers that simply won't start, and an error message that says NOTHING about the problem or how to fix. Anybody else actually solved this issue? I had perfectly working virtual servers with SSL before (for years actually).

    Read the article

  • Is Firefox less vulnerable to exploit when running NoScript?

    - by PP
    The article titled "iPhone, IE, Firefox, Safari get stomped at hacker contest" at The Register website discusses that Firefox can be exploited. I wonder if NoScript protects against the kind of exploits written about; or whether the browser can be exploited regardless of having the extension loaded. Any opinions? Might make this a community wiki given that it's not simple problem/solution post.

    Read the article

  • Big IP F5 Basics (show run/show conf/term len 0)

    - by PP
    I've tried to find the basics in a Big IP manual but it seems to me the device is marketed towards GUI users only. Meanwhile I want to write a few scripts to automate tasks on the load balancer. Namely: how do I turn off more - when I issue a command I want the output to stream out without waiting for me to press a key for the next page how do I show the running configuration (I think list all is the way to do it but cannot find it documented anywhere) Thanks!

    Read the article

  • IIS restart causes many Connection_Abandoned_By_AppPool messages in log

    - by PP
    After about half a day the IIS 6.0 ASP (VBScript) web server appears to die. It accepts TCP connections (i.e. I can telnet localhost 80 successfully) however it does not return any response. When I restart the server (going through My Computer - Manage - IIS - All Tasks - Restart) I get a lot of entries in C:\WINDOWS\system32\LogFiles\HTTPERR\httperr1.log at the time of restart that say: ... 80 HTTP/1.1 GET / - 843545307 Connection_Abandoned_By_AppPool DefaultAppPool ... 80 HTTP/1.0 GET / - 843545307 Connection_Abandoned_By_AppPool DefaultAppPool ... 80 HTTP/1.0 GET / - 843545307 Connection_Abandoned_By_AppPool DefaultAppPool where the ... refers to the prefix of the line, e.g. 2010-03-17 10:05:06 127.0.0.1 4927 127.0.0.1 80 There are 583 such lines (Connection_Abandoned_By_AppPool) in my log at time of restart. What could be the cause of this problem?

    Read the article

  • Windows 7 Start Menu All Programs - display all folders, not just a single scrollable column

    - by PP
    In Windows 95/XP/Vista I could click on the start menu, "All Programs", and I would get a list of all my programs. In Windows 7 when I click start menu, "All Programs", I get a single column with a scroll bar - but that's not what I want, I want to see All Programs. How do I do this? I've looked in the start menu options but cannot find an option that appears to show me all my programs.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >