FAQ Database Discussion Community


Global name 'bluetooth' is not defined

python,data,bluetooth,connect
I am working with the bitalino board and I wanted to print the data with python but when I run the proper code, it shows me the message Global name 'bluetooth' is not defined According to my pc the board is connected via bluetooth. I don't know what the problem...

How to show data from database depending on user's choice from a select

php,jquery,database,select,data
I have to make a select and when user choose option from it, it should be displayed data from database based on this select. I can't use submit. It only should be displayed this select and when option is selected, to show data from this select. I'm new to jQuery...

set data- html5 value by default

jquery,html5,data
I have this small code that put some preset style to a div with custom attributes, that attributes set the src and an APA text to an img tag, also generate a button with a zoom option using FancyBox... I'm kinda new in the jquery world, so maybe I'm using...

Reconstructing an Index in C

c,data,structure,strtok
I have a program that reads in a giant text file of lines in this format, and I need to construct a data structure from this text file. microfinance 5 41 5 1650 2 1667 1 1811 1 1988 5 subminiature 1 432 1 The number 1st number after the...

Swift xcode advise where to store data

ios,xcode,data,store
I have created an app using ionic and cordova and now i want to remake it on iOS. I am working with ios for the first time, and i cannot figure out how to store data. For example: i have a form where user has to input some data, but...

What data is stored in transaction?

database,spring,data,transactions,transactional
Which data is stored in @Transactional services, especially in the transaction? If I have a controllers layout, services layout, daos and database - why I have to use my services with @Transactional annotation and what data is stored between these layouts? For example, I send some object data and I...

Double integration using experimental data

matlab,data,integration,splines
I need to perform a double integration using experimental data, but my integration limits are the same for each integral, in this case, the time. Mathematically I need to calculate: E [ a0+ ∫0T a(t)dt ] = a + limTx → ∞ (1/T) ∫0T ∫0t a dt dT After some...

How to split data monthly in R

r,data,split
I have a dataset corresponding to the register of buys in a store, it is something like this: Date BuyId Price Description Category 2010-01-01 101028 100 ... ... 2010-01-01 101028 100 ... ... 2010-01-01 101028 100 ... ... 2010-01-01 101028 100 ... ... ... The dates in the dataframe goes...

Using SAS to check if columns have specified characteristics

