How can I use more than one constant for a switch case C#? Conceptually, I'm looking for something like this:
switch(n)
{
case 1,2,3: //????
case 4:
default:
}
I was amazed to find out that apparently Eclipse doesn't come with a decent HTML editor by default (it opened my .html file in some kind of browser view and apparently tried to render it). And the basic text editor is not good enough (I need at least some syntax highlighting and automatic indenting).
Any suggestions?
Hello
I have created login account on my localhost\sql2008 Server (Eg. User123)
Mapped to Database (default)
Authentication Mode on SQL Server is set to both (Windows and SQL)
But login to SQL Server fails with following message (for User123)
Note: Have checked mutliple time that UserName / Password are typed in correctly
Error Details:
Login failed for user 'User123' (Net.SqlClient Data Provider)
Server Name : localhost\sql2008
Error Number: 18456
Severity : 14
State : 1
Line Number : 65536
any help on this please.
Thanks
I have one small issue.
in my view model parameterized constructor is not working. while debugging i observed that default constructor get hit but it never triggers my parameterized constructor.
How I can get my parameterized constructor working?
public EmployeeRequestViewModel(IEventAggregator eventAggregator, IContextManager contextmanager):this()
{
_contextmanager = contextmanager;
_eventAgg = eventAggregator;
_eventAgg.GetEvent<EmployeeEvent>().Subscribe(EventTask);
}
public EmployeeRequestViewModel()
{
LoadEmpRequest();
}
I'm looking for what specifically the "Edit project-level information" permission allows you to do. So far I've noticed that by default you need this to add/delete areas & iterations, manage check-in policies, create team work item queries. What else am I forgetting?
Hello all,
Is there a java equivalent to python's bisect library? With python's bisect you can do array bisection with directions. For instance bisect.bisect_left does:
Locate the proper insertion point for item in list to maintain sorted order. The parameters lo and hi may be used to specify a subset of the list which should be considered; by default the entire list is used.
I am looking for a way to add a post-commit or pre-commit hook to my VCS that will allow me to both create and close a trac ticket in one go.
The use-case is for when a bug has been found, and corrected, but a single developer who wants to make sure the project manager can see the fix has been done, when it was done and what milestone the fix has been done in.
We have a default milestone in trac when creating a ticket, so reflecting that information would be good too.
hi,
I'm doing some IP localization and need to set the language in a view.
Using translation.activate changes the language, but the rendered page
still have the default language prefix in its URL.
Is there any way to also change the rendered URL?
thanks
jul
I want to make a class in java that is assessable to all other classes in my project.
I created this in the default package and now it cannot be seen. What is the best way to do this in java?
Hi All,
I want to know why we can't have "char" as underlying enum type.
As we have byte,sbyte,int,uint,long,ulong,short,ushort as underlying
enum type.
Second what is the default underlying type of an enum?
My friend says that Django only has 1 thread or something?
And I have to edit my 000-default in order to add more processes? He suggests 4 or 5.
What exactly is this, and what do I have to do?
Thanks, I'm a noob.
By default, Visual Studio tooltips remain visible for 10 seconds and then they disappear. I find this time too short to read some of the longer tooltips. Is there a way to increase the time they remain visible?
if IDE by default adding ; at end. should i remove?
selector {property:value;property:value;property:value;property:value;}
I read on an article semicolon not required at end.
I use a subclass of CRichEditCtrl to provide a CEdit+ type control. One thing I want is to disable drag-drop functionality, which the base class provided by default.
Disabling dropping is easy: ::RevokeDragDrop(m_hWnd);
But I can't see a simple way to disable the control being a drag-source. Is there an easy way?
Because I want to do things like load images from the web, I guess I need to move my Silverlight project from using a default file to some kind of web package. I don't really want an ASP .Net site, in fact, I totally don't want an ASP.Net site and yet I want to be able to develop and load images from the web. How do I move my development files to a website and still be able to compile, debug, etc from Visual Studio?
I'd like to restore the default admin theme in Drupal 6 via the database. Anyone know where this is stored?
Btw, there is a great answer describing how to change your site's public theme in the database here ...I just could not get it to update my admin theme.
Where can I find good templates for svn commit emails?
Google led me to this. Even though it was much better than the default post-commit, I didn’t find it very useful.
Help much appreciated.
domain.com/index/
to
domain.com/index.php
domain.com/index/hello
to
domain.com/index.php/hello
The site is use path_info,and the default rule not works:
RewriteRule ^([^/]+)/(.*)$ $1.php/$2 [L]
I change to: RewriteRule ^([^/.]+)((/[^/]+)*)/?$ $1.php$2 [L]
That was strange
domain.com/index/ to domain.com/index.php works fine
domain.com/index/hello to domain.com/index.php/hello not work
and it says No input file specified.
Php is run in fast cgi mode in apache
I understand the default git behaviour of updating the modification time every time it changes a file, but there are times when I want to restore a file's original modification time.
Is there a way I can tell git to do this?
(As an example, when working on a large project, I made some changes to configure.ac, found out that autotools doesn't work on my system, and wanted to restore configure.ac's to its original contents and modification time so that make doesn't try to update configure with my broken autotools).
my database using postgresql. the table pk is uing serial value.if i want to insert a record in table, do i need type pk or it will automatic contain id. Can you give me a example about how to insert a record in dataset
CREATE TABLE dataset
(
id serial NOT NULL,
age integer NOT NULL,
name character varying(32) NOT NULL,
description text NOT NULL DEFAULT ''::text
CONSTRAINT dataset_pkey PRIMARY KEY (id )
)
I have created an ATL Project with all default options using VC++ 2008.
I have added Simple ATL object (interface IDemo) and some interface moethos inside the simple object.
I want to use MFC classes (e.g. CDatabase, CRecordset and lots more) inside my ATL project.
How can I achieve this?
Is there a way to say UPDATE items SET qty=10 WHERE **unique key** instead of saying UPDATE items SET qty=10 WHERE userID=1 AND listID=10 and itemID=100 on the following table?
CREATE TABLE IF NOT EXISTS `items` (
`userID` int(20) NOT NULL,
`listID` int(20) NOT NULL,
`itemID` int(20) NOT NULL,
`qty` int(10) NOT NULL,
UNIQUE KEY `unique` (`userID`,`listID`,`itemID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
I am currently in C# and I have set Session variables on each page.
The link to my Colorbox is in the MasterPage, and on click opens up in an iframe from a different page in a different folder
i.e.
/admin/deals.aspx <-- iframed page in colorbox which needs SESSION
/default.aspx <-- page with set SESSION
Is there a way I can pass this variable to the iframed page?