w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Do I need to explicitly include a common header file(in an include path folder) used in shared library?
If your main_prog.c depends on shr_struct.h, the compiler will need to know where this last file is located. Now if the library is installed in the system "standard" library path, you may not have to explicitly add this path to the compiler command as it may be smart enough to search in the standard system path by itself.

Categories : C

php include function to include parent folder in LAMP server
Drop the leading / and change your includes to include("../footer.php"); the leading / means from the root of the file system. You are digging below the root and there just ain't nothing there. Another thing to beware of when dealing with problems between windows and linux is that on windows ../footer.php is the same as ../Footer.php which is not the case on linux (case sensitive vs case insensitive file systems). UPDATE The final solution was to for the relative path for the include into a absolute one by prefixing it with __DIR__ as in ... include(__DIR__."/../footer.php");

Categories : PHP

PHP include different version of same library
This is a very common problem in modular systems. In PHP you could try to solve it with very bad hacks (eval, file_get_contents, str_replace), but you would loose a lot of usefull tooling support (backtrace, debugging, op code cache, precise error reporting, just to mention a few). The usual way to approch these problems is to use some kind of dependency management. E.g. in java maven is used most times, in scala it is maven or sbt and php guys would normaly use composer (never used this one, so I'm not completely sure whether it is good or not and whether it even supports what you need). These tools usualy have some kind of algorithm to detect and solve typical version conflicts. However this will only work if two conflicting versions are compatible (or at least the part you are using i

Categories : PHP

Include .dll of different version than project targets
You would have to use COM Interop to build a bridge layer. using System; using System.Runtime.InteropServices; namespace Net4ToNet2Adapter { [ComVisible(true)] [Guid("E36BBF07-591E-4959-97AE-D439CBA392FB")] public interface IMyClassAdapter { void DoNet4Action(); } } See here for more information.

Categories : Asp Net

How to specify thrift include folder in SBT?
As we now include thrift files from other modules/projects we use the Scrooge possibility to include thrift files coming from jar (classpath) dependencies like this in our build.sbt: scroogeThriftDependencies in Compile := Seq("service-xxx-api_2.10", "service-yyy-api_2.10")

Categories : Scala

Include resources in my app from sdk folder
You can include the drawables from sdkplatformsandroid-18data esdrawable-hdpi in your project's drawable-hdpi folder. Rename these to avoid name conflict. Alternatively, you can place these drawables in your assets folder. I doubt that any of the drawables will be > 1 MB in size (there's a system-imposed size limit). To access them in code: try { Drawable drawable = Drawable.createFromStream(getAssets().open("some_drawable.png"), null); } catch (IOException e) { // catch } For the sdkplatformsandroid-18data esvaluesdimens.xml, copy required <dimen name="some_name">some_value</dimen> and paste them in your res/values/dimens.xml. Again, be careful about name conflicts.

Categories : Android

Include CocoaPods in version control checkin?
This is an ongoing debate even with the CocoaPods core team. https://github.com/CocoaPods/guides.cocoapods.org/issues/3 At some point someone felt that it should be ignored enough to get it into Github's gitignore template for Objective-C. Some good points were brought up in the linked debate above about longevity of the project where if you check in your pods directory in the future other developers should always be able to build the source regardless of the state of CocoaPods or the specs repository without any dependency on the command line too. But I could see you having this same issues with Git submodules since the remote repositories could be deleted in the future as well. I think this comes down to your preference. Personally I don't like having updates to external dependencies d

Categories : IOS

Include from displayed file or folder that contains
there's the current working directory, which you can get with getcwd(). THAT'S the path that everything will be relative to in any file operations you perform. By default it will be the directory that your main script is executed from. Whether you go relative to that, or relative to something else, or just absolute on everything is up to you. There's no right/wrong answer - just whatever's easiest for YOU to maintain.

Categories : PHP

Include folder with images c# project
You could always embed the images as resources into your executable. There are a number of different options detailed in this post: Load image from resources in C#. If you are referencing files by their path on disk, you will always need to copy the folders and files to wherever your code is being deployed.

Categories : C#

How can I include a path outside the Wamp www folder using php.ini ?
Using include 'system/init.php'; tells PHP to include from a specific folder. You are telling php the folder should exist below the current folder the script is execution from. Try include 'init.php'; Then it will search the include path

Categories : PHP

How to include js.erb file in view folder
you can do this by render :partial => "myfile" you have to keep your file in controller's view directory with name _myfile.js.erb Now you can write your own code (js,ruby) here and probably can separate out js with javascript_include_tag to avail asset pipline This file will be first rendered by erb engine and then as javascript.

Categories : Javascript

How to configure config.php in include folder
Your question seeming to be a bit out of context - what exactly are you using the $config array for? What application are you trying to install? Either way, the basedir variable you have sounds like a UNIX based XAMPP one, it should probably be something like "C:xampphtdocs" on your windows installation. As for the baseurl, try maybe adding "http://" before it.

Categories : PHP

Cannot include FXML file in another folder
It looks like this question: Error loading fxml files from a folder other than the bin folder is about the same problem. Start with what's there and see if that helps you.

Categories : Java

Conditional comments - Include javascript based on IE Version
The conditional comment should be: <!--[if IE 8]> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f21643b21c50811"></script> <![endif]--> with the two dashes after the exclamation point. It's called a "conditional comment" because it's actually an HTML comment: <!-- this is a comment -->. Internet Explorer (until IE9) makes an exception and parse the comments with the special format <!--[ if ... ] ... <![endif]--> as an instruction, but for any other browsers is just a comment and it'll be ignored.

Categories : Javascript

Which version of jdbc4 postgres driver should you include in your product?
I am not sure if this question is really answerable, it depends on a number of factors, including but not limited to: How formal is your testing and release procedure? Do you depend on specific behavior of the driver version? For example if you have a very thorough or formal testing process, you would normally release with the version you tested against. A newer version of the driver might require a very intensive re-testing that is not worth the effort right now (or you simply want to get the product out of the door). And if you depend on behavior of the driver that was changed (or fixed) in a newer version, that might be a good reason to release with an older version until you have fixed your dependence on the old behavior. Other than that, I'd suggest to usually release with the l

Categories : Java

Eclipse, Java project - How do I add a source folder where the folder name is part of the package name?
My recommendation, especially if your source files are all in one - or just a few - director(ies): 1) Check out your CVS project into a temp folder 2) Create a new Eclipse project from scratch. It will create a "src" folder by default. 3) Create your package with Eclipse. It will automatically create subfolders representing your package name (e.g. com.foo.mypackage). 4) Drag/drop your source into the Eclipse package 5) Make sure everything builds 6) Save the new Eclipse folder tree to CVS (ideally, use the CVS plugin for Eclipse to do this). IMHO...

