Git Product home page Git Product logo

c_client's Introduction

GridDB

Visit Website GitHub All Releases GitHub release

Overview

GridDB is Database for IoT with both NoSQL interface and SQL Interface.

Please refer to GridDB Features Reference for functionality.

This repository includes server and Java client. And jdbc repository includes JDBC Driver.

Quick start (Using source code)

We have confirmed the operation with Linux(x64).

  • CentOS 7.9 (gcc 4.8.5), RockyLinux 9.3(gcc 11), Ubuntu 22.04(gcc 11)

Note:

  • Please install Python3 in advance.
  • Please install tcl like "yum install tcl.x86_64" in advance.

Build a server and client(Java)

$ ./bootstrap.sh
$ ./configure
$ make

Note: When you use maven build for Java client, please run the following command. Then gridstore-X.X.X.jar file is created on target/.

$ cd java_client
$ ./make_source_for_mvn.sh
$ mvn clean
$ mvn install

Start a server

$ export GS_HOME=$PWD
$ export GS_LOG=$PWD/log
$ export PATH=${PATH}:$GS_HOME/bin

$ bin/gs_passwd admin
  #input your_password
$ vi conf/gs_cluster.json
  #    "clusterName":"your_clustername" #<-- input your_clustername

$ bin/gs_startnode
$ bin/gs_joincluster -c your_clustername -u admin/your_password

Execute a sample program

$ export CLASSPATH=${CLASSPATH}:$GS_HOME/bin/gridstore.jar
$ mkdir gsSample
$ cp $GS_HOME/docs/sample/program/Sample1.java gsSample/.
$ javac gsSample/Sample1.java
$ java gsSample/Sample1 239.0.0.1 31999 your_clustername admin your_password
  --> Person:  name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]

Stop a server

$ bin/gs_stopcluster -u admin/your_password
$ bin/gs_stopnode -u admin/your_password

Quick start (Using RPM or DEB)

We have confirmed the operation with Linux(x64).

  • CentOS 7.9, RockyLinux 9.3, Ubuntu 22.04

Note:

  • Please install Python3 in advance.
  • When you install this package, a gsadm OS user are created in the OS.
    Execute the operating command as the gsadm user.
  • You don't need to set environment vatiable GS_HOME and GS_LOG.
  • There is Java client library (gridstore.jar) on /usr/share/java and a sample on /usr/gridb-XXX/docs/sample/programs.
  • If old version has been installed, please uninstall and remove conf/ and data/ on /var/lib/gridstore.

Install

(CentOS/RockyLinux)
$ sudo rpm -ivh griddb-X.X.X-linux.x86_64.rpm

(Ubuntu)
$ sudo dpkg -i griddb_X.X.X_amd64.deb

Note: X.X.X is the GridDB version.

Start a server

[gsadm]$ cp /usr/griddb-X.X.X/conf_multicast/* conf/.

Note: Default is only for local connection. So, please change the configure files.

[gsadm]$ gs_passwd admin
  #input your_password
[gsadm]$ vi conf/gs_cluster.json
  #    "clusterName":"your_clustername" #<-- input your_clustername
[gsadm]$ gs_startnode
[gsadm]$ gs_joincluster -c your_clustername -u admin/your_password

Execute a sample program

$ export CLASSPATH=${CLASSPATH}:/usr/share/java/gridstore.jar
$ mkdir gsSample
$ cp /usr/griddb-X.X.X/docs/sample/program/Sample1.java gsSample/.
$ javac gsSample/Sample1.java
$ java gsSample/Sample1 239.0.0.1 31999 your_clustername admin your_password
  --> Person:  name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]

Stop a server

[gsadm]$ gs_stopcluster -u admin/your_password
[gsadm]$ gs_stopnode -u admin/your_password

If necessary, please refer to Installation Troubleshooting.

Document

Refer to the file below for more detailed information.

Client and Connector

There are other clients and API for GridDB.

(NoSQL Interface)

(SQL Interface)

(NoSQL & SQL Interface)

(Others)

There are some connectors for other OSS.

Community

  • Issues
    Use the GitHub issue function if you have any requests, questions, or bug reports.
  • PullRequest
    Use the GitHub pull request function if you want to contribute code. You'll need to agree GridDB Contributor License Agreement(CLA_rev1.1.pdf). By using the GitHub pull request function, you shall be deemed to have agreed to GridDB Contributor License Agreement.

License

The server source license is GNU Affero General Public License (AGPL), while the Java client library license and the operational commands is Apache License, version 2.0. See 3rd_party/3rd_party.md for the source and license of the third party.

c_client's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

c_client's Issues

How do I fix overlapping divs in HTML when I change the window size?

<title>My Favorite Recipe</title> <style> body {background-color: #33AA00; width: 100%; padding-left: 20px;} article {vertical-align: all}
/*Header styling*/
#navigation_header {
  height: 75px; 
  width: 97%; 
  font-size: 20px; 
  background-color: #00FA66;}

