Posts

Showing posts with the label database

how to reduce speed of datatable

how to reduce speed of datatable Here is my code i am using jquey datatable i am fetching records from 1 table only but it's take hardly 5 sec to load records when i am trying to search records at that time at that time it's take 14 sec how to reduce data fetching sec i am already use searchDelay: 10 for reduce speed but still i am facing same problem. Controller : function customer_is_com_wise_datatable(){ $post_data = $this->input->post(); $id = $this->session->userdata('teen_is_logged_in')['customer_id']; $query = $this->app_model->get_categories_customer_list($id); $parent_data = $this->array_flatten($query,null); $customer_id_arr = array(); if(!empty($parent_data)){ foreach ($parent_data as $parent){ $customer_id_arr = $parent['customer_id']; } } $config['table'] = 'customers c'; $c...

Flutter: StreamBuilder uses old stream instead of new stream

Flutter: StreamBuilder uses old stream instead of new stream I'm trying to show a Google-Firestore real-time list on my Flutter app using Flutter's StreamBuilder. However, the stream seems to be using both the old data and the new data, instead of just the new one. (See below) //This is the widget with the stream Expanded( child: StreamBuilder<QuerySnapshot>( stream: _firestoreInstance.collection("seeks").document('145725').collection("classes").document(_chosenClass) .collection("classTopics").document(date).collection("dateTopics").snapshots(), builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot){ if (!snapshot.hasData) return Text('Loading...'); return ListView( children: snapshot.data.documents.map((DocumentSnapshot document){ debugPrint("DOCCUMENT ID: ${document.documentID} AND topic...

Pivot Chart/Pivot Table blank/missing data to hide on table

Pivot Chart/Pivot Table blank/missing data to hide on table I hope everybody is well! Quick question I have concerning Pivot Tables and Pivot Charts. I have quite a quantity of data that I am trying to put into a Pivot Chart, however it also creates space for data that is blank and therefore make the pivot chart very small and hard to read. I've been trying to find a solution for my problem for quite some time and wasn't able to find anything. enter image description here What I would like to achieve not to have the data that is blank showing in the pivot chart. Thank you ! How about uploading a higher resolution picture. I can't see what's going on in that one. – jeffreyweir Jun 28 at 21:50 Thanks for the reply. I've updated the picture with a better resolution. Due to the huge amount of data...

One post belonging to many businesses

Image
One post belonging to many businesses I have a database with a structure similar to the one below (apologies if the diagram isn't fully clear). The statistics, favourite_likes and category_links all have polymorphic relationships with the posts table. A business can have many posts, and a post can have many dates. The post will only appear on the frontend of the site if it has a date in the post dates table which is in the future. The issue is I need to change this design so that its possible for one post to be linked to many businesses, this seems fairly straightforward however there are many issues: Each post and business have a coords spatial column, this column is used for a nearest me search on the frontend of the website. The coords column is optional for the user in the backend if they don't enter anything the system will just copy the coords from the business. So if I have a post linking to many businesses then it will need to store more than one set of coordinates. Fu...

How to show tables from a database i checked?

How to show tables from a database i checked? Hellow guys. How to show tables from a database I checked when I submit? I'm not sure with my codes. this code will just display the list of a database with a checkbox, I want when I checked it, it shows the table of the database I check. please help <?php $link = mysqli_connect('localhost','root',''); $sql = "SHOW databases"; $result = mysqli_query($link, $sql); while ($row = mysqli_fetch_row($result)) { $table = $row[0]."<br>"; ?> <form action="" method="post"> <input type="checkbox" name="database" value="<?php echo $table;?>"> <?php echo $table?> <?php } ?> <input type="submit" name="submit"> </form> I almost got it. My new problem is this. How to place the value of echo to complete the query. or im just doing it wrong.. <?php if (is...

Most effective and efficient way to store tree with co-indexed nodes in XML

Image
Most effective and efficient way to store tree with co-indexed nodes in XML I am picking up an older project of mine where effectiveness and efficiency are key. I have 100's of GB of XML data that I parse. For each XML tree (millions of them) some XML attributes are used from which patterns are deducted. For this question, though, I shall simplify things greatly - but it is important to remember that there is a lot of data and that fast processing, and tidy storing of the results in XML is important. In addition, the resulting XML tree will need to be traversed as well. In fact, it will serve as a custom indexing mechanism used in BaseX but I'll come back to that later on. From every tree (and its subtrees, but that's not important now) a pattern is created that is based on the root node's direct children. As a basic example, take the following XML tree: <node letter="X"> <node letter="A"/> <node letter="B"/> <no...

Load csv file data into tables

Load csv file data into tables Created tables as below : source:([id:`symbol$()] ric:();source:();Date:`datetime$()) property:([id:`symbol$()] Value:()) Then i have two .csv files which include two tables datas. .csv property.csv showing as below : property.csv id,Value TEST1,1 TEST2,2 source.csv showing as below : source.csv id,ric,source,Date 1,TRST,QO,2017-07-07 11:42:30.603 2,TRST2,QOT,2018-07-07 11:42:30.603 Now , how to load csv file data into each tables one time csv 2 Answers 2 You can use the 0: to load delimited records. https://code.kx.com/wiki/Reference/ZeroColon The most simple form of the function is (types; delimiter) 0: filehandle (types; delimiter) 0: filehandle The types should be given as their uppercase letter representations, one for each column or a blank space to ignore a column. e.g using "SJ" for source.csv would mean I wanted to read in the id column as a sy...

Insert Into Multiple values table using stored procedure and DataAccessLayer [duplicate]

Insert Into Multiple values table using stored procedure and DataAccessLayer [duplicate] This question already has an answer here: I am trying making a test on how to add multiple values into a column, which accepts multiple values. For example, I have two tables Table 1: contains `ID` (`int`) primary, `Name` (`varchar`) Table 2: contains `ID` (reference to Table 1's `ID`), `Image` (`image`) I created these tables, and I can insert data into table one, but how can I let it insert into multiple value column in table 2 ( Image )? Image I can have Id and add images how much I want, I tried with stored procedure, using insert, but failed, because I want to check ID is the same to ID in table 1 using where statement not working in insert For more examples. ID: 1, Name: Willam, Image:[AnyImage] (More than 1 image) ID: 2, Name: Edi, Image[Anyknownimage], Image[AnyNewImage] etc... Anything that helps? This question has been asked before and already has an answer. If those answers do not fu...