Categories : Java

Do I want to include the Azure csx folder in configuration control?
The csx folder can be excluded from source control. Note that if you pull a .gitingore file from gitignore.io it will exclude this automatically. http://gitignore.io/api/visualstudio

Categories : Visual Studio

"Proper way" to add a folder to the include path in XCode 4
Go into the Get Info window (Cmd + I) Select the Build tab Add the directories you'd like to include under "Search Header Paths" You'd have to do this for every project you would want to include with Eigen but I think that is the recommended way to do things. Just keep it in one place and have all projects that use it reference that location

Categories : C++

.htaccess rewrite rules that include a sub-folder
The reason this was not working was because there was an .htaccess file within my /blog/ directory. This included a rule that would catch anything and route to blog/index.php. Moving my rules to /blog/.htaccess allowed them to function properly

Categories : Htaccess

How can i make apache to include all files from folder
You can do: Include dir/* For example in Debian the modules are included this way, from apache2.conf: # Include module configuration: Include mods-enabled/*.load Include mods-enabled/*.conf

Categories : Linux

How can I recursively include all files with a specific name in a folder using PHP?
Although it sounds like a bad design to include all files, it is possible: $directory = new RecursiveDirectoryIterator('path/to/project/'); $recIterator = new RecursiveIteratorIterator($directory); $regex = new RegexIterator($recIterator, '//module.php$/i'); foreach($regex as $item) { include $item->getPathname(); } Btw, this example is derived from a comment in the PHP manual. To make it working, make sure that all sub folders are readable by PHP in that folder. If cannot make this sure you will have to write a custom recursive function for that (but this is unlikely). Again, what you are doing is not a good design and will lead to problems (earlier than you might think). If you are following the OOP style, a better approach would be to use the autload mechanism of PHP.

Categories : PHP

AngularJS include a file located in a folder
Add a <base href="/sites/all/themes/theme/js/"> at the top of your <head> element inside index.html. <html> <head> <base href="/sites/all/themes/theme/js/"> ... Reference Relative links Be sure to check all relative links, images, scripts etc. You must either specify the url base in the head of your main html file (<base href="/my-base">) or you must use absolute urls (starting with /) everywhere because relative urls will be resolved to absolute urls using the initial absolute url of the document, which is often different from the root of the application. Running Angular apps with the History API enabled from document root is strongly encouraged as it takes care of all relative link issues.

Categories : Javascript

Does Microsoft include automatic .NET version checks when launching an application?`
.NET will only run if the version that your application is targetting is installed. If you wrote the app and targetted .NET 4.0 for example, and the machine does not have 4.0 installed, the app won't start at all, so the check using Environment.Version is pretty much redundant. To be able to truly determine if and which version of .NET is installed without a dependency on .NET (chicken and egg problem), you need to write the detection app/bits in a different language, like C++, see this article for info on what to look for in the registry (one of the few ways to verify which version of .NET is installed), the keys should be located in HKLMSOFTWAREMicrosoftNET Framework SetupNDP

Categories : Dotnet

embed sound so that when publish we do not have to include it in the same folder as the swf file
I would have written the answer, but this has been answered already... First, in your library, set the class linkage of a sound file by right clicking, selecting properties and editing the Class field in the Linkage section. In this example it will be Class:FogHorn import flash.utils.getDefinitionByName; var SoundClass:Class = getDefinitionByName("FogHorn") as Class; var newSound:Sound = new SoundClass(); newSound.play() source: @Allan in Actionscript 3: playing sound from library with name from string

Categories : Actionscript

Java create a folder in current package folder
Well assuming your current path is within the application folder (where your package folders are), and your class files are not within a jar, you can do this. String OUTPUT_DIR = this.getClass().getCanonicalName().replace(".","/"); OUTPUT_DIR = OUTPUT_DIR.substring(0,OUTPUT_DIR.lastindexOf('/'));

Categories : Java

Java program is loading from system32 folder, not from folder, which it is placed
My theory: if you installed Java for Windows via the traditional installer, in addition to the place you told it to put it (canonically, JAVA_HOME), the installer drops a java.exe in the system32 directory, so it's likely that when you're starting the JVM on startup, system32 is the working directory and that's where it will look for files with relative path names like the one you've provided. The easiest solution is to specify the path to the text file absolutely in your code. I would also recommend specifying the full path to java.exe in your registry key (I would guess that right now it's just java.exe with no path) so that you can guarantee which version you're running; if you have multiple versions of Java installed only the most recently one installed will have java.exe in system3

Categories : Java

Rename Files to include Parent & Grantparent folder - powershell
If they all follow the same pattern and there are no files in grandparent or root, then that's pretty trivial: $root = 'C: oot folder' Get-ChildItem -Recurse | ForEach-Object { $parent = $_.Parent $grandparent = $parent.Parent $number = [int]$_.BaseName Move-Item $_ -Destination (Join-Path $root ('{0}-{1}-{2}{3}' -f $grandparent, $parent, $number, $_.Extension)) }

Categories : Powershell

How to include a config file in the "META-INF/services" folder of a JAR using Maven
Create a new source folder with the location src/main/resources, then create your META-INF/services folder in there and drop in your FQCN file. This should copy them into the jar file automatically. So you'll have: Project | src | | main | | java | | [your source code] | | resources | | META-INF | | services | | [your service files]

Categories : Java

SVN does not see conflicts between original folder and moved version
This might help now, I have two solutions for this.The problem you faced can be overcome with these approach. Solution1 : Say you have following files /branch/foo/src/com /branch/foo/test/com /trunk/src/main/java/com /trunk/src/test/java/com Before you moved src/com to src/main/java/com and test/com to src/test/java/com you could have done: cd $TRUNK svn merge -r N:M http://server/branch/foo . What you could do now is: cd $TRUNK svn merge -r N:M http://server/branch/foo/src/com src/main/java/com svn merge -r N:M http://server/branch/foo/test/com src/test/java/com OR what else you could have done is Solution2 : 1) Do svn up to get latest copy of code ( in old dir structure) svn up 2) copy dirs with unix commands in dir dir stucture cp -r /root/dirA /root/dirGroup/ cp -

Categories : Svn

How do I include license (.lic) files in my bin folder while ensuring they're covered by source control?
The way I accomplished this was to place my license files in the project root (I imagine you can place them anywhere within the project). Then, I set their properties (ctrl-click each .lic file and press Alt+Enter, or click the Properties tab): Setting Copy to output directory to "Copy always" causes the files to be moved to the bin folder at build time. Setting Build action to "None" prevents the files from being published at their original location along with the other content. Without this setting, the license files would be published at the website root and could be downloaded.

Categories : Visual Studio

same older dll override existing newer version in bin folder
DotNetNuke manages that for you, as long as you include the version number in the Module install manifest (.dnn file), see here for more information: http://www.dotnetnuke.com/Resources/Wiki/Page/AssemblyComponent.aspx

Categories : C#

How to include iTunesArtwork in resources folder when building with appcelerator/Titanium Studio build
i had just looked this up yesterday. I haven't tried it yet but here are the links i found that answered it: http://docs.appcelerator.com/titanium/latest/#!/guide/Icons_and_Splash_Screens-section-29004897_IconsandSplashScreens-iOSgraphicassetrequirementsandoptions if you have language specific: http://docs.appcelerator.com/titanium/latest/#!/guide/Icons_and_Splash_Screens-section-29004897_IconsandSplashScreens-iOS

Categories : IOS

My Java version is the newest version but my JVM is still 1.5?
What does this site say? http://www.java.com/en/download/uninstallapplet.jsp You should probably look for version 1.7, not 1.6. (That's more current) If you have an older version of Java, go here: http://java.com/en/download/index.jsp

Categories : Java

What is the purpose of different version of class file in "target/classes" folder when i do maven-build?
They have nothing to do with Maven, and they are not different version of files. They are simply anonymous inner class. Although in code, there is no name for the anonymous inner class, Java compiler is going to create a corresponding class (and hence, a class file)

Categories : Maven

Can a Java Factory class be structured to instantiate either Java 6 or Java 7 specific class based on JVM version?
You can do this without having to worry about the versions. You can even build the "Java 7" to run on Java 6, but won't work because it needs classes which are not there. i.e. you can have one JAR which runs in Java 6 for them all. Also you don't need to use reflection.

Categories : Java

java.lang.VerifyError when deploying the new version of my Java EE web application
Judging from what I'm seeing in your stack trace, I believe the application is unable to connect to the database or an LDAP. This causes the autowiring of one of the beans to fail which then cascades over into the other beans. Ensure that the application can properly connect to any external resources required by the beans.

Categories : Spring

.gitignore NuGet packages folder at any level but include .targets file at any level
There is no 'good' way to do it (see manpage as a proof), however there is a hack around it. Main issue with ignoring packages/ of the bat is that git does not even check it's subdirectories due to directory being ignored. Solution here - you will have to have 2 gitignore files. One regular, and one inside the packages directory that looks like this: # ignore all files * # do not ignore directories !*/ # do not ignore targets !*.targets # do not ignore gitignore !*.gitignore New example: $ mkdir foo $ cd foo/ $ mkdir foo $ mkdir foo/bar $ mkdir foo/bar/baz $ touch foo/.foo $ touch foo/bar/.foo $ touch foo/bar/baz/.foo $ touch regular.txt $ touch foo/ignored.txt $ touch foo/bar/baz/ignored-2.txt $ cat foo/.gitignore * !*/ !*.foo !regular.txt !.gitignore $ git add . && git stat

Categories : Windows

config.assets.precompile - include a folder of files? or kill the precompile 'feature' entirely?
A good practice when dealing with multiple CSS/JS files to add to the asset pipeline is to simply create a new manifest for those files: Let's say you have some JS files under lib/assets/javascripts/external/calendars and you want to load them through the asset pipeline. You want to create an index.js manifest file with the following content: // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //

Categories : Ruby On Rails

Change popup window to include HTML
The simple answer is that where you have "Added to cart, thank you!" ... window.showQuickPopup("Added to cart, thank you!", $form.find('input[type="submit"]:first')); you can use html instead. So for example var myHtmlVersion = '<div class="popup-block">Added to cart, thank you!</div> window.showQuickPopup(myHtmlVersion, $form.find('input[type="submit"]:first')); Of course the html can be as comprehensive as you like.

Categories : Javascript

How to change "src" attribute value of ng-include in angularJS after first load?
Here is a code example that could help you: <div class="example-animate-container" ng-include="{{template.url}}"> Then in directive or controller $(document).on("keydown", function () { template.url = "put the value here"; $scope.$apply(); });

Categories : Angularjs

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