Adding resource files to xcode

It might be that the file you added was not added to the project build. Click your project > App target > Build Phases And check that the file exists in Compile sources (if it needs to be compiled), otherwise check Copy bundle resources. If the file does not exist there, drag it there and … Read more

UriFormatException : Invalid URI: Invalid port specified

That’s because you’re executing this code while the pack:// scheme is not yet registered. This scheme is registered when you create the Application object. You can add this code in the setup of your test fixture: [SetUp] public void Setup() { if (!UriParser.IsKnownScheme(“pack”)) new System.Windows.Application(); } EDIT: actually it seems the pack:// scheme is registered … Read more

Java: Which of multiple resources on classpath JVM takes?

It is specified by the order in which the resources (i.e. usually jar files) are specified using -classpath option. Resources ‘earlier’ on the classpath take precedence over resources that are specified after them. This can be also set in the manifest file of your application and then you don’t need to provide -classpath option. You … Read more

How to reference CSS / JS / image resource in Facelets template?

Introduction The proper JSF 2.x way is using <h:outputStylesheet>, <h:outputScript> and <h:graphicImage> with a name referring the path relative to webapp’s /resources folder. This way you don’t need to worry about the context path as you would do in JSF 1.x. See also How to include CSS relative to context path in JSF 1.x? Folder … Read more

Managing resources in a Python project

You may want to use pkg_resources library that comes with setuptools. For example, I’ve made up a quick little package “proj” to illustrate the resource organization scheme I’d use: proj/setup.py proj/proj/__init__.py proj/proj/code.py proj/proj/resources/__init__.py proj/proj/resources/images/__init__.py proj/proj/resources/images/pic1.png proj/proj/resources/images/pic2.png Notice how I keep all resources in a separate subpackage. “code.py” shows how pkg_resources is used to refer to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)