#navigation_header_list{list-style: none; padding-left: 0; 
  display: flex; 
  justify-content: Space-around; 
  line-height: 75px;
}

.Navigationlistitem:hover{
  background-color: #008C66; 
  padding: 0 5px 0 5px; 
  transition: .3s;
}

.header_list *{
  text-decoration: none;
  color:black;
}

/*Recipe Title Styling*/
#RecipeTitleContainer {
position: relative; 
display: flex; 
justify-content: center; 
align-items: center;
width: 98%;
border-bottom: 10px solid yellow;
padding-bottom: 20px;
}


#RecipeTitle {
position: absolute; 
left: 50%; bottom: 40px; 
transform: translate(-50%, -10%); 
padding: 2px; 
font-size: 40px; 
color: black;
font-weight: bold;
font-family: Arial;
background-color: white;
}
    
 
/*Paragraph Styling*/
#Paragraph_card {
  font-size: 25px;
  width: 98%;
  height: 350px;
  display: block;
  position: relative;
  margin-bottom: 20px;
}


.heading3 {
  font-size: 25px;
  text-decoration: underline;
  text-decoration-color: yellow;
}

#row01{
  display: flex;
  flex-wrap: wrap;
  position: relative;
  max-width: 100%;
  padding-top: 25px;
  margin-top: 35px;
  position: relative;
}
</style>
Quick 'n Easy Chicken Caldereta Recipe

Caldereta or Kaldereta is one of the most popular dishes in the Philippines. In fact, when you go to any Filipino restaurant or even in the carinderias, I’m sure you’ll find the Caldereta.

Caldereta is basically a tomato based stew that originally started with goat meat as the main ingredient. Later on, variations in meats where made like Beef Caldereta, Pork Caldereta, and for this recipe, we have Chicken Caldereta.

The minor ingredients also vary but the most staple ones are the tomato sauce (duh), bell peppers, and sausages (a cheaper alternative can make use of hotdogs).

Yes, why not use chicken in creating this yummy dish? Chicken is readily available, its raw price is reasonable, and a big bonus is that it contains less fat (good news for people trying to reduce weight).

Ingridients

  • 1/4 cup oil
  • 500 g chicken, thigh fillet
  • 1 cup potato, cut into chunks
  • 1/4 cup onion, red, chopped
  • 2 tsp garlic, minced
  • 1/2 cup liver spread
  • 1 1/2 cup water
  • 1 pouch DEL MONTE Quick 'n Easy Caldereta Sauce (80g)
  • 1/4 cup bell pepper, green, cut into 2-inch strips
  • 1/44 cup bell pepper, red, cut into 2-inch strips

Preparation

  1. Cook the chicken- Heat the oil in a pan. Brown the chicken thighs on both sides until golden brown then set aside.
  2. Cook the vegetable- In the same pan, fry the potatoes until golden brown and cooked through. Set aside.
  3. Sauce- Remove the oil from the pan but leave around 2tbsp of oil. Saute the onions and garlic until aromatic.
    Add the liver spread, water and Del Monte Quick n Easy Caldereta Sauce. Add the chicken back to the pan,
    cover and simmer until the chicken is cooked. Add the potatoes and bell peppers. Simmer for 1 minute then serve.

Cooking Skills Needed

  • Chopping
  • Pan Frying
  • Sautéing
  • Simmering

