FAQ Database Discussion Community


Laravel 5 elixir issue

laravel,assets,gulp,laravel-5,laravel-elixir
I'm having a little issue with elixir in laravel 5. Sass is working fine, but my scripts are not being moved to the public/js directory neither versioned. here is my gulpfile elixir(function(mix) { mix.sass('aracademia.scss') .scripts( [ 'partials/fancybox/jquery.fancybox.pack.js', 'partials/jscroll.js', 'aracademia.js', 'partials/doubletaptogo.js' ], 'resources/assets/scripts', 'public/js/aracademia.min.js'); mix.version(['public/css/aracademia.css','public/js/aracademia.min.js']); }); Any ideas?...

How to resize image assets for all Apple devices? (not launch images)

ios,iphone,ipad,uiimageview,assets
My app displays 2 buttons on the top and a car picture (1 of 4 possible) at the bottom: Each image file has huge dimensions of 5616 x 3744 pixels and the app lags noticeably and also sometimes crashes (here fullscreen, Aspect Fill mode is used): So I would like...

Wrong image being loaded by UIIMageView

ios,iphone,xcode,assets
I have this iPhone app targeted to iOS 7. I have created an entry on .xcassets called mainImage that is device specific for iPhones. So xcode presents me with 4 slots I have to fill with images. that has these images: 1x, 2x, Retina 4 2x and 3x. I have...

FileNotFoundException while copying db from assets to device data folder

android,sqlite,assets,filenotfoundexception,fileoutputstream
I tried in many ways to copy my sqlite db file to my /data/data/packagename/databases folder, but I still get stuck in FileNotFoundException, triggered by the FileOutputStream object... Here's the code: public static boolean checkCopyDb(Context c, DbHandler _db) { try { String destPath = "/data/data/" + c.getPackageName() + "/databases/db_sociallibraries.db"; File dbFile...

same webview for different activities

android,html,listview,webview,assets
i have many buttons in main activity that each button link to another activity that contain listview that each item in listview link one html file that is in asset folder. in my codes i'm using one webview activity for each activity. how can i use one same webview activity...

In Playframework2, how to serve multiple asset directory?

