List View with SQL Lite and CheckBox in List View Problem: How do I get SQL data when I select chekbox?

I have 3 classes: Items, AdapterItems, Main Class 2 Layout: Show List, Main Layout.

Code of class objects:

Here I create the objects

package com.example.myapplication;
import android.widget.CheckBox;

public class Items {
private string PriceProduct;

public items (String Productprice) {
this.ProductPrice = ProductPrice;
}

public String getProductPrice () {return ProductValue;}
}

Adapter Items Class Code:

Here I create the adapter

package com.example.myapplication;

import android.content.Context;
android.view.LayoutInflater Import;
android.view.View import;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.ArrayList;


public class Adapter Items extends BaseAdapter {
private context context;
private ArrayList listItems;

public Adapter Items (context context, ArrayList listItems) {
this.context = context;
this.listItems = listItems;
}

// Count the objects to load
@Override
public int getCount () {
return listItems.size ();
}

// return the list
@Override
public object getItem (int position) {
return listItems.get (position);
}

//
@Override
public long getItemId (int position) {
return 0;
}

// where the list is created and we assign the values ​​of each element
@Override
public view getView (int position, view convertView, ViewGroup parent) {
Items items = (Items) getItem (position);

convertView = LayoutInflater.from (context) .inflate (R.layout.activity_show_listing, null);
TextView txt Show Price = (TextView) convertView.findViewById (R.id.txt Show Price);

img_avatar.setImageResource (items.getAvatar ());
txt_product.setText (items.getProduct ());
txtShowPrice.setText (items.getProductPrice ());
return convertView;
}
}

Main class calling the layout code:

here is the prolema in the layout I have the chekbox but they are not added in the daptador or in the article class, because from the database, the objects filled the objects with data and the chekbox no data needed, so that only the price object receives information with sql

package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
android.media.MediaCodec import;
import android.os.Bundle;
android.view.View import;
import android.widget.CheckBox;
import android.widget.ListView;
import android.widget.TextView;
android.widget.Toast import;

import java.util.ArrayList;

public class OrderProduct extends AppCompatActivity {
private ListView lst_items;
private adapterItems adapter;

@Override
protected void onCreate (bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_order_product);

lst_items = (ListView) findViewById (R.id.lst_items);
adapter = new AdapterItems (this, GetArrayItems ());
lst_items.setAdapter (adapter);
}

private ArrayList GetArrayItems () {
ArrayList listitems = new ArrayList <> ();

// Load database records
AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper (this, "administration", null, 1);
SQLiteDatabase DataBase = admin.getWritableDatabase ();

Row cursor = DataBase.rawQuery ("Select price from items", null);
if (row.moveToFirst ()) {
do
// Design of records These are objects and we introduce the data of the tables sql into the object lists
listitems.add (new Items (row.getString (0)));

} while (row.moveToNext ());
}
DataBase.close ();

return list items;
}
}

As you can see, the checkboxes with the price text view are repeated. I would like to add the prices according to the list checkboxes. I can not access the check boxes because they are in a different layout to display the list of the design and code in the main layout I can not call the chekbox.

my goal is to display a list of prices and when choosing chekbox i make the sum of the selected or create the object in item, but the item objects get data from the database or i create a class for the layout to list and from there validate the selected data. I am an apprentice, I need help.

Layout Code listlist:




    

        

    

    

        

        

    


Main layout code:




    

    

    


SQL Server Mssql query problem. The column & # 39; & # 39; is invalid in the selection list because it is neither contained in an aggregate function nor in the GROUP BY clause

There is a problem that I experienced in Mssql. (but I do not have this problem in MySQL.) You know two different engines. But I could not find a solution.
Do you think I can fix this error?


My question is

CHOOSE
COUNT (*) as stok_adet, s. *, M. *, D. *
FROM stok as s
CROSS JOIN mermer_cins as m
JOIN stok_durum as d ON s.stok_durum_id = d.stok_durum_id
WO m.mermer_cins_id = & # 39; 5 & # 39; AND s.blok_no = & # 39; M6320 & # 39;
GROUP BY s.bundle_no, s.boy, s.yukseklik, s.hatali
ORDER BY s.blok_no ASC, s.bundle_no ASC, s.stok_tarih DESC " 

And the reason for the error I get in mssql

The column & # 39; stok.stok_id & # 39; is invalid in the selection list because it is neither contained in an aggregate function nor in the GROUP BY clause.


This is the design of my tables in Mssql.

Table mermer_cins => https://pasteboard.co/IofwCGc.jpg
stok table => https://pasteboard.co/Iofx1QV.jpg
stok_durum table => https://pasteboard.co/IofxfJg.jpg

Here is the screenshot link of my running query in MySQL. => https://pasteboard.co/Iof1DVa.png