Cooking Tools Needed

  • Chopping Board
  • Knife
  • Measuring Cups
  • Measuring Spoon
  • Pan
  • Rubber Spatula
  • Tongs

Cooking References

  • Chicken Caldereta by Kawaling Pinoy
  •   <li><a target="_blank" href="https://panlasangpinoy.com/chicken-caldereta/">
        Chicken Caldereta
      </a> by Panlasang Pinoy</li>
      
      <li><a target="_blank" href="https://casaveneracion.com/chicken-caldereta/">
      Chicken Caldereta
        </a> by Casa Veneracion</li>
      
      <li><a target="_blank" href="https://www.pinoyrecipe.net/kalderetang-manok-or-chicken-caldereta-recipe/#wprm-recipe-container-10272">Chicken Caldereta
        </a> by Pinoy Recipe at Iba pa</li>
      
      <li><a target="_blank" href="http://www.russianfilipinokitchen.com/2015/09/05/chicken-caldereta/">Chicken Caldereta
        </a> by Russian-Filipino Kitchen</li>
      
    </ul>
    

Contact

Email me

Can not be reset NULL in a column with gsSetRowFieldByXXX()

When GSRow object is reused, it can not be reset NULL in a column with gsSetRowFieldByXXX().

This is a sample code.
#include "gridstore.h"
#include <stdio.h>

int sample1(const char *addr, const char *port, const char *clusterName, const char *user, const char *passwd) {
    GSResult ret = EXIT_FAILURE;
    GSGridStore *store;
    const GSPropertyEntry props[] = {
            { "notificationAddress", addr },
            { "notificationPort", port },
            { "clusterName", clusterName },
            { "user", user },
            { "password", passwd } };
    const size_t propCount = sizeof(props) / sizeof(*props);
    ret = gsGetGridStore(gsGetDefaultFactory(), props, propCount, &store);
    ret != GS_RESULT_OK ? printf("gsGetGridStore failed %d\n",ret) : 0;

    GSContainer *col;
    GSRow *colRow;
    GSBool bExists;
    GSColumnInfo colInfoList[3] = { {"long", GS_TYPE_LONG},
                                    {"float", GS_TYPE_FLOAT},
                                    {"byte", GS_TYPE_BYTE}};
    GSContainerInfo colInfo = {"col",
                                GS_CONTAINER_COLLECTION,
                                3,
                                colInfoList,
                                GS_TRUE,
                                GS_TRUE,
                                NULL, 0, NULL, NULL,0, NULL};
    ret = gsDropContainer(store, "col");
    ret != GS_RESULT_OK ? printf("gsDropContainer failed %d\n",ret) : 0;
    ret = gsPutContainerGeneral(store, "col", &colInfo, GS_FALSE, &col);
    ret != GS_RESULT_OK ? printf("gsPutContainerGeneral failed %d\n",ret) : 0;
    ret = gsSetAutoCommit(col, false);
    ret != GS_RESULT_OK ? printf("gsSetAutoCommit failed %d\n",ret) : 0;

    ret = gsCreateRowByContainer(col, &colRow);
    ret != GS_RESULT_OK ? printf("gsCreateRowByContainer failed %d\n",ret) : 0;

    ret = gsSetRowFieldByLong(colRow, 0, 111);
    ret != GS_RESULT_OK ? printf("gsSetRowFieldByLong failed %d\n",ret) : 0;
    ret = gsSetRowFieldByFloat(colRow, 1, 1.1);
    ret != GS_RESULT_OK ? printf("gsSetRowFieldByFloat failed %d\n",ret) : 0;
    ret = gsSetRowFieldNull(colRow, 2);// NULL
    ret != GS_RESULT_OK ? printf("gsSetRowFieldNull failed %d\n",ret) : 0;
    ret = gsPutRow(col, NULL, colRow, &bExists);
    ret != GS_RESULT_OK ? printf("gsPutRow failed %d\n",ret) : 0;
    ret = gsCommit(col);
    ret != GS_RESULT_OK ? printf("gsCommit failed %d\n",ret) : 0;

    ret = gsSetRowFieldByLong(colRow, 0, 222);
    ret != GS_RESULT_OK ? printf("gsSetRowFieldByLong failed %d\n",ret) : 0;
    ret = gsSetRowFieldNull(colRow, 1);// NULL
    ret != GS_RESULT_OK ? printf("gsSetRowFieldNull failed %d\n",ret) : 0;
    ret = gsSetRowFieldByByte(colRow, 2, 2);
    ret != GS_RESULT_OK ? printf("gsSetRowFieldByByte failed %d\n",ret) : 0;
    ret = gsPutRow(col, NULL, colRow, &bExists);
    ret != GS_RESULT_OK ? printf("gsPutRow failed %d\n",ret) : 0;
    ret = gsCommit(col);
    ret != GS_RESULT_OK ? printf("gsCommit failed %d\n",ret) : 0;

    int64_t l = 111;
    GSBool nullValue;
    void *key = &l;
    ret = gsGetRow(col, key, colRow, &bExists);
    ret != GS_RESULT_OK ? printf("gsGetRow failed %d\n",ret) : 0;
    ret = gsGetRowFieldNull(colRow, 1, &nullValue);
    ret != GS_RESULT_OK ? printf("gsGetRowFieldNull failed %d\n",ret) : 0;
    if (nullValue) {
        printf("rowKey = %d, field 1 is null [NG]\n", l);
    }
    ret = gsGetRowFieldNull(colRow, 2, &nullValue);
    ret != GS_RESULT_OK ? printf("gsGetRowFieldNull failed %d\n",ret) : 0;
    if (nullValue) {
        printf("rowKey = %d, field 2 is null [OK]\n", l);
    }
    l = 222;
    ret = gsGetRow(col, key, colRow, &bExists);
    ret != GS_RESULT_OK ? printf("gsGetRow failed %d\n",ret) : 0;
    ret = gsGetRowFieldNull(colRow, 1, &nullValue);
    ret != GS_RESULT_OK ? printf("gsGetRowFieldNull failed %d\n",ret) : 0;
    if (nullValue) {
        printf("rowKey = %d, field 1 is null [OK]\n", l);
    }
    ret = gsGetRowFieldNull(colRow, 2, &nullValue);
    ret != GS_RESULT_OK ? printf("gsGetRowFieldNull failed %d\n",ret) : 0;
    if (nullValue) {
        printf("rowKey = %d, field 2 is null [NG]\n", l);
    }

    gsCloseRow(&colRow);
    gsCloseContainer(&col, GS_FALSE);
    gsCloseGridStore(&store, GS_FALSE);
    return 0;
}

