Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Activity for Anonymous‭

Type On... Excerpt Status Date
Question Why I am unable to find a class after implementing library also?
I had found a better way to plot in Java. ```java int n = Integer.parseInt(args[0]); // the function y = sin(4x) + sin(20x), sampled at n+1 points // between x = 0 and x = pi double[] x = new double[n+1]; double[] y = new double[n+1]; for (in...
(more)
over 2 years ago
Question How to plot in C++?
I was trying to plot using following lines in C++. ```cpp #include "koolplot.h" int main() { plotdata x(-6.0, 6.0); plotdata y = sin(x) + x/5; plot(x, y); return 0; } ``` When I was trying to run the program then I got the following message >g++ -o plot plot.cpp plo...
(more)
over 2 years ago
Question Why some items aren't clickable in RecyclerView?
```java if (type=="dialer") { String timestamp = list.get(position).get(Constants.DATE); holder.txtTimestamp.setVisibility(View.VISIBLE); holder.imgDelete.setVisibility(View.GONE); holder.txtTimestamp.setText(getDate(Long.parseLong(timest...
(more)
over 2 years ago
Question Why margin isn't working in SVG for path?
```svg ``` I had used (`style="margin:50px;"`) margin in `g`. But I noticed the margin isn't working. img Why it's happening? I have tried by increasing margin. But nothing happens.
(more)
over 2 years ago
Answer A: How does PathData work?
I was dealing with random Path. I had written a code like this : ```vector ``` As we know, there's two axes. 1. X axis. 2. Y axis. First value after "M" is representing X axis when the X axis gets very plain then sometime X axis "rotate" (very negligible) the icon (not directly rotati...
(more)
over 2 years ago
Answer A: WARNING: environment variable DISPLAY is not set (netbeans)
I had installed default-jdk, jre and java although I didn't get any GUI of netbeans. I was thinking what was missing. While visiting lots of site I had seen oracle (Article) then I remembered I didn't install Oracle after installing Oracle I can access GUI of netbeans. ```bash sudo apt-get install ...
(more)
over 2 years ago
Question How does PathData work?
What is pathData? I was thinking to convert SVG to XML. I found it. In the code, I had seen that ```xml android:pathData="M 64 2 C 98.2416544895 2 126 29.7583455105 126 64 C 126 98.2416544895 98.2416544895 126 64 126 C 29.7583455105 126 2 98.2416544895 2 64 C 2 29.7583455105 29.7583455105 2 64 2 ...
(more)
over 2 years ago
Question Hash sum mismatch (only for openjdk-11-jdk)
I was installing Java yesterday. I had faced lot of problem. I had fixed most of them. But I had changed Hash that's what I think. I don't remember which command I had executed since I had executed lots of command and visited lots of site. Now, whenever I go to install something I get an error which ...
(more)
over 2 years ago
Question WARNING: environment variable DISPLAY is not set (netbeans)
I was trying to install Netbeans in Xubuntu. I had installed Netbeans using Snapd. ```bash sudo snap install netbeans --classic ``` I was trying to start Netbeans then I got an error which was looking like this ```bash netbeans ``` >can't find JDK (I completely don't remember the err...
(more)
over 2 years ago
Answer A: can't find git repo (library)
At first you have to add ```gradle maven { url "jitpack.io" } ``` in settings.gradle. I was facing the issue after adding that line also. When I had reboot my system it's working fine then. You can try to close and re-run Android Studio also. I think that might be helpful also.
(more)
over 2 years ago
Question can't find git repo (library)
```plain Could not find com.github.Kunzisoft:Android-SwitchDateTimePicker:1.9. Required by: project :app Search in build.gradle files ``` I was trying to use the library. I had searched for 2.1, 2.0 and 1.9 none of them are working. I had searched through internet I had found similar is...
(more)
over 2 years ago
Question Why comma is expected for auto_increment?
```sql query = "CREATE TABLE "+TABLE+" ("+COLUMN1+" INTEGER PRIMARY KEY NOT NULL AUTOINCREMENT, "+COLUMN2+" VARCHAR(255), " + COLUMN3+" VARCHAR(255), "+COLUMN4+" TEXT, "+ COLUMN5+" VARCHAR(255), "+COLUMN6+" VARCHAR(255), "+COLUMN7+" TEXT)"; ``` error > ')',, ON or comma expected, go...
(more)
over 2 years ago
Question What's the better way to store base64 in SQLite Database?
What's the better way to store base64 in SQLite Database? I was thinking to put base64 as TEXT since base64 has lots of chars. ```sql CREATE TABLE name (id INTEGER PRIMARY KEY AUTOINCREMENT, image TEXT); ``` Is there any other value in SQL for base64? I don't want to use bitmap (BLOB)[^1]. ...
(more)
over 2 years ago
Question Why is the switch statement not executing the correct case blocks?
In the code below, the value of `order` variable should change according to `i`'s value: ```java String order; switch (i){ case 0: order = CallLog.Calls.DATE + " DESC "; contactViewAdapter = new ContactViewAdapter(getActivity(),getActivity(),new ReadContacts().CallLog(getA...
(more)
over 2 years ago
Answer A: Why ArrayList is always same value in only Adapter?
Each list index refers to the same `HashMap` which it just override the key's value with each iteration of your loop, losing any previously set values. So if I put the HashMap value inside loop then it works fine. So the code will look like ```java while(c.moveToNext()){ HashMap data = new HashM...
(more)
over 2 years ago
Question Why ArrayList is always same value in only Adapter?
This is the worst bug I have ever seen.. I was fetching CallLogs following way. ```java ArrayList> callLog= new ArrayList<>(); HashMap data = new HashMap<>(); Cursor c = activity.getContentResolver().query(CallLog.Calls.CONTENTURI, null, null, null, CallLog.Calls.DATE + " DE...
(more)
over 2 years ago
Answer A: What should I use instead of managedQuery?
There's obviously an alternative. But it was available earlier also. It's actually `getContentResolver().query()`. There's not much more difference. Both classes (not actually class it's something else I forgot the name), contain same code. Here's the query code. ```java @Nullable public fi...
(more)
over 2 years ago
Question What should I use instead of managedQuery?
`managedQuery` is recently deprecated. ManagedQuery was used for using Cursor. What should I use since managedQuery was deprecated? Without it, I can't work with Cursor. So there must be alternative of it. Sample Cursor : ```java Cursor managedCursor = managedQuery(CallLog.Calls.CONTENTURI, null...
(more)
over 2 years ago
Question What are the disadvantages of using static methods in Java?
I was using static method few moments ago. But I noticed that I was returning a variable using that static method. According to the article, >Static is a keyword that identifies the class-related thing. It means the given Method or variable is not instance-related but Class related. It can be acces...
(more)
over 2 years ago
Question event_start always returning contact number in android
Why `ContactsContract.CommonDataKinds.Event.STARTDATE` always returning contact number. The number is available in Google Contacts. img img Here what I am doing... ```java Cursor c; if (contactID=="") { c = activity.getContentResolver().query(Phone.CONTENTURI, null,...
(more)
over 2 years ago
Question What's the alternative of "ContactsContract.Contacts.LAST_TIME_CONTACTED"?
What should I use instead of `ContactsContract.Contacts.LASTTIMECONTACTED`? According to documentation, LASTTIMECONTACTED variable was deprecated. Even it was written in ContactsContract.class ```java / @deprecated / @Deprecated String LASTTIMECONTACTED = "lasttimecontacted"; ``` Since it w...
(more)
over 2 years ago
Answer A: What does android:ems do?
>The em is simply the font size. In an element with a 2in font, 1em thus means 2in. Expressing sizes, such as margins and paddings, in em means they are related to the font size, and if the user has a big font (e.g., on a big screen) or a small font (e.g., on a handheld device), the sizes will be in ...
(more)
over 2 years ago
Question What does android:ems do?
What does ems in xml do? I saw that I was using following line in EditText. But, I never thought what it does. I was trying to check what actually it does by removing the line. I couldn't see any difference in my layout. ```xml android:ems="10" ``` Then I visited attributes.xml (AKA a...
(more)
over 2 years ago
Answer A: Find image for contact list in Android Java
See https://developer.android.com/reference/android/provider/ContactsContract.Contacts.Photo There's PHOTOURI in ContactsContract.class. Fetch it following way. ```java String photo = c.getString(c.getColumnIndex(Phone.PHOTOURI)); ``` It's URI not URL. Don't confuse with URL. Now, you g...
(more)
over 2 years ago
Question Find image for contact list in Android Java
How to get image of contact list? I was using cursor to get contact list. Here how it looks like. ```java ArrayList> contactList = new ArrayList<>(); HashMap data; String name,phoneNumber; Cursor c = activity.getContentResolver().query(Phone.CONTENTURI,null,null,null,Co...
(more)
over 2 years ago
Question What's the better way to deal with deprecated feature?
It's a very old question came to my mind. Whenever I start building some applications for Android using Android Studio. In every update, lots of tools get deprecated. I know I can use deprecated "things". But, they don't work in higher version or API level. I was thinking if there was something t...
(more)
over 2 years ago
Answer A: What's the minimum API level for activity transition?
It worked for me hardly. ```java Intent intent = new Intent(Activity.this, SecondActivity.class); ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this); startActivity(intent, options.toBundle()); ``` According to the answer, R.anim was available from API leve...
(more)
over 2 years ago
Question What's the minimum API level for activity transition?
I was trying to show transition on activity changes. I had followed two method from SO. I lost those link so I can't add them here. My first method was I had used `overridePendingTransition` on onCreate method. ```java overridePendingTransition(R.anim.fadein, R.anim.fadeout); ``` I had ex...
(more)
over 2 years ago
Question How to break line in XML?
How to break line in XML? I was trying to follow the answer. But, It wasn't helpful for me. I had tried `` and ``. None of them works. ```xml Belgian Waffles $5.95 Two of our famous Belgian Waffles with plenty of real maple syrup 650 Strawberry Bel...
(more)
over 2 years ago
Answer A: How to show XML in browser?
I was searching further why it's not working properly. Then I created a CSS file. Linked that CSS to XML using the following command. ```xml ``` Then when I executed it then I could see the design. It was the output : output If you make changes to CSS then you can show it the way you w...
(more)
over 2 years ago
Question How to show XML in browser?
Is there possible way to run XML like as HTML? Suppose, I have following code. ```xml Belgian Waffles $5.95 Two of our famous Belgian Waffles with plenty of real maple syrup 650 Strawberry Belgian Waffles $7.95 Light Belgian waffles cover...
(more)
over 2 years ago
Answer A: Is it a good idea to have a permanent branch for a feature?
You may know me so I am answering :P (someone close to you but you can't find me directly). >Is it a good idea to have a permanent branch for a feature? Suppose, you have a permanent branch then you had PR 1 years later. Of course, there will be lots of changes in develop branch. But, you forg...
(more)
over 2 years ago
Question How allocated memory is calculated?
```c++ int arr[] = {10,123,14,14,15,16}; cout I was reading the article. >When sizeof() is used with the data types such as int, float, char… etc it simply returns the amount of memory is allocated to that data types. How the memory is calculated? Is there any equation to find that with...
(more)
over 2 years ago
Question What might happen if I ignore warning?
```c++ #include using namespace std; int linearSearch(int array[], int n, int key){ for(int i=0;i<=n;i++){ if(array[i]==key){ return i; } } } int main() { int balance[] = {10,240,120,150,100}; cout<<linearSearch(balance, sizeof(balance)/sizeof(balance[0]), 150); retur...
(more)
over 2 years ago
Answer A: Unable to use pyttx3 (libespeak.so.1: cannot open shared object file: No such file or directory)
```bash sudo pacman -Sy espeak ``` After installing espeak it's working well. I am not getting the error anymore. Reference
(more)
over 2 years ago
Question Unable to use pyttx3 (libespeak.so.1: cannot open shared object file: No such file or directory)
```python from tkinter import from tkinter import messagebox, filedialog import pyttsx3 import PyPDF2 import os import webbrowser root = Tk() root.geometry("500x500") root.title("Audio Book") speaker = pyttsx3.init() speaker volume volume = Label(root, text="Volume", width=25) vol...
(more)
over 2 years ago
Question edit button isn't taking me to `/edit/` page
Whenever I click on edit button it is redirecting me to that answer. This is happening for the answer. Here's a video
(more)
over 2 years ago
Question Tags are highlighting while my favourite tags is empty
My favourite tags is empty. Although, some tags are highlighting. Usually, I was using another account earlier. I forgot (lost that gmail address) password (I can reset but, I don't want to use that account) of that account. So, I created this account. I had added some tags in favourite tags. Now, th...
(more)
over 2 years ago
Question theme always not changing
```javascript const body = document.body; const light = evt => { body.setAttribute('data-theme', 'light'); localStorage.setItem("theme", "light"); console.log("light"); } const dark = evt => { body.setAttribute('data-theme', 'light'); localStorage.setItem("theme", "...
(more)
over 2 years ago