Hello all,
Lets say I have 1 - 1,000 in a list and I click on 250. When I push the back button I want to go bag to 250 not all the way back up to 1.
Is this possible?
I'm trying to produce a dropdownlist for GetAllRoles using the role provider.
I can produce the drop down in a controller using ViewData but I would like to use a View Model to produce the dropdown, but I'm unsure of the best way to create the list using a View Model?
public ActionResult GetAllRoles()
{
ViewData["Roles"] = new SelectList(Roles.GetAllRoles());
return View();
}
How to find-out which url is accessed from which IP address/Country using Google analytic.
I found the country list and visit count. how do i know which URL visited from that country.
Hi,
I created a small WPF desktop application. I am thinking about how to make my application internationalized. Is there any Language Class to research (.NET 3.5 based)?
I want to load the my application language from windows region/language configuration automatically.
OR. some method to switch language from my application menu list.( no additional language package installation, assume the windowns system language packages support Chinese/English/Japanese/Korea already).
Hi Guys,
I am trying to add a prebuild even command line which essentially sets
Build Action = None
For a list of files before the solution is packaged up for release. How would I go about adding this & what command would I use to exclude a number of files in the web solution ?
i.e. \script\some-script.js [Set Build Action = None] etc
\script\some-script2.js [Set Build Action = None] etc
?
Haskell is about computation by calculation of values.
DisplayLists / FBOs / VBOs are very very stateful by nature. I.e. "give me a display list / buffer object".
How do these bindings work in Haskell?
[I do understand monads; so a technical explaination, as opposed to a fluffy one, is preferred].
Thanks!
I am implementing a very simple requirements management tool.
I want the URLs to look like this:
Shows home page for "Project One":
http://projectmanager/Project/Project%20One
Shows a list of requirements being worked on for "Project One"
http://projectmanager/Project/Project%20One/Requirements
Shows requirement 1 for "Project One"
http://projectmanager/Project/Project%20One/Requirement/1
How could I set up routes so that
http://projectmanager/Project/Project%20One
is handled by the project controller
http://projectmanager/Project/Project%20One/Requirements
and
http://projectmanager/Project/Project%20One/Requirements/1
is handled by the requirements controller.
Is it even possible?
My json string looks like { abc: 123, def: 442, ghi=444 } - say stock list.
I dont know what quotes are coming in , i.e I dont know what is abc, def etc is. I need to get this token dynamically. Any pointers would be of great help !
BTW, this has to run in silverlight.
The Mono 2.6 distribution contains System.Media.SoundPlayer, but attempts to play result in no sound (and no errors) on Mac OS X. All I can find with Google search is obscure references to ALSA. I posted to the Mono-OSX list, but there have been on replies there. I hope someone here has an answer. I think I need to tap into CoreAudio, but don't know how from Mono/C#.
Suppose I have
table Person
table Employee, which inherits Person.
I want to get a list of Person only. How do you get entity framework to do that without joining the Employee table?
I noticed that ObservableCollection in WPF reflects changes in GUI only by adding or removing an item in the list, but not by editing it.
That means that I have to write my custom class MyObservableCollection instead.
What is the reason for this behaviour?
Thanks
I'm currently working on a largish Ruby on Rails project. It's old enough and big enough that it's not clear if all views are actually in use.
Is there any script/plugin out there that can generate a list of unused view files?
I need to import yahoo,Live and AOL contacts list. I have already done gmail(their website has the whole hting explained properly). but cannot find much help for live, yahoo and aol for vb.net. Any help will be appreciated. some small source code or where to download API's.
Thanks
Ahoy,
I'd like to mount a "virtual drive" myself on Windows XP, I guess using the windows API.
What I thought about would be like a server interface, meaning explorer.exe would send "queries", like, list directory, or get file through a pipe or whatever...
I know some programs do it, maybe not the way I think it is done, but what the heck,
if you know anything, enlighten me please!
I have tried to hack together a small test project, but it fails with "400 Bad Request" so I'm pretty sure I have done something very basic wrong, but the examples I've found are all in the form of questions, only showing minor pieces of the puzzle, such as a request XML for public folders or whatnot.
Is there a complete example somewhere where I can just put in my username and servername and it would list the calendar items in my calendar?
This is for C# 3.0/4.0.
Hi,
I customized flex 4 combobox to display popup in an auto width layout. But combobox shows dropdown list from Left to right as you can see in the Left side of image.
I actually want to display dropdown starting from right side, as described in the highlighted image.
Thanks
I found an implementation for a tree at this SO question. Unfortunately I don't know how to use it. Also I made a change to it since LinkedList does not have Add method:
delegate void TreeVisitor<T>(T nodeData);
class NTree<T>
{
T data;
List<NTree<T>> children;
public NTree(T data)
{
this.data = data;
children = new List<NTree<T>>();
}
public void AddChild(T data)
{
children.Add(new NTree<T>(data));
}
public NTree<T> GetChild(int i)
{
return children[i];
}
public void Traverse(NTree<T> node, TreeVisitor<T> visitor)
{
visitor(node.data);
foreach (NTree<T> kid in node.children)
Traverse(kid, visitor);
}
}
I have class named tTable and I want to store it's children and their grandchildren (...) in this tree. My need is to find immediate children and not traverse entire tree. I also might need to find children with some criteria. Let's say tTable has only name and I want to find children with names matching some criteria. tTables constructor gives name a value according to int-value (somehow).
How do I use Traverse (write delegate) if I have code like this;
int i = 0;
Dictionary<string, NTree<tTable>> tableTreeByRootTableName =
new Dictionary<string, NTree<tTable>>();
tTable aTable = new tTable(i++);
tableTreeByRootTableName[aTable.Name] = new NTree(aTable);
tableTreeByRootTableName[aTable.Name].AddChild(new tTable(i++));
tableTreeByRootTableName[aTable.Name].AddChild(new tTable(i++));
tableTreeByRootTableName[aTable.Name].GetChild(1).AddChild(new tTable(i++));
def showCards():
#SUM
sum = playerCards[0] + playerCards[1]
#Print cards
print "Player's Hand: " + str(playerCards) + " : " + "sum
print "Dealer's Hand: " + str(compCards[0]) + " : " + "sum"
compCards = [Deal(),Deal()]
playerCards = [Deal(),Deal()]
How can i add up the interger element of a list containing to values? under #SUM error is can combine lists like ints...
I know about the boolean column type, but is there a boolean literal in SQLite? In other languages, this might be true or false. Obviously, I can use 0 and 1, but I tend to avoid so-called "magic numbers" where possible.
From this list, it seems like it might exist in other SQL implementations, but not SQLite. (I'm using SQLite 3.6.10, for what it's worth.)
How do i design a socket server, which accept various trades ( stock symbol, its value )
Trades are coming in the form of continuous stream.
I need to process those trades based on the subscription client list.
Hi folks!!
I have various models of which I would like to keep track and collect statistical data.
The problem is how to store the changes throughout time.
I thought of various alternative:
Storing a log in a TextField, open it and update it every time the model is saved.
Alternatively pickle a list and store it in a TextField.
Save logs on hard drive.
What are your suggestions?
Hello,
I have been reading about Unit of Work pattern but I am confused about how the UoW actually persists data.
When we commit the changes, UoW should iterate through the list of Added, Updated and Deleted objects and somehow find a class responsible to Add, Update, Delete objects of a certain type.
I couldn't find an example showing this technique.
Any advice on this would be greatly appreciated.
Mosh
Hi,
Is there a way to return HTML from a method which gets called from the JMX HTTP page. I have a huge set of data and want to display the data with some formatting.
The following code does not work:
@ManagedOperation(description = "return html")
@ManagedOperationParameters({@ManagedOperationParameter(name = "someVal", description = "text")})
public List returnAsHtml(String someVal)
{
return ""+someValblah";
}
Looks like JMX escapes the returned script before throwing it to the browser.
I am looking for code that will take a huge list of numbers, and calculate price ranges correctly. There must be some algorithm that will choose the proper ranges, no?
I am looking for this code in c#, but any language will do (I can convert).
Thanks in advance!