scala,playframework,playframework-2.0,sbt,assets
There are two asset directory, one is /ui/dist and the other is /public. I tried to write the routes like this: GET /assets/*file controllers.Assets.at(path="/public", file) GET /ui/*file controllers.Assets.at(path="/ui/dist", file) But it will throws an error while compiling: [error] Unspecified value parameter file. [error] <link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")"> Does anyone have...

having trouble accessing my json file from my assets folder

android,json,assets,filenotfoundexception,android-assets
In my android app I can't access my json file in my assets folder. It keeps giving me a FileNotFoundException. Without reading it directly into a InputStream I want to get the location of the json file instead. I have tried using /main/assets/data.json or ///android_assets/data.json or /assets/data.json. The main purpose...

Heroku and Precompiled Assets

ruby-on-rails,ruby,heroku,assets
I have a Rails 4 app. One of my javascript assets uses ruby to get all Users. A problem arises when I try to upload to heroku. It says that it cannot precompile that asset because the database does not yet exist. What can I do short of removing that...

How do I link assets from android to desktop in libgdx?

android,android-studio,libgdx,assets
Whenever I try to run the desktop version of my LibGDX project it says "badlogic.jpg not found". How can I link the assets folder from android to desktop? I found this post but I can't find out how to do it for android studio. I tried just copying the assets...

Android app crashes when using AsyncTask for fetching an url with jsoup

android,android-asynctask,jsoup,assets
So the app shows up the dialog while loading but then crashes. Te reason I decided t use these technologies is because I have to load an html, which changes dynamically and there are heavy CSS files which I would like to cache, so I think including them as assets...

Dropwizard 0.8.0: serve static assets from /

path,assets,dropwizard
I want my server to serve the static html files from /. Furthermore, css and js files should be served from /css respectively, /js. All json data should be accessible at /api. However, I get a 404 for http://localhost:8080/ or any other path. I use the following setting in the...

Game Multi-Images Android

android,png,assets
I have seen a lot of developer use all asset or images or drawable needed into one file png like this : the question is how can developer split each image to use it in android ? and what's advantage of this technique ? ...

Precompiling rails assets caused undefined method directory? for nil:NilClass

ruby-on-rails,asset-pipeline,assets,precompile
I am trying to precompile assets in my rails app, and getting this $ ber assets:precompile --trace DL is deprecated, please use Fiddle DL is deprecated, please use Fiddle ** Invoke assets:precompile (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment ** Execute assets:precompile...

Yii2 disable asset of a vendor module

module,yii2,assets,vendor,assetbundle
I have install yii2-admin module, located in /vendor/mdmsoft/yii2-admin and I want don't want it to load it's own asset bundle. It there anyway to disable this module asset bundle?

Rails does not update the fingerprint for some assets

ruby-on-rails,assets,fingerprint
I notice there is a weird thing going on in rails 4.2.0. I am using the default dev environment. When I change some of my JS files, the fingerprint does not change and it keeps serving the old file. The weird thing is that this does not happen to all...

create appasset just for one page in yii2

javascript,php,css,yii2,assets
I use yii2 framework. I want use just one css file in my page, but when I put my css file in appasset.php file as below: public $basePath = '@webroot'; public $baseUrl = '@web'; public $css = [ 'css/site.css', 'css/country.css', 'css/admin/one.css', 'css/fg/two.css' ]; public $js = [ ]; public $depends...

Nginx configuration for clean urls

url,nginx,server,assets
I have a website with the following directory structure: . ├── assets ├── config ├── html ├── spec └── vendor I'm using this as a development setup for running integration tests and I need a server instance. I need the site root to be in html but I need to...

Open HTML file from assets folder

android,webview,assets
I am trying to open local html file in my Android application. The file is located under my assets folder. So I am setting a WebViewClient and loading my page into it. But I get a "webpage not available" error. Here is my Activity code : public class LocalDialogActivity extends...

Why does getResource return null

java,eclipse,jar,assets,getresource
I'm trying to access a file in my project. But getResource method returns null. This is how my project looks like: Thread.currentThread().getContextClassLoader().getResource("assets/xxx.png"); //returns null And how project folder in eclipse workspace looks like: Why? I want to access files in my assets folder? Edit I created a jar file and...

Accessing the AssetManager in Xamarin Forms

android,xamarin,assets,xamarin.forms
In Xamarin Forms, in a Dependency Service, I need to access an Asset. How do I get the AssetManager from within a Dependency Service?...

How to do {{ asset('/css/app.css') }} in Lumen?

laravel,assets,blade,lumen
In Lumen, I can do this in my blade template: {{ url('/css/app.css') }} In Laravel I could do {{ asset('/css/app.css') }} Is the url helper all I have to work with in Lumen?...

Include assets in Twig Extension with Symfony2

javascript,php,symfony2,twig,assets
I want to include asset with some script file in Twig extension. E.g. I want to declare twig function {{ init_project() }}, but when I writing in my twig function '<script type="text/javascript" src="{{ asset('bundles/mybundle/js/script.js') }}"></script>', it dont work, it return 404 error in debug panel of browser. So how I...

Cannot open PDF file in external app

android,pdf,uri,assets
I would like to open a PDF file when the user clicks on a button. Currently, i am using this code to achieve this: Uri path = Uri.fromFile(new File("file:///android_asset/regola11_1.pdf")); Intent pdfIntent = new Intent(Intent.ACTION_VIEW); pdfIntent.setDataAndType(path, "application/pdf"); pdfIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(pdfIntent); but it doesn't work. When i select to use Adobe Acrobat, i...

Symfony 2 - Access public asset directly

symfony2,assets,assetic
I have a folder called "cdn" in my /web folder and i would like to give a public access to a javascript file in there (basically, it's a bookmarklet). I don't want to use a controller to serve the file but rather let the server serve the file directly. How...

Laravel 5 adding invalid chars at end of JS

javascript,laravel-5,assets
I'm including a JS file with the following tag in my app.blade.php: <script type="text/javascript" language="javascript" src="/js/colors.js"></script> Whenever that script loads in the browser, it contains a bunch of invalid characters at the end. I've verified that these characters are not present in the actual file. Has anyone seen this problem?...

Android assets retrieve embedded font for Typeface

android,file,assets,typeface
I've managed to embed a font which I can access through Typeface.createFromAsset, however, there is also the "file:///android_asset/.." protocol. I tried using "file:///android_asset/fonts/myfont.ttf" for Typeface.createFromFile, but this does not work ? Strange as I would have thought that file:///android_asset is handled by the system and thus Typeface would be able...

Sails v0.11.0-rc10 assets loading timeout

timeout,sails.js,assets,beta
After upgrade to v0.11.0-rc10, sometimes, random assets (both css and js) loading takes a long time. Does anyone has same problem? Firebug screen Chrome dev screen P.S. All grunt tasks has completed successful P.S.S. sorry for my english...

ActionController::Base.helpers.image_url doesnt generate hashed version in initializer

ruby-on-rails,assets
I got an constants.rb file in config/initializers with the following content: DEFAULT_IMAGES = { profile: ActionController::Base.helpers.image_url('v2/default_profilepic.jpg'), banner: ActionController::Base.helpers.image_url('v2/profile-banner.jpg'), missing: ActionController::Base.helpers.image_url('v2/missing.png'), } When I try to call DEFAULT_IMAGES somewhere in the code or even in the console then I get the images back without the hash. Is it that what its...

Javascript in Yii2 AssetBundle is not published on update

javascript,yii2,assets,assetbundle
I have a quite simple AssetBundle: use yii\web\AssetBundle; /** * ImagizerAsset */ class ImagizerAsset extends AssetBundle { public $sourcePath = '@app/components/widgets/imagizer/assets'; public $css = [ 'css/imagizer.css' ]; public $js = [ 'js/imagizer.js', ]; public $depends = [ 'app\assets\BowerCropperAsset' ]; } If I change the JavaScript in the bundle, it is...