Windows 2012 R2 RDP problem

We have provided a customer with a Windows 2012 R2 VPS with 27 RDP user licenses. Often, users can not connect to the RDP and receive the following message

The number of connections to this computer is limited and all connections are currently in use

However, if we check the number of connected users by accessing the VPS with the noVNC console, we can see that no more than 4-5 users are connected. The problem is not resolved until after the Remote Desktop service is restarted. I know that Windows 2012 R2 has problems with RDP because we often have these issues with other servers and VMs. However, RDP user licenses have been issued for this VPS. Is this due to an RDP error in the Windows 2012 R2 operating system or is the problem something else?

Please help to understand and solve the problem.

Algorithms – PAN card validation problem

Given a paragraph P of words containing some PAN card numbers. Count the number of different valid PAN card numbers in P.

A valid PAN card number is a 10-length alphanumeric word of the form "AAAAA1111A" (without the quotation marks), where

  1. A denotes each letter of the English capital letter.

  2. 1 denotes any digit in 0,1,2 ….. 9.

  3. The fourth character can only consist of the set {"A", "B", "C", "F", "G", "H", "L", "J", "P", "T", " K "}.

  4. The fifth character must be the same as the first character.

Example: MKOFM5336S is a valid PAN card number.

entrance

Letter P of the words

output

Output number of the unique PAN card numbers in R

Example test case

entrance

$ MKOFM53365d * 02Hd | ^ BAAAB0000CAAC1111 …% G

output

2

explanation

It contains two different valid PAN card numbers: MKOFM53365S and BAAAB0000C

Unit – problem when creating wave animations

I want to create simple wavy animations with mesh. I thought it would look like a wave if there was a point in the middle of the net and changed the z-axis of that point, and then I'll change the points around the center one at a time. This did not happen.

What can I do to create a wave-like network animation?

My code:

using System.Collections;
using System.Collections.Generic;
with UnityEngine;

[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]

public class Gridd: MonoBehaviour
{
public mesh mesh;
public float axisCounter;
public Vector3[] vertices;
public int xSize, ySize;
point nokta;

int sayac = 0;

Private Empty Wake Up ()
{
mesh = new mesh ();
To generate();
}

private void Generate ()
{
_to generate();
}

private void OnDrawGizmos ()
{
to draw();
}

void start ()
{
nokta = new point (1,1, xSize, ySize, vertices);
}

void update ()
{
createMesh ();
StartCoroutine (destroy ());
}

IEnumerator destroy ()
{
float zAxis = 0;
while (true)
{
while (zAxis> = - axisCounter)
{
if (zAxis <= - axisCounter)
{
break;
}
zAxis = 0.01f;
nokta.func (xSize / 2, ySize / 2, zAxis);

Yield Return New WaitForSeconds (0.01f);
}

while (z<=axisCounter)
            {
                if(zAxis>= axisCounter)
{
break;
}
axis + = 0.01f;
nokta.func (xSize / 2, ySize / 2, zAxis);

Yield Return New WaitForSeconds (0.01f);
}
}
}

/ ********************************************************************************************* * ************************** /

void _generate ()
{
mesh = new mesh ();
GetComponent() mesh = mesh;
Corners = new Vector3[(xSize + 1) * (ySize + 1)];
for (int y = 0; y <= ySize; y ++)
{
for (int x = 0; x <= xSize; x ++)
{
corners[sayac] = new vector3 (x, y);
sayac ++;
}
}
sayac = 0;
}

void createMesh ()
{
mesh.vertices = vertices;
int[] Triangles = new int[xSize*xSize*6];
for (int y = 0; y <ySize; y ++)
{
for (int x = 0; x <xSize; x ++)
{
triangles[sayac] = (xsize + 1) * y + x;
sayac ++;
triangles[sayac] = (xsize + 1) * (y + 1) + x;
sayac ++;
triangles[sayac] = (xsize + 1) * y + x + 1;
sayac ++;
triangles[sayac] = (xsize + 1) * y + x + 1;
sayac ++;
triangles[sayac] = (xsize + 1) * (y + 1) + x;
sayac ++;
triangles[sayac] = (xsize + 1) * (y + 1) + x + 1;
sayac ++;
}
}
sayac = 0;
mesh.triangles = triangles;
}

Draw ()
{
if (vertices == null)
{
Return;
}
Gizmos.color = Color.black;
for (int i = 0; i <vertices.Length; i ++)
{
Gizmos.DrawSphere (vertices[i]0,01f);
}
}
}

/ ********************************************************************************************* * ****************************** /

