Search Results

Search found 310 results on 13 pages for 'grace ladder'.

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

  • NFS v4, HA Migration, and stale handles on clients

    - by Karl Katzke
    I'm managing a server running NFS v4 with Pacemaker/OpenAIS. NFS is configured to use TCP. When I migrate the NFS server to another node in the Pacemaker cluster, even though the metadata is persisted, connections from the clients 'hang' and eventually time out after 90 seconds. After that 90 seconds, the old mountpoint becomes 'stale' and the mounted files can no longer be accessed. The 90 second grace period seems to be part of the server configuration and not the client configuration. I see this message on the server: kernel: NFSD: starting 90-second grace period If I restart the NFS client on the client nodes after I migrate (unmounting and then remounting the share), then I don't experience the problem, but connections and file transfers still interrupted. Three questions: What is the 90 second grace period? What's it there for? How can I keep the files from going stale on the clients without restarting them after I migrate the NFS server to another node? Is it actually possible to migrate the NFS server without having large file uploads drop?

    Read the article

  • Only run selenium test if previous selenium test fails

    - by Mike Grace
    I have several 'it' blocks in my selenium test file (using Ruby and rspec) that test various portions of my web application. Each 'it' block stops executing and goes to the next 'it' block if any of the conditions or code fails. Is there a way to run an 'it' block only if the previous fails or call a function to react to the failed test? Is there a better way to accomplish what I am wanting to do that doesn't involve an 'it' block? Example 'it' block it "should load example.com" do page.open("http://example.com") page.wait_for_page_to_load(25) end

    Read the article

  • jQuery Autocomplete & jTemplates - handling response

    - by Diegos Grace
    Has anyone had any experience with using jTemplates to display autocomplete results. I have the following $("#address-search").autocomplete({ source: "/Address/SearchAddress", minLength: 2, delay: 400, focus: function (event, ui) { $('#address-search').val(ui.item.name); return false; }, parse: function(data) { $("#autocomplete-results").setTemplate($("#templateHolder").html()); $("#autocomplete-results").processTemplate(data); }, select: function (event, ui) { $('#address-search').val(ui.item.name); $('#search-address-id').val(ui.item.id); $('#search-description').html(ui.item.address); }); and the simple jtemplate holder: <script type="text/html" id="templateHolder"> <ul class="autocomplete"> {#foreach $T as data} <li>{$T.name}</li> {#/for} </ul> </script> Above i'm using 'Parse' to format results, I've also tried the autocomplete result method but not having any luck so far. The only success I've had is by using the private method ._renderItem and formatting the data that way but we want to render the output using the jTemplate. Any advice appreciated.

    Read the article

  • Doesn't get into Debug Mode

    - by Grace Jones
    When I Press F5 on my VS2005 to debug the application, it launches the web app window but it is coming out of debug mode. When I tried to trace the Error in the EventViewer, this was the error: Failed in Token.vb(GetToken). The token was not in memory and the identity of the authenticated IIS caller was not permitted. The session may have unexpectedly terminated. The specific error message included: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration. I don't have any httpModules section in my config file and the sessionState mode="InProc"...

    Read the article

  • How do I turn an array of bytes back into a file and open it automatically with C#?

    - by Ace Grace
    Hi, I am writing some code to add file attachments into an application I am building. I have add & Remove working but I don't know where to start to implement open. I have an array of bytes (from a table field) and I don't know how to make it automatically open e.g. If I have an array of bytes which is a PDF, how do I get my app to automatically open Acrobat or whatever the currently assigned application for the extension is using C#?

    Read the article

  • Adding global blank option to DroDownList in MVC

    - by Diegos Grace
    Is there a way of using a templated helper in mvc so that each and every select list in my project has a custom default 'Choose an option' with null value etc. The posts I have seen seem a little complex, is it possible to have a DropDownList.ascx file in shared view folder with something like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<SelectListItem>>" %> <%= Html.DropDownList(selectlist name, selectlist value, "Choose an option")%> And then having a UIHint("DropDownList") for each dropdownlist in the ViewModel? Some guidance on syntax of parameters would be much appreciated, where name and value of the viewmodel dropdownlist plus the 'Choose an option' string are passed. Or is this all wishful thinking?

    Read the article

  • Best language to develop medical software

    - by Grace
    I need to write medical program to manage medical practices (patient records, appointments, prescription, etc). Note that this is not for US practices so US EMRs will not work. What is the best platform to develop the software in ie. language and database? Considerations include: - Integration with the web - will need to have Doctors download updates to the software from the web. Will also post reports from the software unto webpages - The software will include a mobile application - probably for Blackberry - Cost is a big factor - need to minimize the license cost to the users - Need tight security on the program

    Read the article

  • how to load a file into a blob without loading into RAM first?

    - by Ace Grace
    Hi, I am using C# and I am having trouble loading large files into a binary field use byte arrays. Basically, if I load a file that is too large, I get memory problems. Is there a way to load a file into a binary field without using large amounts of ram, i.e. avoid loading the file into memory first? If it helps, I am using Advantage Database Server and this is using a winforms app not a web app. Regards

    Read the article

  • how to load Module to control like panel , vbox etc +flex

    - by glory-grace
    Hi All, Im new to this flex. can anybody solve my problem.This is my query- i have home page divided into 3 part like top,left,middle positon. in middle postion -panel and combobox are there. i want to load my module to the middle positon like to panel. i have combobox, when i selected any item based on that im loading module to that panel using Custom moduleloader control.uptohere its working fine. my probelm, i selected one option from combobox. its showing the one module(sam1). when i click(sam1),it should open anothermodule(sam2) in same location(instead of sam1-sam2).so can u tel ur idea and how to resolve it.plz.

    Read the article

  • SSIS with different table structures

    - by Grace
    I have a flat file source from Excel that has a structure like this: **People** Day1 Day2 Day3 Day4 Person1 someValue ... Person2 Person3 And i would like the package to put this information in a database with standard columns 'Person', 'Day', 'Value'. Does anybody know how to do this - at the moment because the days are going along the top, the package is assuming these are seperate data columns when they are not really and the mapping is not working.

    Read the article

  • Java keep printing a new line in my recursive method

    - by Abra Grace Libretto White
    I am trying to write a recursive method to print n number of asteriks in a line and create a new line at the end. So, TriangleOps.line(5); would print ***** This is the code I wrote: public static void line (int n){ if(n>0){ System.out.println("*"); line(n-1); }} instead it prints * * * * * with a lot of space at the end. Can anyone tell me how to remove the line breaks?

    Read the article

  • cpufreq not available 11.10

    - by code shogan
    on 11.04 I had cpufreq working on my "AMD Turion(tm) 64 X2 Mobile Technology TL-50 stepping 02" processors, however now on oneiric cpufreq won't load. The core temperature of my cpu is normally 40 c, but lately it's cooking away at 75-80+ c and the fan is always extremely loud even when cpu usage has at 0.4%. and after this dmesg | grep -i cpu I got: Brought up 2 CPUs Switch to broadcast mode on CPU1 Switch to broadcast mode on CPU0 Switched to NOHz mode on CPU #1 Switched to NOHz mode on CPU #0 ACPI: acpi_idle registered with cpuidle cpufreq-nforce2: No nForce2 chipset. cpuidle: using governor ladder cpuidle: using governor menu powernow-k8: Found 1 AMD Turion(tm) 64 X2 Mobile Technology TL-50 (2 cpu cores) (version 2.20.00) I see something about governors and ladder there, does this mean the OS is able to scale my cpu's or not? If so is there a way I can determine it's working? I saw that for other users that the wrong module had been loaded and by disabling it they were able to get cpufreq loaded. How can I tell what scaling module is loaded? stats: Ubuntu Oneiric 32bit Dell Inspiron 1501

    Read the article

  • Varnish cached 'MISS status' object?

    - by Hesey
    My site uses nginx, varnish, jboss. And some url will be cached by varnish, it depends a response header from jboss. The first time, jboss tells varnish doesn't cache this url. Then the second request, jboss tells varnish to cache, but varnish won't cache it. I used varnishstat and found that 1 object is cached in Varnish, is that the 'MISS status' object? I remove grace code and the problem still exists. When I PURGE this url, varnish works fine and cache the url then. But I can't PURGE so much urls every startup time, how can I fix this? The configuration: acl local { "localhost"; } backend default { .host = "localhost"; .port = "8080"; .probe = { .url = "/preload.htm"; .interval = 3s; .timeout = 1s; .window = 5; .threshold = 3; } } sub vcl_deliver { if (req.request == "PURGE") { remove resp.http.X-Varnish; remove resp.http.Via; remove resp.http.Age; remove resp.http.Content-Type; remove resp.http.Server; remove resp.http.Date; remove resp.http.Accept-Ranges; remove resp.http.Connection; set resp.http.keeplive="true"; } else { if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; } else { set resp.http.X-Cache = "MISS"; } } } sub vcl_recv { if(req.url ~ "/check.htm"){ error 404 "N"; } if( req.http.host ~ "store." || req.request == "POST"){ return (pipe); } if (req.backend.healthy) { set req.grace = 30s; } else { set req.grace = 10m; } set req.http.x-cacheKey = "0"; if(req.url ~ "/shop/view_shop.htm" || req.url ~ "/shop/viewShop.htm" || req.url ~ "/index.htm"){ if(req.url ~ "search=y"){ set req.http.x-cacheKey = req.http.host + "/search.htm"; }else if(req.url !~ "bbs=y" && req.url !~ "shopIntro=y" && req.url !~ "shop_intro=y"){ set req.http.x-cacheKey = req.http.host + "/index.htm"; } }else if(req.url ~ "/search"){ set req.http.x-cacheKey = req.http.host + "/search.htm"; } if( req.http.x-cacheKey == "0" && req.url !~ "/i/"){ return (pipe); } if (req.request == "PURGE") { if (client.ip ~ local) { return (lookup); } else { error 405 "Not allowed."; } } if (req.url ~ "/i/") { set req.http.x-shop-url = req.original_url; }else { unset req.http.cookie; } } sub vcl_fetch { set beresp.grace = 10m; #unset beresp.http.x-cacheKey; if (req.url ~ "/i/" || req.url ~ "status" ){ set beresp.ttl = 0s; /* ttl=0 for dynamic content */ } else if(beresp.http.x-varnish-cache != "1"){ set beresp.do_esi = true; /* Do ESI processing */ set beresp.ttl = 0s; unset beresp.http.set-cookie; } else { set beresp.do_esi = true; /* Do ESI processing */ set beresp.ttl = 1800s; unset beresp.http.set-cookie; } } sub vcl_hash { hash_data(req.http.x-cacheKey); return (hash); } sub vcl_error { if (req.request == "PURGE") { return (deliver); } else { set obj.http.Content-Type = "text/html; charset=gbk"; synthetic {"<!--ve-->"}; return (deliver); } } sub vcl_hit { if (req.request == "PURGE") { set obj.ttl = 0s; error 200 "Purged."; } } sub vcl_miss { if (req.request == "PURGE") { error 404 "N"; } }

    Read the article

  • Structuremap and creating objects with initial state

    - by Simon
    I have an object which needs a dependency injected into it public class FootballLadder { public FootballLadder(IMatchRepository matchRepository, int round) { // set initial state this.matchRepo = matchRepository; this.round = round; } public IEnumerable<LadderEntry> GetLadderEntries() { // calculate the ladder based on matches retrieved from the match repository // return the calculated ladder } private IMatchRepository matchRepo; private int round; } For arguments sake, lets assume that I can't pass the round parameter into the GetLadderEntries call itself. Using StructureMap, how can I inject the dependency on the IMatchRepository and set the initial state? Or is this one of those cases where struggling against the framework is a sign the code should be refactored?

    Read the article

  • Openvz: What exactly does it mean when tcpsndbuf failcnt increases? Why must there be a minimum difference between limit and barrier?

    - by Antonis Christofides
    When the failcnt of tcpsndbuf increases, what does this mean? Does it mean the system had to go past the barrier, or past the limit? Or, maybe, that the system failed to provide enough buffers, either because it needed to go past the limit, or because it needed to go past the barrier but couldn't because other VMs were using too many resources? I understand the difference between barrier and limit only for disk space, where you can specify a grace period for which the system can exceed the barrier but not the limit. But in resources like tcpsndbuf, which have no such thing as a grace period, what is the meaning of barrier vs. limit? Why does the difference between barrier and limit in tcpsndbuf be at least 2.5KB times tcpnumsock? I could understand it if, e.g., tcpsndbuf should be at least 2.5KB times tcpnumsock (either the barrier or the limit), but why should I care about the difference between the barrier and the limit?

    Read the article

  • 6 PhotoBlog Portfolio WordPress Themes

    - by Sushaantu
    It’s been quite a long time since we showcased the recent free WordPress themes on JustSkins.Some cool WordPress themes have been made in recent times that you may use for your photo portfolio blog. The following list contains both free and the premium WordPress themes. If you happen to be a professional photographer or just one by hobbyist you can expect something in here for you. Amplify 5 in 1 Portfolio Theme Amplify is a paid theme with some amazing features and nice image manipulation. It uses javascript image transition at the main page which supports an unlimited number of images. Grace Grace is a minimalistic WordPress theme which has lightweight jQuery powered rotating banner of featured photos. The theme has a slightly dull background which keeps the focus on the photographs. Free. Photography WordPress theme Photography is a widget ready theme which can be used to showcase your portfolio. Free. Gallery Gallery is an amazing child theme made on the Thematic Wordpress framework. The Gallery theme is extremely flexible and can be customized to individual tastes. The Folio Elements Folio Elements is a a part of Press75 premium themes and it is one of the most impressive Photoblog WordPress themes launched in recent times. All the images can be browsed using the slider on the main page while individual posts corresponding to the images can also be showed just below it. PhotoBlog WordPress Theme PhotoBlog is a premium theme compatible with WordPress 2.7 and above just like all the other themes mentioned in the list.

    Read the article

  • Save all music files in a VLC xspf playlist to another folder

    - by Parto
    I have a VLC playlist (.xspf) of over a 100 songs all scattered all over my computer. I'm looking for a way to save this playlist and all it's songs to another folder - flash drive, external drive or just a different location in my computer. How can I do this? EDIT The xspf playlist is in XML and is such a format: <?xml version="1.0" encoding="UTF-8"?> <playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1"> <title>Playlist</title> <trackList> <track> <location>file:///home/subroot/Music/3%20Days%20Grace%20-%20Wake%20Up.mp3</location> <title>Wake Up</title> <creator>3 Days Grace</creator> <album>Three Days Grace</album> <trackNum>10</trackNum> <annotation> </annotation> <duration>206036</duration> <extension application="http://www.videolan.org/vlc/playlist/0"> <vlc:id>0</vlc:id> </extension> </track> . . [Many more tracks here] . </trackList> <extension application="http://www.videolan.org/vlc/playlist/0"> <vlc:item tid="0"/> . . [Other id's here] . </extension> </playlist>

    Read the article

  • CodePlex Daily Summary for Saturday, March 27, 2010

    CodePlex Daily Summary for Saturday, March 27, 2010New ProjectsAlter gear SQL index Management: SQL Index management displays a list of indexes available for the chosen database and allows you to select an individual / group of indexes to be r...ASP League Ladder System: An ASP ladder / league system for online gaming league or real life leagues also.Augmented Reality Strategy Simulator: Augmented Reality Strategy Simulator is a software suite to promote computer aided strategy planning. Sports team can visualize their strategy usin...Boo syntax highlighting for Visual Studio 2010: Simple syntax hightlighting VSX add-in for Boo language in Visual Studio 2010.easySan: easySan zur einfachen Mitgliedsverwaltung im BRKFsUnit: FsUnit makes unit-testing with F# more enjoyable. It adds a special syntax to your favorite .NET testing framework.Laughing Dog XNA Framework: Laughing Dog is a simple to use, component based 2D framework for XNA game development. At present it is very early in development and as such is f...miniTodo: WPFでMVVMの練習にてきとうに作ったTODOアプリ 実用は無理です。My Common Library on .NET with CSharp: My Common Library on .NET with CSharp, it conclude database assecc, encrypt string, data caching, StringUtility, thank you for your view.Native code wrapping using c# : fsutil sparse commands: Ever thought about creating HUGE FILES for future use but felt bad for the wasted memory? Well, SPARSE FILES are the ANSWER! This FSUTIL SPARSE CO...Open SOA Platform: A centralized system for administering applications throught a SOA Enterprise Service Bus: Runtime environment (PROD, DEV, ...) , application and s...P-DBMS: Network and Database ProjectPraiseSight: PraiseSight is supposed to become a practical tool for churches to catalog an present their songs, lyrics and presentations on a beamer. The soluti...Pretty Good Frontend: Pretty Good Frontend is a sample frontend for ConfigMgr (SCCM) 2007 and MDT 2010 Zero Touch. S3Appender (Appender for Log4Net that Uses Amazon S3 For Storing Log Files): The S3Appender is a log4net appender that stores log events in either a MemoryStream or FileStream and sends them to S3 based on time intervals and...sEmit: sEmit (sms emitter) is an application written in C# which was built to send text messages. The project was founded in May 2009 by cansik. It works ...Silverlight RIA Tools: A tool set that generates a full RIA Solutions in Silverlightthommo cannon: Cannon for shooting down ThommosTianjin Polytechnic University Online Judge: Online Judge System Built on Microsoft technologies. Vision & Scope: A distributed OJ Solution on Windows and Cloud. Technologies used or planed...Tinare: Tinare is an byte encryption and decryption alogrithm. The input key is a string password.TinyPlug: Small Plugin Manager, written in C# Allows a project to define supported interfaces, and at runtime add plugins which support (inherit) these in...Utility niconv helps to convert text from one encoding to another: .NET implementation of GUN iconv console converter utility. The niconv program converts text from one encoding to another encoding. In the future r...WareFeed - Software Business Analytics: WareFeed is a simple but effective Software Business Analytics tool written in PHP and compatible others languages such as .NET, Java or Python. It...Y36API1: Semestralni projekt na Y36APINew ReleasesAlter gear SQL index Management: Setup 1.0.0: setup for first alpha releaseASP League Ladder System: ASPLeagueRelease_0_4_1: Release v 0.41Augmented Reality Strategy Simulator: Augmented Reality Strategy Simulator: Version 1.0 InstallerAutoAudit: AutoAudit 1.10e: Version 1.10e will be the final iteration of version 1 development. Version 2 will begin adding switches and options. Pleae email your suggestio...Boo syntax highlighting for Visual Studio 2010: Boo syntax VS 2010 - alpha: First release TODO: Multiline comments!Chargify.NET: Chargify.NET 0.6: Updated library, using Metered Components and updated Product information.Composer: V1.0.326.1000 Alpha: Initial Alpha release. Should be stable, with minor issues.CoNatural Components: CoNatural Components 1.6: Code fixes: Created helper classes to generate source code for type mapper/materializer. Fixed issue in optimized type materializer when loading ...CRM External View: 1.2: New Features in v1.2 release Password protected views. No more using Web Data Access role from v1. Filtering capabilities Caching for performan...Designit Video Embed Package: Release 1.1.0 beta1: You can now either have the video embeded directly in the template or have a preview in template that opens the video in a lightbox window.FsUnit: FsUnit 0.9.0 for NUnit: This release is for F# 2.0 and NUnit 2.5+.Laughing Dog XNA Framework: Laughing Dog 0.0.1: Laughing Dog - Alpla - v 0.0.1 First released version of the Laughing Dog framework.LiveUpload to Facebook: LiveUpload to Facebook 3.2: Version 3.2Become a fan on Facebook! Features Quickly and easily upload your photos and videos to Facebook, including any people tags added in Win...MapWindow6: MapWindow 6.0 msi March 26: This version adds the Join feature for creating a new "featureset" with attributes that are joined with attributes from a Excel data label named 'D...Mobile Broadband Logging Monitor: Mobile Broadband Logging Monitor 1.2.2: This edition supports: Newer and older editions of Birdstep Technology's EasyConnect HUAWEI Mobile Partner MWConn User defined location for s...Multiplayer Quiz: Release 1_6_351_0: A beta release of the next version. Please leave any errors in discussions or comments.Native code wrapping using c# : fsutil sparse commands: Fsutil sparse file native code - c sharp wrapper: Project Description A C# code wrapping a native code-Sparse files1 The code is about SPARSE files- the abillity to create huge files (for future us...Nice Libraries: 1.30 build 50325.01: Release 1.30 build 50325.01Pretty Good Frontend: Pretty Good Frontend binaries v1.0: This is the first public release of the Pretty Good Frontend binariesPylor: Pylor 0.1 alpha: This is the very first published version. I hope I can put a sample project soon.Quick Performance Monitor: Version 1.1 refresh: There was a typo or two in the sample batch file. Corrected now.Rapidshare Episode Downloader: RED v0.8.3: 0.8.1 introduced the ability to advance to the next episode. In 0.8.2 a bug was found that if episode number is less then 10, then the preceding 0...RapidWebDev - .NET Enterprise Software Development Infrastructure: RapidWebDev 1.52: RapidWebDev is an infrastructure helps to develop enterprise software solutions in Microsoft .NET easily and productively. This is the release vers...thommo cannon: game: gamethommo cannon: setup: setupthommo cannon: test: testTinare: Tinare DLL: Tinare DLL is a dynamic-link library written in C# which provides the functions to encrypt and decrypt a byte stream with tinare.WeatherBar: WeatherBar 2.1 [No Installation]: Minor changes to release 2.0 (http://weatherbar.codeplex.com/releases/view/42490). Fixed the bug that caused an exception to be thrown if the user...Most Popular ProjectsMetaSharpRawrWBFS ManagerASP.NET Ajax LibrarySilverlight ToolkitMicrosoft SQL Server Product Samples: DatabaseAJAX Control ToolkitLiveUpload to FacebookWindows Presentation Foundation (WPF)ASP.NETMost Active ProjectsRawrjQuery Library for SharePoint Web ServicesBlogEngine.NETMicrosoft Biology FoundationFarseer Physics Enginepatterns & practices: Composite WPF and SilverlightLINQ to TwitterTable2ClassFluent Ribbon Control SuiteNB_Store - Free DotNetNuke Ecommerce Catalog Module

    Read the article

  • Ghost Recon: Future Intern (Future Soldier Parody) [Video]

    - by Asian Angel
    What would it be like if a member of the Ghost Recon: Future Soldier team applied to be an intern at IGN? Never boring to be sure! Watch as this ‘future intern’ uses his training and futuristic equipment to climb the corporate ladder in style. Ghost Recon: Future Intern – [Future Soldier Parody] [via Dorkly] HTG Explains: Why Linux Doesn’t Need Defragmenting How to Convert News Feeds to Ebooks with Calibre How To Customize Your Wallpaper with Google Image Searches, RSS Feeds, and More

    Read the article

  • Checking date against date range in Python

    - by Flowpoke
    I have a date variable: 2011-01-15 and I would like to get a boolean back if said date is within 3 days from TODAY. Im not quite sure how to construct this in Python. Im only dealing with date, not datetime. My working example is a "grace period". A user logs into my site and if the grace period is within 3 days of today, additional scripts, etc. are omitted for that user. I know you can do some fancy/complex things in Python's date module(s) but Im not sure where to look.

    Read the article

  • Getting the highest owner of a ToolStripDropDownItem

    - by andyperfect
    I'm currently working on a project in which at one point, the user may right click a button which brings up a contextMenuStrip. I am already able to find the owner accurately from that strip, and manipulate the button clicked as follows: Dim myItem As ToolStripMenuItem = CType(sender, ToolStripMenuItem) Dim cms As ContextMenuStrip = CType(myItem.Owner, ContextMenuStrip) Dim buttonPressed As DataButton = DirectCast(cms.SourceControl, DataButton) But now for the tricky part. Within this contextmenuStrip, I have a DropDown menu with multiple items in there. I would assume you would be able to work your way up the ladder doing casts like above in the manner of ToolStripDrowpDownItem > ToolStripDropDownMenu > ToolStripMenuItem > ContextMenuStrip Unfortunately, when I try to get the sourcecontrol from this menuStrip, it return Nothing. Any ideas on how I can get the button that was pressed from this toolStripMenuItem? My current code is as follows (in which the sourceControl is Nothing) Dim myItem As ToolStripDropDownItem = CType(sender, ToolStripDropDownItem) Dim dropDown As ToolStripDropDownMenu = CType(myItem.Owner, ToolStripDropDownMenu) Dim menuItem As ToolStripMenuItem = CType(dropDown.OwnerItem, ToolStripMenuItem) Dim cms As ContextMenuStrip = CType(menuItem.Owner, ContextMenuStrip) Dim buttonPressed As DataButton = DirectCast(cms.SourceControl, DataButton) Any ideas on how to go about doing what I did in that first method, but just working my way up from further down the ladder?

    Read the article

  • Setting attributes of a class during construction from **kwargs

    - by Carson Myers
    Python noob here, Currently I'm working with SQLAlchemy, and I have this: from __init__ import Base from sqlalchemy.schema import Column, ForeignKey from sqlalchemy.types import Integer, String from sqlalchemy.orm import relationship class User(Base): __tablename__ = "users" id = Column(Integer, primary_key=True) username = Column(String, unique=True) email = Column(String) password = Column(String) salt = Column(String) openids = relationship("OpenID", backref="users") User.__table__.create(checkfirst=True) #snip definition of OpenID class def create(**kwargs): user = User() if "username" in kwargs.keys(): user.username = kwargs['username'] if "email" in kwargs.keys(): user.username = kwargs['email'] if "password" in kwargs.keys(): user.password = kwargs['password'] return user This is in /db/users.py, so it would be used like: from db import users new_user = users.create(username="Carson", password="1234") new_user.email = "[email protected]" users.add(new_user) #this function obviously not defined yet but the code in create() is a little stupid, and I'm wondering if there's a better way to do it that doesn't require an if ladder, and that will fail if any keys are added that aren't in the User object already. Like: for attribute in kwargs.keys(): if attribute in User: user.__attribute__[attribute] = kwargs[attribute] else: raise Exception("blah") that way I could put this in its own function (unless one hopefully already exists?) So I wouldn't have to do the if ladder again and again, and so I could change the table structure without modifying this code. Any suggestions?

    Read the article

  • Le projet MonoDroid apporte .NET sur Android, Novell veut construire une passerelle entre le framewo

    Le projet MonoDroid apporte .NET sur Android Novell veut construire une passerelle entre le framework de Microsoft et l'OS de Google Ce n'est pas un scoop, .NET tend à se généraliser. Aujourd'hui, le framework de Microsoft pourrait bien toucher Android, la plateforme Java de son grand concurrent Google, grâce à un projet de Novell, l'éditeur de Mono. Petit retour sur le projet Mono. Mono est l'implantation open-source et portable du framework .Net. Certains vont même jusqu'à dire qu...

    Read the article

  • Pourquoi réinventer la roue quand il y a Runnable ? La startup ambitionne de devenir le « YouTube du Code »

    Pourquoi réinventer la roue quand il y a Runnable ? La startup ambitionne de devenir le « YouTube du Code » Runnable, qui a récemment été lancé par une startup du même nom basée à Palo Alto avec pour objectif la facilitation de la découverte et de la réutilisation de portions de code, a annoncé qu'elle a soulevé une levée de fonds de 2 millions de dollars grâce à la participation de Sierra Ventures, Resolute VC, AngelPad et 500 startups.Yash Kumar Directeur Général et co-fondateur de la start-up...

    Read the article

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