FAQ Database Discussion Community


How do I load SVGs directly in my React component using webpack?

svg,icons,reactjs,loader,webpack
I would like to render a material design icon directly in my NextButton component using webpack. Here's the relevant part of my code: var NextIcon = require('material-design-icons/navigation/svg/production/ic_chevron_right_18px.svg'); var NextButton = React.createClass({ render: function() { return ( <Link to={this.props.target} className='button--next'> {this.props.label} {NextIcon} </Link> ) } }); But this isn't working as...

Custom Loader isn't working. Probably an easy fix

android,loader
I'm trying to make a custom loader but it no worky. It's probably an easy fix and I'm just brain farting here. Class to load: public class Exercise{ ... } Loader: public class ExerciseLoader extends AsyncTaskLoader<Exercise> { ... } Fragment: public class DataFragment extends Fragment implements android.support.v4.app.LoaderManager.LoaderCallbacks<Exercise>{ ... @Override public...

What is the best way to use the insert, delete and update from an Content Provider?

android,android-asynctask,android-contentprovider,crud,loader
I am spinning my head around this theme for quite some time. I don't have much experience with Android and I'm trying to code everything using the best approach I can. I successfuly created a Content Provider to wrap my SQLite and some Loaders to query the Data. It works...

How to use ImageLoader of Volley Library?

android,image,nullpointerexception,android-volley,loader
I am using volley library to load image from network and getting nullpointer exception. I am using it in Adapter class.Is there any problem in getting instance or what i am not getting. getView() throws nullpointerexception VolleySingleton.java package com.w3nuts.babaa.helper; import android.content.Context; import android.graphics.Bitmap; import android.support.v4.util.LruCache; import com.android.volley.RequestQueue; import com.android.volley.toolbox.ImageLoader; import...

Java class is not found when loading jar file

java,api,class,jar,loader
I am working on a API system for a program. This system goes to a 'plugin' folder and loads every jar there. I am trying to load the main class of the jar file that is in the 'plugin' folder, but while doing so, I get a ClassNotFoundException. Here is...

Android Loader used with SimpleCursorAdapter and ContentProvider not updating

java,android,android-contentprovider,android-listfragment,loader
I have a list fragment which loads data from a ContentProvider using a Loader and SimpleCursorAdapter. I think that I have followed correctly the directions given by google examples, but my ListView is not updated when underlying data changes. This is what I'm doing: ContentProvider @Override public synchronized Cursor query(Uri...

Loading an array with a classloader

java,class,classloader,loader
I'm trying to run this code: public class ClassLoaderTest { public static void main(String[] args) throws Exception { Object[] obj = new Object[]{}; String cname = obj.getClass().getName(); System.out.println(cname); ClassLoaderTest.class.getClassLoader().loadClass(cname); } } But it throws a ClassNotFoundException. Interestingly, if I instead use this line: Class.forName(cname); it works just fine. Whats going...

Cursor loads on fragment load, not on data change

android,loader
I can't figure out why onLoadFinished is not being called when I insert a new row. I have confirmed the following The row is inserted OK (the data appears on app restart) The ContentResolver is notified using the same Uri that the CursorLoader is created with The CursorLoader searches for,...

Why do we need to put the *.odex files under /system/app even if we already have /data/dalvik-cache?

android,optimization,virtual-machine,loader,dalvik
For instance, we have phone.apk and phone.odex under /system/app. According to some unofficial documentation, phone.odex is used to expedite the process of loading an app. However, why do we not just put phone.odex under /data/dalvik? What's more weird is: There exists a file named [email protected]@[email protected] under /data/dalvik, when the app...

Progress image loader pure javascript only when click on submit

javascript,html,image,loader
I'd like to show a progress image loader only when the user clicked on submit... at the moment I can only show a progress image when the user click on submit but the loader image is displayed also when the user reload the page... so I'd like to isolate the...

change jspm_packages location

loader,ecmascript-6,jspm
Is there a .bowerrc equivalent in jspm? When I run jspm install, I'd like jspm to install the packages to client/jspm_packages folder. How can I configure jspm to change location of jspm_packages folder? Thanks...

Rhino obj to Three.js visualisation problems

camera,three.js,loader,rhino
While testing the import/export between Rhino and Three, I have encountered some problems while visualising a fairly complicated obj file. I exported the obj from Rhino after triangulating the Mesh. The problem shows indipendently from the material: with no material, with a material or/and with a texture applied within Three....

OnLoadFinished called infinitely

android,android-contentprovider,loader
Yesterday I try to write my content provider and to test it. Unfortunately, this piece of code: if(loader.getId() == 1) getContentResolver().insert(Uri.parse("content://com.example.djak.contentprovidertest.provider/cte"), values); does something, because of which onLoadFinished is called infinitely. Has someone idea what is going on? When I remove it onLoadFinished is called only once. And when onLoaderReset...

QML ReferenceError: is not defined from Js function called from a qml file

javascript,qml,loader,stackview
Ok definitely not know what to do so I ask for help, I've looked everywhere and can not find solution. This is a long question involved the following files: sizeCalc.js, main.qml, MainForm.ui.qml, VentPrinc.qml and menuPrincElement.qml, the problem is this. Inside the file MainForm.ui.qml have the structure of the main window...

Updating DB from onLoadFinished calls onLoadFinished again and again

android,cursor,android-contentprovider,loader,android-cursorloader
I have a situation in which I need to insert a row at a date and update all the entries after a particular date in an Activity For this, I thought I'll load the entries after the date with a LoaderManager Callback and use a ContentProviderOperation array to update all...

Retaining EditText changes when using Loaders after orientation change

android,loader,orientation-changes
I have a fragment that's used for editing a project. I load all the data with a loader and then let the user edit it. The problem is that when a user enters some data in EditText and then rotates the device the loader reloads the data and overrides all...