int main(int argc,char *argv[]){
    sample1(argv[1],argv[2],argv[3],argv[4],argv[5]);
    return 0;
}

Output is as follows.

rowKey = 111, field 2 is null [OK]
rowKey = 222, field 1 is null [OK]
rowKey = 222, field 2 is null [NG]

React app not running in browser

I created a react app using vs code. When i tried to run the application on browser it shows some errors and doesn't give the localhost address.

GUI for Telegram-bot

import tkinter
from tkinter import Tk, Label, Entry, Button, Frame
from tkinter.scrolledtext import ScrolledText as TextArea
from tkinter import WORD
from database import Database
from functools import partial

class Main:
WORK = True

def __init__(self):
    self.__root = Tk()
    self.__root.title("Редактор Сhess Guider")
    self.__root.resizable(False, False)

    self.__figures_frame = Frame(self.__root)
    self.__guides_frame = Frame(self.__root)


    self.load_figures()
    self.load_guides()

    self.__root.mainloop(0)

def load_figures(self):
    self.__figures_frame.destroy()
    self.__figures_frame = Frame(self.__root)
    self.__figures = {
        figure[1]: [Label(self.__figures_frame, text=figure[1]),
                    Button(self.__figures_frame, text="Редактировать", bg='yellow', command=partial(self.open_figure_editor, figure[0])),
                    Button(self.__figures_frame, text="Удалить", bg='red', command=partial(self.open_figure_deleter, figure[0]))]
        for figure in Database().get_all_figures()
    }

    for index, key in enumerate(self.__figures.keys()):
        self.__figures[key][0].grid(column=0, row=index+1, sticky='w')
        self.__figures[key][1].grid(column=1, row=index+1, sticky="w")
        self.__figures[key][2].grid(column=2, row=index+1, sticky="w")

    self.__figures_frame.grid(column=0, row=0, pady=5, padx=5, sticky="n")
    self.__new_figure = Button(self.__figures_frame, 
                               text="Новая фигура", 
                               fg="white", 
                               bg='green', 
                               command=partial(self.open_figure_editor, None))
    self.__new_figure.grid(column=0, row=0, columnspan=3,sticky='nesw')
    
