Hi;
I have an Excel file with one culumn and there is a lot of numbers in it. I want to want these data to an array in c#. I want c# code immediately.
Thank you all...
I have a bunch of files containing x and y coordinates, representing time and value (space-separated, but can be amended)
For example:
15:06:59 0.0140
.......
I want to create a word file (or some equivalent) to show all these graphs.
Right now I am using Excel. It pretty daunting task, as I ahve to plug paste numbers in two rows for each graph, and I have many of them.
Thanks
Well i'm totaly lost here, i am using jquery ui sliderwidget to make this quite simple menu but i just can't figure out a basic formula to make menu items slide along with with scroll bar.
Here is jsfiddle: http://jsfiddle.net/n2H6Q/4/
Please keep in mind that content height can change to any value that's why i have use random height, and container height can as well change to any value, that's why it is so difficult for me to figure out how to deal with all these numbers...
Any kind of help would be very much appreciated.
I have the need to perform algorithms on various primitive types; the algorithm is essentially the same with the exception of which type the variables are. So for instance,
/**
* Determine if <code>value</code> is the bitwise OR of elements of <code>validValues</code> array.
* For instance, our valid choices are 0001, 0010, and 1000.
* We are given a value of 1001. This is valid because it can be made from
* ORing together 0001 and 1000.
* On the other hand, if we are given a value of 1111, this is invalid because
* you cannot turn on the second bit from left by ORing together those 3
* valid values.
*/
public static boolean isValid(long value, long[] validValues) {
for (long validOption : validValues) {
value &= ~validOption;
}
return value != 0;
}
public static boolean isValid(int value, int[] validValues) {
for (int validOption : validValues) {
value &= ~validOption;
}
return value != 0;
}
How can I avoid this repetition? I know there's no way to genericize primitive arrays, so my hands seem tied. I have instances of primitive arrays and not boxed arrays of say Number objects, so I do not want to go that route either.
I know there are a lot of questions about primitives with respect to arrays, autoboxing, etc., but I haven't seen it formulated in quite this way, and I haven't seen a decisive answer on how to interact with these arrays.
I suppose I could do something like:
public static<E extends Number> boolean isValid(E value, List<E> numbers) {
long theValue = value.longValue();
for (Number validOption : numbers) {
theValue &= ~validOption.longValue();
}
return theValue != 0;
}
and then
public static boolean isValid(long value, long[] validValues) {
return isValid(value, Arrays.asList(ArrayUtils.toObject(validValues)));
}
public static boolean isValid(int value, int[] validValues) {
return isValid(value, Arrays.asList(ArrayUtils.toObject(validValues)));
}
Is that really much better though? Any thoughts in this matter would be appreciated.
What NEW features has WCF in .NET Framework 4 vs .NET Framework 3.5? What Is new, what was fixed (in general - I do not want to get into bug fixed numbers=)?
I am wondering what these greens things are in Visual Studio 2010. What are they for? They look pretty random but of course they have to have some meaning. Can any one tell me?
At first glance they don't mean any thing to me.
Picture 1:
Picture 2:
Edit:
They show saved changed content during the document open. Once you close the document they disappear.
Where to get a Data base of open to viewing IP cameras?
So I am creating a web application that will have a MJpeg backgrownd. I need some DB of IP cameras for random pich=king (or at least array of IP cameras adresses)
When I run:
openssl genrsa -out mykey.key 2048
I get the following error:
unable to write 'random state'
e is 65537 (0x10001)
My googling suggests this is some kind of Vista permissions issue. How can I allow Vista to write this file or how can I configure openssl to get round it?
Quick question: At this website here http://www.vischeck.com/examples/ there are a few pictures of numbers hidden within another color to test for color blindness. Is there any way that these images can be generated algorithmically?
Hi.
I'm looking for a jQuery Plugin to create a graph like that http://www.panic.com/blog/2010/03/the-panic-status-board/. To update the graph every x miliseconds from a PHP page and the numbers that are on the top. Is it possible?
Do you know any plugin that does that? Thanks!
Any ideas on how to make the clones draggable?
$("#draggable").draggable({
helper: 'clone',
cursor: 'pointer',
});
$("#snaptarget").droppable({
drop: function(event, ui) {
var randomnumber = Math.floor(Math.random()*1000000);
var newId = '#draggable_'+randomnumber;
$(ui.helper).clone(true).removeAttr('id').attr('id',newId).appendTo('#snaptarget');
$(newId).draggable();
}
});
$(newId).draggable(); does not work.
Hello,
I have a datetime.datetime property var.
I would like to know if it is less than one hour of the current time.
Something like
var.hour<datetime.datetime.today().hour - 1
Problem with the above syntax is that
datetime.datetime.today().hour
returns a number such as "10" and it is not really a date comparation but more of a numbers comparation.
What is the correct syntax?
Thanks!
Joel
Now I get two collections: coll01 and coll02.
And the structure of coll01 is like this:
{
id: 01,
name: "xxx",
age: 30
}
and the structure of coll02 is like:
{
id: 01,
name: "XYZ"
gender: "male"
}
The two id fields in the both collection are indices. And the numbers of documents in these two collections are same.
And what I want to do in traditional SQL is :
update coll01, coll02
set coll01.name = coll02.name
where coll01.id = coll02.id
I am trying to create an access 2007 database that allows staff that already have ID numbers to make a transaction and also other guest users who do not have ID number make a transaction. What is the best way todo this in access? A transaction involves taking an item out of inventory. Therefore if one a user (staff or external) has an item out of inventory then no other users can get a hold of that item. Thanks, Any Ideas would be most appreciated!
I know there are duplicate account numbers in this table, but this query returns no results.
SELECT [CARD NUMBER],[CUSTOMER NAME],[ACCT NBR 1],[ACCT NBR 2],
COUNT([ACCT NBR 1]) AS NumOccurences
FROM DebitCardData.dbo.['ATM Checking Accts - Active$']
GROUP BY [CARD NUMBER],[CUSTOMER NAME],[ACCT NBR 1],[ACCT NBR 2]
HAVING (COUNT([ACCT NBR 1])1)
say ive got a matrix that looks like:
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
how can i make it on seperate lines:
[[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
and then remove commas etc:
0 0 0 0 0
And also to make it blank instead of 0's, so that numbers can be put in later, so in the end it will be like:
_ 1 2 _ 1 _ 1
(spaces not underscores)
thanks
Hi All,
I have created a user control (from System.Web.UI.UserControl), and created my own validator for the user control (from System.Web.UI.WebControls.BaseValidator). Everything works ok until I try to get the user control to do client side validation.
While trying to debug this issue I have set 'Control to Validate' to a text box instead of the custom user control, and the client side script works fine! It appears to me that it has an a issue with my composite user control I have created. Has anyone encountered this issue before? Has anyone else seen client side validation fail on custom user controls?
Some extra info :
The composite control is a drop down list and 'loader image', as it is a ajax enabled drop down list (using ICallbackEventHandler). I know that the client side javascript is being written to the page, and have placed an alert('random message') as the first line in the validator function that only appears if it is validating a text box (i.e. not when it is validating my custom control)
Language : C# (ASP.NET 2.0) and jQuery 1.2.6
in aspx file :
<rms:UserDDL ID="ddlUserTypes" runat="server" PreLoad="true" />
<rms:DDLValidator
ID="userTypesVal"
ControlToValidate="ddlUserTypes"
ErrorMessage="You have not selected a UserType"
runat="server"
Text="You have not selected a UserType"
Display="Dynamic"
EnableClientScript="true" />
in validator code behind
protected string ScriptBlock
{
get
{
string nl = System.Environment.NewLine;
return
"<script type=\"text/javascript\">" + nl +
" function " + ScriptBlockFunctionName + "(ctrl)" + nl +
" {" + nl +
" alert('Random message'); " + nl +
" var selVal = $('#' + ctrl.controltovalidate).val(); " + nl +
" alert(selVal);" + nl +
" if (selVal === '-1') return false; " + nl +
" return false; " + nl +
" }" + nl +
"</script>";
}
}
protected override void OnPreRender(EventArgs e)
{
if (this.DetermineRenderUplevel() && this.EnableClientScript)
{
Page.ClientScript.RegisterExpandoAttribute(this.ClientID, "evaluationfunction", this.ScriptBlockFunctionName);
Page.ClientScript.RegisterClientScriptBlock(GetType(), this.ScriptBlockKey, this.ScriptBlock);
}
base.OnPreRender(e);
}
I know my ControlPropertiesValid() and EvaluateIsValid() work ok.
I appreciate any help on this issue.
Noel.
I Was reading random questions and answers here on SO and came across this question:
C#, IAsyncResult and the thread pool
The question is asked is X method using the thread pool or using normal threads.
What's the difference between using the thread pool and a normal thread?
Almost all is dialed in except then I click the pause/play button, the current activeSlide div doesn't fade in on rollover like the other slides do. Bit at a loss to figure out why it's not allowing hover even though it works when the cycle is not manually paused (i.e. when just rolling over the pager numbers).
Thanks for any guidance!
http://www.xtracycle.com/home-test-a-rooney
the most darndest thing! the following code prints out 'llo' instead of the expected 'wo'. i get such surprising results for a few other numbers. what am i missing here?
alert('helloworld'.substring(5, 2));
Hi,
in words, can someone post directions towards finding the 'maximal' independent set in a simple graph?
I read up something from ETH site which said one can find such in O(n) by simply picking a random vertex v and than scanning the rest and attempting to find if there's an edge from v to the rest.
Thanks
Can't remove an entry from table.
here's my code
dropItem = dropList[ math.random( #dropList ) ]
dropSomething[brick.index] = crackSheet:grabSprite(dropItem, true)
dropSomething[brick.index].x = brick.x
dropSomething[brick.index].y = brick.y
dropSomething[brick.index].name = dropItem
dropSomething[brick.index].type = "dropppedItems"
collision
function bounce(event)
local item = event.other
if item.type == "dropppedItems" then
if item.name == "bomb" then
Lives = Lives - 1
LivesNum.text = tostring(Lives)
end
item:removeSelf();
end
end
What I've tried:
item:removeSelf(); - removes the whole table
item = nil - seams to do nothing, the object continue to move and i still see the image
Hiya.
I need to create a dynamic array in Java, but the values type differ from String to Int to float. how can I create a dynamic list that I don't need to give it in advanced the type of the values?
The keys just need to be ascending numbers (1,2,3,4 or 0,1,2,3,4)
I checked ArrayList but it seems that I have to give it a fixed type for the values.
thanks!
Hi There,
I have a field in my database that contain comma seperated values these values are numbers, and I am trying to do a search and count the number of times that a number appears in that column throughout the column,
$sql = "SELECT sector_id_csv, COUNT(sector_id_csv) as count FROM cv WHERE sector_id_csv LIKE '$sectorId'";
This seems slow and does not return any results, and I know the sector_id it is search exsists in the table.