replace database file from assets by the database from data folder

android,database,sqlite,assets
i have a database file "myDB.db" (it have only one Table), and i put that file to assets folder, my app copy the data from it, i can read data there is no problem, but when i try to add a new ROW in my Table the new row only...

How do you access assets in a Pakyow app on heroku?

heroku,assets,pakyow
Problem: Pakyow App deployed to Heroku and all JS and CSS sourced/linked in template head 404. I assume this is a problem stemming from Heroku, but rather not one that I am aware of. As far as I know, Heroku allows static assets in the public directory. Anyway, looking for...

Saving WPF Assets

wpf,xaml,assets
I am creating a WPF app where I'd like to create an Assets folder which will contain my images etc, then access them via a relative path, if possible. Assuming my folder structure is as follows: Application > Bin > Debug > EXE Where should I create my Assets folder?...

How to create File from folder in android assets?

java,android,assets
I want to list all files in folder which is in assets. But new File("/android_asset/instagram").exists() always returns false. File instagram = new File("/android_asset/instagram") for (File lookUpFile : instagram.listFiles()) { String filterName = FileUtils.removeExtension(lookUpFile.getName()); filterName = Strings.capitalizeAndCopy(filterName); GPUImageLookupFilter lookupFilter = new GPUImageLookupFilter(); lookupFilter.setBitmap(BitmapFactory.decodeFile(lookUpFile.getAbsolutePath())); filters.addFilter(filterName, lookupFilter); } ...

Using Multi-Target Image Catalog

xcode,assets,target
My app has various targets, since the identical app is used by various clients, each with its own branding. In my Image Asset Catalog I have image sets such as: Client123_LoginBackground ClientABC_LoginBackground ClientBFG_LoginBackground etc. So, in my app where I set this background, how do I tell my app which...

