Questions tagged [data-conversion]

This tag refers to the process of converting the data type of one piece of information into another type.

1963 questions
0
votes
1 answer

C# How can I Coppy All Things in RichTextBox?

I have a richTextBox and I add text and image. Text are not the same color and font. I want to convert to all things for doc file. I am using this codes for this. wordeaktar.Application wordapp = new wordeaktar.Application(); wordapp.Visible =…
0
votes
3 answers

How can I convert an array of strings to an array of objects in JavaScript?

I have this array: myArray = ["AAA","BBB",...,"ZZZ"]; I want to convert it to an array of objects. Something like this: myArray = [ { "Id": "111", "Value": "AAA" }, .... { "Id": "111", "Value":…
firasKoubaa
  • 6,439
  • 25
  • 79
  • 148
0
votes
0 answers

Converting NESTED IF statement into vba code

I'm new to VBA code for excel and I am somewhat rusty on my back-end coding. I am currently having trouble converting this formula: =IF(AND(J7>=12,K7>=1250,L7>=480),"Y","N") This formula is drawing from three different columns. I am also trying to…
Josh R
  • 1
0
votes
1 answer

How to convert strings into numbers for pasting in excel?

I would like to write a program which paste each element of array (separated by commas) into different column in excel. My code works, but numbers are stored as text not as number. How can I fix it? from xlwt import Workbook wb = Workbook() sheet1 =…
Milek
  • 179
  • 3
  • 11
0
votes
1 answer

Extract nonnegative number or alternatively return negative number from a vector of strings

I need to extract a nonnegative number from a string or return negative number if a number was not extracted. For extracting the number I found the following way: > grep("^[0-9.]+","1234.1234alsk",value=TRUE) [1] "1234.1234alsk" If the given…
Heikki
  • 2,214
  • 19
  • 34
0
votes
0 answers

ID Mismatch when parsing database file

I am manually parsing a database file and came across something odd. I have my row length and offset. The database seems to be fixed width columns delimited by 00 values - mostly, it isn't a hard and fast rule it seems. I am able to get the correct…
Alan
  • 2,046
  • 2
  • 20
  • 43
0
votes
2 answers

How to merge xml nodes with common attribute value

I would like to take some XML document and merge all nodes on some level who have the same attribute value. For instance, if I have a document of this form,
misolsen
  • 3
  • 2
0
votes
0 answers

My decimal to binary conversion is printing out extra numbers

So I'm very new to C, and I'm having trouble with my decimal to binary conversions. I'm trying to convert 2 numbers - "205" and "171" too binary and put them both in separate arrays, and its working - sort of. See they both convert properly, but…
0
votes
2 answers

R Dataframe Factor conversion to numeric issue

I've been trying to merge and sort a couple of csv files (links below). I've successfully merged the files and can sort the result manually in excel. But I want to automate this and be able to get the sorted results out. THE ISSUE In the the last…
0
votes
2 answers

Active directory lastLogonTimestamp - convert Integer to Date

Is anyone able to help me convert the lastLogon and lastLogonTimestamp from Active Directory? I am pulling the data with Power Query and for my own user name I and the data is returned like this: [users.lastLogonTimestamp]=131804496023891686…
SherlockSpreadsheets
  • 2,062
  • 3
  • 27
  • 47
0
votes
0 answers

Python3 using UTF-8 data from bytes

I am using Python 3.7. I have data being read from two files. Both contain UTF-8 data (well, technically...). One is properly "encoded" into UTF-8 while the other was written as a decoded bytestream. # 'ba' is the on-disk form of the first…
inetknght
  • 4,300
  • 1
  • 26
  • 52
0
votes
2 answers

Adding ogg vorbis encoding to my project

For my MFC application, I need to convert .wav data in an array into ogg vorbis format. I compiled both libogg and libvorbis as static libraries. I created "bin" directory in my project folder and placed there libvorbis_static.lib and…
dpreznik
  • 247
  • 5
  • 18
0
votes
1 answer

Change an array to an integer percentage value

I have a function that gives me a value in the form of an array as an output when run but I need the output as an integer percentage for a results piece def pred_datsci(file_path): prev_precompute = learn.precompute learn.precompute = False …
M00N KNIGHT
  • 137
  • 1
  • 11
0
votes
4 answers

How can I change ascii string to hex and vice versa in python 3.7?

I look some solution in this site but those not works in python 3.7. So, I asked a new question. Hex string of "the" is "746865" I want to a solution to convert "the" to "746865" and "746865" to "the"
user10303745
0
votes
1 answer

Two first bytes in a String: conversion behavior?

I have a byte array, which is the hash of a file. This is made with messageDigest, so there is a padding. Then I make a shorthash, which is just the two first bytes of the hash, like this: byte[] shorthash = new byte[2]; System.arraycopy(hash, 0,…
Ablia
  • 317
  • 1
  • 3
  • 14