Is there a way we can concat all field in the table(1 sql statement)(automatic) ?
The reason was before user updated or delete a record,the record will push to another table for future reference.
Why does the following line "alarm.AlarmEvent += new AlarmEventHandler(alarm_Sound);" gives me "An object reference is required for the non-static field, method, or property 'AlarmClock.Alarm.alarm_Sound(object, System.EventArgs)'"
public static void Main(string[] args)
{
Alarm alarm = new Alarm(new DateTime(2010, 4, 7, 23, 2, 0));
alarm.Set();
alarm.AlarmEvent += new AlarmEventHandler(alarm_Sound);
}
Full source code here:
Program.cs
AlarmEventArgs
I have a variable which is <type 'datetime.timedelta'> and I would like to compare it against certain values.
Lets say d produces this datetime.timedelta value 0:00:01.782000
I would like to compare it like this:
#if d is greater than 1 minute
if d>1:00:
print "elapsed time is greater than 1 minute"
I have tried converting datetime.timedelta.strptime() but that does seem to work. Is there an easier way to compare this value?
Does anyone know (ideally, with a reference), whether the VS2010 release of LinqToSQL or EntityFramework v4 will support queries over the SQL 2008 spatial data types?
I'm trying to update my project to MVC 2.0 from MVC 1.0. I've removed the references for System.Web.MVC to the newer versions. I'm getting an exception from the HTTPContext which reads "CurrentNotification = 'HttpContext.Current.CurrentNotification' threw an exception of type 'System.PlatformNotSupportedException'". What other binaries do I need to update a reference to, to get my project to work again?
hi guys,
I have variable @count of datatype int.I am setting values to this @count.
I want to select top @count number of rows from table.When i use Select top @count,its showing error.
Delete from ItemDetails where GroupId in (Select Top @count Id from ItemDetails where GroupId=@Prm_GroupId )
The error is Incorrect syntax near '@count'.Can anybody help?
in codeigniter you can use wildcard to reroute.
i never heard the word wildcards before.
is this a set of rules you can use like regexp?
cause in codeigniter documentation they just gave some examples eg.
$route['product/(:num)'] = "catalog/product_lookup_by_id/$1";
is there a list/reference with all the available wildcard expressions you can use?
Here you will find all the SimpleDB code samples on the AWS page.
Here you will find a VB.NET SimpleDB library.
Is there a production grade SimpleDB library, preferable built in C#. If not, May I use the VB.NET library on a C# project as a reference?
Hello,
How can I import a variable from an external file? What I want to do is to have a configuration file in which I can write all my website settings and then to import these settings to every file, so I can set the website skin and things like that..
How can I do this?
Thanks!
I have a WCF Web Service that my ASP.NET app uses. It has been working fine for quite some time.
I just added in a Dev Express Grid (and the Dev Express DLLs) and a new page that uses them and now I am getting parsing errors on the WSDL.
But the weird part is that it works fine on my machine but fails on the web server machine. (Both are connecting to the same web services WSDL.)
Here is the error message I am getting:
Server Error in '/MyWebAppWebDev' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Reference.svcmap: Failed to generate code for the service reference 'MyWebAppService'.
Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Referenced type 'WebClientApp.MyWebAppService.ReferenceUpdatesDataContract, WebClientApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' with data contract name 'ReferenceUpdatesDataContract' in namespace 'http://schemas.datacontract.org/2004/07/MyWebAppServiceLibrary.DataContracts' cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IMyWebAppReferenceDataServiceLib']
Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IMyWebAppReferenceDataServiceLib']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='MyWebAppServicesDefaultEndpoint']
Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='MyWebAppServicesDefaultEndpoint']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='MyWebAppReferenceDataServiceLib']/wsdl:port[@name='MyWebAppServicesDefaultEndpoint']
Source Error:
[No relevant source lines]
Source File: /MyWebAppWebDev/App_WebReferences/MyWebAppService/ Line: 1
I am completely stumped on this. I have checked my web.config endpoint address and it is spot on (and notably is not in the error message above).
Any ideas would be welcomed.
Things I have tried:
Giving permissions to C:\Windows\temp to my Website user name
Giving permissions to C:\Windows\temp to my App pool user name
Checking to see that none of my data contracts are generic and have IsReference=true in them.
Is there any cost/drawback (apart from typing too much) to adorning a class with System.Runtime.Serialization attributes (like [DataContract]) such that it can be used locally as a direct reference to a desktop Client project or as a type for a WCF service? The goal here is to write a data-tier class that can be used in both rich client (WPF) and Web scenarios. My data classes will be in a project that is separate from Client and WCF (*.svc code-behind) code. Is this a valid attempt to reuse code?
What is the rewrite rule for following URL
mysite.com/001234-some-keywords.html
I want to capture the 6 digit reference number something like ([0-9]{6})
my indexed file is
templates/default/index.php?ref=001234
One day I do a crashcourse regex.. I promise.
I had problems finding the answer to this so I am posting it for posterity.
The situation is, you have a git repo with a submodule (similar to an svn external). You want to update that reference to point to a different commit in the external repository. You might think 'git submodule sync' or 'git submodule update' would do that - you'd be wrong.
As a newbie of Zend framework, I have a few version-dependent questions on the framework.
Does Zend Framework has a fixed file structure (meaning a fixed form of file layout)?
If so, does this file structure vary according to framework versions?
If so, is there any reference to learn all the differences in file structure?
I've got a very simple Action on my Controller that's attempting to return my XmlSiteMap as a JsonResult:
public ActionResult Index()
{
var nodes = SiteMap.Provider.RootNode;
return new JsonResult() { Data = nodes, JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
However, when I call the Action, an InvalidOperationException is thrown:
"A circular reference was detected while serializing an object of type 'System.Web.SiteMapNode'."
Is there a way to Json serialize a SiteMap, or indeed any object that has children of the same type?
I'm trying to implement a Chord distributed hash table. I want to use SHA-1 as the hash function to generate node ids and map values to the DHT. However, I'll need to use numerical operations on the SHA-1 generated key, such as a modulo, for example. I wonder in which type of variable should I put the array of bytes I get, and how can I convert from one to another.
i have the variable $a = 5; i want to show it in binary form, with length, equal 8, with writing * at white spaces, just like this, like this * * * * *101
here the script
$number = 5;
printf("%*8b", $number);
it doesn't work with *, but if "0"-s it works
printf("%08b", $number);
//returns 00000101
why it doesn't work with *?
is there an inbuilt method of tracking if a bundle has already been loaded? I have several edit views which forexample require jquery and jquery.Validate etc libraries. Which i don't need to reference on the main layout page.
Since a page could consist of several different conditional libraries ... ideally i would like @scripts.Render to know if i have already referenced a library and prevent its reloading.
Cheers
Tim
As I understand it, C# passes parameters into methods by reference. In vb.net, you can specify this with ByVal and ByRef. The default is ByVal.
Is this for compatibility with vb6, or is it just random? Also, how can I specify what to use in C#? I kind of like the idea of passing parameters by value.
Hello everyone,
I am using VSTS 2008 + .Net 3.5 + C# + Microsoft Expression 3. I want to capture screen and output a wmv file. I tried hard but can not found C# samples from Google. Any reference samples?
thanks in advance,
George
How can I connect from Delphi to Sybase Sql Server? I want to be able to make querys, execute stored procedures, reference views, etc., all the things that the server allows me to do.
Are there any components (like the dbGo components) or something like that?
Git is implemented as a directed acyclic graph. Children know their parents but not the other way round. This makes sense because i can reach every commit only through a branch or a tag ( generally speaking through a reference). That's how i traverse the tree. What other reasons had the developers of Git to make "the children know their parents but not the other way around"?/ What are the key benefits of this?
Hello,
The JTree implementation / Renderer used in eclipse (see the navigation pane on the left side) is extremely good. I've checked out the eclipse source code and am looking through it, but can't seem to find the reference to the JTree used.
Does anyone know which package contains the definition of this pane?
Thanks!