Assets compilation Ckeditor rails in heroku

javascript,ruby-on-rails,heroku,assets
I am having troubles using Ckeditor in production environment. I have 2 environments, staging and production, both of them are in Heroku. I am able to see Ckeditor in staging environment but not prod. My configuration is the following: config/environments/production.rb: # Precompile additional assets config.assets.precompile += Ckeditor.assets config.assets.precompile += %w(...

Rails 4 - Stylesheets from public folder

javascript,ruby-on-rails-4,stylesheet,assets
I have a problem with including stylesheets and javascript files from public folder into my project. I do it in following way: <%= stylesheet_link_tag '/public/dist/css/AdminLTE.min.css' %> Unfortunatelly I've got an error: ActionController::RoutingError (No route matches [GET] "/public/dist/css/AdminLTE.min.css") Can u tell me how to solve this?...

FileChannel returns wrong file size of file in assets folder

java,android,assets,fileinputstream
I am trying to read a File from the raw folder in my assets using a FileInputStream. This is how I create the FileInputStream: AssetManager assetManager = getAssets(); AssetFileDescriptor fileDescriptor = assetManager.openFd(fileName); FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor()); After that I am trying to read the data from the File like...

Symfony2 - assets do not load

javascript,php,css,symfony2,assets
Today again something doesn't work in my symfony2 test project. Now i'm trying to use some assets like .css file and images. What did i do so far? Bundle name is MyValleyBundle so in AppKernel.php bundle is registered: new My\ValleyBundle\MyValleyBundle(), I did put files respectively css to css, images to...

Yii Booster assets with symlink

yii,assets,yii-booster
Im using YiiBooster, but I don't like that is generates folder inside the assets dir and copying a bunch of files into it. I would like it to create symlinks instead, like Yii assetManager: $assetManager = Yii::app()->assetManager; $assetManager->linkAssets = true; Does anyone know how to achieve this ? ...

Reading from assets directs to wrong path?

android,database,sqlite,assets
I'm trying to use sqlite helper class, I have my db_map at /assets folder. sqlite helper should copy it from there to data/data/com.package.app/databases/ what happens is that I get a FileNotFound exception. While debugging and using assetManager.list(""). I found that I have "images", "sounds", "webkit" files in the list. what...

How to truncate the Icon name with Xcode?

ios,xcode,icons,assets
There are several schemes in my project, for each scheme there is an Icon image file in the Images.xcassets folder, like this: AppIcon-DEV AppIcon-QA AppIcon-PROD In order to show the right Icon along with a specific scheme, we need to modify the Asset Catalog in Build Settings like this: Asset...

andriod out of memory exception

android,out-of-memory,assets,bitmapfactory,android-bitmap
please help in solving me this out of memory exception as i am unable to solve it, any help would be greatly appreciated, 06-04 12:11:44.119: E/AndroidRuntime(9090): FATAL EXCEPTION: main 06-04 12:11:44.119: E/AndroidRuntime(9090): Process: com.zar.bdr, PID: 9090 06-04 12:11:44.119: E/AndroidRuntime(9090): java.lang.OutOfMemoryError 06-04 12:11:44.119: E/AndroidRuntime(9090): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 06-04 12:11:44.119: E/AndroidRuntime(9090): at...

.\key.p12: open failed: ENOENT (No such file or directory)

java,android,google-cloud-storage,assets,google-cloud-platform
In my android application I'm accessing the Google cloud storage . I have generated the private key xxxxxxxkey.p12 .I have put my key file in assets folder . But while running the project it is not opening the key.p12 file . I have tried putting it outside the assets folder...

Protecting code in android asset files

android,security,webview,assets
I have an android application which takes place mostly in webview, I have my html files in my assets folder, but files in the assets folder are very fragile and anyone can have access to codes in assets files. I wanted to ask if you have any tips to protect...