Hi, I'm using Ruby 1.9 and I'm wondering if there's a simple regex way to do this.
I have many strings that look like some variation of this:
str = "Allocation: Random, Control: Active Control, Endpoint Classification: Safety Study, Intervention Model: Parallel Assignment, Masking: Double Blind (Subject, Caregiver, Investigator, Outcomes…
In an ASP.NET web application using C#, when we double click on design it will go to code behind page (cs file), but problem here is, when we double click on design its going to script of source file. Why it is happening?
For a simple simulation in C, I need to generate exponential random variables. I remember reading somewhere (but I can't find it now, and I don't remember why) that using the rand() function to generate random integers in a fixed range would generate non-uniformly distributed integers. Because of this, I'm wondering if this code might have a…
In asp.net web application using c#, when we double click on design it will go to code behind page(cs file). but problem here is, when we double click on design its going to script of source file. why it is happening
I wrote this code in VB to label columns in a table but now im writting a python script to automate the process and i can't make it work. Any thoughts??
Static v1 as variant
Static v2 as variant
Dim Output as double
Dim Start as double
Start = 1
If v2 = [XMIN] Then
Output = v1
Else
Output = v1 + 1
End If
v1 = Output
v2 = [XMIN]
I'm gonna detect the resolution with the following code in WPF :
double height = System.Windows.SystemParameters.PrimaryScreenHeight;
double width = System.Windows.SystemParameters.PrimaryScreenWidth;
Current resolution of my screen is 1920*1200, but height is 960.0 and width is 1536.0 !!!
What's wrong with it ?
Thanks in advance.
Hi,
I learned something about DLL's yesterday. But I haven't found the way how to use all of the functions and procedures in DLL without writing this line into code of application for every function and procedure I want to use.
function CircleArea(const radius : double) : double; external 'circle.dll';
I am developing an android app in which i have to show map view i have done it once in a previous app but the key i used in the previous is not working int his app .
It is just showing a pin in the application with blank screen.
Do i have to use a different Map key for each project , If not Kindly help me how can i use my previous Key in…
This type of stuff drives me nuts. I'm having trouble finding the exact issue that I'm having, maybe I just don't know the terminology. Anyway, I had a working website using MVC and Entity Framework, but then I coded an error in a partial view page (ascx). Then all of a sudden I started to get this message.
Cannot open user…
I have implemented 3 gesture recognizers - single, double and triple tap. Single and double works perfectly, but the 3 tap gesture is interpreted as a 2 tap gesture, despite the number of taps being set correctly. Does a 3 tap gesture require additional code? Thank you
I can draw many things using this :
NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"dummy2.png" ofType:nil];
UIImage *img = [UIImage imageWithContentsOfFile:imagePath];
image = CGImageRetain(img.CGImage);
CGRect imageRect;
double x = 0;
double y = 0;
for (int k=0; k<someValue; k++) {
x += k;
y…
This is probably an easy one, but is the right way to calculate volume for a sphere in c++. My getArea() seems to be right, but when I call getVolume() it doesn't output the right amount. With a sphere of radius = 1, it gives me the answer of pi, which is incorrect:
double Sphere::getArea() const
{
return 4 * Shape::pi *…
faacEncConfigurationPtr FAACAPI faacEncGetCurrentConfiguration(
faacEncHandle hEncoder);
I'm trying to come up with a simple wrapper for this C++ library; I've never done more than very simple p/invoke interop before - like one function call with primitive arguments.
So, given the above C++ function, for example, what…
I have two functions:
double fullFingerPrinting(string location1, string location2, int nGrams)
double AllSubstrings(string location1, string location2, int nGrams)
I want to go in a loop and activate each function in its turn, and after each function I also want to print the name of the function, how can I do that?
Does a smarter way than the following exist to resize a rectangular array?
double[,] temp = new double[newSize, originalSecondDimension];
Array.Copy(original, temp, original.Length);
I was concerned about duplicating a huge array and the memory necessary to do it. What does the Array.Resize() do internally?
Thanks,
Alberto
How to specify blob type in MS Access? I have office 2007 installed. I am using jdbc, but this should not matter for the SQL query I am passing. Tried to pass a length to it, or FILE type, did not help.
CREATE TABLE mytable (
[integer] INTEGER not null,
[string] VARCHAR (255),
[datetime] DATETIME,
[boolean] BIT,
…
I have a string that has some double quoted substring in it, the " character. In between the double quotes is the data i want.
How can i write a regex to extract "the first data i want" and "the second data i want" from this:
'some string with "the first data i want" and "the second data i want"'
I tried the following code.…
Hi,
I desperately need a solution for this... I m using Blackberry JDE 5.0. In documentation it shows net.rim.device.api.util.MathUtilities.pow ( double double ) is added form 4.6. But i couldnt get pow function when i use Math.pow().
I need to get this value...float fSecondFactor=(float)…
I'm trying to generate a string from my own class called Value using boost::spirit::karma, but i got stuck with this. I've tried to extract my problem into a simple example.
I want to generate a String with karma from instances of the following class:
class Value
{
public:
enum…
Who can give me a link for the operator= of vector in MSDN?
Why I can only find operator[]?
If operator= is just something default, like copy everything in A to B, how this following code works?
vector<double> v(100,1);
v = vector<double>(200,2); // if operator= is…
I am trying to build a data processing program. Currently I use a double matrix to represent the data table, each row is an instance, each column represents a feature. I also have an extra vector as the target value for each instance, it is of double type for regression, it is of…
I am using an Excel Add-in for an Erlangs:
http://abstractmicro.com/erlang/helppages/ref-erlbblockage.htm
I try to call the Erlang-B function within the Add-in from within VBA thus:
Function Erl(Erlangs As Double, Capacity As Double)
Erl =…
I saw two common approaches for coding standards for private member variables:
class Foo
{
private int _i;
private string _id;
}
and
class Foo
{
private int m_i;
private string m_id;
}
I believe the latter is…
hi
here
string strScore="2"; or
string strScore="2.45656"
now here i am checking the condition if it is
double value = double.Parse(strScore);
strScore = value.ToString("##.##");
2.45656 like this then i am showing the…