How to access local css files in external HTML File - titanium

I load some external files form the web in webview, but now I won't to improve the loading time and save all css und images on device.
My folder is /Ressources/assets/themes/....
In html file I try everything from simply assets/... to file:///Ressources....
What is the right way?
Thank you!

we have to use prefix app://
For a example if you want to include style.css which is inside of folder mycss
app://mycss/style.css

You need to use the app:// prefix.

Try this will may help you
Was there ever a solution to this problem? I'm having it as well. I tried 4 methods of linking:
../css/style.css
/css/style.css
app://css/style.css
file:///css/style.css

app://Resources/css/style.css works for me.
Using 3.1.1.GA

Related

Issue with Random Image module in Joomla 3.9.13?

I created the folder and uploaded 3 jpg images. And putting the right path in Image Folder. But it still not show the images on page.
What am I doing wrong?
This looks correct to me.
I suggest trying an alternative path for the Image Folder such as:
/images/Manifestation_Miracle
I also suggest renaming the folder to remove the underscore to see if that helps.

Play sound with Oboe with .obb file

Hello sorry I'm begginer.
I don't have my sound files in my assets folder but in my .obb
I'm using the RythmGame sample who is using only assets folder.
I'm trying to use DataSound but only AAssetDataSource is used in my sample for create a DataSound.
I look at Asset and NDKExtractor for the decode function, but can only be use with an AAsset from an AssetManager...
How can I play sound from an .obb with Oboe ?
Can someone help me with that problem ?
Thanks
You should be able to do this by getting the path to your expansion file and passing that through JNI to your native code, opening it as a normal file object and passing the contents to the extractor.
You're right about the NDKExtractor::decode methods - they take an AAsset *, however it should be pretty easy to update them to take the file descriptor from your open file instead.

Capybara open an html file in my computer

I have an html file in my computer and I want to open that file using Capybara to test it. Could you help me to solve this problem?
P/S: That html file is created automatically in my app. I do appreciate any idea helping me to solve this problem. Thanks :)
UPDATE:
Based on the capybara source code here, I found that I should use Capybara.current_session.driver.visit instead of page.visit. The problem is solved
I can confirm that the update to the question works (assuming the file is in the current directory):
filename = 'foo.html'
Capybara.current_session.driver.visit filename
If your file is located at /path/to/folder/file.html
Set Capybara.app to a folder containing this file:
Capybara.app = Rack::File.new('/path/to/folder')
and then
visit 'file.html'
should work for you
See also this gist for example
With simple relative file path I got errors:
Failure/Error: visit 'foo.html'
Selenium::WebDriver::Error::InvalidArgumentError:
invalid argument
I didn't want to switch Capybara.app to Rack::File and back, so I've tried this way and it works:
visit "file://#{__dir__}/foo.html"

xupload in Yii: How to handle uploaded files

I just managed to run xupload on Yii, the upload works fine.
Now i have to do something with the files being upload, i.e i have to loop through all the files uploaded by the user. Is there a simple way ? thanks in advance
you can use the following function:
http://www.yiiframework.com/doc/api/1.1/CFileHelper#findFiles-detail

How can I get <asp:menu> working in Safari?

On the safari browser, the standard <asp:Menu> doesn't render well at all. How can this be fixed?
Thanks for the advice, it led me into the following solution;
I created a file named "safari.browser" and placed it in the App_Browsers directory. The content of this file is shown below;
<browsers>
<browser refID="safari1plus">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
</controlAdapters>
</browser>
</browsers>
As I understand it, this tells ASP.NET not to use the adaptor it would normally use to render the control content and instead use uplevel rendering.
You can use ControlAdapters to alter the rendering of server controls.
Here's an example:
http://www.pluralsight.com/community/blogs/fritz/archive/2007/03/27/46598.aspx
Though, in my opinion it might be equal amount of work to abandon the menu control for a pure css one (available on many sites).
Oooof - was hoping it would be a simmple case of adding a browserCaps item in web.config with appropriate values or similar...
The best and simplest solution I've found for this problem is to include this bit of code in your page_load event.
if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
Request.Browser.Adapters.Clear();