w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How does web.config files works in C# works?
Configuration transformation is only done when publishing. Your base configuration file should have your development settings. If you choose to use the default build configurations, normally the release transform file should contain your production environment settings and the debug transform file will contain your test environment settings. Personally, I usually create a new build configuration for testing and for production and leave the debug and release transforms empty.

Categories : C#

Original back button in iOS navigation bar shows briefly after replacing it with a custom one
I am testing your code now. It all seems to be working well. But I would definitely call this first: self.navigationItem.hidesBackButton = YES; After you call this then create your new leftBarButtonItem. The full code that I used is below: self.navigationItem.hidesBackButton = YES; self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Hi" style:UIBarButtonItemStylePlain target:self action:@selector(triggerBackNavigation:)]; I know you're using an image but I just used a button with text to see if it works properly.

Categories : Iphone

Why client config shows wsHttpBinding when I have customBinding on server?
Probably your custom binding is configured in a way that macthed the WSHttpBinding capabilities. According WCF Binding converter, this is the custom binding that matches ws http default settings: <customBinding> <binding name="NewBinding0"> <transactionFlow /> <security authenticationMode="SecureConversation" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" /> </security> <textMessageEncoding /> <httpTransport /> </binding> &l

Categories : C#

{{ oauth_token }} shows up and works in source but not on the page
You have an error in the onclick part of the a tag, see the url begins with http://https:: http://https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token= If you are clicking the link on the page, onclick() is executed. If you are clicking the link in the page source - href is used and the link there is valid.

Categories : Javascript

Tomcat shows blank page - GWT devmode works fine
I think it is a NullPointer: protected static Properties props; // << NULL public void onModuleLoad() { loadProps(); // props is still NULL buildUI(); } void loadProps() { // props is still NULL props.set("scarsa manutenzione manto stradale", "images/red.png"); // BANG! [...] By the way: Why did you make props static? There is only one instance of you EntryPoint. So no state can be shared.

Categories : Java

feed dialog shows an error occurred when I use my appid.When I use FB developers example app id it works
Make sure you specified App Domain and Site URL. Those have to point to the server where your Share Feed Dialog will be triggered from. As for testing it can point to local host. Example: App Domain: localhost Site URL: http://localhost:12345/ Good luck! Marta

Categories : Javascript

Web pages which works fine in Firefox shows some styling issues in Chrome
Try using a media query, selecting only webkit specific stuff such as: @media screen and (-webkit-min-device-pixel-ratio:0) { /* Your CSS */ } This query checks the device pixel ratio in webkit. Safari & Chrome are the only big browsers using webkit, so this will not affect FireFox or IE.

Categories : CSS

FTDI D2XX library works with ubuntu. but shows error on ezsdk cross compilation
Kernel versions are different.. arm926 built for kernel version 2.6.32 Ezsdk 6.0 for beagleboard XM uses kernel version 3.3.7 I think, need to use open source library (http://www.intra2net.com/en/developer/libftdi/)

Categories : Linux

applet with swing mysql and a config file works in eclipse but fails in browser
Applets are not allowed to do a number of things, including file I/O and various networking tasks; as your applet is trying to do one. You may need to sign you applet. Check this reference http://www.coderanch.com/how-to/java/HowCanAnAppletReadFilesOnTheLocalFileSystem

Categories : Java

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

function executed by .apply() works with array, but does not the original function
Your function only accepts one argument (numArray), not three—this is why your call to getMaxOfArray is failing. If you are writing a one-liner, you should use call instead of apply for a series of parameters rather than an array, as so: Math.max.apply(null, [1, 3, 9]); Math.max.call(null, 1, 3, 9); For a function, you can use the arguments object for a variable number of parameters, if you do not want the user to pass an array. Here's how you would go about doing it this way. (Note that I still call apply here, because I store all of the arguments called by the user into an array.) function getMaxOfArguments() { var parameters = 1 <= arguments.length ? [].slice.call(arguments, 0) : []; return Math.max.apply(null, parameters); } Now, your second function call should wo

Categories : Javascript

I have made a code for retrieve image from database? and it works but it shows, Image: System.Byte[] Label
The behavior you describe sounds like you are calling .ToString() on an Image object. Images are not strings, so the .ToString() method will perform the default behavior of writing the class name and a property like System.Byte[] to the label. Darren's link in the comments shows how to write an array of bytes to the response stream, though if you really really want to keep it a string and the image size is small you can also try using the data:uri format for image tags: stackoverflow.com/questions/6826390/... I'd go with the custom httphandler to write to stream, since the data uri format might not be supported with all browsers and has a size limit. But, if you're just serving small images to modern browsers, it may be for you.

Categories : Asp Net

Google Maps V2 Android works as fragment, but shows white screen (with zoom control) as child fragment
I remember having the same issue when using transaction.add. From then on one of my base rules was to never user transaction.add again and use transaction.replace instead. Try it, it should work.

Categories : Android

list.getchildAt(i) return null pointer ,only shows visible views not shows more
I guess you should think fo a better approach than iterating over the EditTexts with getChildAt() to collect all the value. I take it that the user can change the values in the EditTexts, you can have an Array of size 30 of Values and everytime the user enters / changes a value you change the according value in the Array. Use a listener that changes the values in your Array like this.

Categories : Android

My horizontal navigation menu shows as 1 line in chrome, others shows 2 lines
you are aware that in: .mainnav ul li a:link,.mainnav ul li a:visited there are double padding decalarations? padding:4px; padding: 0 0.73em; You can combine those: padding: 4px 0.73em; Seems that the issue with the navigation list is that there is too much spacing in between them in combination with the amount of items. I there are too much items, the normal behavior is the wrapping, you could decrease spacing, font-size to fix this.

Categories : HTML

My hibernate application shows message in console and shows session closed error on browser
At first look it seems like a possibility of 2 issues ContactManager object which you are trying to save is null Your variable name 'Contact' is incorrect, it should be 'contact' (some hibernate thingy) Where is your hbm.xml file ? There may be a reference of 'Contact' the class in that file still around somewhere Edit Solutions Put a if (developer != null) before your 'save(developer)' Rename Contact to contact Put the hbm file contents on the question, without that cant review the mapping Hope it clear now. Edit 2 : Do a clean build. Its possible your build is not updated.

Categories : Hibernate

String variable shows as empty but length shows it to not be
.NET uses BStrings, which are length-prefixed and null-terminated. So if the first character in RecievedString is the null character (''), then it will not be printed, since strings end at their first null character.

Categories : Vb.Net

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

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

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

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

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

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#

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

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

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#

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

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 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

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

open a new activity in original activity and finish original one
I don't think you need to worry about resource or performance in this situation. You should be most concerned on the functionality that you want and your users expect. If they are clicking a list item and open up say a detailed Activity for that list item then they press the back button then they probably expect to return to that list. If you call finish() then the user will return to the Activity before this one or if there are no others then they will exit the app. Is that what you want? So with what little I know about your app I would say remove finish() public void return_to_config(View view){ Intent intent = new Intent(this, ConfigActivity.class); startActivity(intent); } But if the user doesn't expect to return here when pressing "Back" button then keep it in there

Categories : Android

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

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

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

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



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