def load_guides(self):
    self.__guides_frame.destroy()
    self.__guides_frame = Frame(self.__root)
    self.__guides = {
        guide[1]: [Label(self.__guides_frame, text=guide[1]),
                    Button(self.__guides_frame, text="Редактировать", bg='yellow', command=partial(self.open_guide_editor, guide[0])),
                    Button(self.__guides_frame, text="Удалить", bg='red', command=partial(self.open_guide_deleter, guide[0]))]
        for guide in Database().get_all_guides()
    }

    for index, key in enumerate(self.__guides.keys()):
        self.__guides[key][0].grid(column=0, row=index+1, sticky='w')
        self.__guides[key][1].grid(column=1, row=index+1, sticky="w")
        self.__guides[key][2].grid(column=2, row=index+1, sticky="w")

    self.__guides_frame.grid(column=1, row=0, pady=5, padx=5, sticky="n")
    self.__new_guide = Button(self.__guides_frame, 
                               text="Новый гайд", 
                               fg="white", 
                               bg='green', 
                               command=partial(self.open_guide_editor, None))
    self.__new_guide.grid(column=0, row=0, columnspan=3,sticky='nesw')
    
def open_figure_editor(self, figure_id):
    if self.WORK:
        self.WORK = False
        FigureEdit(figure_id)
        self.load_figures()
        self.WORK = True

def open_figure_deleter(self, figure_id):
    if self.WORK:
        self.WORK = False
        FigureDelete(figure_id)
        self.load_figures()
        self.WORK = True

def open_guide_editor(self, guide_id):
    if self.WORK:
        self.WORK = False
        GuideEdit(guide_id)
        self.load_guides()
        self.WORK = True

def open_guide_deleter(self, guide_id):
    if self.WORK:
        self.WORK = False
        GuideDelete(guide_id)
        self.load_guides()
        self.WORK = True

class FigureEdit:
def init(self, figure_id=None):
self.__figure_id = figure_id
if self.__figure_id is not None:
self.__figure_name = Database().get_figure(figure_id)[1]
self.__figure_definition = Database().get_figure(figure_id)[2]
else:
self.__figure_name = None
self.__figure_definition = None

    self.__root = Tk()
    self.__root.title("Редактор фигуры Сhess Guider")
    self.__root.resizable(False, False)

    self.__window = Frame(self.__root)
    self.__button_frame = Frame(self.__window)
    self.__name_label = Label(self.__window, text="Название: ")
    self.__name_field = Entry(self.__window, width=40)
    self.__definition_label = Label(self.__window, text="Описание: ")
    self.__definition_field = TextArea(self.__window, width=58, height=10, wrap=WORD)
    self.__save_button = Button(self.__button_frame, text="Сохранить", bg="green", fg="white", command=self.save)
    self.__cancel_button = Button(self.__button_frame, text="Отмена", bg="red", fg="white", command=self.__root.destroy)

    self.__window.grid(column=0, row=0, pady=5, padx=5)
    self.__button_frame.grid(column=0, row=2, columnspan=2, sticky="e", pady=(5, 0))
    self.__name_label.grid(column=0, row=0, sticky="w")
    self.__name_field.grid(column=1, row=0, sticky="w")
    self.__definition_label.grid(column=0, row=1, sticky="n")
    self.__definition_field.grid(column=1, row=1)
    self.__save_button.grid(column=0, row=0)
    self.__cancel_button.grid(column=1, row=0)

    self.__name_field.insert(0, self.__figure_name if self.__figure_name is not None else "")
    self.__definition_field.insert(0.0, self.__figure_definition if self.__figure_definition is not None else "")

    self.__root.mainloop(1)