arrays,data,sas
I have a dataset that looks like the one below. each row is a different observation that has anywhere from 1 to x values (in this case x=3). I want to create a dataset that contains the original info, but four additional columns (for the four values of Bin present...

Trying to return one dataset from a function that prints from two functions

python,list,csv,input,data
In this program I am trying get the dataPrinter() function to return just one set of data. Right now the program works well but I would like for it to return just one dataset that includes data from both gen1 and gen2. As shown below, I have already tried creating...

SVG data image not working on Firefox

css,image,firefox,svg,data
I'm setting a SVG as background-image for a pseudo element: content: ''; position: absolute; right: 0; bottom: 0; left: 0; width: 100%; height: 12px; background-image: url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 620 12" enable-background="new 0 0 620 12" xml:space="preserve"><g><polygon fill="#D11A3C" points="48.8,12 0,12 0,0 54.1,0"/><polygon fill="#952592" points="93.8,12 44,12...

Replicating tables within the database

java,database,database-design,data
I have table A, B and C with data that is similar, but with different structure. I need to access the data from my program (Java, in this case) and I'm thinking of having a mini-ETL process that will run daily replicating data from these three tables into a new...

Building totals based on condition in another row

tsql,data,pivot
Really struggling to understand the best way of doing this... I have a table of data **StudentID AssessmentCode ResultGroup Result** 46933 12ENG IBLevel HL 46933 12ENG Mark 6 46933 12ECO IBLevel HL 46933 12ECO Mark 5 46933 12GEO IBLevel SL 46933 12GEO Mark 6 46933 12LAN IBLevel HL 46933 12LAN...

Best practice to store arrays

data,constants,superglobals
I'm using this code to prepare values for meta data selection in posting and search forms. <select> <?php $my_custom_meta_regions = array ( 'region1' => 'Region1', 'region2' => 'Region1', 'region3' => 'Region1' ); forearch ($my_custom_meta_regions as $key->$value) : ?> <option value="<?php echo $key; ?>"><?php echo $value; ?></option> ?> The problem is...

mean day with hourly data from a week matlab

matlab,data,average,mean,days
I have a matrix with 24*7 rows(hourly data from the column week) and 52 columns(weeks in a year). I want to calculate the average day(with 24h) from each week (resulting with a 24-by-52 matrix). Normaly I would reshape the vector from each week so that I could have 24 rows...

AngularJS Spring sort field names

angularjs,spring,model-view-controller,data,hateoas
I'm developing an application using AngularJS for the front-end part and Spring for the back-end. I have mainly two entity classes : @Entity public class Project implements Serializable { private static final long serialVersionUID = 1L; /** * idProject */ @Id @GeneratedValue(strategy=AUTO, generator="PROJECT_SEQ") private Integer idProject; /** * name */...

Python Beautiful Soup Scraping Exact Content From Charts

python,table,data,beautifulsoup,scrape
In python using beautiful soup I want to be able to grab specific text/numbers from a sortable table online. http://www.nfl.com/stats/categorystats?archive=false&conference=null&role=OPP&offensiveStatisticCategory=null&defensiveStatisticCategory=INTERCEPTIONS&season=2014&seasonType=REG&tabSeq=2&qualified=false&Submit=Go I have attempted this about a million times and can't figure it out. This is the best i could do: from bs4 import BeautifulSoup import urllib2 import requests import pymongo...

How to generate hex values to dump into a Java simulated main memory, which will be working with a simulated cache?

java,caching,data,simulation
I am creating a cache simulation to show myself how it works and to prove to myself that I'm at least (hopefully) somewhat proficient in java and computing. So if I'm clearly wrong about something it would definitely help to hear outside input :) My planned address size will be...

How to read/extract climate model data in .asc file format by using Python?

python,numpy,data
I have downloaded some global climate model data from an opensource website. But, these data are in .asc file format. How could I read/extract these data using Python? Anything in Numpy?

Extract data from a webpage

web,data,extraction
I have about 10000 html downloaded files. They have a section of html code like this: <tr> <td width="10%" valign="top"><p>City:</p></td> <td colspan="2"><p> London </p></td> </tr> What I need is a way of getting the cities from all the files. I'm using linux so I was thinking in using some batch...

build excel array from data items and a multiplier

arrays,database,excel,data
first question on this site. Been coming here to bask in the warm glow of the knowledge on offer for years! Please be gentle with me. ;) I'm not a programmer but can muddle my way around excel but I have a problem in excel that I'm struggling to find...

Unknown Data Structure?

java,data-structures,data
I had a question about whether or not Java has its own data structure for what I am looking for. It is something like a combination of an array, linked list and a tree. If it is not in Java, but exists already as a concept in computer science/other languages,...

Does it make sense to optimize data hazards if a processor supports out-of-order execution?

optimization,data,dependencies,processor
Is there still a possibility for programmers to optimize data hazards for processors that support full out-of-order executionn?

How do I display my mysql table column headers in my php/html output?

php,html,mysql,table,data
2 Questions... Scenario: I would like to query my database table via a form and then display the results that occur(if there are results) and my current situation is that it does work but it clears the form completely and leaves my to an empty page with just the results...

Difference between cell, mesh and samples

data,graphics,cell,visualization,mesh
What is the difference between cell, mesh and samples from a graphics/Visualization point of view? I read a lot and I still cannot seem to figure out the difference between a cell and a mesh and how does that impact my samples?...

calculate the mean of every 13 rows in data frame in R

r,data,split,frame,reducing
i have a data frame with 2 columns and 3659 rows df i am trying to reduce the data set by averaging every 10 or 13 rows in this data frame. so i tried the following : # number of rows per group n=13 # number of groups n_grp=nrow(df)/n...

From a messy character list to a matrix in R

