Search Results

Search found 560 results on 23 pages for 'chad johnson'.

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

  • Silverlight Cream for June 15, 2010 -- #882

    - by Dave Campbell
    In this Issue: Colin Eberhardt Zoltan Arvai, Marcel du Preez, Mark Tucker, John Papa, Phil Middlemiss, Andy Beaulieu, and Chad Campbell. From SilverlightCream.com: Throttling Silverlight Mouse Events to Keep the UI Responsive Colin Eberhardt sent me this link to his latest at Scott Logic... about how to throttle Silverlight -- no not that, you'd have to go to one of the *other* blogs for that :) ... this is throttling the mouse, particularly the mouse wheel to keep the UI from freezing up ... check out the demos, you'll want to read the code Data Driven Applications with MVVM Part I: The Basics Zoltan Arvai started a series of tutorials on Data-Driven Applications with MVVM at SilverlightShow... this is number 1, and it looks like it's going to be a good series to read. Red-To-Green scale using an IValueConverter Marcel du Preez has an interesting post up at SilverlightShow using an IValueConverter to do a red/yellow/green progress bar ... this is pretty cool. Infragistics XamWebOutlookBar & Caliburn With assistance from Rob Eisenburg, Mark Tucker was able to build a Caliburn sample including the Infragistics XamWebOutlookBar, and he's sharing his experience (and code) with all of us. Printing Tip – Handling User Initiated Dialogs Exceptions John Papa responded to a common printing problem by writing it up in his blog. Note this problem quite often appears during debug, so check it out... John also has a quick tip on an update to the PrintAPI in Silverlight 4. Automatic Rectangle Radius X and Y Phil Middlemiss has another great Blend post up -- this one on rounding off buttons... they look great to me, but he's looking for advice -- how about that Phil? They look great to me :) WP7 Back Button in Games Planning on selling 'stuff' in the Windows Phone Marketplace? Are you familiar with the required use of the Back Button? How about in a game? ... Andy Beaulieu discusses all this and has some code you'll want to use. Windows Phone 7 – Call Phone Number from HyperlinkButton Chad Campbell [no relation :) ] is discussing dialing a number from a hyperlink in WP7 - oh yeah, it's a phone as well :) -- I think I've only seen a number attempt to be called -- hmm... and we're not yet either because we all have emulators, but this is a good intro to the functionality for when we may actually have devices! 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

  • Silverlight Cream for December 09, 2010 -- #1006

    - by Dave Campbell
    In this Issue: Adam Kinney, Jonathan van de Veen, René Schulte(-2-), Vikas, Chad Campbell, Chris Koenig, John Papa, and Martin Krüger. Above the Fold: Silverlight: "Silverlight TV #54: Introducing 11 Brand New Labs" John Papa WP7: "Gestures in Windows Phone 7" Chris Koenig Training: "New Windows Phone 7 tutorials for Designers on toolbox!" Adam Kinney Shoutouts: Jesse Liberty posted ways to get help when you get stuck: Top 10 Tips To Getting Help With Silverlight From SilverlightCream.com: New Windows Phone 7 tutorials for Designers on toolbox! Adam Kinney posted about some WP7 design goodness he's had the opportunity to take part in putting together that is now available for all of us on the Microsoft design Toolbox site.... detailed info about what's there. Adventures while building a Silverlight Enterprise application part #39 Jonathan van de Veen has his latest Silverlight coding adventure detailed on his blog... in the final throes of releasing, he came across some issues surrounding CRUD operations... Windows Phone Unplugged - How to Detect the Zune Software René Schulte has a post up about my two favorite devices: Zune and WP7 ... and how to detect if the Zune software is running when the device is connected to the PC. Issue with the WP7 PictureDecoder and Workaround René Schulte has a second post up today about strange behavior with the PictureDecoder DecodeJpeg method... he describes the problem and a workaround for it. Performance Wizard for Silverlight Vikas reports some Silverlight goodness in the VS2010 SP1 beta that's out ... a Performance Wizard... and he's ratted out it's use and sharing that info... Submitting an App to the Windows Phone Marketplace Chad Campbell details the user experience of getting an app through the marketplace to users... from the standpoint of someone that's been there. Gestures in Windows Phone 7 Chris Koenig is talking about Gestures in WP7, documenting how he used some XNA to get some side-to-side image scrolling going on... and gave us the source! Silverlight TV #54: Introducing 11 Brand New Labs John Papa has his latest Silverlight TV up and he's talking to two great guys: Dan Wahlin and Corey Schuman who have produced the labs you've seen referenced... awesome stuff guys... WP7: precisely position the text cursor when writing text Martin Krüger has a quick WP7 usage tip up for precisely positioning the text cursor in a textbox ... I could have used that today when "Nick's Frame Shop" came up as "Nix Frame Shop" in a search. 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

  • Encrypting your SQL Server Passwords in Powershell

    - by laerte
    A couple of months ago, a friend of mine who is now bewitched by the seemingly supernatural abilities of Powershell (+1 for the team) asked me what, initially, appeared to be a trivial question: "Laerte, I do not have the luxury of being able to work with my SQL servers through Windows Authentication, and I need a way to automatically pass my username and password. How would you suggest I do this?" Given that I knew he, like me, was using the SQLPSX modules (an open source project created by Chad Miller; a fantastic library of reusable functions and PowerShell scripts), I merrily replied, "Simply pass the Username and Password in SQLPSX functions". He rather pointed responded: "My friend, I might as well pass: Username-'Me'-password 'NowEverybodyKnowsMyPassword'" As I do have the pleasure of working with Windows Authentication, I had not really thought this situation though yet (and thank goodness I only revealed my temporary ignorance to a friend, and the embarrassment was minimized). After discussing this puzzle with Chad Miller, he showed me some code for saving passwords on SQL Server Tables, which he had demo'd in his Powershell ETL session at Tampa SQL Saturday (and you can download the scripts from here). The solution seemed to be pretty much ready to go, so I showed it to my Authentication-impoverished friend, only to discover that we were only half-way there: "That's almost what I want, but the details need to be stored in my local txt file, together with the names of the servers that I'll actually use the Powershell scripts on. Something like: Server1,UserName,Password Server2,UserName,Password" I thought about it for just a few milliseconds (Ha! Of course I'm not telling you how long it actually took me, I have to do my own marketing, after all) and the solution was finally ready. First , we have to download Library-StringCripto (with many thanks to Steven Hystad), which is composed of two functions: One for encryption and other for decryption, both of which are used to manage the password. If you want to know more about the library, you can see more details in the help functions. Next, we have to create a txt file with your encrypted passwords:$ServerName = "Server1" $UserName = "Login1" $Password = "Senha1" $PasswordToEncrypt = "YourPassword" $UserNameEncrypt = Write-EncryptedString -inputstring $UserName -Password $PasswordToEncrypt $PasswordEncrypt = Write-EncryptedString -inputstring $Password -Password $PasswordToEncrypt "$($Servername),$($UserNameEncrypt),$($PasswordEncrypt)" | Out-File c:\temp\ServersSecurePassword.txt -Append $ServerName = "Server2" $UserName = "Login2" $Password = "senha2" $PasswordToEncrypt = "YourPassword" $UserNameEncrypt = Write-EncryptedString -inputstring $UserName -Password $PasswordToEncrypt $PasswordEncrypt = Write-EncryptedString -inputstring $Password -Password $PasswordToEncrypt "$($Servername),$($UserNameEncrypt),$($PasswordEncrypt)" | Out-File c:\temp\ ServersSecurePassword.txt -Append .And in the c:\temp\ServersSecurePassword.txt file which we've just created, you will find your Username and Password, all neatly encrypted. Let's take a look at what the txt looks like: .and in case you're wondering, Server names, Usernames and Passwords are all separated by commas. Decryption is actually much more simple:Read-EncryptedString -InputString $EncryptString -password "YourPassword" (Just remember that the Password you're trying to decrypt must be exactly the same as the encrypted phrase.) Finally, just to show you how smooth this solution is, let's say I want to use the Invoke-DBMaint function from SQLPSX to perform a checkdb on a system database: it's just a case of split, decrypt and be happy!Get-Content c:\temp\ServerSecurePassword.txt | foreach { [array] $Split = ($_).split(",") Invoke-DBMaint -server $($Split[0]) -UserName (Read-EncryptedString -InputString $Split[1] -password "YourPassword" ) -Password (Read-EncryptedString -InputString $Split[2] -password "YourPassword" ) -Databases "SYSTEM" -Action "CHECK_DB" -ReportOn c:\Temp } This is why I love Powershell.

    Read the article

  • Raise event to another control with jquery

    - by Chad
    Is it possible to raise a keyup event from one control (text input) to another control (say, a select element)? In short, when certain keys are pressed in the text box (up, down, etc) I need that event to also happen in the select element.

    Read the article

  • WebSocket handshake with Ruby and EM::WebSocket::Server

    - by Chad Johnson
    I am trying to create a simple WebSocket connection in JavaScript against my Rails app. I get the following: WebSocket connection to 'ws://localhost:4000/' failed: Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing What am I doing wrong? Here is my code: JavaScript: var socket = new WebSocket('ws://localhost:4000'); socket.onopen = function() { var handshake = "GET / HTTP/1.1\n" + "Host: localhost\n" + "Upgrade: websocket\n" + "Connection: Upgrade\n" + "Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\n" + "Sec-WebSocket-Protocol: quote\n" + "Sec-WebSocket-Version: 13\n" + "Origin: http://localhost\n"; socket.send(handshake); }; socket.onmessage = function(data) { console.log(data); }; Ruby: require 'rubygems' require 'em-websocket-server' module QuoteService class WebSocket < EventMachine::WebSocket::Server def on_connect handshake_response = "HTTP/1.1 101 Switching Protocols\n" handshake_response << "Upgrade: websocket\n" handshake_response << "Connection: Upgrade\n" handshake_response << "Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=\n" handshake_response << "Sec-WebSocket-Protocol: quote\n" send_message(handshake_response) end def on_receive(data) puts 'RECEIVED: ' + data end end end EventMachine.run do print 'Starting WebSocket server...' EventMachine.start_server '0.0.0.0', 4000, QuoteService::WebSocket puts 'running' end The handshake headers are per Wikipedia.

    Read the article

  • Why does Internet Explorer break "pegman" display in Google Maps API v3?

    - by Chad
    On my site here, the SteetView control, aka "Pegman", works great under Firefox. Under IE (7 in this case, but tested on 8 as well - same result) it breaks the display of the pegman control. Here's my map code: var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; directionsDisplay = new google.maps.DirectionsRenderer(); var milBase = new google.maps.LatLng(35.79648921414565, 139.40663874149323); var mapOpts = { streetViewControl: true, zoom: 12, center: milBase, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU }, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map($("#dirMap").get(0), mapOpts); directionsDisplay.setMap(map); var basePoly = new google.maps.Polygon({ paths: [new google.maps.LatLng(35.724496338474104, 139.3444061279297), new google.maps.LatLng(35.74748750802863, 139.3363380432129), new google.maps.LatLng(35.75765724051559, 139.34303283691406), new google.maps.LatLng(35.76545779822543, 139.3418312072754), new google.maps.LatLng(35.767547103447725, 139.3476676940918), new google.maps.LatLng(35.75835374997911, 139.34955596923828), new google.maps.LatLng(35.755149755962755, 139.3567657470703), new google.maps.LatLng(35.74679090345495, 139.35796737670898), new google.maps.LatLng(35.74762682821177, 139.36294555664062), new google.maps.LatLng(35.744422402303826, 139.36346054077148), new google.maps.LatLng(35.74860206266584, 139.36946868896484), new google.maps.LatLng(35.735644401200986, 139.36843872070312), new google.maps.LatLng(35.73843117306677, 139.36174392700195), new google.maps.LatLng(35.73592308277646, 139.3531608581543), new google.maps.LatLng(35.72686543236113, 139.35298919677734), new google.maps.LatLng(35.724496338474104, 139.3444061279297)], strokeColor: "#ff0000", strokeOpacity: 0.8, strokeWeight: 2, fillColor: "#FF0000", fillOpacity: 0.35 }); basePoly.setMap(map); var marker = new google.maps.Marker({ position: new google.maps.LatLng(35.79648921414565, 139.40663874149323), map: map, title: "Ruby International" }); function calcRoute() { var start = new google.maps.LatLng(35.74005964772476, 139.37083393335342); var end = new google.maps.LatLng(35.79648921414565, 139.40663874149323); var request = { origin: start, destination: end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(result, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(result); } }); } The only real difference from my code and Google's code is that I use jQuery's document ready function instead of the body onload event to initialize my map. Can't imagine that's the cause though (works in v2 of the maps). Have I found a bug or is there something wrong in my code? Thanks in advance!

    Read the article

  • HTTPS Redirect Causing Error "Server cannot append header after HTTP headers have been sent"

    - by Chad
    I need to check that our visitors are using HTTPS. In BasePage I check if the request is coming via HTTPS. If it's not, I redirect back with HTTPS. However, when someone comes to the site and this function is used, I get the error: System.Web.HttpException: Server cannot append header after HTTP headers have been sent. at System.Web.HttpResponse.AppendHeader(String name, String value) at System.Web.HttpResponse.AddHeader(String name, String value) at Premier.Payment.Website.Generic.BasePage..ctor() Here is the code I started with: // If page not currently SSL if (HttpContext.Current.Request.ServerVariables["HTTPS"].Equals("off")) { // If SSL is required if (GetConfigSetting("SSLRequired").ToUpper().Equals("TRUE")) { string redi = "https://" + HttpContext.Current.Request.ServerVariables["SERVER_NAME"].ToString() + HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"].ToString() + "?" + HttpContext.Current.Request.ServerVariables["QUERY_STRING"].ToString(); HttpContext.Current.Response.Redirect(redi.ToString()); } } I also tried adding this above it (a bit I used in another site for a similar problem): // Wait until page is copletely loaded before sending anything since we re-build HttpContext.Current.Response.BufferOutput = true; I am using c# in .NET 3.5 on IIS 6. enter code here

    Read the article

  • C# - Launch Invisible Process (CreateNoWindow & WindowStyle not working?)

    - by Chad
    I have 2 programs (.exe) which I've created in .NET. We'll call them the Master and the Worker. The Master starts 1 or more Workers. The Worker will not be interacted with by the user, but it is a WinForms app that receives commands and runs WinForms components based on the commands it receives from the Master. I want the Worker app to run completely hidden (except showing up in the Task Manager of course). I thought that I could accomplish this with the StartInfo.CreateNoWindow and StartInfo.WindowStyle properties, but I still see the Client.exe window and components in the form. However, it doesn't show up in the taskbar. Process process = new Process { EnableRaisingEvents = true, StartInfo = { CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden FileName = "Client.exe", UseShellExecute = false, ErrorDialog = false, } }; What do I need to do to let Client.exe run, but not show up?

    Read the article

  • Return extra data besides tree data from ExtJS TreeLoader dataUrl?

    - by Chad Johnson
    I asked this question in the Ext JS forums, but I received no responses, so I am asking here. I have a TreePanel (code below) that uses a TreeLoader and an AsyncTreeNode. In my API method specified by the TreeLoader's dataUrl, I return a JSON array to populate the tree. This works great, of course. However, I need to return an additional item--an integer--in addition to the array, and I need to display that value somewhere else in my UI. Is this possible? If not, what else would be a good solution? Here's the code I have currently: tree = new Ext.tree.TreePanel({ enableDD: true, rootVisible: false, useArrows: true, loader: new Ext.tree.TreeLoader({ dataUrl: '/api/method' }), root: new Ext.tree.AsyncTreeNode() });

    Read the article

  • Can't figure out jQuery ajax call parameters

    - by chad larson
    I am learning jQuery and trying the following but the parameters are so foreign to me with all the embedded quotes I think that is my problem. Can someone explain the parameters and where quotes go and possibly rewrite my parameters line? (This is a live site to see the required parms). function AirportInfo() { var divToBeWorkedOn = '#detail'; var webMethod = "'http://ws.geonames.org/citiesJSON'"; var parameters = "{'north':'44.1','south':'9.9','east':'22.4','west':'55.2','lang':'de'}"; $.ajax({ type: "POST", url: webMethod, data: parameters, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { alert(msg.d); $(divToBeWorkedOn).html(msg.d); }, error: function(xhr) { alert(xhr); alert(xhr.statusText); alert(xhr.responseText); $(divToBeWorkedOn).html("Unavailable"); } }); }

    Read the article

  • 404 Error Hosting WCF Service via IIS 7.5 Shared Content

    - by Chad Gruka
    We're attempting to host a WCF Service (.NET 3.5 SP1) using Shared Content on IIS 7.5. At the moment it's returning a 404 error. My assumption at this point is that WCF can not be hosted via a UNC path (See workaroundHosting WCF service in IIS6 using UNC). Steps I've taken: - Established a FullTrust to/with the UNC path. - The service works hosting it on a local disk. - A basic HTML page renders without issue from the UNC path. - A ASPX page renders without issue from the UNC path. - Explicitly set "Full Control" permissions to the user running the service. The reason for using Shared Content in IIS 7.5 to host this WCF Service, and several other websites, in a web farm. Using Shared Content avoids the need for file replication between the nodes in the farm. (Note we are also using Shared Configuration to support this environment.)

    Read the article

  • What components of your site do you typically "offload" or embed?

    - by Chad
    Here's what I mean. In developing my ASP.NET MVC based site, I've managed to offload a great deal of the static file hosting and even some of the "work". Like so: jQuery for my javascript framework. Instead of hosting it on my site, I use the Google CDN Google maps, obviously "offloaded" - no real work being performed on my server - Google hosted jQueryUI framework - Google CDN jQueryUI CSS framework - Google CDN jQueryUI CSS framework themes - Google CDN So what I'm asking is this, other than what I've got listed... What aspects of your sites have you been able to offload, or embed, from outside services? Couple others that come to mind... OpenAuth - take much of the authentication process work off your site Google Wave - when it comes out, take communication work off of your site

    Read the article

  • Variable collation with MySQL stored procedure?

    - by Chad Johnson
    I want to do something like this in a stored procedure: IF case_sensitive = FALSE THEN SET search_collation = "utf8_unicode_ci"; ELSE SET search_collation = "utf8_bin"; END IF; INSERT INTO TABLE1 (field1, field2) SELECT * FROM TABLE 2 WHERE some_field LIKE '%rarf%' collate search_collation; However, when I do this, I get ERROR 1273 (HY000): Unknown collation: 'search_collation' How can I use a dynamic collation without having two copies of the same query?

    Read the article

  • Updating records with their subordinates via CTE or subquery

    - by Mike Jolley
    Let's say I have a table with the following columns: Employees Table employeeID int employeeName varchar(50) managerID int totalOrganization int managerID is referential to employeeID. totalOrganization is currently 0 for all records. I'd like to update totalOrganization on each row to the total number of employees under them. So with the following records: employeeID employeeName managerID totalOrganization 1 John Cruz NULL 0 2 Mark Russell 1 0 3 Alice Johnson 1 0 4 Juan Valdez 3 0 The query should update the totalOrganizations to: employeeID employeeName managerID totalOrganization 1 John Cruz NULL 3 2 Mark Russell 1 0 3 Alice Johnson 1 1 4 Juan Valdez 3 0 I know I can get somewhat of an org. chart using the following CTE: WITH OrgChart (employeeID, employeeName,managerID,level) AS ( SELECT employeeID,employeeName,0 as managerID,0 AS Level FROM Employees WHERE managerID IS NULL UNION ALL SELECT Employees.employeeID,Employees.employeeName,Employees.managerID,Level + 1 FROM Employees INNER JOIN OrgChart ON Employees.managerID = OrgChart.employeeID ) SELECT employeeID,employeeName,managerID, level FROM OrgChart; Is there any way to update the Employees table using a stored procedure rather than building some routine outside of SQL to parse through the data?

    Read the article

  • Call a protected method from outside a class in PHP

    - by Chad Johnson
    I have a very special case in which I need to call a protected method from outside a class. I am very conscious about what I do programmingwise, but I would not be entirely opposed to doing so in this one special case I have. In all other cases, I need to continue disallowing access to the internal method, and so I would like to keep the method protected. What are some elegant ways to access a protected method outside of a class? So far, I've found this. I suppose it may be possible create some kind of double-agent instance of the target class that would sneakily provide access to the internals...

    Read the article

  • Account verification Yelp style, how is it more "secure" than traditional verification?

    - by Chad
    For business owners to "take control" of their business page on Yelp, they register for it. The Yelp system performs a telephone call-back. From watching to the video here, it sounds like a telephone version of what we all typically do - e-mail check. For e-mail check, it basically goes like this: User registers verify e-mail sent they click link inside verify e-mail site verifies Here's Yelp's: User registers verify screen shown with code Yelp calls user user enters code site verifies It's essentially the same thing, via phone. Is there any reason you can see why this method is better than the e-mail method?

    Read the article

  • Why do I get "undefined method `destroy'" when including 'svn/repos'?

    - by Chad Johnson
    I get the following when running script/server require 'svn/repos' script/console Loading development environment (Rails 2.3.5) require 'svn/repos' /Library/Ruby/Site/1.8/svn/core.rb:88: warning: already initialized constant Stream /Library/Ruby/Site/1.8/svn/core.rb:138: warning: already initialized constant AuthBaton NoMethodError: undefined method destroy' for #<Svn::Ext::Core::Apr_pool_wrapper_t:0x10150ae68> from /Library/Ruby/Site/1.8/svn/util.rb:60:insvn_fs_initialize' from /Library/Ruby/Site/1.8/svn/util.rb:60:in call' from /Library/Ruby/Site/1.8/svn/util.rb:60:ininitialize' from /Library/Ruby/Site/1.8/svn/fs.rb:14 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:innew_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Site/1.8/svn/repos.rb:5 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' from (irb):1 Any idea why?

    Read the article

  • Multiple file types in vim

    - by Chad
    When I am working on a PHP file for example the default filetype is php. This makes sense, however when that PHP file has HTML as well the filetype is still only php. For some plugins that means that I get the PHP functionality for that plugin, but miss out on the HTML functionality. A more specific situation where this happens is with my snippet plugin. I get php snippets and not html snippets when I am editing a php file. Possible solutions to this (which I obviously don't like, hence my posting this question) are: add a map to toggle between different filetypes when I am editing different sections of the file. update my php snippets file to include the html snippets as well (while this would work for the example above, it doesn't solve the fundamental problem). So, Is there a way to edit a file using multiple filetypes at the same time in vim?

    Read the article

  • Can someone describe the nested set model from a C#/LINQ perspective?

    - by Chad
    I know the nested set model doesn't pertain to the C# language or LINQ directly... it's what I'm using to develop my web app. For hierarchical data (categories with sub-categories in my case), I'm currently using something similar to the Adjacency List model. At the moment, I've only got 2 levels of categories, but I'd like to take it further and allow for n levels of categories using the nested set model. I'm not quite clear on how to use it in a C# context. Here's the article I'm reading on the nested set model. Though this article cleared up my confusion some, I still have a big ?? in my head: - Is inserting, updating or deleting categories tedious? It looks like the left and right numbers would require re-numbering... what would the LINQ queries look like for the following scenarios? Delete a child node (re-number all node's left/right values) Delete a parent node (what do you do with the orphans?) Move a child node to a different parent node (renumber again) If my understanding is correct, at all times the child node's left/right values will always be between the parent node's left/right values, am I correct? Seems easy enough, if only the categories were static... most likely I need to spend more time to get my head around the concept. Any help is greatly appreciated!

    Read the article

  • Why Does Thread.CurrentThread.CurrentCulture Change between Page Rendering and HttpModule.PostReques

    - by Chad
    I'm creating an HttpModule that needs to know the value of Thread.CurrentThread.CurrentCulture as set in an MVC application. That value is currently being set by the BaseController, but when my HttpModule.PostRequestHandlerExecute() method fires, it reverts to what the Culture was prior to page rendering. I have duplicated this by creating a simple web app with these steps: Module.PreRequestHandlerExecute: Set culture to A Page_Load: Culture is currently A. Set culture to B Module.PostRequestHandlerExecute: Current thread culture is A. I expected it to be B but it was changed between page rendering and PostRequestHandlerExecute Any idea why .Net changes this value or how I could get around it? The thread is the same, so something in .Net must be explicitly reverting the culture.

    Read the article

  • Custom array sort in perl

    - by ABach
    I have a perl array of to-do tasks that looks like this: @todos = ( "1 (A) Complete online final @evm4700 t:2010-06-02", "3 Write thank-you t:2010-06-10", "4 (B) Clean t:2010-05-30", "5 Donate to LSF t:2010-06-02", "6 (A) t:2010-05-30 Pick up dry cleaning", "2 (C) Call Chris Johnson t:2010-06-01" ); That first number is the task's ID. If a task has ([A-Z]) next to, that defines the task's priority. What I want to do is sort the tasks array in a way that places the prioritized items first (and in order): @todos = ( "1 (A) Complete online final @evm4700 t:2010-06-02", "6 (A) t:2010-05-30 Pick up dry cleaning", "4 (B) Clean t:2010-05-30", "2 (C) Call Chris Johnson t:2010-06-01" "3 Write thank-you t:2010-06-10", "5 Donate to LSF t:2010-06-02", ); I cannot use a regular sort() because of those IDs next to the tasks, so I'm assuming that some sort of customized sorting subroutine is needed. However, my knowledge of how to do this efficiently in perl is minimal. Thanks, all.

    Read the article

  • Manipulating multi-track ogg files programatically

    - by Chad Birch
    I'm planning to create a program for manipulating multi-track OGG files, but I don't have any experience with the relevant libraries, so I'm looking for recommendations about which language/library to use for this. I don't really have any preference for the language, I'll happily code it in C, C#, Python, whatever makes things the easiest (or even possible). Perhaps it's even a possibility to automate Audacity somehow? In terms of requirements, I'm not looking for anything particularly fancy. It will probably be a command-line program, I don't need to be able to play the audio, draw image representations of the waveforms, etc. The program will basically be used as a converter, but I need to do some processing before outputting. That is, I need the ability to programatically remove some tracks, set panning per-track, change track volumes, etc. Nothing too complex, just some basic processing, and then output the result in either MP3 or a format easily converted to MP3, such as WAV. Any suggestions or general information would be appreciated, thanks.

    Read the article

  • Symlinking (ln) faster than moving (mv)?

    - by Chad Johnson
    When we build web software releases, we prepare the release in a temporary directory and then replace the release directory with the temporary one just prepared: # Move and replace existing release directory. mv /path/to/httpdocs /path/to/httpdocs.before mv /path/to/$newReleaseName /path/to/httpdocs Under this scheme, it happens that with about 1 in every 15 releases, a user was using a file in the original release directory exactly at the time the commands above are run, and a fatal error occurs for that user. I am wondering if using symlinking like follows would be significantly faster, in terms of processing time, thereby helping to lessen the likelihood of this problem: # Remove and replace existing release symlink. ln -sf /path/to/$newReleaseName path/to/httpdocs

    Read the article

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