def save(self):
    if self.__figure_id is not None:
        Database().del_figure(self.__figure_name)
    self.__figure_name = self.__name_field.get()
    self.__figure_definition = self.__definition_field.get("1.0", tkinter.END)
    Database().add_figure(self.__figure_name, self.__figure_definition, f_id=self.__figure_id)
    self.__root.destroy()

class FigureDelete:
def init(self, figure_id):
self.__figure_id = figure_id
self.__figure_name = Database().get_figure(figure_id)[1]

    self.__root = Tk()
    self.__root.resizable(False, False)

    self.__window = Frame(self.__root)
    self.__text_lable = Label(self.__window, text=f"Удалить фигуру '{self.__figure_name}'?")
    self.__delete_button = Button(self.__window, text="Удалить", bg="red", fg="white", command=self.delete)
    self.__cancel_button = Button(self.__window, text="Отмена", bg="gray", fg="white", command=self.__root.destroy)

    self.__window.grid(column=0, row=0, pady=5, padx=5)
    self.__text_lable.grid(column=0, row=0,columnspan=2, sticky="e")
    self.__delete_button.grid(column=0, row=1,sticky='nesw')
    self.__cancel_button.grid(column=1, row=1,sticky='nesw')

    self.__root.mainloop(1)

def delete(self):
    Database().del_figure(self.__figure_name)
    self.__root.destroy()

class GuideEdit:
def init(self, guide_id=None):
self.__guide_id = guide_id
if self.__guide_id is not None:
self.__guide_name = Database().get_guide(guide_id)[1]
self.__guide_definition = Database().get_guide(guide_id)[2]
else:
self.__guide_name = None
self.__guide_definition = None

    self.__root = Tk()
    self.__root.title("Редактор гайда Сhess Guider")
    self.__root.resizable(False, False)

    self.__window = Frame(self.__root)
    self.__button_frame = Frame(self.__window)
    self.__name_label = Label(self.__window, text="Название: ")
    self.__name_field = Entry(self.__window, width=40)
    self.__definition_label = Label(self.__window, text="Описание: ")
    self.__definition_field = TextArea(self.__window, width=58, height=10, wrap=WORD)
    self.__save_button = Button(self.__button_frame, text="Сохранить", bg="green", fg="white", command=self.save)
    self.__cancel_button = Button(self.__button_frame, text="Отмена", bg="red", fg="white", command=self.__root.destroy)

    self.__window.grid(column=0, row=0, pady=5, padx=5)
    self.__button_frame.grid(column=0, row=2, columnspan=2, sticky="e", pady=(5, 0))
    self.__name_label.grid(column=0, row=0, sticky="w")
    self.__name_field.grid(column=1, row=0, sticky="w")
    self.__definition_label.grid(column=0, row=1, sticky="n")
    self.__definition_field.grid(column=1, row=1)
    self.__save_button.grid(column=0, row=0)
    self.__cancel_button.grid(column=1, row=0)

    self.__name_field.insert(0, self.__guide_name if self.__guide_name is not None else "")
    self.__definition_field.insert(0.0, self.__guide_definition if self.__guide_definition is not None else "")

    self.__root.mainloop(1)

def save(self):
    if self.__guide_id is not None:
        Database().del_guide(self.__guide_name)
    self.__guide_name = self.__name_field.get()
    self.__guide_definition = self.__definition_field.get("1.0", tkinter.END)
    Database().add_guide(self.__guide_name, self.__guide_definition, g_id=self.__guide_id)
    self.__root.destroy()