r,data,split,data-conversion
I would really appreciate your help. I have large vector that contains 2000 strings of character of different length, which I retrieved from Web of Science. My dataset can be downloaded here. Data structure and Outcome. Each row of this vector has a different "length" but the same pattern. The...

Convert String “2008-02-10T12:29:33.000” to a Date with the same format 2008-02-10T12:29:33.000 in Java [duplicate]

java,string,data,transform,simpledateformat
This question already has an answer here: Java string to date conversion 9 answers I have an ArrayList that contains strings like 2008-02-10T12:29:33.000 [2008-02-11T12:29:33.000, 2008-02-10T12:29:33.000]... I want to sort this ArrayList in natural order. For this I have to convert this strings into a Date I quess. The order...

Blank line as block-data separator

r,data,block
I have a one-column dataset with blank lines. Each blank line defines a new data block, i.e. what I would plot with gnuplot (if blank line were doubled) like this: plot "datafile" i n where n is the n-th block. How could I implement a data import in R so...

Moving data (based on a class) from .py to a dictonary in another .py file

python,input,data
I'm trying to store user input data in a dictonary in another python file. This is my first real python project and so if you have any suggestions about ways to simplify what i'm doing, please suggest. Thanks! My Assignment class: class Assignment(object): def __init__(self, assignment_name, due_date): self.assignment_name = assignment_name...

Data Analysis and Scatter Plot different file and different column

python,data,matplotlib,analysis
i have a lot of files and i want to open, read data1.txt and data2.txt file and then data1.txt file 22. column "x_coordinate" and data2.txt file 23. column "y_coordinate" scatter plot. how can i ? with open('data1.txt') as f: with open('data2.txt') as f2: data1 = f.readlines() data2 = f2.readlines() f1.xArr=[]...

Offline heat map with map background

python,data,matplotlib,offline,heatmap
I am trying to find if we can have background set (as 2D map) for a heat map ? Read data from a file and plot heat map (which is pretty simple) But in offline mode can we have the heat map imposed on the real map ? Any useful...

Removing outliers in one step

