load

How to load comma separated data into R?

南楼画角 提交于 2019-12-19 09:07:37
问题 I have a flat file like this: x1, x2, x3, x4, x5 0.438,0.498,3.625,3.645,5.000 2.918,5.000,2.351,2.332,2.643 1.698,1.687,1.698,1.717,1.744 0.593,0.502,0.493,0.504,0.445 0.431,0.444,0.440,0.429,1.0 0.438,0.498,3.625,3.648,5.000 How do I load it in R. I have tried to do this > x <- read.table("C:\\flatFile.txt", header=TRUE) but after I do some operation I get error like > colSums(x) Error in colSums(x) : 'x' must be numeric 回答1: If you look at the help on read.table you'll discover some extra

No valid constructor during serialization

孤人 提交于 2019-12-19 09:06:35
问题 I have a major problem during loading the extension into the program. I get an exception as there is no valid constructor. The problem is in the line: ekstensja = (ArrayList<Dydaktyk>) ois.readObject(); I get something like that: java.io.InvalidClassException: Dydaktyk; no valid constructor at java.io.ObjectStreamClass$ExceptionInfo.newInvalidClassException(Unknown Source) at java.io.ObjectStreamClass.checkDeserialize(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown

How to handle up to 100k HTTP connections in .Net

独自空忆成欢 提交于 2019-12-19 02:52:09
问题 I am creating a server to monitor the online presence of clients on a webpage. There will be 80-100 000 (eighty thousand) simultaneous clients to monitor. I’m using .Net to write this. Clients will contact a (separate) server using JavaScript (on the HTML-page) to tell the server that they are alive/online. I’m considering one of two approaches: Persistent connections with keep-alive sent regularly. This will give me much higher precision on when clients disconnect and I don’t need to update

MySQL - Multiple set on LOAD DATA INFILE

本小妞迷上赌 提交于 2019-12-18 17:25:38
问题 I've a table_name like this: No | Name | Inserted_Date | Inserted_By ===================================== and then I've file name.csv like this no,name 1,jhon 2,alex 3,steve I want to load these file table_name using syntax like this: LOAD DATA INFILE 'name.csv' INTO TABLE table1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES ??? the question is, what should I put on ??? so I can store data like this: No | Name | Inserted_Date | Inserted_By =================================

call jQuery function after fonts are loaded.

谁说胖子不能爱 提交于 2019-12-18 16:37:51
问题 I have multiple fonts in web site It loads very slowly,I have some jquery functionality I need to load them when the fonts are loaded. I have tried to call it in jQuery(window).load(function () { //my_function() }); not working what to do??? 回答1: One problem with the Google font loader callbacks/events is that if you're using jQuery - you may not want to run your event handler until the DOM is loaded - but you don't want to risk running it before you're sure all fonts are loaded. Here's my

jquery .load() page then parse html

∥☆過路亽.° 提交于 2019-12-18 12:17:14
问题 I have used the line below in my app. But now I need to parse the html loaded before I show it. Whats the best way to get certain html elements. $("#div").load("page.html"); Thanks UPDATED Now I am using this but having trouble geting the title attribute of a div with the id "div". function get_title() { $.get("test.html", function(data) { var data = $(data); var title = $("#div", data).attr("title"); alert(title); }); } The html in the var data looks like this. <div id="div" title="title

Load package dynamically

≡放荡痞女 提交于 2019-12-18 12:07:12
问题 Is it possible to load a specific package during runtime? I want to have a kind of plugins where each one has the same functions than the others but with different behaviour, and depending on the configuration file, load one or other. 回答1: You might consider executing the ‘plugin’ packages at runtime, by writing out a new program (say, to a temp directory) and executing via exec.Command, something along the lines of exec.Command("go", "run", files…).Run() You’ll see some similar code here.

Use Javascript to load some images last

孤街浪徒 提交于 2019-12-18 12:01:02
问题 Hi I just wondered if this is possible. I have quite a few images on my website and I have made them as small file size as possible. Some of the images are used as a slideshow but there are all loaded in one go. Is there a way using javascript to make the slideshow images load last so that the background images etc load up first and the slideshow loads at the end. The images are in the main body of the page and are "slideshowified" using javascript. The code for this images is simple: <div id

Applying loadMask() to a single element in extjs?

烂漫一生 提交于 2019-12-18 11:53:47
问题 How to apply loadMask to only one element, and not the whole browser width-height? default here, only one element is masked, and a messageBox is in center, inside this element and not the whole display... any ideas? EDIT: @Molecule , thanks, but this is when data is loading from some source, what i need is : { xtype:"button", text:"Alert", handler: function(){ Ext.Msg.show({ title:'Save Changes?', msg: 'You are closing ?', buttons: Ext.Msg.YES, setLoading: // here somehow only mask parent

How does LEA instruction store address of A?

陌路散爱 提交于 2019-12-18 09:47:35
问题 This is based off this question LEA instruction Here is the code segment I have a question about .ORIG X3700 LEA R0, A ..... A .FILL X1234 @Paul R, the answer responder, said that "The origin of the code is x3700, and you have 12 instructions, so the address of A will be x3700 + x0C = x370C. As you guessed, LEA R0,A loads the address of A into R0, so R0 will contain x370C after that first instruction has been executed." I agree with the first part of what Paul said, his reasoning for why the