Hi guys, I want to create chess application without AI. I just need in checking available ways for chosen chess-object and checkmate for the king. What is the best way to implement this?
I'd like to do a bit of matrix/vector arithmetic in JavaScript, and was wondering if any browsers or other JS implementations actually have support for vectorized operations, for instance for quickly summing the entries of two Arrays (or summing, or whatever). Even if that currently doesn't mean it compiles down to vectorized operations, at least some language support would be nice for when it does get implemented - I'd take the existence of functions or syntax to support it as a step in the right direction. (Understandably, "vectorization javascript" searches are pretty much all about graphics and SVG.)
Hi... I was wondering if there is another way to spell check a Windows app instead what I've been of using: "Microsoft.Office.Interop.Word". I really don't want to buy a spell checking add-on.. and would like the spell check to be dynamic..any suggestions?
Hi. is there any difference between using one of this technologies?
I'm building now a site using HTML5, and I'm having hard time to decide which of them to use.
I cannot see any difference between them, else the syntax size, which i'm not quiet sure is an advantage for the microformats side.
Am looking for a query to sum values in a particular time duration say an year or a particular month in an year using MYSQL syntax.Note that my transaction_date column stores daily amount transacted.
Am example of a query that returns total sales in an year query would look something like this
SELECT SUM(transaction_amount) WHERE transaction_date = (YEAR)
Am example of a query that returns total sales in an particular month and year would look something like this
SELECT SUM(transaction_amount) WHERE transaction_date = (YEAR)(MONTH)
How achievable is this?
I am getting a syntax error when I send a parameterized query to Access from my C# program via ADO.NET.
I, of course, know what SQL string I have included in my code, with the parameter names embedded inside.
Does anyone know how I can look at the SQL string that is finally sent to the DBMS during after I call cmd.ExecuteNonQuery?
Thanks.
I'm trying to update a collection of records in my database using ActiveRecord's update_all. Enter script/console.
MyModel.update_all("reserved = 1", :limit => 1000)
ActiveRecord thinks limit is a column, says it's unknown and throws an exception. According to the documentation though, my syntax looks sane. This is RoR 2.3.5.
When doing MyModel.update_all("reserved = 1") alone, it works just fine.
I am trying to create some script variables in T-SQL as follows:
/*
Deployment script for MesProduction_Preloaded_KLM_MesSap
*/
GO
SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
GO
:setvar DatabaseName "MesProduction_Preloaded_KLM_MesSap"
However, when I run this, I get an error stating 'Incorrect syntax near ':'. What am I doing wrong?
Hello,
I want to constrain a SQL Server decimal column to only allow -1,0,1 as valid values.
Can you show me the SQL syntax for adding such a constraint. (I would like to know how to do it in both the CREATE TABLE statement and/or the ALTER TABLE ADD CONSTRAINT).
Or can this only be accomplished in a trigger?
Seth
Background: i'm using InstantRails 2.0
I'm wanted to add a new column to an existing table using the following syntax:
ruby script/generate migration add_fieldname_to_tablename fieldname:string
So I tried
ruby script/generate migration add_invites_to_user invites:integer
ruby script/generate migration add_invites_to_users invites:integer
And to test it further
ruby script/generate migration AddInvites
ruby script/generate migration AddInvites invites:integer
All of the above give me
builder.rb:175 in 'build': Illegal route: the :controller must be specified! (ArgumentError)
Hello,
I am parsing a XML file against a XSD containing some regex patterns used for checking input data, but only this regex generates an error, even if it passes into the Eclipse XSD plugin:
InvalidRegex: Pattern value
'(((com|it|org)\.)+(\b[a-z]+[.]{1}\b)+)?[A-Z]{1}[A-Za-z]+'
is not a valid regular expression. The reported error was:
'This expression is not supported in the current option setting.'.
So, with SAX validator where can I find the fatal "current option setting"?
Hey,
Does anyone know a fast algorithm for evaluating 7 card poker hands? Something which is more efficient than simply brute-force checking a every 21 5-card combination of hands from a set of 7.
Cheers,
Pete
Hi,
I have a php login which sets 2 cookies once some one login. the problem is that if you login from : http://www.mydomain.com and you go to http://mydomain.com you will find your self not logged in, I think that's because the browser only send the cookies to the first syntax.
It's only one domain, the difference is the www. before the domain name, so how to set cookies to the whole domain whatever there is www. or not ?
Thanks
I have a IWebBrowser2 I use to visit some webpages with .Navigate()
When the page has a js error I got a warning box for "Syntax error", so I used .put_Silent(TRUE). And now I get a warning for "VS Just-In-Time Debugger: Unhandled exception" instead
How can I disable all the script error warnings (including JIT debugger) from my code (i mean without modifying the real IE settings)?
What's the best way of checking if an object property in JavaScript is undefined?
Sorry, I initially said variable rather than object property. I believe the same == undefined approach doesn't work there.
I basically want to do this:
SELECT HasComments = CASE (LEN(Comments) > 1) WHEN 1 THEN 1 ELSE 0 FROM TableName
In other words, return a boolean telling me whether the length of Comments is greater than 1. This gives me a syntax error.
How can I accomplish this?
Part-time reluctant DBA here. I want to change an existing primary key index from clustered to non-clustered. And the syntax is escaping me.
This is how it's scripted out right now.
ALTER TABLE [dbo].[Config] WITH NOCHECK ADD
CONSTRAINT [PK_Config] PRIMARY KEY CLUSTERED
(
[ConfigID]
) ON [PRIMARY]
I am not seeing an ALTER CONSTRAINT statement in the online docs.
How can I implement cross browser opacity gradient (not color gradient)?
See following code:
<div style="background-color:Red;display:block;height:500px;width:500px;filter:alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY=500)"></div>
It works fine in IE but not in other browsers like firefox,safari..etc.
What is equivalent syntax for firefox?
Please don't suggest me to use gradient image.
How to create VB Irregular expression syntax to check the VPparam (IP address validity)
When the last octatat of the IP address is a range between ip's (x-y)
and between each IP we can put the "," separator in order to add another IP
example of VBparam
VBparam=172.17.202.1-20
VBparam=172.17.202.1-10,192.9.200.1-100
VBparam=172.17.202.1-10,192.9.200.1-100,180.1.1.1-20
THX
yael
I want to create a generic class, whose builder would not return an instance of this generic class, but an instance of a dedicated children class.
As Moose does automatic object building, i do not get to understand if this something possible, and how to create a Moose class with Moose syntax and having this behaviour
Eg:
The user asks: $file = Repository-new(uri='sftp://blabla') .... and is returned an Repository::_Sftp instance
User would use $file as if it is a Repository instance, without the need to know the real subclass (polymorphism)
How to create VB script Irregular expression syntax to check the VPparam (IP address validity) When the last octatat of the IP address is a range between ip's (x-y) and between each IP we can put the "," separator in order to add another IP
example of VBparam
VBparam=172.17.202.1-20
VBparam=172.17.202.1-10,192.9.200.1-100
VBparam=172.17.202.1-10,192.9.200.1-100,180.1.1.1-20
THX yael
I'm using perl cron, and I want to make a rule like this
run every xx min/hours starting at yy:yy time (until the end of time)
How would I put this into a cron string? perl:cron seems to use the same syntax as regular cron so a regular cron string should work
TIA!
I'm using Prettify for syntax highlighting, but it doesn't work on dynamically generated code.
I have a form that when submitted generates code and displays it (without refreshing) in <div id="output></div>, but prettify doesn't work on this code, is there any workaround?
Many thanks!
The reason I asked this question is that I wanted to create a helper class for Remoting instantiation, and wanted to pass the appropriate app.exe.config (or web.config) file path to the RemotingConfiguration.Configure method, depending on the caller.
Is there a way I could get the name of the config file for both Win and Web apps without checking if the application is Web or WinForms?
I have a scenario where a control has an event wired up in XAML, say a Button.Click.
Somewhere else in my code, a security check is applied which mean I need to disable said event, but I do not have access to the normal -= syntax to remove it.
How else can I remove or disable this event?
Thanks,
Dave