Categories
Development JSON

i want to convert my json obj values which are in string to integer

java code for convert the json object which values in string to integer { “LINTER_CONSUMPTION_MT__LS”: “1.75”, “NO_OF_BATCHES_NO__LS”: “0.0”, “LINTER_PULP_PRODUCTION_MT__LS”:” 1.663″, “NO_OF_REFINER_BATCH_NO__LS”: “0.0”, “REFINED_PULP_PRODUCTION_MT__LS”: “0.0”, “PULP_TRANSFERRED_TO_PM1_MT__LS”: “0.0”, “PULP_TRANSFERRED_TO_PM2_MT__LS”: “0.0”, “REFINER1_RUNNING_HOURS_HRS__LS”: “0.0”, “REFINER2_RUNNING_HOURS_HRS__LS”: “0.0”, “REFINER3_RUNNING_HOURS_HRS__LS”: ‘0.0″ } i want my json in this formate { “LINTER_CONSUMPTION_MT__LS”: 1.75, “NO_OF_BATCHES_NO__LS”: 0.0, “LINTER_PULP_PRODUCTION_MT__LS”: 1.663, “NO_OF_REFINER_BATCH_NO__LS”: 0.0, “REFINED_PULP_PRODUCTION_MT__LS”: 0.0, “PULP_TRANSFERRED_TO_PM1_MT__LS”: 0.0, […]

Categories
Database Development

How can I clear the data of some of my database columns when new year comes?

I have 8 columns representing the achieved targets in each quarters of this year and last year. the user can only change the values of the quarters of the current year. The columns of my database table are: LastYearQuarter1 LastYearQuarter2 LastYearQuarter3 LastYearQuarter4 ThisYearQuarter1 ThisYearQuarter2 ThisYearQuarter3 ThisYearQuarter4 The thing I want is that when new year […]

Categories
Development

how not to repeat the same record after spaces

This code actually works but my problem is that the output repeats after triple spaces. String english = input.nextLine(); char[] toChar = english.toCharArray(); String output = “”; for (int i = 0; i < toChar.length; i++) { if (toChar[i] == ‘a’ || toChar[i] == ‘A’) { output += “.-“; } if (toChar[i] == ‘b’ || […]

Categories
Development

Empty BOOT_COMPLETED Broadcast Receiver

In an app that I’m working, is implemented a Broadcast Receiver for BOOT_COMPLETED intent, but the method onReceive is empty… does it makes sense anyway? The effect is simply to start application at boot?

Categories
Development

How to copy the value of a cell in a hyperlink

I have three columns: Longitude Latitude Link I want to create a link in every row using the value of longitude and latitude. Example: For longitude 2.254299319 and latitude 48.83910264 i want to insert HYPERLINK(“https://www.google.fr/maps/@48.83910264,2.3492276,14z“) in the column link. Is-it possible to do so without any script?

Categories
Development

Unable to deserialize the list of object data using GSON library

I have a JSON Data which is a collection of objects like the one given below. I have to deserialize the below given data into a list of objects [{\”Name\”: \”Initialize\”, \”Library\”: \”BKS\”, \”Type\”: \”setup\”, \”Status\”: \”PASS\”, \”StartTime\”: \”20190429 15:06:36.020\”, \”EndTime\”: \”20190429 15:06:39.476\”, \”Environment\”: \”CLC-ER\”, \”ScenarioName\”: \”BKS-DISVAS\”, \”ElapsedTime\”: 456.0},{\”Name\”: \”Initialize\”, \”Library\”: \”BKS\”, \”Type\”: \”setup\”, \”Status\”: […]

Categories
Development

Individual log file for each thread (Parallel.For) using log4net

I need to create separate log file for each thread being using log4net. I am reading multiple mailboxes and want to email information and attachment information of mailboxes in individual files. EmailMaster objEmailMaster = new EmailMaster(); List<MailboxConfiguration> lstMailBoxConfiguration = objEmailMaster.GetMailBoxInformation(); Parallel.For(0, lstMailBoxConfiguration.Count, i => { log.Debug(“MailBox reading”); objEmailMaster.ReadAndDownloadEmails(lstMailBoxConfiguration[i]); });

Categories
Development

How to sort a column in ascending order with NULL values at the end?

I’m working on a personal database to track my projects. I have a date/time column called “StartDate” in the table that I’m sorting in ascending order in the query that’s used as the data source for the form where I’m entering data. The form is a split form that displays the data in the “Detail” […]

Categories
Development

How to properly normalize pid coefficient in q15 fixed point

I’m working on a PID controller using CMSIS library on a STM32F4 microcontroller. I can’t really understand the normalization of the PID parameter. Now I have the three Kp, Ki, Kd parameters of the PID controller and I have to put them in the system. I understand there they needs to be normalized, so I […]

Categories
Development

Why a div after a is not displaying under the header?

I’m doing a reactJS web application, i have done the header but when i want to add a div for the content after the header, the div is not displaying under the header and I don’t understand why Which is weird is that when i put my div in the header, the div is displayed […]