class GuideDelete:
def init(self, guide_id):
self.__guide_id = guide_id
self.__guide_name = Database().get_guide(guide_id)[1]

    self.__root = Tk()
    self.__root.resizable(False, False)

    self.__window = Frame(self.__root)
    self.__text_lable = Label(self.__window, text=f"Удалить гайд '{self.__guide_name}'?")
    self.__delete_button = Button(self.__window, text="Удалить", bg="red", fg="white", command=self.delete)
    self.__cancel_button = Button(self.__window, text="Отмена", bg="gray", fg="white", command=self.__root.destroy)

    self.__window.grid(column=0, row=0, pady=5, padx=5)
    self.__text_lable.grid(column=0, row=0,columnspan=2, sticky="e")
    self.__delete_button.grid(column=0, row=1,sticky='nesw')
    self.__cancel_button.grid(column=1, row=1,sticky='nesw')

    self.__root.mainloop(1)

def delete(self):
    Database().del_guide(self.__guide_name)
    self.__root.destroy()

Main()

Unable to start a node with gs_startnode MacOS

Just installed GridDb, already configured and everything worked fine except for an error:

checking whether FALLOC_FL_PUNCH_HOLE is declared... no
configure: error: fallocate and FALLOC_FL_PUNCH_HOLE must be supported

Which I skipped through, I was able to add user and actually even change the admin password with gs_adduser and gs_passwd but upon running gs_startnode, I get the error below and thus unable to proceed.

Traceback (most recent call last):
  File "/Users/jjoek/griddb/bin/gs_startnode", line 122, in <module>
    proc = subprocess.Popen(command, stdout=f, stderr=f)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I am on a macos,
running python 2.7 but also have python3 installed.

Asked the question on stackoverflow here https://stackoverflow.com/questions/70299642/unable-to-start-a-node-with-gs-startnode-macos

Fatal error: Uncaught TypeError:

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in C:\xampp\htdocs\MARKA\MARKA.php:54 Stack trace: #0 {main} thrown in C:\xampp\htdocs\MARKA\MARKA.php on line 54

gsGetGridStore Error

When I call gsGetGridStore() 10 times or more by changing only the port number,
an error occurs.

gsGetPartitionContainerNames crashes on Debian.

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b442e8 in void NodeResolver::acceptClusterInfoEntry<long>(NodeResolver::ClusterInfo&, NodeResolver::ClusterInfoEntry<long>&, char const*, long const&, util::SocketAddress const&, bool, bool) ()
   from /griddb/bin/libgridstore.so.0
(gdb) bt
#0  0x00007ffff7b442e8 in void NodeResolver::acceptClusterInfoEntry<long>(NodeResolver::ClusterInfo&, NodeResolver::ClusterInfoEntry<long>&, char const*, long const&, util::SocketAddress const&, bool, bool) ()
   from /griddb/bin/libgridstore.so.0
#1  0x00007ffff7ad104d in NodeResolver::acceptClusterInfo(NodeResolver::ClusterInfo&, int const*, ContainerHashMode::Id const*, long const*, util::SocketAddress const&, bool) () from /griddb/bin/libgridstore.so.0
#2  0x00007ffff7b14ced in NodeResolver::getNodeAddressList(NodeResolver::ClusterInfo&, int, bool, unsigned long, bool) () from /griddb/bin/libgridstore.so.0
#3  0x00007ffff7b1551c in NodeResolver::getNodeAddress(NodeResolver::ClusterInfo&, int, bool, util::SocketAddress const*) () from /griddb/bin/libgridstore.so.0
#4  0x00007ffff7b15a2d in GridStoreChannel::updateConnection(GridStoreChannel::Context&, bool) () from /griddb/bin/libgridstore.so.0
#5  0x00007ffff7b1663e in GridStoreChannel::executeStatement(GridStoreChannel::Context&, Statement::Id, long, util::NormalXArray<unsigned char>&, util::NormalXArray<unsigned char>&) () from /griddb/bin/libgridstore.so.0
#6  0x00007ffff7b3aa04 in GSPartitionControllerTag::getContainerNames(int, long, long const*, char const* const*&, unsigned long&) ()
   from /griddb/bin/libgridstore.so.0
#7  0x00007ffff7b3b670 in gsGetPartitionContainerNames ()
   from /griddb/bin/libgridstore.so.0
#8  0x00005555555555cf in main (argc=1, argv=0x7fffffffec98)
    at ./ContainerNames.c:75