public point
{
public int x;
public int y;
public int xSize, ySize;
public int[,] _nokta;
public int[,] Dalga;
int atlayici;
int kolaynokta;
int kolaynoktax, kolaynoktay;
public Vector3[] vertices;
bool buldumu = false;

public point (intx, inty, intxSize, intSize, Vector3[] vertices)
{
this.x = x;
this.y = atlayici * y;
this.xSize = xSize;
this.ySize = ySize;
this.vertices = vertices;
this.atlayici = xSize + 1;
this._nokta = new int[xSize,ySize];
this.kolaynokta = (xSize + 1) * y + x;
this.dalga = new int[ySize/2+1,xSize*ySize];
}

public void func (intx, inty, floatz)
{
corners[pointFinder(x,y)] = new vector 3 (x, y, -z / 2f);
Sub-waves (x, y, z);
}

public void subWaves (int x, int y, float z)
{
if (! buldumu)
{
find (x, y, z);
}
int counter = 8;
for (int a = 0; a <ySize / 2; a ++)
{
for (int b = 0, b <counter, b ++)
{
corners[dalga[a,b]]= new vector3 (vertices[dalga[a,b]].x, vertices[dalga[a,b]].y, _math (a, z));
}
Counter + = 8;
}
}

/ ********************************************************************************************* * ************************** /

Empty search (int x, int y, float z)
{
int katman = 2;
int wavex = x;
int wavey = y;
int _x = 0;
for (int a = 0; a <ySize / 2; a ++)
{
wavex--;
wavey ++;
int xarray = 0;
int yarray = 0;
for (int c = 0; c <katman; c ++)
{
Dalga[a,_x] = pointFinder (wavex + xarray, wavey + yarray);
xarray ++;
_x ++;
}
for (int c = 0; c <katman; c ++)
{
Dalga[a,_x] = pointFinder (wavex + xarray, wavey + yarray);
yarray--;
_x ++;
}
for (int c = 0; c <katman; c ++)
{
Dalga[a,_x] = pointFinder (wavex + xarray, wavey + yarray);
xarray--;
_x ++;
}
for (int c = 0; c <katman; c ++)
{
Dalga[a,_x] = pointFinder (wavex + xarray, wavey + yarray);
yarray ++;
_x ++;
}
Katman + = 2;
_x = 0;
}
buldumu = true;
}

int pointFinder (int x, int y)
{
int nokta = (xsize + 1) * y + x;
return nokta;
}

float _math (int a, float z)
{
z * = - 1;
float deger;
deger = z / (1,25f + (a + 1));
Return Deger;
}
}

Bottom image (GIF) of the result I achieved:

Enter image description here

np – Can I calculate the time to find the optimum of a travel salesperson's problem with a supercomputer, and can I know that the city limit is now computerized?

I want to know the real limit of our computing power that we have now
What is the limit of the cities that I can achieve with optimal sol.
I believe that the first computer is 10 ^ 19 process in the second

and
can I calculate the time that it will take by looking at compounds of the directed graph?
and say the time by this force 10 ^ 19

how can I edit real graphic of the problem and delete cities from it

utf 8 – Problem with Utf8 encoding in Laravel

I have a problem with the UTF8 encoding. I do not know what happens.
If I print the text via the controller, it is correct as follows: http://prntscr.com/ofcemt.

But if I pass the text to the view

return view (& # 39; text_page & # 39 ;, compact (& # 39; title & # 39 ;, textexample & # 39;));

The text loses the UFT8 encoding and thus becomes http://prntscr.com/ofce0t

Glutenprint possible problem

A label could not be printed directly from EBAY. Push button pressed, but print side has timed out. Print it on my e-mail account and print it from there. Can print other files OK. The print queue referred to this good thing. I did a system update, but that did not help. Is this gluten the problem, is not it part of the standard packaging? or do I have to add this separately? Printer is Canon MX470

Cheers Omhie

What are these? [bot] Traffic to my website?

Hello friends,

What are these? [bot] Traffic to my website?

Love Marriage Problem Solution India | Husband Wife Relationship Problem Solving | Tantrik Bangali Babaji | Love problem solution | Vashikaran Mantra for Love | Vashikaran Specialist Baba ji

,

Interpolation – Problem with the interpolation function returned by NDEigensystem

I'm trying to evaluate the interpolation function returned by NDEigensystem at some point in time, but Mathematica does not evaluate it.

{vals, funs} = NDEigensystem[-Laplacian[u[x], {x}]u[x], {x, 0, [Pi]4];
f = fun[[3]](* 3rd eigenfunction *)
plot[f[f[f[f[x], {x, 0, pi}](* this plot returns a blank plot *)
plot[f, {x, 0, Pi}] (* this action works well *)
f[2]

As you can see, f[2] is not evaluated. Any help with the problem with the plot and the function rating would be appreciated.

Enter image description here