Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Atalia Chez

Member
  • Content Count

    144
  • Joined

  • Last visited

Awards


This user doesn't have any awards

About Atalia Chez

  • Title
    Member

Recent Profile Visitors

662 profile views
  1. When I first installed the RAM module, I had Windows 10 Home, it ran without any problem for a week, after that I clean installed to Windows 10 Pro, since then I have been facing this issue. The newer RAM module has the same part identity as the previously installed one.
  2. I have Acer E5 575G, recently it randomly completely shuts off without any warning on battery. To turn on, I would then press power-up button. About 2 weeks ago, I installed another 8 GB RAM module installed Windows 10 pro after. I have run memory diagnostics, checked any disk errors, but everything is fine. One thing I have noticed is that when I boot it up again, I hear a one-time 'click' noise from the laptop. It's my work laptop, please someone suggest me a solution.
  3. I am thinking of buying a used external hard drive for storing my coding project backups. Why used? Because it is cheaper and currently I do not want to spend too much on a backup system. If it is 'worth' it to buy a hard drive what procedures should I take to inspect that it is still in use able condition. Thank you!
  4. I am trying to disable my DVD ROM so that it does not pops up when I press its button. Tried to disable its driver but it still works and the only the change I see is that 'CD/DVD' partition gets removed. Anyway to fix it?
  5. I am trying to create an application that would store 'to do works' and show it to the user. I have used SQLiteDatabase. The problem is that, I have setup cardview that would display the data user has entered. How it is displaying? It is supposed to read the data from sqlite database and then display to the card view. I am have been busting my a** off trying to find the solution but I could not. WorkListAdapter.kt package com.minutecodes.worklist.Data import android.content.Context import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import com.minutecodes.worklist.CommonLibs.Work import com.minutecodes.worklist.R class WorkListAdapter(private val workList: ArrayList<Work>, private val context: Context): RecyclerView.Adapter<WorkListAdapter.ViewHolder>() { override fun onCreateViewHolder(parent: ViewGroup, position: Int): ViewHolder { var view = LayoutInflater.from(context).inflate(R.layout.work_list, parent, false) return ViewHolder(view) } override fun getItemCount(): Int { return workList.size } override fun onBindViewHolder(parent: ViewHolder, position: Int) { parent.bindItems(workList[position]) } class ViewHolder(itemView: View): RecyclerView.ViewHolder(itemView) { var workName = itemView.findViewById(R.id.listWorkNameID) as TextView var assignedTo = itemView.findViewById(R.id.listAssignedToID) as TextView var assignedBy = itemView.findViewById(R.id.listAssignedByID) as TextView var assignedDate = itemView.findViewById(R.id.listDateAssignedID) as TextView fun bindItems(work: Work) { workName.text = work.workName assignedTo.text = work.assignedTo assignedBy.text = work.assignedBy assignedDate.text = work.dateAssigned.toString() } } } DatabaseHandler.kt package com.minutecodes.worklist.Data import android.content.ContentValues import android.content.Context import android.database.Cursor import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteOpenHelper import android.util.Log import com.minutecodes.worklist.CommonLibs.* import java.text.DateFormat import java.util.* import kotlin.collections.ArrayList class DataBaseHandler(context: Context): SQLiteOpenHelper(context, DATABASE_NAME, null, DATABASE_VERSION) { override fun onCreate(db: SQLiteDatabase?) { var DB_TABLE = "CREATE TABLE " +TABLE_NAME+ "(" +KEY_ID+ " INTEGER PRIMARY KEY," + KEY_WORK_NAME + " TEXT," + KEY_ASSIGNED_TO + " TEXT," + KEY_ASSIGNED_BY + " TEXT," + KEY_DATE_ASSIGNED + " LONG" + ")" db?.execSQL(DB_TABLE) } override fun onUpgrade(db: SQLiteDatabase?, p1: Int, p2: Int) { db?.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME) onCreate(db) } //Implementing CRUD functions fun createWork(work: Work) { var db: SQLiteDatabase = writableDatabase var values = ContentValues() //hashmap type values.put(TABLE_NAME, work.workName) values.put(KEY_ASSIGNED_TO, work.assignedTo) values.put(KEY_ASSIGNED_BY, work.assignedBy) values.put(KEY_DATE_ASSIGNED, work.dateAssigned) db.insert(TABLE_NAME, null, values) Log.d("DATA INSERTION", "SUCCESS") db.close() } fun readAWork(id: Int): Work { var db: SQLiteDatabase = writableDatabase val cursor = db.query(TABLE_NAME, arrayOf(KEY_ID, KEY_WORK_NAME, KEY_ASSIGNED_TO, KEY_ASSIGNED_BY, KEY_DATE_ASSIGNED), KEY_ID + "=?", arrayOf(id.toString()), null, null, null, null) if (cursor != null) cursor.moveToFirst() var work = Work() work.workName = cursor.getString(cursor.getColumnIndex(KEY_WORK_NAME)) work.assignedTo = cursor.getString(cursor.getColumnIndex(KEY_ASSIGNED_TO)) work.assignedBy = cursor.getString(cursor.getColumnIndex(KEY_ASSIGNED_BY)) work.dateAssigned = cursor.getLong(cursor.getColumnIndex(KEY_DATE_ASSIGNED)) var dateFormat: java.text.DateFormat = DateFormat.getDateInstance() var formatDate = dateFormat.format(Date(cursor.getLong(cursor.getColumnIndex(KEY_DATE_ASSIGNED))).time) return work } fun readBulkWorks(): ArrayList<Work> { var db: SQLiteDatabase = readableDatabase var list: ArrayList<Work> = ArrayList() var selectAll = "SELECT * FROM " + TABLE_NAME var cursor: Cursor = db.rawQuery(selectAll, null) if (cursor.moveToFirst()) { do { var work = Work() work.workID = cursor.getInt(cursor.getColumnIndex(KEY_ID)) work.assignedTo = cursor.getString(cursor.getColumnIndex(KEY_ASSIGNED_TO)) work.assignedBy = cursor.getString(cursor.getColumnIndex(KEY_ASSIGNED_BY)) work.dateAssigned = cursor.getLong(cursor.getColumnIndex(KEY_DATE_ASSIGNED)) list.add(work) } while (cursor.moveToNext()) } return list } fun updateWork(work: Work): Int { var db: SQLiteDatabase = writableDatabase var values = ContentValues() values.put(KEY_WORK_NAME, work.workName) values.put(KEY_ASSIGNED_TO, work.assignedTo) values.put(KEY_ASSIGNED_BY, work.assignedBy) values.put(KEY_DATE_ASSIGNED, System.currentTimeMillis()) return db.update(TABLE_NAME, values, KEY_ID + "=?", arrayOf(work.workID.toString())) } fun deleteWork(work: Work) { var db: SQLiteDatabase = writableDatabase db.delete(TABLE_NAME, KEY_ID + "=?", arrayOf(work.workID.toString())) db.close() } fun workCount(): Int { var db: SQLiteDatabase = writableDatabase var countQuery = "SELECT * TABLE " + TABLE_NAME var cursor: Cursor = db.rawQuery(countQuery, null) return cursor.count } } WorkActivity.kt package com.minutecodes.worklist.UI import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView import com.minutecodes.worklist.CommonLibs.Work import com.minutecodes.worklist.Data.DataBaseHandler import com.minutecodes.worklist.Data.WorkListAdapter import com.minutecodes.worklist.R import kotlinx.android.synthetic.main.activity_work.* class WorkActivity : AppCompatActivity() { private var dbHandler: DataBaseHandler? = null private var adapter: WorkListAdapter? = null private var layoutManager: RecyclerView.LayoutManager? = null private var workList: ArrayList<Work>? = null private var workListItems: ArrayList<Work>? = null //for storing bulk works list override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_work) //Initializing variables dbHandler = DataBaseHandler(this) layoutManager = LinearLayoutManager(this) workList = ArrayList<Work>() workListItems = ArrayList<Work>() adapter = WorkListAdapter(workListItems!!, this) recyclerViewID.adapter = adapter recyclerViewID.layoutManager = layoutManager workList = dbHandler!!.readBulkWorks() for(workReader in workList!!.iterator()) { var work = Work() work.workName = workReader.workName work.assignedTo = workReader.assignedTo work.assignedBy = workReader.assignedBy work.dateAssigned = workReader.dateAssigned work.workID = workReader.workID workListItems!!.add(work) } adapter!!.notifyDataSetChanged() } } Main activity: package com.minutecodes.worklist.Activity import android.content.Intent import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.text.TextUtils import android.widget.Toast import com.minutecodes.worklist.CommonLibs.Work import com.minutecodes.worklist.Data.DataBaseHandler import com.minutecodes.worklist.R import com.minutecodes.worklist.UI.WorkActivity import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { private var dbHandler: DataBaseHandler? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) setTitle("Add work") dbHandler = DataBaseHandler(this) saveWorkButtonID.setOnClickListener { if(TextUtils.isEmpty(workNameTxtID.text.toString()) || TextUtils.isEmpty(assignedToTxtID.text.toString()) || TextUtils.isEmpty(assignedByTxtID.text.toString())) { Toast.makeText(this, "Enter details", Toast.LENGTH_SHORT).show() } else { var work = Work() work.workName = workNameTxtID.text.toString() work.assignedTo = assignedToTxtID.text.toString() work.assignedBy = assignedByTxtID.text.toString() saveToDB(work) startActivity(Intent(this, WorkActivity::class.java)) } }//end of save button } fun saveToDB(work: Work) { dbHandler!!.createWork(work) } }
  6. Please anyone know how to fix it? I need to roll out update for my app real quickly for a bug fix. But this is error is giving warning that it may lead to run time crashes.
  7. I just tried to integrate Admob in my app. Here are the steps I did: 1- Add maven repository in project level Gradle 2- Added in my build.gradle file implementation 'com.google.android.gms:play-services-ads:15.0.1' Right after adding, com.support.android appcomapt threw error saying that libraries must use the exact same version specification implementation 'com.android.support:appcompat-v7:28.0.0-alpha3' ^^ this one is causing the problem. I tried changing it to aplha1 and syncing the project but still no luck. The problem seems to be generating from maven repository Here is the probable source of problem : maven{url "https://maven.google.com"}
  8. I hate to debate on which language is the best to start with. What I believe is that if you are really determined you can start with almost any language. Remember if you start with a 'tough' language, it WILL take time to learn. It WILL make you angry sometimes. It WILL make you rethink you decision. But if you stay to your decision and give you 100%, you will learn it eventually and transitioning to other languages will be way(x100) easier. You like Android? Dont directly jump to learn it. If you want to eventually learn Android, start with Java. After you are done with Java, learn Kotlin and THEN learn Android.
  9. I tried registering dev account with my mastercard. They declined the card and I can not make in app purchases as well. Card does works, for test purpose I added 5$ to my steam account. What do I do?
  10. Hey there! First of all, lets throw that 'fast' out of the window. Talking about C++, you can find complete C++ tutorial on Youtube. Here is what you made mistake, dont watch tutorial in one go. Just no. Learning few things, say, conditions in C++. Then STOP the tutorial, open up compiler, start making your OWN test programs using conditions in as many different ways as you can think of. Remember this, no one can or will be a good programmer if you dont tackle the problems on your own first. Cant find solution after your brain storming? Simply Google it or ask for help.
  11. Acer E5 575G. Really feasible laptop for programming. i5 7200u 2GB 940MX 1TB HDD 16GB RAM
  12. Installed JDK manually. Installed with exe installer. There is only one problem now, it fails to load appcompat with unkown error. Basically almost every theme is 'dead'. It doesnt works unless I choose holo light theme.
×