I used the sample application on GridDB Github with modification (Change props. Commented out gsGetContainerGeneral and gsCloseContainer).
https://github.com/griddb/c_client/blob/master/sample/guide/ja/ContainerNames.c

	const GSPropertyEntry props[] = {
		{ "notificationMember", "griddb-1:10001,griddb-2:10001,griddb-3:10001"},
		{ "clusterName", "defaultCluster" },
		{ "database", "public" },
		{ "user", "admin" },
		{ "password", "admin" },
		{ "applicationName", "SampleC" }
	};

gssample/Dockerfile:
(Please put ContainerNames.c into gssample directory.)

FROM debian:stretch-slim

RUN apt-get update && apt-get install -y make automake autoconf libtool pkg-config libssl-dev git wget g++ procps gdb vim
ENV LANG en_US.utf8

RUN wget https://github.com/griddb/c_client/archive/v4.3.1.tar.gz && tar zxvf v4.3.1.tar.gz && mv c_client-4.3.1 griddb 
RUN cd /griddb/client/c  && ./bootstrap.sh && ./configure && make && make install

WORKDIR /app
COPY ContainerNames.c /app
RUN gcc ./ContainerNames.c -g -O0 -o ContainerNames -I /griddb/client/c/include -L /griddb/bin/ -lgridstore

docker-compose.yaml:

version: "3"
services: 
  gssample:
   build: ./gssample/
   networks:
    service1_net:
      ipv4_address: 192.168.1.14
   cap_add:
   - SYS_PTRACE
   security_opt:
   - seccomp:unconfined
   tty: true
  griddb-1:
   build: ./
   networks:
    service1_net:
      ipv4_address: 192.168.1.10
  griddb-2:
   build: ./
   networks:
    service1_net:
      ipv4_address: 192.168.1.11
  griddb-3:
   build: ./
   networks:
    service1_net:
      ipv4_address: 192.168.1.12
networks:
  service1_net:
    ipam:
      driver: default
      config:
        - subnet: 192.168.1.0/16

Dockerfile for griddb:
https://github.com/rongfengliang/griddb-cluster-pgspider-fdw/blob/master/Dockerfile

start_griddb.sh:
https://github.com/rongfengliang/griddb-cluster-pgspider-fdw/blob/master/start_griddb.sh

How to execute:

# docker-compose up -d
# docker-compose exec gssample bash
root@975331767d2e:/app# LD_LIBRARY_PATH=/griddb/bin/ ./ContainerNames
Connect to Cluster
gsGetPartitionController ok
gsGetPartitionCount pcCount=128
Segmentation fault (core dumped)

If I created the docker image of application from centos, the test program finished successfully.

This issue was found by GridDB FDW.
pgspider/griddb_fdw#27

ilandan.net

Web ilan sektöründe lider olmaya aday ilandan.net sitesi;
Emlak vasıta ve alışveriş alanında aradığınızı kolayca bulabileceğiniz sizi yüz binlerce ilanla karşılayacak devamlı gelişen ve büyüyen bir platform olacak.

Emlak alanında; yeni ve ikinci el konutları birbirinden farklı güzel daireler , müstakil evler, rezidanslar vedaha bir çok konutun yanında arsalar tarlalar ve işyerleri fabrikalar devren satılık ve kiralık işyerleri bulabilirsiniz.

Vasıta bölümünde; yeni ve 2,el otomobiller arazi araçları ve ticari araçların yanı sıra vasıtaların diğer gereksinimleri hasarlı araçları ve yedek parçaları bulabilirsiniz. Motorsıkletler atvler temizlik ve bakım hizmetleri de var.
İş makineleri ve yedek parça ilanları da var.

Alışveriş bölümünde; farklı kategorilerde ilanlar mevcuttur. Ev aletleri bilgisayarlar ve elektronik ürünlerde var. Ayrıca antika ve ikinci el ürünlerin ilanlarını da bulabilirsiniz.

https://ilandan.net/ Farklı derslerde ders verenler ve özel ders arayanlarda var.
İş ilanları iş arayanlar iş verenler ilgi alanlarına göre ayrılmış ve belli kriterlere ayrılmış sınıflandırılmış olarak yayınlanan ilanlar mevcut.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.