Reference Questions
Ad
Ad
MapboxGL is not defined error solution
Fix mapboxgl is not defined. it's an easy fix you just have to include mepboxgl script into your Head section.
Mapbox production error in console Uncaught Reference Error
Fix Mapbox production error in console. "Uncaught ReferenceError: y is not defined". with Mapbox 2.0 version React app in the production environment gets this error and it's really easy to fix it.
Correct way to pass the char pointer to helper fuction and assign the value in C
I have some questions regarding assign the value to a char* in a helper function. if i have following code int main() { char *p
Should I pass an int array to a function by reference?
A basic idea of what i'm talking about is below. #include <stdio.h> void
Pointer to pointer in linked list
Can someone explain me why this code give me as result the empty list: typedef struct str_node{ int data; struct str_node *next;
How do i pass an array of structs by reference to a function?
I need to write a function that would reflect an image by having ever pixel in the image with in a 2d array of structs. below is the function i
Does this downcasting lead to undefined behavior?
Given this sample: class base { public: void foo() {}; }; class derived : public base { }; int
Is throwing a temporary value as reference undefined behavior?
To my surprise, std::runtime_error only has a const std::string& constructor, but no value constructor. thus i am
Watch for addition of a referenced library to a project (Visual Studio 2008 plug-in)
I am hoping someone can help me with this. what i have been looking around for but can't seem to find is if there is someway to add an event, or
Is it better in C++ to pass by value or pass by constant reference?
Is it better in c++ to pass by value or pass by constant reference? i am wondering which is better practice. i realize that pass by
c++: passing arrays by reference
I am trying to define a function prototype which takes an array of char of different lengths. i understand that i must pass the
This dereferencing pointer in C works fine, but it looks wrong
This c code works fine (the compiler is gnu11). i'm sure it can improved since it gives a "dereferencing type-punned pointer" warning,
Ad
How to save an index of PageView and load it when reopening the app?
I want to save an index of pageview and load it when reopening the app. for example, if a user closes the app on page 2, the
Shared pref return always default value on all activities except SettingsActivity
I'm trying to implement dark mode into my app. i decided to use shared preferences to save the current state of dark mode. the problem is that the
Reduction procedure for MethodReference Expressions
Consider the following article from jls that describes the reduction procedure for the methodreference expressions during type inference
How to save users' last read Page Number
I am building an android app which displaying a specific pdf through
having some confusion about c pointer assignment
I'm having some trouble wrapping my head around pointer assignments in c. the asterisk character appears in many different locations and i don't
PreferenceManager getDefaultSharedPreferences deprecated in Android Q
Preferencemanager getdefaultsharedpreferences is deprecated in
Used Reference in javascript is not available inside the catch-Block
Inside our javascript-code we have a try...catch-block. the class works like the following: const ourcustomclassfile =
Unresolved reference: getPreferences
I am trying to store a boolean value which is changed every time a button is clicked. i want to do this using shared preferences, however i keep
Two variables refers to same config.js File using require (Reference Problem) in Node.js
Hello i have this scenario in node.js // config.js module.exports = { dataurltest: "http://www.google.com", };
How to assign the query responses to the global.arrays, not the value inside the array of global.arrays?
Question: i am trying to assign to global arrays the results of queries to my mongodb database efficiently. i essentially
How to change first value in list of two lists
I would like to know how to change the first value of such list: [100][timestamp] [200][timestamp] [300][timestamp]
Ad
SwitchPreference not working properly - why so?
I am using switch preference in my preference activity to change app theme but it is not working properly . i can't figure out what am i doing
Getting a reference to a React Component using useRef hook
The current value in the reference object that useref returns is always null. i've reproduced the issue here
Flutter & Shared Preferences: How do i save and read back a List<Object> using setStringList? Also, how do i remove a specific object from the List?
Class restaurant { restaurant({ required this.name, required this.description, required this.address, required
Array of custom object model won't save to shared preferences
I am trying to do a module where once i fetched the json from the api and i am loading it into ram memory i immediately load it to shared prefs
Will shared_preferences not persist after the app is killed? (flutter)
I noticed this text in the shared_preferences documentation: "data may be persisted to disk asynchronously, and there is no guarantee
Android Button in preferences changing the MainActivity
I have a preference activity where i would like to add a button. if this button is clicked, it should load some data and update the
How to set maximal length of EditTextPreference of AndroidX Library?
Recently, i migrate my android project to androidx and i use the edittextpreference from androidx library. now, i want to set the maximum length
Fetching Shared Preferences String Value in Recyclerview Adapter
I want to fetch string value from shared preferences and show it in recylerview adapter. any help will be appreciated this is my code
SharedPreferences returns wrong value
I'm fairly new to android and java, i'm pulling some data from the internet by clicking on an item in a list view, but i need 2 calls to get the
how to update firestore database value correctly
I am working to build basic shopping functions in my flutter app. i'm new to coding and flutter. when the user clicks the
LateInitializationError: Field 'displayName' has not been initialized in Flutter's Shared Prefrence?
I am creating an flutter application in which i need to store the user information and for some extent i am able to achieve it with shared
Ad
How to access Flutter's shared preference file?
I am pretty new to flutter and currently, i am writing an app that needs to store key-value pairs to disk and read it each time the app is
Data isn't showen after fetchig it from sharedpreferences
I save data to sharedpreferences, but when i get the data, it isn't shown at the screen. i can print the correct data in the console log, but i am
How to save a list to shared preferences
I want to save a list to shared preferences, but it doesn't work... the goal is to add data to the variable and save it. this is the
Future builder runs forever, if memoizer used doesnt notify to the listerners
I am trying to switch the drawer tab, according to the value stored in shared preferences using the following code. code works fine when
Javascript/Node Date specification
the official documentation for js i know is
How to display a saved list in Shared preferences in another list in another page(Favorite page)?
Hello community, i'm new to the flutter world and mobile app development and struggling with how to display a saved list in shared
How to figure out why app is crashing when trying to access SystemPreferences data
I am trying to maintain a userid and username throughout my app. i created a class called session that places and receives data to
Modifying a pass by reference in a foreach loop
The values returned from explode() are pass by reference, so the following works:
How to allow two or more react native apps to share data with each other?
I am working on a poc where i want to share data between two or more apps on the same device. i have read about shared preferences for android but
How to control storing user data using SharedPreferences when logging in and out?
I'm trying to create an app which uses username and password to login, then stay logged in as long as user didn't logout -or didn't delete app
Sharing setting names and default value in PreferenceScreen and Code
I have my preferencesettings xml <?xml version="1.0" encoding="utf-8"?> <androidx.preference.preferencescreen
Ad
Android - pass data from fragment to new java class
I am trying to pass an integer from a fragment to another java class however i keep getting an error: attempt to invoke virtual method 'int
flutter/ how to save geopoint using shared preferences
I want to know how to save user's geopoint using shared preferences in my flutter app. it has 2 values(lat, long), but the following code was all
Shared preferences must be initialized error
In flutter i have faced with my below error about non-nullable variable. i am using shared preferences package for storing user info in device. i
How can I get preferences from shared preferences in a method that can't by async in Flutter?
I want to get the bool of a shared pref to decide which widget should get loaded, but the method cant be async or to bool cant get the value
When to use Shared Preferences in flutter?
I'm just curious about when is the perfect time to use shared preferences, i know that it is perfect to use it when we have to save login data for
How to get the value of flutter map by call by value
I am developing a movie app using tmdb. a total of 3 pieces of data are needed to create a reservation system. 1.movielist's
Object is null since the second method call
With the following code, the script enters in the block of if (myset! = null) only at the first call of the method.
Is it okay to use shared preferences for big data objects?
I know there are some topics and posts about this question, but i want to have an individual feedback. so in my app i use one shared preferences
Why to pass function reference instead of method in onClick event of button in ReactJS?
Whenever i pass function parentheses in onclick of button, it automatically calls when page loads even without clicking on button. but when i
Flutter using SharedPreferences with Json for storing an object
I have to store the last loaded weather information, therefor i use tojson method to get a json-file out of the weather-object:
How to save prefs to different scopes in Flutter?
I am trying to use shared prefs to store app data and user data differently, like this : { "app_data": {
Ad
How to Copy an Object without Create Reference Dart
I want to give object value from another but when i modify name2 it modify name1 at same time. item item2 = item1; item2.name =
How to create a bool list in shared_preferences and store values there
Required this.favorite, i got the bool value from the previous page like this. since i used the pageview, i want to store
delete one element in a list in sharedPreferences
I'm trying to delete an element in my favoritelist here but this doesn't seem to be working. i've looked on the web but couldn't find
how to use FutureBuilder with Visibility in a widget flutter
It has been days since i am trying to figure out how to keep hidden posts hidden from the user, who has hidden it. i tried filtering with
Count how many times the app is open using shared preferences
I have a widget who should be shown on home screen after a number of app open events. i know i have to use shared preferences, but i don't know
How to read and use shared preference values in initstate()? I can read and use values in other widgets but not in my API which i call in initstate
I am creating a list of businesses through restapi in initstate. i need to use sharedpreference value as one of its parameter but when i try to
How to Create a Custom SeekBar Preference?
I'm trying to create a custom seekbar preference, but android can't seem to find the element. i get
Self Launch Using Flutter?
I am new to flutter somehow and i was wondering is there a way to make my application force open itself..like self-launch? i am trying to make an
Equality of reference types in template parameters
The c++ standard says in [temp.type]#2.7, that
How to use shared preferences without an async method in dart?
I want to show a text in a child of a container in flutter but first i have to use shared preference to get my value, i tried to use
Flutter - Need help on a proper way to use splash screen + Login data with SharedPreferences checking
I am trying to display a splash screen with 3 seconds timer while getting isloggedin value from
Ad
How can I get username and password from SharedPreferences in Android?
I am trying to recover the username and password to be able to start a session. these are the users of the sharedpreferences.
how can i store List<object> in sharedpreferences using provider?
So basically this is my provider, what i want is how can i store the model data coming from provider to a shared preferences, and then how to
How to change toolbar color according to the radio button selected after the second login using android kotlin
I need to change the toolbar color in the second login time according to the radiobutton selected in the
How can you make a createRef/useRef not target the last value. But rather go to where its suppose to
Can't manage to make useref/createref to get any other div's other then what was added last. how can i make it so when the button is clicked the
I'm trying to implement a favorites feature locally in flutter that works both inside the page and on the select page
I'm trying to add a favorites feature with flutter. if you activate it by clicking the favorites button inside the page, you need to implement it
How to create settings screen in android app?
How do i create a settings screen? should i use preferenceactivity or preferencefragment? note-
The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't in Text widget
I am trying to display the name and email of the person when he logs in to the profile screen using getx
Firebase CloudFirestore reference datatype
Does anyone know how the cloudfirestore reference datatype is supposed to be used ? i have a document that have a reference field, how do i get
Deserialized object type get value throw null reference
I have a json response from ajax and i am trying to deserialize it as object type(not a defined model class) and access its properties value.
C Pass By Reference Misconception
Specifics matter. especially when talking about how something works, and even more so when we consider why something works. currently, as i
Flutter Json FormatException
In my application, i'm trying to retrieve the data from shared preferences and pass that value to the provider. how ever im getting a
Ad
Why does SharedPreferences need two keys?
I'm trying to build a single object that handles all my sharedpreferences, since they are mostly used in the whole app, and i don't
How to change the font size of a preference?
I don't know how to change the font size of a few preferences. i have tried
Android: How do I create a Fragment that extends from AppCompatPreference
I'm trying to create an app with a navigation bar. the navigation bar will have options to go to, such as the settingsactivity which
How can I add item to SharedPreferences with out coding in Flutter?
I am new on flutter. i'm using the sharedpreferences to keeping tokens and etc. it works like below. final prefs = await
Making a copy/clone of a "List<List<Map>>"
I'm trying to create a copy/clone of a "list<list<map'>>". so far i tried: datafty2 =
SharedPreferences putInt method not working
Private boolean rightreviewtiming() { int insertkitcnt = sharedpreferences.getint("insert_kit_cnt",0); insertkitcnt++;
Get value from SharedPreferences without future builder
I need to get one stored value from shared preferences and put it into text widget. how can i do this without a future builder?
Shared Preferences won't save the data
I'm new to android, and a bit to java (don't ask) i want to use the shared preferences, and till to this day everything worked fine, but
Is it possible to store a data from recyclerview by using only SharedPreferences?
I'm new in android and also new in english sorry my bad english... i have learned android course at the academy. the last class was
What is the alternate of shared preference in flutter
I am developed an app, which is almost complete it is in deployment stage. but, now i am in huge problem, i uninstall the app from emulator and
android WeakReference of activity
I have an async task, where i had a warning that it should be static or leaks might occur. so i used a weakreference like this:
Ad
How to check CheckBoxPreference is checked or not?
I have a setting page where i have added checkboxpreference i need to check whether the checkbox is checked or not? my code is :
How can i save data in shared Preferences and receive it to another page in flutter
I tried to save data in shared preferences. when i hit in api, with id and pass it gives me token and id. i saved my token in sharedpreferences
how to retrieve a value from shared preferences instantly? - FLUTTER
I'm trying to show a page as an initial login, this is only displayed when my switch value is set to true. the switch value is stored with shared
LateInitializationError SharedPreferences
I am trying to make a singleton of sharedpreferences, but i get a failure of not initialized (lateerror (lateinitializationerror:
manage login tokens (flutter)
I'm using shared preference in my flutter app and i want to manage login token. this is my auth class : class auth with
TextView inside Custom Preference does not get updated properly
I have 2 fragments : homefragment that extends fragment settingsfragment that
findViewById fails in onViewCreated of a PreferenceFragment, Android
I have two fragments : - homefragment that extends fragment - settingsfragment that extends preferencefragment each one contains
save string and associated icon with shared prefs
I'm currently using the shared preferences to save a string list. every time the page is opened, for every string entry from the list i create a
Chaining multiple Method calls at the same time? Example provided
Simply put, i have an if statement with multiple different outcomes, but a lot of code in common. i want to make sure that the
Flutter : Class 'Future<List<String>>' has no instance getter 'length'
I have a list of string saved on sharedpreference in flutter app, i want to call it inside provider and using it in a widget. provider :
Flutter: Using Shared Preferences and set min and max value for a variable
I am using a variable called "int _progs1 = 0;". this variable i can set with a "if statement" to a max and min value, that it
Ad
Another exception was thrown: Null check operator used on a null value
I need to use a future builder to get the value of a radio button form shared preferences. but the error occurs when i open the page of the radio
Why doesn't the output change?
I'm studying for a python final on wednesday. i'm having some issues with the references in lists. i need some explanation as to what is
Ad
Blog Categories
Ad