my solution is structured like this:
- MyApp.Shared (Shared Project)
|- myPage.xaml
- MyApp.Android (Android Project)
|- Resources
|- drawable
|- img-1.png (BuildAction: AndroidResource, Do not Copy)
- MyApp.iOS (iOS Project)
|- Resources
|- img-1.png (BuildAction: BundleResource, Do Not Copy)
And in my xaml page (in the shared project) i've this simple piece of code:
<Image Aspect="AspectFit" Source="img-1.png">
Why i can't see image (in the droid and ios app)
I followed the Xamarin Tutorial
Using dashes in the name of the resource brokes the regeneration of Resource.Designer.cs
The name given was img-1.png: I renamed it to img1.png and it works
Related
I'm following a YouTube tutorial on twilio sms service, and I came to a point where I have to create my own .rb file! My project directory at the moment looks something like this:
The tutorial uses atom my_ruby_file.rb in the terminal to create a new ruby file. However, I do not use atom and from what I understand rails have changed a lot since 2014 that the video was recorded!
So my question is: Where to create my custom ruby files for Rails 6.1.3.2? I have noticed in my directory that .rb files are used all over the place. For example controllers and models and more, but where do I have to set one created by me ?
Related Question:
Where to keep other custom files such as .js, .css, .png ? The way I did it is to create a new folder in the following directory project-name/app/javascript/my_custom_files/js/dial_codes.js and actually reference that in the project-name/app/javascript/packs/application.js using this command require("my_custom_files/js/dial_codes"). Is this the correct way of doing that for that specific rails version?
project-name
|
|- app
|- assets
|- channels (application_cable)
|- controllers (concerns) -> contains application_controller.rb, friends_controller.rb, home_controller.rb
|- helpers
|- javascript (channels, packs, my_custom_files) -> For custom JS, CSS, images using webpacker
|- jobs
|- mailers
|- models (concerns) -> contains application_record.rb, friend.rb, users.rb
|- views (divise, friends, home, layouts)
|- bin
|- config
|- environments
|- initializers
|- locales
|- webpack
|- db
|- lib
|- log
|- .node_modules
|- public
|- storage
|- test
|- tmp
|- vendor
In SPRING MVC project, Which is the right folder location to create a new JSP(view) file:
WebContent\new_jsp_file.jsp
or
Java Resources\src\com.example.view\new_jsp_file.jsp
Note: com.example.view is a manually created package
Usually JSP file is located here:
%projectfolder%/src/main/webapp/WEB-INF/jsp/
JSP files should be put inside WEB-INF directory, because contents of WEB-INF aren't directly accessible by users, which is needed for application security.
If you are using Maven or Gradle:
project-name
|- src
|- main
|- java
|- resources
|- webapp
|- WEB-INF
|--- put JSPs here, can create subdirectories if needed
I would like to use TiRemoteImage from https://github.com/ulizama/TiRemoteImage
and in my alloy project I have added lib and components folder in app folder. Then I copy the files in TiRemoteImage's Resources/lib and Resources/components folder into my project's lib and components respectively
So my project folder structure looks like this now
app
> assets
> components
> controllers
> lib
> models
> styles
> views
I have then added
var RemoteImage = require('/components/remoteimage');
in index.js and then my app will just crash without any error. Am I including the component correctly?
You are using Alloy framework and the github project is not an alloy project so you have to copy all modules (.js in components and lib ) in /lib folder and change all line of code like : require("/components/module.js") ou require("/lib/module.js") by require("module.js")
I have a maven project and i download images dinamicly in folder \src\main\webapp\images\, but dont show it in browser. Example:
|- src
|- main
|- java
|- resources
|- webapps
|- images
|- image1.jpg (fixed)
|- image2.jpg (fixed)
|- image3.jpg (downloaded with my app)
If i show image1.jpg or image2.jpg works perfecty, but if i try show image3.jpg dont works:
<img src="images/image1.jpg" /> <!-- Works -->
<img src="images/image2.jpg" /> <!-- Works -->
<img src="images/image3.jpg" /> <!-- Not Works -->
Any idea?
Thanks.
Well... as far as I understand your are modifying your web-app resources at runtime. It works fine in eclipse because eclipse do kind of hot-deployement when your workspace is modified (i.e. when a new file is added in your webapp dir it is automatically available as a webresource for your appserver).
I don't think it's a good design. Imagine you download one image, then redeploy your webapp: the downloaded image will be lost.
Instead of putting your downloaded images in your web app resources: put them somewhere else (outside the war hierarchy, maybe in a directory managed by your web server)
I am having a hard time adding a Visual Studio Solution with multiple projects to my repo. I am using VisualSVN. Here is my directory structure
c:\-----
|
---Projects
|
--MyApp
|
---Project1 (The solution is in this project directory)
---Project2
---Project3
When I select "MyApp" as the working copy root, nothing is added. If I select one of the project folder, only 2 are added.
Here's the structure I use with success:
dev
|- Project root folder (solution file here is the key)
|- Class Project
|- Class Project
|- Web Project
|- References
|- Resources
What I'm suggesting is that you should move your .sln file to the top level then import.
Another advance approach.
Each project has it is own trunk with following structure
trunk
|- .sln
|- src
|- ClassProject
|- Web Project
Then in a separate svn directory create sub directory for every solution you need. For example you can have AllProjects, WebOnly, DALOnly.
And using svn:externals bring every project you need (ClassProject etc.) in given case.