I have a UTF-8 encoded char*.
Is there a standard function to calculate the number of visible characters represented by the byte array?
I'm on Red Hat (RHEL 5).
I will be creating flatfiles and based on the data in the batch, it might be necessary to split the data into an undetermined number of files.
I can make the connection string dynamic with an expression, but that is only evaluated when the package starts. I'd like to change that expression to include a '-a' or '-b' in the filename.
Alternately, if I have to create new connection manager objects at run time on demand, how do I go about that?
I was attempting to install an exe that requires a serial number before the install, which the vendor has not provided to us yet.
This got my wheels turning about whether there is any information that can be gained from viewing an exe using a hex editor/VI/etc?
Using VI to view an exe, I can see some sections of plain text, but it is difficult to determine what it refers to without any context around it.
Is it possible to determine any information by reading an exe?
Thanks
Is there a way to find out the number of digits of min/max values of an integral type at compile time so that it's suitable to be placed as a template parameter?
Ideally, there will be an existing solution in, for example, Boost MPL. Failing that I'm looking for some pointers for a hand-coded solution.
Hey SO
Doing a some practice questions for exam tomorrow can't figure out this one
What is the minimum number of socket port(s) required for a TCP server to connect a TCP client for communication?
Surely its just two right? one for the server one for the client, but this seems to obvious. My mates thinks TCP uses two ports at the server end for for data in and one for data out.
thanks in advance
Does anyone know how to count the number of times a value appears in a matrix?
For example, if I have a 1500 x 1 matrix M (vector) which stores the values of weekdays (1 - 7), how could I count how many Sundays (1), Mondays(2), ... , Saturdays(7) are stored in M?
This is my app:
If someone enters "C6H12O6+O2=CO2+H2O", then I have already written code to split the equation into terms, so in an ArrayList called rterms I have the strings:
C6H12O6
CO2
and in another ArrayList called pterms, I have:
CO2
H2O
I need to count the number of C's in each term of the reactants, so 6 for term 1, 0 for term 2, and then the H's and then O's. How would I do this? Any help is appreciated.
Is there any easy way to calculate the number of lines changed between two commits in git? I know I can do a git diff, and count the lines, but this seems tedious. I'd also like to know how I can do this, including only my own commits in the linecounts.
I am writing a custom error handling/reporting function for php file upload and I noticed that the error codes returned is one of numbers 0 to 8 except 5.
Is this a typo in the source I am using or is it really this way? And if it is so, I am curious why they have skipped number '5'.
Thanks.
Hi,
In many cases, it could be useful to know the number of a row in a table (a kind) in a datastore using Google Application Engine. There is not clear and fast solution . At least I have not found one.. Have you?
I need a reliable way to detect how many CPU cores are on a computer. I am creating a numerically intense simulation C# application and want to create the maximum number of running threads as cores. I have tried many of the methods suggested around the internet like Environment.ProcessorCount, using WMI, this code: http://blogs.adamsoftware.net/Engine/DeterminingthenumberofphysicalCPUsonWindows.aspx. None of them seem to think a AMD X2 has two cores. Any ideas?
Hi, I have question how to generate unique serial number of machine in Delphi? I tried to do this using the ID the motherboard or processor, but unfortunately it's unfortunately supported. Partition serial numbers, etc. fall off, because it is changing after the formatted. I'm looking for something that doesn't change after the formatted. Has anyone any idea?
I am busy preparing for exams, just doing some old exam papers. The question below is the only one I can't seem to do (I don't really know where to start). Any help would be appreciated greatly.
Use the O(nlogn) comparison sort bound, the theta(n) bound for bottom-up heap construction, and the order complexity if insertion sort to show that the worst-case number of inversions in a heap is O(nlogn).
Hi,
How can I fix number of concurrent sessions allowed at app level?
Basically I want a limit to how many concurrent requests to this url to keep the server from getting congested.
I guess some middleware hack?
Thanks.
Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators? I'd specifically like to know if it's possible under the .NET Platform.
if i do this in a worksheet:
=RAND()
i also specified that i want only 2 decimal places
and for example let's say that rand() = 0.07
what is the probability that when i call this function again i will get 0.07 ??
i know that ideally if we assume 100% randomness, the answer would be 1/ (10 * 10) because there are only 100 possible combinations, but what would it be according to the way excel generates a random number?
Sounds like a "let me google it for you" question, but somehow I can't find an answer. The Lua # operator only counts entries with integer keys, and so does table.getn:
tbl = {}
tbl["test"] = 47
tbl[1] = 48
print(#tbl, table.getn(tbl)) -- prints "1 1"
count = 0
for _ in pairs(tbl) do count = count + 1 end
print count -- prints "2"
How do I get the number of all entries?
Hi guys,
In SQL Server, how can I separate a large number of tsql statement into batches? Should I use the GO statement in stored procedures or functions? Should I use the GO statement in explicit transaction management situation(between BEGIN TRANSACTION and ROLLBACK TRANSACTION or COMMIT TRANSACTION)?
Are there some best practice about this topic?
Great thanks in advance.
Hi,
What's the best way to implement showing a number in a small circle on a UITableView row, much like is seen on the 'Inbox' row in the image below?
Thanks,
while inserting into temp table inside a cursor am getting this error
Cursorfetch: The number of variables declared in the INTO list must match that of selected columns.
I'm not sure the best way to word this question so bear with me.
Table A has following columns:
id
name
description
Table B has the following columns:
id
a_id(foreign key to Table A)
ip_address
date
Basically Table B contains a row for each time a user views a row from Table A.
My question is how do I sort Table A results, based on the number of matching rows in Table B.
i.e
SELECT *
FROM TableA
ORDER BY (SELECT COUNT(*)
FROM TableB
where TableB.a_id = TableA.id)
Thank you!
When you hit the delete button a nice effect is run on that li and it is removed by using jquery's .remove() function.
For some reason if i try to .size() on the parent ul it just still says the number of list items that were there when the page loaded?
I am using facebook like in my site, and my php script need to know how many people like every page. For example I want to use echo $likes; where $likes is a number of likes. Is it possible to do?
A m x n rectangular matrix is give, and each cell is to be filled with 0/1 colour. I have to find number of colorings possible so that there is no monochromatic coloured (same colour) sub-rectangle whose both dimension is greater than 1 (eg - 2x2, 2x3,4x3)
I have found a slightly different version of it here
But they have said nothing about the algorithm. So, I am looking for an algorithm here !!