Daily Archives

Articles indexed Friday December 24 2010

Page 5/25 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • With ASP .NET, how do I display a side submenu depending on what user picked from the main menu?

    - by Ole Media
    Hello, I come from PHP side, but I'm in need to develop a site using ASP .NET So far I manage to create a master page. Now I'm dealing with menus and submenus What I'm trying to do is, if the user picks "About Us" from the main menu, under the about us page I want to display a submenu with the options "who we are, what we do, contact us" If the user picks "Our Products" from the main menu, then under the products page I want to display a submenu with the options "product 1, product 2, product 3" Is this possible with only one master page? I read something about menu control but not sure that is what I need. So far I found how to display a sitemap, but not specific sections of a sitemap, if this is the way to do things. Any links, sample code, point of reference will be appreciated. Thanks

    Read the article

  • Return value mapping on Stored Procedures in Entity Framework

    - by Yucel
    Hi, I am calling a stored procedure with EntityFramework. But custom property that i set in partial entity class is null. I have Entities in my edmx (I called edmx i dont know what to call for this). For example I have a "User" table in my database and so i have a "User" class on my Entity. I have a stored procedure called GetUserById(@userId) and in this stored procedure i am writing a basic sql statement like below "SELECT * FROM Users WHERE Id=@userId" in my edmx i make a function import to call this stored procedure and set its return value to Entities (also select User from dropdownlist). It works perfectly when i call my stored procedure like below User user = Context.SP_GetUserById(123456); But i add a custom new column to stored procedure to return one more column like below SELECT *, dbo.ConcatRoles(U.Id) AS RolesAsString FROM membership.[User] U WHERE Id = @id Now when i execute it from SSMS new column called RolesAsString appear in result. To work this on entity framework i added a new property called RolesAsString to my User class like below. public partial class User { public string RolesAsString{ get; set; } } But this field isnt filled by stored procedure when i call it. I look to the Mapping Detail windows of my SP_GetUserById there isnt a mapping on this window. I want to add but window is read only i cant map it. I looked to the source of edmx cant find anything about mapping of SP. How can i map this custom field?

    Read the article

  • kXML (XmlPullParser) not hitting END_TAG

    - by Tejaswi Yerukalapudi
    Hello all, I'm trying to figure out a way to rewrite some of my XML parsing code. I'm currently working with kXML2 and here's my code - byte[] xmlByteArray; try { xmlByteArray = inputByteArray; ByteArrayInputStream xmlStream = new ByteArrayInputStream(xmlByteArray); InputStreamReader xmlReader = new InputStreamReader(xmlStream); KXmlParser parser = new KXmlParser(); parser.setInput(xmlReader); parser.nextTag(); while(true) { int eventType = parser.next(); String tag = parser.getName(); if(eventType == XmlPullParser.START_TAG) { System.out.println("****************** STARTING TAG "+tag+"******************"); if(tag == null || tag.equalsIgnoreCase("")) { continue; } else if(tag.equalsIgnoreCase("Category")) { // Gets the name of the category. String attribValue = parser.getAttributeValue(0); } } if(eventType == XmlPullParser.END_TAG) { System.out.println("****************** ENDING TAG "+tag+"******************"); } else if(eventType == XmlPullParser.END_DOCUMENT) { break; } } catch(Exception ex) { } My input XML is as follows - <root xmlns:sql="urn:schemas-microsoft-com:xml-sql" xmlns=""> <Category name="xyz"> <elmt1>value1</elmt1> <elmt2>value2</elmt2> </Category> <Category name="abc"> <elmt1>value1</elmt1> <elmt2>value2</elmt2> </Category> <Category name="def"> <elmt1>value1</elmt1> <elmt2>value2</elmt2> </Category> My problem briefly is, I'm expecting it to hit XmlPullParser.END_TAG when it encounters a closing xml tag. It does hit the XmlPullParser.START_TAG but it just seems to skip / ignore all the END_TAGs. Is this how is it's supposed to work? Or am I missing something? Any help is much appreciated, Teja.

    Read the article

  • Virtual Brown Bag Recap: FancyHands, CanCan, 1KB XMas Tree, YouTube Yuks

    - by Brian Schroer
    At this week's Virtual Brown Bag meeting: Claudio has some one-month Evernote premium accounts to give away Claudio & George talked about FancyHands, the 4-hour work week, and paying people to do the stuff you don't want to JB shared more Ruby gems: cancan and open and talked about insert and other Ruby Enumerable functions We looked at the winner of the 1KB JavaScript Christmas contest and some fun YouTube videos For detailed notes, links, and the video recording, go to the VBB wiki page: https://sites.google.com/site/vbbwiki/main_page/2010-12-23

    Read the article

  • Silverlight Cream for December 23, 2010 -- #1014

    - by Dave Campbell
    In this 4-days loss to a sinus infection and all-submittal Issue.... and this only catches me up on submittals through last Sunday: Mark Monster, Sacha Barber, Rénald Nollet, Georgi Atanasov, and András Velvárt. Above the Fold: Silverlight: "Silverlight with Facebook - a practical guide to integration" András Velvárt WP7: "RadDateSelector for Windows Phone 7 – Loaded within a standard in-browser Silverlight application" Georgi Atanasov MVVM: "Cinch - A Rich Full Featured WPF/SL MVVM Framework" Sacha Barber From SilverlightCream.com: Solving 3 problems with the ShellTileSchedule Mark Monster is discussing the Shell Tile Schedule, or rather problems therewith... 3 of them to be exact. He discusses them at lenght and describes solutions to each. Cinch - A Rich Full Featured WPF/SL MVVM Framework After Sacha Barber contacted me, I searched SilverlightCream and only found 1 reference to Cinch... what gives... this looks pretty good. If you're blogging about it let me know, if you're not, check it out! SQL Azure Database Manager – Part 2 : Now you’re in, take a tour Rénald Nollet has part 2 of his SQL AZure Database Manager up for us to look at, and this time out he's explaining the UI. RadDateSelector for Windows Phone 7 – Loaded within a standard in-browser Silverlight application. This is a cool post with a sort-of twist to it... Georgi Atanasov has a post up about using Telerik's WP7 RadDateSelector ... but in a SL4 app... and why not... if it works for SL3.x, it should work in SL4 right? Silverlight with Facebook - a practical guide to integration András Velvárt has a great post up (as usual) discussing 'harnessing the power of social networks' ... remember his great image of the soccer match where people could tag themselves? ... well, get some of the explanation here! (and some code) Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • TFS 2008 to TFS 2010 moves and some issues

    - by Enrique Lima
    There have been many things going on this year around TFS.  Most of them had to do with migrations (I don’t call them upgrades for the most part since it involved new hardware and such).  Many were implementations using the Conchango SfTS template (now EMC). But there were others that were CMMI or Agile 4.0. Everything would move just fine, no issues.  That was until you attempted to run Test Case Management or run the last configuration steps for Lab Management. There is an error that states a project is not ready to run or integrate with Test or Lab Management.  And while there was some documentation on how to adjust and update the Agile WITs to work with it, there was still some disconnect to making it work with CMMI. Now there is a great post on how to run the “fix” from end to end. Check the post here:  TFS 2010: Enable Test Case Management for upgraded Team Projects

    Read the article

  • Blocking HTTPS and P2P Traffic

    - by Genboy
    I have a Debian server running at the gateway level on a LAN. This runs squid for creating block lists of websites - for eg. blocking social networking on the LAN. Also uses iptables. I am able to do a lot of things with squid & iptables, but a few things seem difficult to achieve. 1) If I block facebook through their http url, people can still access https://www.facebook.com because squid doesn't go through https traffic by default. However, if the users set the gateway IP address as proxy on their web browser, then https is also blocked. So I can do one thing - using iptables drop all outgoing 443 traffic, so that people are forced to set proxy on their browser in order to browse any HTTPS traffic. However, is there a better solution for this. 2) As the number of blocked urls increase in squid, I am planning to integrate squidguard. However, the good squidguard lists are not free for commercial use. Anyone knows of a good squidguard list which is free. 3) Block yahoo messenger, gtalk etc. There are so many ports on which these Instant Messenger softwares work. You need to drop lots of outgoing ports in iptables. However, new ports get added, so you have to keep adding them. And even if your list of ports is current, people can still use the web version of gtalk etc. 4) Blocking P2P. Haven't been able to figure out how to do this till now.

    Read the article

  • Redmine plug-in fails at rake db:migrate_plugins

    - by Drew
    Hey, First post, so hope I'm in the right place. While trying to install the Redmine plug-in 'Wiki Extensions', I keep getting stuck when I try to run the "rake db:migrate_plugins RAILS_ENV=production" command. I am moving server and I'm in bit over my head. Haven't found anything on Google that has helped me much, though I might have missed something. I have pasted in the output with --trace: (in /srv/www/vastpark.org/redmine) ** Invoke db:migrate_plugins (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate_plugins Migrating engines... Migrating acts_as_activity_provider... Migrating acts_as_attachable... Migrating acts_as_customizable... Migrating acts_as_event... Migrating acts_as_list... Migrating acts_as_searchable... Migrating acts_as_tree... Migrating acts_as_versioned... Migrating acts_as_watchable... Migrating awesome_nested_set... Migrating classic_pagination... Migrating coderay-0.9.2... Migrating gravatar... Migrating open_id_authentication... Migrating prepend_engine_views... Migrating redmine_wiki_extensions... == CreateWikiExtensionsComments: migrating =================================== -- create_table(:wiki_extensions_comments) rake aborted! An error has occurred, all later migrations canceled: Mysql::Error: Table 'wiki_extensions_comments' already exists: CREATE TABLE 'wiki_extensions_comments' ('id' int(11) DEFAULT NULL auto_increment PRIMARY KEY, 'wiki_page_id' int(11), 'key_word' varchar(255), 'user_id' int(11), 'comment' text, 'created_at' datetime, 'updated_at' datetime) ENGINE=InnoDB

    Read the article

  • how to design LAN connectivity between private and corporate ?

    - by maruti
    there is a bunch of servers connected to shared storage in a private LAN (10.x.x.x). this privateLAN is managed by a windows server (DHCP, DNS and directory services). how can these hosts be accessed from outside of this privateLAN? Eg. Remote desktop. can the NIC2 on each of the hosts be connected to the other public LAN (compromising speed or security? what are improtant considerations: additional hardware? like switches? routing&DNS software?

    Read the article

  • In what platforms/browsers does Adobe Flash come preinstalled?

    - by Michael Haren
    In what platforms/browsers does Adobe Flash come preinstalled? I'm pretty sure neither FireFox nor Safari include it on any platform but Chrome on Windows does (not sure about Mac or Linux). What about IE on a completely vanilla Win XP system? Or Win 7? Maybe mfgs like Dell add it if MS doesn't? Perhaps we can find (or build) a comprehensive list. Considering that Flash is a significant piece of the web platform, I hope I've asked this on the right place.

    Read the article

  • Will this RAM work well in an iMac?

    - by sala_7
    I want to increase the RAM of my 2.4GHz Intel Core 2 Duo 24" iMac. I currently have 1GB of RAM DDR2 SDRAM 667 MHz. I really want to upgrade, but know nothing about RAM or hardware in general... These are the cards I found: http://www.crucial.com/eu/store/mpartspecs.aspx?mtbpoid=D4B6F603A5CA7304 Are these of quality or should I look at something else? Finally, I have 800MHz of Bus speed, couldn't I get faster RAM? Thanks for taking the time to read, and hoping you take the time to answer.

    Read the article

  • Making GRUB see software RAID 0 under Ubuntu 10.10 LiveCD

    - by unknownthreat
    I just installed Windows 7 recently, and I expect that it would alter GRUB and it did. I've been following some guides around and I am always stuck at GRUB not able to detect the usual RAID content. (Software RAID 0) I've tried running: sudo grub > root (hd0,0) GRUB complains it couldn't find my hard disk. So I tried: find (hd0,0) And it complains that it couldn't find anything. So I tried: find /boot/grub/stage1 It said "file not found". So what now? How can we make GRUB see RAID 0 under Ubuntu 10.10 LiveCD?

    Read the article

  • Applescript save command for QuickTime Player

    - by Frost Shadow
    I've installed the Perian addon for Quicktime so it can open .flv files, and then I can save them as .m4v or .mov. I'm trying to make an Applescript to convert from .flv to .m4v automatically by using this tutorial and butchering their example applescript file, which normally converts ChemDraw files (.cdx, .cml, .mol) to .tiff, so that it instead uses Quicktime to save the .flv files as .m4v. When I try to use it, though, I get an error "QuickTime Player got an error: document 1 doesn't understand the save message". My save message is currently: save first document in target_path as ".m4v" which looks like the QuickTime dictionary's instructions: save specifier : The document(s) or window(s) to save. [as saveable file format] : The file format to use. I've also tried "m4v", without the period, and still get the error. Is my Save direction wrong, or is it probably an error from trying to use Quicktime instead of the original ChemDraw? I tried to change references to .cdx, .cml, .mol, .tiff, and ChemDraw to .flv, .m4v, and QuickTime respectively, but maybe it's more complicated than that?

    Read the article

  • How to use the 4-in-1 card reader on my Lenovo x100e?

    - by Thomas Padron-McCarthy
    My Lenovo x100e laptop has a "4-in-1" card reader that's supposed to handle SD/SDHC, MMC, Memory Stick and MS Pro, but I can't insert my SDHC card (a "SANDISK SECURE DIGITAL EXTREME SDHC 16GB 30MB/S"). It enters a bit and looks lite it will fit, but then it doesn't get any further in (and yes, I've tried to turn it around). It really doesn't move, and I'm afraid to break something if I push harder. Am I missing something obvious here?

    Read the article

  • HTML_Template_IT and wordpress

    - by David Ryder
    I want to use PEAR's HTML_Template_IT in one of my Wordpress page templates so I can separate the HTML from the PHP. I got it working, except I am not sure about one thing. Wordpress's built-in function get_header() actually echo's HTML - so I can't technically set it as a template variable. Is this considered acceptable or is there another way to put the contents of get_header() in a variable? Thanks!

    Read the article

  • Difference between redirecting to a page and coming to the same page after pressing back button

    - by Mac
    Actually i have a page in which i am not using cache by using this code HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); HttpContext.Current.Response.Cache.SetValidUntilExpires(false); HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache); HttpContext.Current.Response.Cache.SetNoStore(); now i want to know is there any difference between coming to this page using a proper link or coming back using browser back button or is there any way to detect this.

    Read the article

  • Max tcp/ip connections on Windows Server 2008

    - by zendar
    I have .Net service that listens on single port over TCP protocol. Clients connect and then transmit data for some time (from few minutes to several hours). Is there any limit on number of connections on Windows 2008 server? I did not hit any, since now there is up to 50 users. Plan is to have thousands of users, so I'd like to know if there will be problems in future. Edit: As Cloud answered, it seems that there are some limits in some versions of Windows Server 2008. Is there any reference on those limits? I tried Google, but it returns articles on limit on half-bound tcp connections.

    Read the article

  • jQuery selector to target any CSS name (of multiple present) starting with a prefix?

    - by John K
    I'm considering one selection statement that would target one of many css class names in a single class attribute value based on a string prefix. For example, I want any detail- prefixed class names to get targeted from the following sample links. <a href="eg.html" class="detail-1 pinkify another"> <a href="eg.html" class="something detail-55 minded"> <a href="eg.html" class="swing narrow detail-Z"> <a href="eg.html" class="swing narrow detail-Z detail-88 detail-A"> It's reminiscent of how [class|="detail"] prefix selector works on a scalar attribute value, and also of .hasClass(className), but my question needs both concepts applied simultaneously. Note: The detail- prefix won't necessarily be the first class name of the bunch.

    Read the article

  • Get the ranking of highest score with earliest timestamp

    - by Billy
    I have the following records: name score Date Billy 32470 12/18/2010 7:26:35 PM Sally 1100 12/19/2010 12:00:00 AM Kitty 1111 12/21/2010 12:00:00 AM Sally 330 12/21/2010 8:23:34 PM Daisy 32460 12/22/2010 3:10:09 PM Sally 32460 12/23/2010 4:51:11 PM Kitty 32440 12/24/2010 12:00:27 PM Billy 32460 12/24/2010 12:11:36 PM I want to get the leaderboard of the highest score with earliest time stamp using LINQ. In this case, the correct one is rank name 1 Billy 2 Daisy 3 Sally I use the following query: var result = (from s in Submissions group s by s.name into g orderby g.Max(q => q.Score) descending,g.Min(q => q.Date) ascending select new ScoreRecord { name = g.Key Score = g.Max(q => q.Score) }).Take(3).ToList(); I get the following wrong result: rank name 1 Billy 2 Sally 3 Daisy What's the correct linq query in this case?

    Read the article

  • how to control the width and height of default alert dialog in Android?

    - by sat
    AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Title"); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { Toast.makeText(getApplicationContext(), items[item], Toast.LENGTH_SHORT).show(); } }); AlertDialog alert = builder.create(); I am using above code to show alert dialog , By default it fills the screen in width and wrap_content in height. How to control the width and height of default alert dialog ? I tried , alert.getWindow().setLayout(100,100); // It dint work. How to get the layout params on the alert window and set manually the width and height ?

    Read the article

  • Stored Procedure To Search the AccessRights given to the Users.

    - by thevan
    Hi, I want to display the Access Rights given to the Users for the particular module. I have Seven Tables such as RoleAccess, Roles, Functions, Module, SubModule, Company and Unit. RoleAccess is the Main Table. The AccessRights given will be stored in the RoleAccess Table only. RoleAccess Table has the following columns such as RoleID, CompanyID, UnitID, FunctionID, ModuleID, SubModuleID, Create, Update, Delete, Read, Approve. Here Create_f, Update_f, Delete_f, Read_f and Approve_f are flags. Company Table has two columns such as CompanyID and CompanyName. Unit Table has three columns such as UnitID, UnitName and CompanyID. Roles Table has four columns such as RoleID, RoleName, CompanyID and UnitID. Module Table has two columns such as ModuleID and ModuleName. SubModule Table has three columns such as ModuleID, SubModuleID, SubModuleName. Functions Table has five columns such as FunctionID, FunctionName, ModuleID and SubModuleID. At First, The RoleAccess Table does not contain any records. So I want to display the ModuleName, SubModuleName, FunctionName, CompanyID, RoleID, UnitID, FunctionID, ModuleID, SubModuleID, Create_f, Update_f, Delete_f, Read_f and Approve_f. If the AccessRights is assigned to the Particular RoleID means the flags in the search results will be 1 else it will be 0. I have witten one stored procedure but it displays the records based on the RoleID stored in the RoleAccess table. But I also want to display the Flags as 0 for the Roles not stored in the RoleAccess Table. I want the Stored Procedure for this. Any one please help me.

    Read the article

  • Javascript callback with AJAX + jQuery

    - by Fred
    Hey! I have this jQuery code (function () { function load_page (pagename) { $.ajax({ url: "/backend/index.php/frontend/pull_page/", type: "POST", data: {page: pagename}, success: function (json) { var parsed = $.parseJSON(json); console.log(parsed); return parsed; }, error: function (error) { $('#content').html('Sorry, there was an error: <br>' + error); return false; } }); } ... var json = load_page(page); console.log(json); if (json == false) { $('body').fadeIn(); } else { document.title = json.pagename + ' | The Other Half | freddum.com'; $("#content").html(json.content); $('#header-navigation-ul a:Contains('+page+')').addClass('nav-selected'); $('body').fadeIn(); } })(); and, guessed it, it doesn't work. The AJAX fires fine, the server returns valid JSON but the console.log(json); returns undefined and the js crashes when it gets to json.pagename. The first console.log(parsed) also returns good data so it's just a problem with the return (I think). I knew I was clutching at straws and would be extremely if this worked, but it doesn't. To be honest, I don't know how to program callback functions for this situation. Any help is greatly appreciated!

    Read the article

  • how can i strip formatting from word document using php

    - by shazia
    I want to display a word file and then extract the content and display it in a separate textarea. i want to do away with the formatting as well. this is what i get when i get the read the text file using php ??????ÿÿÿÿ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Running Head: INTERNATIONAL BUSINESS International Business [Name of the writer] [Name of the institution] International Business Question 1 Increasing returns to scale (or economies of scale) in production is an indisputable phenomenon characterizing real world production, and, as such, they have long been recognized as a principal source of economic prosperity. Nonetheless, they have never played a major role in this is the code $fh = fopen($newname, 'r'); $contents => fread($fh, filesize($newname)); fclose($fh); unlink($newname); echo "<br/>"; echo $contents; how can i get rid of all these charecters. Thanks

    Read the article

  • Maintaining many socket connections with a single thread

    - by John
    Many tutorials on socket communication I see seem to use 1 thread per socket. But on a server used for online gaming, you might have 10k concurrent users - 10k threads isn't probably a wonderful idea. I came across a tool (SmartFox) which claims to use a single thread for monitoring all socket connections, potentially thousands of them. This app happens to be in Java, but I figure C++ or C# could do the same... how would you achieve this?

    Read the article

  • Something wrong with this gtk# class for a window?

    - by Isaiah
    Learning C#, I feel so guilty for loving it. I'm a microsoft hater. Anyways I'm trying out gtk# and just trying out some simple stuff. I've made a class for the main window and MonoDevelop is complaining about this code, which I swear was just fine a second ago. public class mwin{ protected Window win = new Window("test program--"); public mwin(){ //Configure the parts win.SetDefaultSize(300,500); } public void showWin(){ win.ShowAll(); } } win.SetDefaultSize(300,500); }--<(here it says "} expected") But obviously I have a closing brace! Am I missing something? [edit] here's whole code. The color stuff was some stuff I was playing around with to color the window, but I didn't finish because the error started. I'm sure it's not the color stuff because it still has an error when I comment them out. http://codepaste.net/b2mwys

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >