This silly scripting language doesn't have a % or Mod(). I do have a Fix() that chops off the decimal part of a number. I only need positive results, so don't get too robust.
What is the optimal way to configure/code NServiceBus to delay retrying messages, in its default configuration retry happens almost immediately upto the number of attempts defined in the config file. I'd ideally like to retry again after an hour etc..
Also how does HandleCurrentMessageLater() work, what does the Later aspect refer to?
I am simply taking the data from a Table and insert it into #tempTable then delete the data, and insert it back to the table. I get "Insert Error: Column name or number of supplied values does not match table definition." Error.
Here are the lines I am running.
SELECT * INTO #tempTable FROM dbo.ProductSales
SELECT * FROM #tempTable
DELETE FROM dbo.ProductSales
INSERT INTO dbo.ProductSales SELECT * FROM #tempTable
Any Idea?
In Windows 2008R2, in Resource Monitor in the Disk Acitivity section I can see the number of bytes read from/written into files. How can I do this in a programatic manner, prefferably using C# (or Win32 API)? I have looked into WMI and various performance counters, however I cannot figure out if there is something which suits my needs.
I want to query against a geospatial index in mongo-db (designed after this tutorial http://www.mongodb.org/display/DOCS/Geospatial+Indexing).
So when I execute this from the shell everything works fine:
db.sellingpoints.find(( { location : { $near: [48.190120, 16.270895], $maxDistance: 7 / 111.2 } } );
but the same query from my nodejs application (using mongoskin or mongoose), won't return any results until i set the distance-value to a very high number (5690)
db.collection('sellingpoints')
.find({ location: { $near: [lat,lng], $maxDistance: distance / 111.2} })
.limit(limit)
.toArray(callback);
Has someone any idea how to fix that?
I am creating my java Swing application in Netbeans. At present there are more than 2000 lines of code. Is it right to have these many number of lines in a single file. Moreover the IDE has become slow when i am editing this file. Is there any way to overcome this?
I am not sure if I am going about this the best way, but I will try to explain what I am trying to do.
I have the following domain classes
class User {
static hasMany = [goals: Goal]
}
So each User has a list of Goal objects. I want to be able to take an instance of User and return 5 Users with the highest number of matching Goal objects (with the instance) in their goals list.
Can someone kindly explain how I might go about doing this?
I have a number between 0.0 and 1.0, I would like to convert it to a grayscale color.
White = 0
Black = 1
You can show me how in any understandable language (I prefer actionscript 3)
Please, don't just give a name of a function that a language have to do this, I want to know how it does.
Context:
I use an ArrayCollection object as follows:
1) Number of elements is fixed.
2) Elements are inserted at a given position, based on some order.
Question:
Can I set the max size of the ArrayCollection? Will fixing the size improve the performance, as elements keep getting inserted into this collection?
-Thank You
i have following regular expression but it's not working properly it takes only three values after @ sign but i want it to be any number length
"/^[a-zA-Z0-9_.-]+\@([a-zA-Z0-9-]+.)+[a-zA-Z0-9]{2,4}$/"
this@thi This is validated
this@this It is not validating this expression
Can you please tell me what's the problem with the expression...
Thanks
hi, i am siva this is frist time taken the python programming language i have a small problem please help me the question is **Write two functions, called countSubStringMatch and countSubStringMatchRecursive that take two arguments, a key string and a target string. These functions iteratively and recursively count the number of instances of the key in the target string. You should complete definitions for
def countSubStringMatch(target,key):
and
def countSubStringMatchRecursive (target, key):
**
The most efficient way to code powers of two is by bit shifting of integers.
1 << n gives me 2^(n-1)
However, if I have a number that is larger than the largest value allowed in an int, what can I use to efficiently manipulate powers of 2?
I am trying to solve the problem Secret Code and it's obviously math problem.
The full problem
For those who are lazy to go and read, it's like this:
a0,a1,a2,...,an - sequence of N numbers
B - some number known to us
X = a0 + a1*B + a2*(B^2) + a3*(B^3) + ... + an*(B^n)
So if you are given B and X, you should find a0,a1,..an.
I don't know how or where to start, because not even N is known, just X and B.
Can you help me ?
I have 3 textboxes in three different tab control and i want to generate textbox id like textbox plus concatenate the tab number
for(int i=0;i<3;i++)
{
<%: Html.TextBoxFor(e=>e.vcr_LinkName + i)%>
}
its not working but when i change it to
for(int i=0;i<3;i++)
{
<%: Html.TextBox("vcr_LinkName" + i)%>
}
it works fine. but i want to use textboxfor instead of textbox
Hi, I have a jcycle plugin on a number of divs which are testimonials. Basically I don't want to show the tag in the testimonial viewed in a block on the front page but rather I do want it to show on another page. So I want to add some jquery or another method that strips the img tags for the front page display.
Any ideas how to do this?
Thanks
Andy
just yesterday i finished one site, which provides video watching.
but now i need to show the number of views of each film. i never wrote such thing, so i don't know what to do.
maybe i must add one field in mysql database, and increase it every time the video opened?
but i use flash player, and i can't wrote script onclick of player.
so, could you give me an idea...
thanks
How can a Clojure program find its own MANIFEST.MF (assuming it is packaged in a JAR file).
I am trying to do this from my "-main" function, but I can't find a class to use in the following code:
(.getValue
(..
(java.util.jar.Manifest.
(.openStream
(java.net.URL.
(str
"jar:"
(..
(class **WHAT-GOES-HERE**)
getProtectionDomain
getCodeSource
getLocation)
"!/META-INF/MANIFEST.MF"))))
getMainAttributes)
"Build-number"))
Thanks.
How can i round a calculated mdx measure up to the nearest integer without having Excel on the server? The Excel-function is CEILING(number, significance), but it is not possible to install Excel on the production ssas-server.
May I know how to add a new custom text field in TFS to show the lastest revision number?
Can anyone explain in deatil about
Making use of work item’s XML and customize TFS work items.
How to create custom window form control to add to work item.And installation of
custom control runtime
Hello,
I need to change a method that has one parameter that takes a serie of objects. I need to find the lowest Interface (in inheritance tree) that has the Count property. Until now I was using the IEnumerable but as this has not Count I need to change it to the wider interface possible so the method can work with the biggest number of types of series (collections, lists, arrays, etc).
Thanks in advance.
How do I add 2 years to a date in powerbuilder and account for the leap year correctly?
We have a medical license application where the user would like the date to go expire two years. Current license date is 7/10/2010 and expire date should be 7/2/2012 I used relative date and added 729 if not a leap year and 730 if it was but that is messy.
I wish the relativedate function took another parameter to so you could pass in number years.
I always had this question:
When i dont mind the exact floating number
Which one is preferred?
like this code:
parseFloat
someValue = parseFloat(el.outerWidth())+parseFloat(ele2.css("marginRight")),
parseInt
someValue = parseInt(el.outerWidth(), 10)+parseInt(ele2.css("marginRight"), 10),
Which method is easier for the JS engine?