r,data,statistics,analytics,outliers
I have a dataset in which there are some outliers due to input errors. I have written a function to remove these outliers from my data frame (source): remove_outliers <- function(x, na.rm = TRUE, ...) { qnt <- quantile(x, probs=c(.25, .75), na.rm = na.rm, ...) H <- 1.5 * IQR(x,...

Cross-thread work with Control which have a data source (ComboBox)

c#,multithreading,user-interface,data,control
At first I will post the code, it is short and quite clear. cb_currentProfile is a ComboBox filled with 3 items when form is loaded delegate void SetCurrentProfileCallback(int index); private void SetCurrentProfile(int index) // Set index of Combobox.SelectedItem { if (this.cb_currentProfile.InvokeRequired) { SetCurrentProfileCallback d = new SetCurrentProfileCallback(SetCurrentProfile); this.Invoke(d, new object[]...

How do I transfer data from one activity to another in Android?

android,data,alertdialog
I want to transfer my "result" data from my first (Main) acitivity to my Custaddress activity, which has edit texts for customer details, and then this is sent to an email. The email/edit texts work perfectly - but I want to add in "result.toString" into email body string. How do...

How to receive gps data from device with php?

php,data,gps
I have a car gps device, the only thing I can change is the IP-address. Is it possible to have shared hosting with a dedicated IP-address(that part is possible) and then to have a php script that picks up the data that is being send? So what is in my...

specific gnuplot by data grouping

data,gnuplot,std,mean
I'm new in gnuplot and sorry that my problem formulation might be unprecise, but I don't know how to find the tools/commnds needed to solve my problem. The code for plotting I would like to integrate in my bash file. I have a data set like: 285 1 50 7.35092...

Data attributes with css selectors [duplicate]

css,data,attributes
This question already has an answer here: Select elements by data attribute in CSS 3 answers Hi I am trying to remove a div targeting it with a data selector. css [data-id="b5c3cde7-8aa1"] { display:none; } does not work. Is is possible?...

Detecting significant changes in data

c#,algorithm,data,graph,statistics
I have a graph input where the X axis is time (going forwards). The Y axis is generally stable but has large drops and raises at different points (marked as the red arrows below) Visually it's obvious but how do I efficiently detect this from within code? I'm not sure...

What are the different pattern evaluation measures in data mining?

data,data-mining,market-basket-analysis
In data mining, frequent itemset are found using different algorithms like Apriori Algorithm , FP-Tree , etc. So are these the pattern evaluation methods?

Powershell Data input [closed]

powershell,input,data
I'm looking to make a super simple request for input script that uses said input to be executed in the script below. I can edit the script before I run it each time, but it would be way cooler and more practical if you could just enter the PCname and...

Extract the JSON data in different formate

ios,objective-c,json,data
I am trying to get the JSON response in an array, but I want just data without index. Here is my code: NSString *myRequestString = [NSString stringWithFormat:@"getSetAvailability=yes&userId=41"]; // Create Data from request NSData *myRequestData = [NSData dataWithBytes: [myRequestString UTF8String] length: [myRequestString length]]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:...

Very simple hash table inquisition

c,data,structure,hashtable
If the index for a hash table is calculated by using some integer value returned from a hash() function % TABLE_SIZE, doesn't that mean the only possibly index values are 0-9, since the range of the return value for the modulo operator is [0, 9]? I know this is really...

Polymer 1.0 data binding not working

data,binding,polymer
I have the following polymer element: The value of navigator.currentStep is not updating after someMethod is called. <dom-module id="m"> <template> Navigator step = <span>{{navigator.currentStep}}</span> </template> </dom-module> Polymer({ is: 'm', ready: function() { this.navigator = new Navigator(1); console.log(this.navigator.currentStep); // 1 }, someMethod: function() { this.navigator.next(); console.log(this.navigator.currentStep); // 2 } }); Output...

Grouping Data first by frequency, then by category in python

python,csv,pandas,data,grouping
I have a large csv file, which is a log of caller data. An example of my file: CompanyName High Priority QualityIssue Customer1 Yes User Customer1 Yes User Customer2 No User Customer3 No Equipment Customer1 No Neither Customer3 No User Customer3 Yes User Customer3 Yes Equipment Customer4 No User My...

Spring Data Neo4j 4.0 Gradle Dependency

spring,data,gradle,neo4j,spring-data-neo4j
I am trying to download the Spring Data Neo4j 4.0 tests dependency with Gradle, but it doesn't seem to work. In the official tutorial documentation (http://docs.spring.io/spring-data/neo4j/docs/4.0.0.M1/reference/pdf/spring-data-neo4j-reference.pdf), only maven dependency below is provided: <dependency> <groupId>org.neo4j.ogm</groupId> <artifactId>neo4j-testutils</artifactId> <type>test-jar</type> <scope>test</scope> </dependency> <dependency>...

Python pandas trouble with storing result in variable

python,variables,csv,pandas,data
I'm using pandas to handle some csv file, but i'm having trouble storing the results in a variable and printing it out as it is. This is the code that I have. df = pd.read_csv(MY_FILE.csv, index_col=False, header=0) df2 = df[(df['Name'])] # Trying to get the result of Name to the...

Data not being written to file?

ios,data,filepath,nsdocumentdirectory
I'm using FastttCamera as a wrapper on AVFoundation in order to implement a camera in my app. Things appear to work fine until I try to save a captured image with the following code: - (void)cameraController:(FastttCamera *)cameraController didFinishScalingCapturedImage:(FastttCapturedImage *)capturedImage { //Use the image's data that is received pngData = UIImagePNGRepresentation(capturedImage.scaledImage);...

multi colored Heat Map error Python

python,file,numpy,data,heatmap
I am trying to plot a heat map with multiple colors by reading data from a file. I can very well generate a 2D and normal heat map but not able to plot the one like attached image. When used random numbers I can plot this but while reading data...

Use a different row as labels in pandas after read

python,data,pandas
I need to use the third row as the labels for a dataframe, but keep the first two rows for other uses. How can you change the labels on an existing dataframe to an existing row? So basically this dataframe A B C D 1 2 3 4 5 7...

Ambari Monitoring raw data

api,data,monitoring,ambari
For my masters project, I'm looking for a convenient way to grasp the monitoring data Ambari collects. To be precise, I'm interested in the raw data (can be csv, xml, json, you name it) of the charts Ambari shows in the dashboard, i.e., Cluster CPU, Disk Usage, network usage and...

Data and array formatting help (nodejs)?

arrays,node.js,object,data
I have four input arrays that all correspond with one output array like so: var arr1 = [.84, .01, .95, 1, .22, .453, .194, .43]; var arr2 = [.54, .09, .10, 0, .76, .12, .41, .99]; var arr3 = [1, .26, .90, .65, .88, .33, .854, .414]; var arr4 =...

jQuery update data attributes using Json syntax

jquery,data
I'm trying to update only one option in data array: <a class="status" data-set='{"field": "status", "id": 2, "result": "3"}'>Click</a> I need result to be updated from 3 to lets say 4. Here is my code: $('body').on('click', 'a.status', function() { var data = $(this).data("set"); value = data.result == 3 ? 4 :...

CayenneModeler not generating Cayenne.xml

java,data,orm,apache-cayenne
I am learning Apache Cayenne, so I am new to it. I am following the official guide http://cayenne.apache.org/docs/3.0/tutorial.html. I am doing exactly the same as the guide says, but when I save the project, it's generating 2 xml files, instead of 3, and when I run the java app (using...

Create array for Data JSON

php,arrays,json,data
I'm starting with DataTables (https://datatables.net/) And I'm trying to reload my table with json source. From PHP code: I want to create an json array: $fh = fopen("pv1_consultafolioTorre".".json", 'w'); while($row = mssql_fetch_array($query_result)) { $a = array( array( 'folio' => $row['folio'], 'MATNR' => $row['MATNR'], 'sucursalSolcitante' => $sucursalSolcitante, 'sucursalResponsable' => $sucursalResponsable, 'fechaSolicitud'...

List with many dictionaries VS dictionary with few lists?

python,pandas,data
I am doing some exercises with datasets like so: List with many dictionaries users = [ {"id": 0, "name": "Ashley"}, {"id": 1, "name": "Ben"}, {"id": 2, "name": "Conrad"}, {"id": 3, "name": "Doug"}, {"id": 4, "name": "Evin"}, {"id": 5, "name": "Florian"}, {"id": 6, "name": "Gerald"} ] Dictionary with few lists users2...

Space complexity of Java data structures

java,algorithm,memory,data,analysis
I have been searching for many websites that contain information of the space complexity of Java data structures. I am searching specifically for the space complexity of the HashMap, ArrayList, Stack and LinkedList. One site that I found that came close and had information only on the Stack and LinkedList...

Basemap Heat error / empty map

python,data,matplotlib,matplotlib-basemap,imshow
I am trying to plot a scattered heat map on a defined geo location. I can very well plot a normal scattered map with no background but I want to combine it with a given lat and lon. I get the following empty map. Input Input: col[2] and col[3] are...

Matlab: Read textfile with a mix of floats, integers and strings in the same column

matlab,data,ascii
loading a well formatted and delimited text file in Matlab is relatively simple, but I struggle with a text file that I have to read in. Sadly I can not change the structure of the source file, so I have to deal with what I have. The basic file structure...

How to capture data from third party web site?

data,capture
For example, I would just like to capture the data for the 30 latest events for the scrolling info shown on this URL: http://hazmat.globalincidentmap.com/home.php# Any idea how to capture it? Thanks....

How to get back my datas from a button to an other php page

php,data
I have a button on a php page with some datas on this same page. My button redirect to an other php page and I want to get back this datas. I tried to do if(isset($_POST['button'])){ echo($data); } The isset is true (I do a test with a string) but...

Generate random data with lat-long

python,math,random,data,latitude-longitude
I am trying to generate random data with range of specific latitude and longitude. The code below executes with no errors and also generates output but not fully what I am expecting. Program: import random import sys import math latitude = 19.99 longitude = 73.78 output_file = 'filename' def generate_random_data():...

C++ Memory layout of vector of POD objects

c++,memory,vector,data
Supose I have a simple C++ class, class Data { public: float data[3]; void clear() { data[0] = 0.0f; data[1] = 0.0f; data[2] = 0.0f } } And a vector of Data's, std::vector<Data> v(10); Is it safe to assume that &v[0].data[0] points to an array of 30 floats?...

Haskell/XMonad: wrapper around a Monad that also keeps track of data

haskell,data,wrapper,monads,xmonad
This is a followup to Ben's previous answer. I had asked for type checking for cases in which X t actions "require cleanup" (ungrabbing of buttons and/or keyboard after it has been completed). His response was a monadic wrapper NeedsCleanup, for which my current implementation goes something like this: {-#...

Elasticsearch data model

data,elasticsearch,model,nested,parent-child
I'm currently parsing text from internal résumés in my company. The goal is to index everything in elasticsearch to perform search on them. for the moment I have the following JSON document with no mapping defined : Each coworker has a list of project with the client name { name:...

Information consoles/alerts correctly, won't output into html though

javascript,jquery,html5,data
I am using .each() to get a set of lis. After getting the group(li) data, subtract it from the current year and then console the amount. I then want to pass that to a if statement, if it is equal to or less than 2 print a star for each...

Autofilter Column data one by one using buttons

function,excel-vba,data,filter
I have a some filtered data in a column that I would like to see for one value at a time by a macro. so far I have got up to the code below but it filters out when I manually select a value from the column. Is it possible...

Can I use scikit-learn with Django framework?

django,data,scikit-learn,analysis
I would like to make a Web app in which some data is analyzed. Due to it, I read that Django is a good option for doing web apps and that scikit-learn was used for machine learning. Therefore, before starting, does anyone know if it is possible to use that...

jquery use data tag selector after updating data tag on element

javascript,jquery,data,tags
I want to be able to get a set of elements that match a selector in jQuery. I have HTML with data tag attributes that get altered dynamically by jQuery using the .data(key, value) method. However, after dynamically updating an element's data tag it seems I can no longer use...

Where to populate data? Inside or outside method?

design,data
I have a dilemma on where to populate the data. Below are 2 kind of methods to compute the total price of a quotation: // example in javascript function computePrice(quotation) { var totalPrice = 0.00; var items = quotation.getItems(); for (var i = 0; i < items.length; i++) { totalPrice...

Python interpolation of 3D data set

python,data,interpolation
Does anyone know how to interpolate a 3D data set with Python? I would like to interpolate in the x, y, and z dimension to obtain the correct value of the 4th column. Thanks a lot! The data looks like the following: x y z 75 1E+00 3.7594E-10 1.0199E-08 75...

Java unique value map

java,dictionary,data-structures,data
I need a map with unique keys and also storing duplicate values only once. The interface will be the Map but I don't want that the same value use memory multiple times. For example: In a normal Map implementation like HashMap suposing value.equals(value') and value.equals(value'') but value!=value' and value!=value' and...

parsing JSON files in python to get specific values

python,json,parsing,data
I'm trying to simply grab information from a json file using python. I've seen many threads that briefly cover this, however there are some questions that I have that I have not seen answered on here. Let's say I have the following json file: { "href" : "http://www.google.com", "Hosts" :...

can i use json file as a module in node.js

javascript,json,node.js,data,dynamic-data-exchange
I have a JSON module which contains empty containers like this: { "files": { "rootNeeded":[], "folders":[], "files":[], "images":[], "text":[], "unknown":[] }, } and I wonder if I can push data into this from another module simply by using array.push method. Something like ... var myModule=require("./myJsonFile"); function(){ some magic here... myModule.files.files.push(files);...

Send events to two separate google analytics accounts?

javascript,data,google-analytics
Is it possible to send a tracking event to two separate google analytics accounts?

How to create a survival time variable based on start and stop time

r,datetime,data,survival-analysis,poisson
I'm trying to calculate incidence (with poisson regression) for a rare type of cancer. My dataset is quite large, consisting of 25.000 observations, i have only included the first 20 rows. The nrcase variable indicates each individual, as you can see an individual can have a number of observations, depending...

Getting wrong value in variable in c using structs

c,data-structures,data
Well I just began learning data structures and i have problems getting the right value for cociente, everytime i run it, cociente is printed as 1 but that is no the value i want to assign it, this is the code where i print: printf("\nEl valor del cociente es: %d",(polinomio_->polinomio->cociente));....

How do RDBM’s make working with data more effective than flat files and spreadsheets. [closed]

data,spreadsheet,rdbms,flat-file
Could anyone help me answer this question: How do RDBM’s make working with data more effective than flat files and spreadsheets. ...

Move information-resource stored in the database tables with two step using 'reservation'

mysql,sql,database,data
I need to architect a database and service, I have resource that I need to deliver to the users. And the delivery takes some time or requires user to do some more job. These are the tables I store information into. Table - Description _______________________ R - to store resources...

Pass data through unwind segue

ios,swift,data,segue
I have been looking all over for an answer for this...I do not know how to pass data through an unwind segue. I know I am supposed to use prepareForSegue but I am not sure what I am supposed to put in. I am trying to pass a variable (myLabel)...

Extracting a column from one dataset and creating another dataset with columns from a third dataset in R [duplicate]

r,data,merge,data.frame
This question already has an answer here: How to join (merge) data frames (inner, outer, left, right)? 8 answers So I have these two datasets: ID DOB ID2 count 1 4083 2007-10-01 3625 5 2 4408 2008-07-01 3603 2 3 4514 2007-07-01 3077 3 4 4396 2008-05-01 3413 5...

JavaScript: Add table values to input field on button click

javascript,input,data,datatable
I have a DataTable that stores names only. I want to have a button that will add all the names in the DataTable to an text input field. <div id="myTabDiv"> <table name="mytab" id="mytab1"> <thead> <tr> <th>name</th> </tr> </thead> <tbody> <tr> <td>chris</td> </tr> <tr> <td>mike</td> </tr> </tbody> </table> <button id="add" >ADD</button>...

Insert data in collection at Meteor's startup

javascript,json,meteor,data,startup
I would like to insert data at Meteor's startup. (And after from a JSON file) At startup, I create a new account and I would like to insert data and link it to this account once this one created. This is the code that creates the new account at startup:...

how to split .csv data in python?

python,csv,data
When I split my csv file using this method: with open(fname) as f: for line in f: a = line.strip().split() I get an expected output which is: ['Chicago', 'White', 'Sox,"Valentin,', 'Jose","5,000,000",Outfielder,,,,'] ['Detroit', 'Tigers,"Bernero,', 'Adam","314,000",Pitcher,,,,'] and so on... how to split this data into right pieces (team, player, salary, position)? Data...

Most efficient way to implement table with multiple column?

java,data,structure
I am attempting to create a table with multiple column such as The initial implementation I thought was is that use Hashtable with key being "String" and value being "List" of String. But is this the most efficient way? I would be accessing data entry a lot and I am...

Size efficient way to transfer array of numbers as text

c#,text,data,numbers,transfer
Lets say I have a following array of numbers: 1,5,500,994,6950,54,54,845,101,54046506452,5980,960406,55,680,68045,66540,321032 What is the most size efficient way to transfer it with http post to a website which decodes it back to numbers? If I transfer it as text "1,5,500,994,6950,54,54,845,101,54046506452,5980,960406,55,680,68045,66540,321032" then every 1 digit and separator take 1 byte which is...

Spring Data JPA user posts

java,spring,jpa,data
I have user login and profile view, I would like the users to have posts. Can someone guide me in the right direction? I have a user entity: @Entity @Table(name = "usr", indexes = { @Index(columnList = "email", unique = true) }) // using usr because in may conflict with...

Read data only when it is present

matlab,data,serial-port,fscanf
I try to read data from the COM3 port. I'm using : in = fscanf(s); if(in == 'A') fclose(s); break; end The problem is, when no data is send to the com3 port, the fscanf line will wait for a certain time and than give a timeout. Is there a...

onSaveInstanceState() not saving data from the intent

android,android-intent,data
I have a form. Here, the user fills in details like event name, description, location etc. To select the location, I have set a button. When I click on the button, I am taken to another page/intent. I select the location from there, and the location data is passed back...

Google Linechart - No Pointsize, Tooltips?

data,tooltip,visualization,linechart
I'm using a Linechart from Google, in which I have drawn a graph from JSON data. There are two problems I'm running into I can't seem to fix. Even though I have 'pointSize: 6' in my options, I still can't seem to draw any kind of point, anywhere on the...

Importing matrix with different row length

matlab,matrix,data,import
I have large data files and I would like to import 12 columns of data for further use. However the row length will be different in each instance. I would import the selected columns only but below the data I need are some blank rows followed by extra numbers which...

Use JSON file to insert data in database

javascript,json,mongodb,meteor,data
I'm using my JSON file like this to insert data in my collection : var content = JSON.parse(Assets.getText('test.json')); console.log('inserting...'); Profiles.insert({ user: id, data:content }; But I would like to have a "data's tree" like that : [ user: "rtegert23423131", firstname:"test", surname:"test2", // ... ] Not like that : [ user:...

extract a .txt file to a .mat file

matlab,data
I am working with a publicly available database in which four files are there : They are all .txt documents. How can I put them in a .mat format ? I am giving a simple example: A.txt file 1 2 3 4 5 6 7 8 9 1 2 3...

XML Outputs in Visual C#

c#,xml,visual-studio-2012,data,xml-serialization
I used this method (serialization) to create data (skills) into a combo-box. I can select a player, a skill rate it and then save a comment and it writes to an xml skill. I am hoping to be able to do this for multiple combo-boxes (one for each skill) or,...

R Data Wrangling for Emails

r,data,data-cleansing
Need Help! this is a work related project. I need to clean 16,000 emails... Expected to do by hand :( I need to find a away to pull the domain name from the email and place it into a new column, and parse the name into a new column as...

How to store simple text data in the python program itself? [closed]

python,data
I'm making a program to ease my work. The concept of it is that it has some company names (I'll make a button to add more of them) and stores the info when and what loan they took. So basically I open the program, it displays the company names, I...

Method for Storing and organizing data submitted by user to a website (form, pdf)?

php,sql,database,data,website
I have completed a website for a startup consultancy office and am confused on database part. User is supposed to upload basic information using form and resume in pdf format. How should I organize data so that it get stored, say, in Excel sheet or anything like that. Office people...

Return data from async function [duplicate]

javascript,node.js,asynchronous,data,return
This question already has an answer here: How to return the response from an asynchronous call? 7 answers Why is my variable unaltered after I modify it inside of a function? - Asynchronous code reference 3 answers I've been reading a lot about callbacks, but still don't get it......

write table in R

r,data
I'm trying to get my data from R. When I type: write.table(c, "~/XXX/XXX.txt", sep="\t"). I get something like this: "x" "1" 3011.5648786606 "2" 15654.1820393584 "3" 12368.7319176159 "4" 3055.2054987339 "5" 4590.9390484852 "6" 15472.0519755823 "7" 22142.4386253643 "8" 43684.1996516822 "9" 20931.0908837875 "10" 15165.4255765957 "11" 21790.7749747969 "12" 42362.7562956186 ............................. How to get rid of...

using nested set model to store Hierarchical data in sqlite how can I move a category into another category

php,database,sqlite,data,hierarchical
I'm trying to store hierarchical data using SQLite. After searching a lot, I chose to use the nested set model instead of an adjacency list, because almost 90% of the operations will be reads and only 10% will be updates/deletes/creates. I followed this example: http://www.phpro.org/tutorials/Managing-Hierarchical-Data-with-PHP-and-MySQL.html And it works fine to...