w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
TextWriterTraceListener : can I reset/clear the output log via app.config?
Clearing the logs on appdomain start up is a surprising behavior-- most libraries are reluctant to destroy data. Creating a new file on start up or every-so-often is a more common scenario. If the built in listeners don't meet your needs, try Essential Diagnostics (Extends Systems.Diagnostics tracing) Ref: https://essentialdiagnostics.codeplex.com/wikipage?title=RollingFileTraceListener&referringTitle=FileLogTraceListener Also: https://ukadcdiagnostics.codeplex.com/ And, again, assuming you are using Systems.Diagnostics for legit reasons, then you might consider extending TextWriterTraceListener & overriding the behavior you don't like and replacing it (say by adding file deletion to the constructor). (And someone will recommend switching to log4net or nlog which have more fe

Categories : C#

Magento import reset every 'use default config' for multistores
The easiest way to clean this up is to use the 'Update Attributes' mass action. To to Catalog->ManageProducts. Filter if needed. Hit the 'Select All' link in the top left corner of the grid. Drop down Actions to select 'Update Attributes' and hit Submit (top right corner of grid) At this point you are mass editing all of the products you had selected. In the top left corner select the store view you want to edit. For every attribute you want to update, checkoff 'Change' then check off the 'Use Config Settings' box. When you are satisfied with your edits hit the 'Save' button in the top right hand corner. In Code You can achieve the same thing using the model 'catalog/product_action' like this. Mage::getSingleton('catalog/product_action')->updateAttributes($arrayIds, array('attrib

Categories : Magento

Zoom reset in Firefox not resetting properly
If you're using Windows, Firefox 22 introduces a support for the pixel density you've set on a system level in the windows control panel > appearance > display. You can still go on con firefo config by typing about:config into the firefox address bar, and look for layout.css.devPixelsPerPx. double-click to change its value to 1.0. Reference: http://support.mozilla.org/it/questions/963759#answer-451851

Categories : HTML

font kerning differs in chrome and firefox even after using the reset.css
Browsers tend to vary in their interpretation of font size. Personally I tend to set the body font size to 62.4%, by doing this you can then use ems to set the font size for individual elements when, for example, 1.4em = 14px, 1.8em = 18px, etc. This might work for you. Having said all this... the discrepancy is really tiny... is it really worth all the hassle?? There are more important things in life :)

Categories : HTML

Why is rendered text different sizes on Chrome and Firefox even when using HTML reset?
Each browser has a different translation of what 100% means. Especially IE but also on others. The only way to get truly the same size is to use pixels as your unit of measurement. Then you know it will be consistent.

Categories : CSS

Firefox extension to modify about:config preferences
Although i agree that the best solution for this would be to fix the script that is giving you problems, you might not control that, so here's how you can do it in an extension: Follow the steps on this tutorial from MDN Then, when you have that extension working, you replace the sayHello contents with this very simplistic way of doing what you want: var pref = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); pref.setIntPref("dom.max_script_run_time", 30); This will do what you want.

Categories : Firefox

read "about config" prefrences of mozilla firefox using javascript
I don't think it is possible as a security measure If the browser configuration is exposed to client code like javascript then it could modify the setting to create/expose vulnerabilities

Categories : Javascript

I don't see the Web.Debug.config and Web.Release.config files on my web.config after upgrading my project to VS2012
I found the answer in a post here: how to add files in web.config transformation process? In your "App Data" folder you'll find your publish profiles you created and can right click on them to add a config transform file.

Categories : Visual Studio 2012

ATTiny20 Stuck in Reset Loop after Watchdog Reset
// Disable watchdog on reset void wdt_init(void) __attribute__((naked)) __attribute__((section(".init3"))); void wdt_init(void) { // This is the flag that must be cleared on an ATTiny20 before the WDT can be disabled /***************/ /* RSTFLR = 0; */ /***************? wdt_disable(); return; }

Categories : C

Why explicitly call git reset --soft before git reset (--mixed)
No, there doesn't seem to be any difference. It is more to illustrate the git reset --soft (i.e. moving HEAD only, which can have other more practical uses) git reset HEAD is for "unstaging", and a simple git reset HEAD^ does both (move the HEAD, and unstage, no need for --mixed, since it is the default option) Here is a quick test to see what that looks like: Before (you just switch back to feature, where you committed a "wip" -- work in progress): C:UsersVonCproggit est 3>gl * 6ac95bd - (origin/master, origin/HEAD, master) fix in master (2 minutes ago) <VonC> | * fd8d97d - (HEAD, origin/feature, feature) snap WIP (3 minutes ago) <VonC> | * 16066dd - f1 (3 minutes ago) <VonC> |/ * e8ad96f - f1 (3 minutes ago) <VonC> The reset itself: C:UsersVonCproggit

Categories : GIT

Why won't my reopenClass state reset when I do App.reset?
App.reset only destroys Ember's generated objects. Classes are untouched. You will need to extend the reset method and do this cleanup manually. App = Ember.Application.create({ reset: function() { this._super(); App.Person.people = []; } });

Categories : Ember Js

add and tag to collections in applicationHost.config or web.config using Powershell webadministration module
Without resorting to xml manipulation, the following answer may help you get started with this problem: Add a 'clear' element to WebDAV authoringRules using powershell

Categories : Shell

brew doctor yields python config warning: should I remove these config files? (Mac)
Homebrew mainly uses built-in tools, so formulae generally should be built against system Python anyway. You shouldn't have any problem with them unless you override system Python with Homebrew ones (which is generally not recommended unless you need to do something special).

Categories : Python

override git config --system in .gitconfig user file ( git config --global )
If it is a system wide config, each user can override a config value in his/her global and local settings. But there is no easy way to "deactivate" a setting in a lower config file. Even set it to "" generally has unintended consequences. That very topic was discussed in April 2010. For instance, deactivating the send-email option: True, after thinking a bit about this using no value to unset is a horrible, horrible hack. git-send-email should be corrected to not only check that there is value from config or command line option, but also that it is sane (i.e. non-empty, or simply true-ish if we say that smtpuser = "0" is not something we need to worry about supporting). That would be true for any setting: the diff.c#run_diff_cmd() function will attempt to run an external diff i

Categories : GIT

What is the recommended method of storing EJB configuration? (Java version of app.config/web.config)
There are several ways and depending on what's your deployment structure it may make sense to pick one or another. META-INF/ejb-jar.xml - this is used when the EJBs are inside their own JAR which in turn is part of an EAR. WEB-INF/ejb-jar.xml - this is used when EJBs are part of a WAR. annotations - many configuration options can be specified through annotations on the bean class itself. The above are configurations specific to EJBs. However, some of the resources you mention may be specified in both ejb-jar.xml and web.xml. For reference, try reading the schema file - it's fairly well documented, or something like this.

Categories : Java

mongoDB, could not read from config file -- config in different folder / Uninstall it?
Issue resolved with following steps (thanks to Karl Seguin's 'The Little MongoDB Book'). If you installed MongoDB via the download package from mongodb.org, you have to create create your own config file in /bin. Follow the instructions below (copied from Karl Seguin's book): download package unzip package Create a new text file in the bin subfolder named mongodb.config (if you have permission issues saving the file, save it first to your desktop then move file into folder). Add a single line to your mongodb.config: dbpath=PATH_TO_WHERE_YOU_WANT_TO_STORE_YOUR_DATABASE_FILES. For example, on Windows you might do dbpath=c:mongodbdata and on Linux you might do dbpath=/var/lib/ mongodb/data. Make sure the dbpath you specified exists Launch mongod with the --config /path/to/your/mongodb

Categories : Mongodb

Is there a way to unset a global git config section in a local git config file?
No Git config includes operate: as if its contents had been found at the location of the include directive ref That means you can't override/remove the include itself, as as soon as it's found the contents of the included file are injected/loaded. You can of course override the settings it contains in a more specific config file: # ~/.git.config.team [user] name = name Locally, via git config user.name nic # /some/project/.git/config [user] name = alias Yielding: /some/project $ git config user.name alias /some/project $

Categories : GIT

Updating a config file adds additional config sections
Try changing the ConfigurationSaveMode from ConfigurationSaveMode.Minimal to ConfigurationSaveMode.Modified Modified only saves the properties that you have changed. From MSDN: Full Causes all properties to be written to the configuration file. This is useful mostly for creating information configuration files or moving configuration values from one machine to another. Minimal Causes only properties that differ from inherited values to be written to the configuration file. Modified Causes only modified properties to be written to the configuration file, even when the value is the same as the inherited value.

Categories : C#

codeigniter custom config file calling config data
it seems you create form at wrong place, try to get main controller first: $CI =$ get_instence(); 'rules'=>'required|min_length['.$CI->config->item('min_password_length', 'ion_auth').']'

Categories : Codeigniter

Passing config file as argument to config parse module
start.py ... options.ConfigFile = args.filename ... options.py from ConfigReader import getConfigValue as getVal, ConfigFile def getTest(): Test = getVal('main', 'test') return Test ConfigReader.py import os import ConfigParser ConfigFile='default.cfg' def config(): cfg = ConfigParser.ConfigParser() for f in set(['default.cfg',ConfigFile]):

Categories : Python

Website is not taking connection string from web.config. it is searching for app.config
you can have either a web.config for a web project or an app.config for an application. as alternative you can load in custom configuration files see also http://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.configsource.aspx

Categories : C#

Class Library project in ASP.NET reading from web.config and not app.config
A web application will use web.config. Keep your app settings inside that. A dll specic config file is not required. A windows application will use App.config while a web application will use web.config. If you use your dll in a windows or console application put the setting in app.config. Dlls will always use the config file of the application they are loaded into. If you want to have a dll specific config file, you will have to load it yourself.

Categories : Asp Net

how to properly nest config-sections config-elements?
Took me a while to find the problem. It seems the collections don't know which elementitems to look for in the config file. Therefore Adding an ItemName at the Collections ConfigurationCollection-Attribute will do the trick: ... [ConfigurationCollection(typeof(LoggerRegistration), AddItemName = "LoggerRegistration")] public class LoggerRegistrations : ConfigurationElementCollection { ... . ... [ConfigurationCollection(typeof(LogMapperElement), AddItemName = "LogMapper")] public class LogMappers : ConfigurationElementCollection ... The ItemName must be set to the tagname used in the config file for the collections elements, and be passed via 'AddItemName="..."'

Categories : C#

ConfigurationManager reading wrong file - Web.config instead of App.config
App.config that resides in a Class Library project would not be loaded (at least not without extra effort), the only configuration loaded by the framework is the Client configuration (i.e the Web.config of a project that references and uses your Class Library). See this answer for possible solutions.

Categories : Asp Net Mvc

How do I read a config value in JavaScript where the config value is dynamic?
The syntax you're implying is impossible. I can think of two ways for you to achieve this: Preload all the codes: var preloadedCodeArray = ["<%= ConfigurationManager.AppSettings[line1] %>", "<%= ConfigurationManager.AppSettings[line2] %>", "<%= ConfigurationManager.AppSettings[line3] %>"]; Or via a method that returns the wanted string: var preloadedCodeArray = ["<%= GetAllConfigurationLines() %>"]; Use AJAX calls to retrieve the wanted line (this would require of you to build a specific http-handler for handling the calls and returning the wanted code line). something in the form of: function getConfigLine(lineNum) { var config; $.ajax("../WebConfigLineHandle.ashx?line=" + lineNum, { com

Categories : Javascript

Can I set a conditional compilation constant in a web.config or app.config, if so how?
No, the processor directives are not available in the web.config or app.config files. Edited to add: These files are not actually compiled, and the #debug preprocessor value is used during compilation to tell the compiler what to do.

Categories : C#

What's the difference between require.config and requirejs.config
"requirejs" is just an alias to the same API, since "require" is used by other libraries. From the documentation: If you just want to load some JavaScript files, use the require() API. If there is already a require() in the page, you can use requirejs() to access the RequireJS API for loading scripts. Even though it makes no technical difference, just by convention I would stay with require.config unless you have a naming conflict with some other module loader. Results as of 6-Jun-2013: http://stackoverflow.com/search?q=require.config (609 results) http://stackoverflow.com/search?q=requirejs.config (258 results)

Categories : Javascript

What is the appropriate pattern to ignore *.config except for packages.config in svn?
In a word: You can't... However, if you already have packages.configin your repository, then it won't be ignored even if svn ignore is set to *.config. You can't ignore stuff already in the repository. However, from what you want, it sounds like you can use my pre-commit hook for finer control over your situation. My hook takes a list of rules specified in a control file. For file rules, the last rule that matches the file's name is the access they're granted. In your situation, you would have two rules: [FILE Configuration files must be named "packages.config"] file = **/*.config access = no-add users = @ALL [FILE Configuration files must be named "packages.config"] file = **/packages.config access = read-write users = @ALL If someone tried to add bob.config, to the repository, my f

Categories : Svn

unable to obtain stable firefox connection in 60 seconds ( Windows 7 / Firefox 22
Can you update your 'watir-webdriver' gem to 0.6.4 and check it once. My PC configuration is Windows 7 Professional 64-bit Firefox 22.0 Ruby 1.9.3p392 Ruby 1.9.2p290 (2011-07-09) [i386-mingw32] selenium-webdriver (2.33.0, 2.32.1, 2.32.0) watir-webdriver (0.6.4, 0.6.3)

Categories : Selenium

PHP form reset error after sending the message. How to reset the form after
First thing I would say without even looking at your code would be to do a redirect in your code back to the original URL once processing has finished correctly. This is a standard practice for many types of problems, including keeping someone from refreshing a cart checkout page and having a payment submitted twice. By redirecting to the original page with no parameters being passed, you are essentially clearing out the data yourself.

Categories : PHP

Checkbox in Jquery UI Dialog doesn't appear in Firefox 22.0 and Opera, but it does in Firefox 20.0
there is problem with position i check in fiddle jquery var popUpConf = $('#addFormular').dialog({ resizable: false, draggable: false, dialogClass: 'no-close', modal: true, position: { my: "left top", at: "right bottom", of: window }, width: 'auto', closeOnEscape: false, open: function(event, ui) { $(".ui-dialog-titlebar-close", ui.dialog || ui).hide(); }, buttons: [ { text: "Annuler", click: function() { $(this).dialog("close"); } }, { text: "Valider", click: function() { $(this).dialog("close"); } }] }); add jquery ui and jquery library.

Categories : Javascript

Why is JavaScript slower in a FireFox add-on than in a webpage loaded in FireFox?
There are two preferences (accessible from the about:config page) that control the javascript optimizations: javascript.options.methodjit.chrome for privileged code (extensions) and javascript.options.methodjit.content for untrusted code (web pages). Some versions of Firefox ship with the former disabled by default. Check javascript.options.methodjit.chrome to see if it's set to true.

Categories : Javascript

Code works on Firefox Desktop v 22 but not on Firefox Android v 22
Ok. After regression testing, it boils down to the nicescroll plugin - areaaperta.com/nicescroll removed the init code for this plugin and things have started working.

Categories : Android

Font looks really worse in Firefox: why and how I can write a hack for Firefox?
When I test 13px Arial, it looks slighty lighter in Chrome than in Firefox, rather than the other way around as in your case. Stay tuned to variation across browser versions, platforms, and settings, as regards to font rendering. Usual browser detection techniques could be used in JavaScript to check whether the browser claims to be Firefox and modify CSS code accordingly. But this would be a shot in the dark, partly due to the variation mentioned, partly because there is really nothing you can do to fix the assumed problem. Bolding tends to change the overall appearance of text, not just slighly thicken strokes, and bolding often reduces readability. Ways to avoid creating problems like this: Do not set font size to something as small as 13px. Especially for small font sizes, use black

Categories : CSS

Spring frame work config issue "prefix context for for element context:annotation-config is not bound"
The following works for me: test.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xmlns:mongo="http://www.springframework.org/schema/data/mongo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd http://www.dire

Categories : Java

Prob: SQL Server 2008 R2: Certificates tab not displaying in protocol properties (Server Config->Network Config)
My solution to this was that I was looking in the wrong place. I took these steps to resolve my issue: From SQL Server Configuration Manager, I chose Protocols for MSSQLSERVER, then right clicked on that and chose Properties. From there I found the certificates tab. Choosing the Cert was easy - done. On restarting MSSQL I got an error and it wouldn't start. Quick Bing and traced it to the fact that the account MSSQL is running on didn't have access to that cert. I went to the Cert MMC and then from there I chose the cert, right clicked and went to All Tasks->Manage Private Keys. From there I simply gave access rights to the SQL service account. Restarted the SQL service and voila! Problem solved.

Categories : Sql Server

Merging web.config and other .config files
As no other solutions were suggested, I created a function to modify web.config manually and copy data from smaller configs. Just in case someone finds it useful or suggests a better approach: # Changes web.config: adds into system.serviceModel group data for binding and for endpoint for the webservice Function add-config-source { Param($configFile) if(($configFile -eq "") -or ($configFile -eq $null)) { $errors = $errors + " Error: path to webservice configuration file was not found. "; } # get data from the web service config file $webServiceConfigXml = [xml](get-content $configFile) # cloning elements that we need $bindingNodeClone = $webServiceConfigXml.SelectSingleNode("//binding").Clone(); $endpointNodeClone = $webService

Categories : Dotnet

use root web.config instead of sub-folders web.config
You can use location element example <location path="subdir1"> <system.web> <authorization> <allow users ="*" /> </authorization> </system.web> </location>

Categories : Asp Net

application-config.xml vs mvc-config.xml in spring
Usually the mvc configuration(/WEB-INF/mvc-config.xml) contains the the beans that are needed by the controller layer (e.g. the controllers, view resolvers ...) The application configuration(classpath:spring/application-config.xml) is for the model layer (here you can define daos, services...)

Categories : Spring

Is there a reset.js similar to a reset.css?
Yes, there are polyfills to do exactly that. But there are so many things you'd need to fix that you can't put all fixes in one single script :-) Have a look at the HTML5 Cross Browser Polyfills list. If you're specifically interested in EcmaScript compliance, there are ES5 shims to retrofit missing or incorrectly implemented methods like String::trim; yet they can't fix the engine bugs (identifier-keywords, NFEs, …).

Categories : Javascript

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.