Search Results

Search found 2003 results on 81 pages for 'matt clark'.

Page 9/81 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Flash causing jerky javascript animations

    - by Matt Brailsford
    Hi Guys, I'm developing a site which has a flash background playing a small video loop scaled to fill the whole background. Over the top I have a number of HTML elements which are animated using javascript. The problem I am having is that (predominantly in FF, but also in others to a lesser degree) the flash seems to be causing my javascript animations to run rather jerky, and in some cases missing the animation altogether and just jumping to the end state. Does anybody have any thoughts on how to make the 2 work together nicely? Many thanks Matt

    Read the article

  • PHP: session isnt saving before header redirect

    - by Matt
    Hi guys, I have read through the php manual for this problem and it seems quite a common issue but i have yet to find a solution. I am saving sessions in a database. My code is as follows: // session $_SESSION['userID'] = $user->id; header('Location: /subdirectory/index.php'); Then at the top of index.php after the session_start(), i have var_dumped the $_SESSION global and the userID is not in there. As i said ive looked through the PHP manual (http://php.net/manual/en/function.session-write-close.php) and neither session_write_close or session_regenerate_id(true) worked for me. Does anybody know a solution? Edit: I have session_start() at the top of my file. When i var_dump the session global before the header redirect, i see the userID in there, but not in the other file, which is in a subdirectory of this script Thanks, Matt

    Read the article

  • Really new to XCode. Why won't the thing run?

    - by Matt W
    Hi, I'm trying to follow the April 2009 and Winter 2010 Stanford iPhone app development videos and I'm running up against the same problems with both. First, they don't appear to be using the latest version of XCode - the Outlets and Actions panels are in a different window and there is little info on the net about this (other than one other post on S.O.F.) Second, having got to the point where I've managed to connect the slider, label and changedLabelText connections, I save, build and run the app - the simulator loads, the app loads and then promptly closes again. What's going on? I have not written any code yet and I still have an app which, while it compiles, does not behave! Is there a better starting point for an XCode noob than the Stanford vids? Thanks, Matt.

    Read the article

  • WPF UserControl Embedded Animation

    - by Matt B
    Hi all, I have a UserControl called Beetle.xaml which has animation makeing the legs move. So far so good. I added this to my Background.xaml page by decaring the xmlns and xaml as: xmlns:my="clr-namespace:Intellident.Liber8.GUI.Theme.Jungle" and <my:Beetle VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="180,0,0,175"> <UserControl.RenderTransform> <MatrixTransform x:Name="trnBeetle" /> </UserControl.RenderTransform> </my:Beetle> However I get errors telling me that I can't declare my:Name as I'm in the wrong scope. I can't declare my:Name as this doesn't exist. How do I do this, I want to create a path animation on the beetle to make him walk around... Ta, Matt. EDIT: THought I'd point out that both Beetle.xaml and Background.xaml live in Intellident.Liber8.GUI.Theme.Jungle namescope.

    Read the article

  • jQuery Validation using the class instead of the name value

    - by Matt
    Hi, I'd like to validate a form using the jquery validate plugin, but I'm unable to use the 'name' value within the html - as this is a field also used by the server app. Specifically, I need to limit the number of checkboxes checked from a group. (Maximum of 3.) All of the examples I have seen, use the name attribute of each element. What I'd like to do is use the class instead, and then declare a rule for that. html This works: <input class="checkBox" type="checkbox" id="i0000zxthy" name="salutation" value="1" /> This doesn't work, but is what I'm aiming for: <input class="checkBox" type="checkbox" id="i0000zxthy" name="i0000zxthy" value="1" /> javascript: var validator = $(".formToValidate").validate({ rules:{ "salutation":{ required:true, }, "checkBox":{ required:true, minlength:3 } } }); Is it possible to do this - is there a way of targeting the class instead of the name within the rules options? Or do I have to add a custom method? Cheers, Matt

    Read the article

  • Is it possible to prevent a locally-running SWF (AS3) from downloading from my website?

    - by Matt
    I've got a crossdomain.xml file which allows SWFs running on only a certain few domains to download resources from my domain. However, one simple way around this is for a user to download the SWF to their local machine, and run it there (i.e. by double-clicking on it within Windows Explorer, not by running through http://localhost). It seems that when this happens, the crossdomain.xml file is ignored. I understand that in my actionscript, I can do this: if (Security.sandboxType.indexOf(Security.REMOTE) == -1) // running locally - don't allow However it is incredibly easy for someone to decompile the SWF and simply remove this line. Is it possible to do something on the server side to stop a locally running SWF to download from my site? I tried checking the referrer but this field often isn't populated. Does anyone have any other ideas? Thanks, Matt

    Read the article

  • Correct association mapping in Entity Framework

    - by Matt Thrower
    Hi, Trying to change two relationships in our entity framework from many-to-one to many-to-many relationships. So I tried the obvious thing: clicked on each association on the diagram, changed the appropriate end of the association accordingly and then changed the name of the navigation property to a plural to reflect the change. This lead to the following build error, or one each for the two changes I've made: Error 3002: Problem in mapping fragments starting at line 1761:Potential runtime violation of table CustomerServices's keys (CustomerServices.Id): Columns (CustomerServices.Id) are mapped to EntitySet CompiledDatabaseCustomerService's properties (CompiledDatabaseCustomerService.CustomerService.Id) on the conceptual side but they do not form the EntitySet's key properties (CompiledDatabaseCustomerService.CompiledDatabase.Id, CompiledDatabaseCustomerService.CustomerService.Id) I'm not entirely sure why this is happening, so unsurprisngly I haven't had much luck fixing it. I've tried fiddling with the mapping details and adding referential constraints to no avail. Anyone point me in the right direction? cheers, Matt

    Read the article

  • How to disable proxy requests once a server has been added to spammers "open proxy" list?

    - by Matt
    Hello all, I've just started in a new company, and have been going over the setup of their Apache webserver conf files... only to find that they've had their apache servers set up as open proxies available to all the world for the last two months. I've already set ProxyRequests Off in the httpd.conf file and restarted the web server, but the access log file is still growing at a horrendous rate (about a gig a day). I noticed that another question was posted on here about this (http://serverfault.com/questions/63715/apache-hit-with-proxy-request), but their access log was supposedly returning 404 errors, while mine appears to be returning 403 and 404 codes... Is this correct? Here are a few lines out of my access log: 87.118.118.124 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.c5interlude.ru/torrent/viewtopic.php?p=2501 HTTP/1.0" 404 219 "http://www.c5interlude.ru/torrent/viewtopic.php?p=2501" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 117.41.184.27 - - [16/Mar/2010:10:56:36 -0400] "GET http://ad.xtendmedia.com/st?ad_type=iframe&ad_size=300x250&section=790074 HTTP/1.0" 404 200 "http://www.newbiegamer.com" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar)" 122.224.55.222 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar HTTP/1.1" 403 214 "http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar" "Mozilla/4.0" 58.55.21.40 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.cpx24.com/ad1.js HTTP/1.0" 404 204 "http://thebighits.com/?id=aibux" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" 122.226.223.188 - - [16/Mar/2010:10:56:36 -0400] "GET http://ad.reduxmedia.com/st?ad_type=iframe&ad_size=160x600&section=798636 HTTP/1.0" 404 200 "http://www.gvvu.com" "Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 98; Win 9x 4.90)" 84.51.109.31 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.kslp.ru/forum/index.php HTTP/1.0" 404 213 "http://www.kslp.ru/forum/index.php" "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0 ; .NET CLR 2.0.50215; SL Commerce Client v1.0; Tablet PC 2.0" 122.224.48.49 - - [16/Mar/2010:10:56:36 -0400] "GET http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe HTTP/1.1" 403 214 "http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe" "Mozilla/4.0" 117.41.184.27 - - [16/Mar/2010:10:56:36 -0400] "GET http://ad.xtendmedia.com/st?ad_type=iframe&ad_size=728x90&section=657624 HTTP/1.0" 404 200 "http://www.raiseanimals.com" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Alexa Toolbar)" And my corresponding error log entries: [Tue Mar 16 10:56:36 2010] [error] [client 87.118.118.124] File does not exist: C:/public_html/torrent, referer: http://www.c5interlude.ru/torrent/viewtopic.php?p=2501 [Tue Mar 16 10:56:36 2010] [error] [client 117.41.184.27] File does not exist: C:/public_html/st, referer: http://www.newbiegamer.com [Tue Mar 16 10:56:36 2010] [error] [client 122.224.55.222] (22)Invalid argument: Cannot map GET http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar HTTP/1.1 to file, referer: http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar [Tue Mar 16 10:56:36 2010] [error] [client 58.55.21.40] File does not exist: C:/public_html/ad1.js, referer: http://thebighits.com/?id=aibux [Tue Mar 16 10:56:36 2010] [error] [client 122.226.223.188] File does not exist: C:/public_html/st, referer: http://www.gvvu.com [Tue Mar 16 10:56:36 2010] [error] [client 84.51.109.31] File does not exist: C:/public_html/forum, referer: http://www.kslp.ru/forum/index.php [Tue Mar 16 10:56:36 2010] [error] [client 122.224.48.49] (22)Invalid argument: Cannot map GET http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe HTTP/1.1 to file, referer: http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe [Tue Mar 16 10:56:36 2010] [error] [client 117.41.184.27] File does not exist: C:/public_html/st, referer: http://www.raiseanimals.com Does this in fact look like the server is blocking them correctly, and is there anything else that I could do better to cut down on my access log size? (perhaps block these requests from the server completely?) Thanks! Matt

    Read the article

  • Pigs in Socks?

    - by MightyZot
    My wonderful wife Annie surprised me with a cruise to Cozumel for my fortieth birthday. I love to travel. Every trip is ripe with adventure, crazy things to see and experience. For example, on the way to Mobile Alabama to catch our boat, some dude hauling a mobile home lost a window and we drove through a cloud of busting glass going 80 miles per hour! The night before the cruise, we stayed in the Malaga Inn and I crawled UNDER the hotel to look at an old civil war bunker. WOAH! Then, on the way to and from Cozumel, the boat plowed through two beautiful and slightly violent storms. But, the adventures you have while travelling often pale in comparison to the cult of personalities you meet along the way.  :) We met many cool people during our travels and we made some new friends. Todd and Andrea are in the publishing business (www.myneworleans.com) and teaching, respectively. Erika is a teacher too and Matt has a pig on his foot. This story is about the pig. Without that pig on Matt’s foot, we probably would have hit a buoy and drowned. Alright, so…this pig on Matt’s foot…this is no henna tatt, this is a man’s tattoo. Apparently, getting tattoos on your feet is very painful because there is very little muscle and fat and lots of nifty nerves to tell you that you might be doing something stupid. Pig and rooster tattoos carry special meaning for sailors of old. According to some sources, having a tattoo of a pig or rooster on one foot or the other will keep you from drowning. There are many great musings as to why a pig and a rooster might save your life. The most plausible in my opinion is that pigs and roosters were common livestock tagging along with the crew. Since they were shipped in wooden crates, pigs and roosters were often counted amongst the survivors when ships succumbed to Davy Jones’ Locker. I didn’t spend a whole lot of time researching the pig and the rooster, so consider these musings as you would a grain of salt. And, I was not able to find a lot of what you might consider credible history regarding the tradition. What I did find was a comfort, or solace, in the maritime tradition. Seems like raw traditions like the pig and the rooster are in danger of getting lost in a sea of non-permanence. I mean, what traditions are us old programmers and techies leaving behind for future generations? Makes me wonder what Ward Christensen has tattooed on his left foot.  I guess my choice would have to be a Commodore 64.   (I met Ward, by the way, in an elevator after he received his Dvorak awards in 1992. He was a very non-assuming individual sporting business casual and was very much a “sailor” of an old-school programmer. I can’t remember his exact words, but I think they were essentially that he felt it odd that he was getting an award for just doing his work. I’m sure that Ward doesn’t know this…he couldn’t have set a more positive example for a young 22 year old programmer. Thanks Ward!)

    Read the article

  • Windows Workflow Foundation 4 (WF4) Bookmark

    - by Russ Clark
    I'm working with Visual Studio 2010 and have a workflow where I'm trying to resume a bookmark. The bookmark appears to be getting set just fine, but when I try to run the code below to resume it, I get an entry in the InstancesTable in the persistence database with the SurrogateLockOwnerID field set to an integer, usually this field is null, and I can no longer do anything with the workflow. I think this is indicating that I have some kind of blocking lock going on, but I can't find any references anywhere to the SurrogateLockOwnerID. Does anyone know what is causing this, and how to fix it? WorkflowApplication workflowApp = new WorkflowApplication(new WebCARSWorkflow()); workflowApp.Extensions.Add(new SqlTrackingParticipant(ConnString)); InstanceStore instanceStore = new SqlWorkflowInstanceStore(ConnString); workflowApp.InstanceStore = instanceStore; workflowApp.Load(WorkflowInstanceId); workflowApp.PersistableIdle = (waie) => PersistableIdleAction.Unload; Approver actualApprover = new Approver(ProcessingStatus.Awaiting, my_RDA_Role, "RDAGetPlayersFromExternalRoleURI", 14); actualApprover.ActionDate = DateTime.Now; Player actualPlayer = (Player)GetPlayer(login); actualApprover.ActualPlayer = actualPlayer; actualApprover.ApproverAction = action; workflowApp.ResumeBookmark("ErrorOccurredBookmark", actualApprover);

    Read the article

  • MVVM Prism Nested Regions Can't Find Child Regions

    - by Garry Clark
    I have a Menu (Telerik RadMenu) that has nested regions defined in the Shell. In my modules I will register the modules menu or toolbar items with these regions. Everything works fine for the root regions, but when I try and add something to a child region, such as the File region on the Menu, I get the error "The exception message was: The region manager does not contain the FileMenuRegion region." However like I said if I change this code regionManager.Regions[RegionNames.FileMenuRegion].Add(menuItem); to this regionManager.Regions[RegionNames.MainMenuRegion].Add(menuItem); everything works fine. Below is the XAML for my menu so you can see the region names and how they are constructed. Any help would greatly be appreciated as this is bewildering and driving me crazy. Menu <telerikNavigation:RadMenu x:Name="menuMain" DockPanel.Dock="Top" prismrgn:RegionManager.RegionName="{x:Static i:RegionNames.MainMenuRegion}" telerik:StyleManager.Theme="{Binding Source={StaticResource settings}, Path=Default.CurrentTheme}"> <telerikNavigation:RadMenuItem Header="{x:Static p:Resources.File}" prismrgn:RegionManager.RegionName="{x:Static i:RegionNames.FileMenuRegion}"> <telerikNavigation:RadMenuItem Header="{x:Static p:Resources.Exit}" Command="{Binding ExitCommand}"> <telerikNavigation:RadMenuItem.Icon> <Image Source="../Resources/Close.png" Stretch="None" /> </telerikNavigation:RadMenuItem.Icon> </telerikNavigation:RadMenuItem> </telerikNavigation:RadMenuItem> </telerikNavigation:RadMenu>

    Read the article

  • Windows 7 - Enable Network DTC Access

    - by Russ Clark
    I have a Visual Studio 2010 Windows Forms application in which I start a transaction using the TransactionScope class. I then Receive a message from a Sql Server Broker Services message queue, which works fine. I next try to call a stored procedure from the same database with a call to my data access layer which is a Visual Studio dataset (xsd file). When I make this second call to the database I get the following error message: The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B). I've seen several posts on the web that talk about Enabling DTC access through dcomcnfg.exe, and allowing DTC to communicate through Windows Firewall. I've done those things, and am still having this problem. I know our remote database server is setup to Enable DTC access, because we are using similar transactions in other projects built with Visual Studio 2008 on Windows XP and Vista. I think there is something specific about Windows 7 and Visual Studio 2010 causing this problem, but haven't been able to find out what it is. Can anyone help with this problem?

    Read the article

  • soapUI - any way to automatically generate input data?

    - by Graham Clark
    I've just started looking at soapUI, and it seems to be a pretty good web service testing tool. It can automatically generate request SOAP messages with all the elements from the WSDL in there, no problem. However, what would be splendid is if it could automatically generate sample random input data, using the WSDL as a guide. For example, if my service is expecting a string, an enumeration, and a date-time, it seems like it wouldn't be too hard for the tool to generate one or more messages with valid values. Is such a feature available in soapUI, either natively or as a plug-in, or am I over-simplifying this?

    Read the article

  • Windows Workflow Foundation 4 (WF4) ReHosting

    - by Russ Clark
    I've been looking at the possibility of ReHosting a WF4 Workflow to be used to debug running Workflows. All the posts and samples I've seen regarding WF4 Rehosting are using a WPF application to initially Host the Workflow, and then use the WorkflowDesigner in ReHosting it. Is there any way to Rehost a Workflow that was hosted in a non WPF application, like ASP.Net MVC?

    Read the article

  • Windows Workflow Foundation 4 (WF4) Error Handling

    - by Russ Clark
    What is the best way to get error messages from a WF4 workflow back to a hosting ASP.NET MVC application? I need the workflow to not terminate, but continue to be active, and then pass a message back to the hosting app regarding the error, so the user can take an alternative action, but I'm not sure how to do that.

    Read the article

  • jquery stop image rotation on mouseover, start on mouseout / hover

    - by Matt Nathanson
    I have built a jQuery rotator to rotate through 3 divs and loop them. I would like to add the functionality on mouse over to "freeze" the current div and then start again on mouse out. I've thought about setting a variable to false at the start of the function and setting it true when it's on it's current frame but I've got my self a bit confused. I've also tried to use the hover function but when using the in and out handlers, I'm confused as to how to stop, restart the animation. function ImageRotate() { var CurrentFeature = "#container" + featureNumber; $(CurrentFeature).stop(false, true).delay(4500).animate({'top' : '330px'}, 3000); var featureNumber2 = featureNumber+1; if ( featureNumber == numberOfFeatures) {featureNumber2 = 1} var NewFeature = "#container" + featureNumber2; $(NewFeature).stop(false, true).delay(4500).animate({'top' : '0px'}, 3000); var featureNumber3 = featureNumber-1; if ( featureNumber == 1) {featureNumber3 = numberOfFeatures}; var OldFeature = "#container" + featureNumber3; $(OldFeature).stop(false, true).delay(4500).css('top' , '-330px'); setTimeout('if (featureNumber == numberOfFeatures){featureNumber = 1} else {featureNumber++}; ImageRotate2()', 7500)}; Any help would be greatly appreciated!! Thanks, Matt

    Read the article

  • Is it possible to make a non-nullable column nullable when used in a view? (sql server)

    - by Matt
    Hi, To start off I have two tables, PersonNames and PersonNameVariations. When a name is searched, it finds the closest name to one of the ones available in PersonNames and records it in the PersonNameVariations table if it's not already in there. I am using a stored proc to search the PersonNames for a passed in PersonNameVariationand return the information on both the PersonName found and the PersonNameVariation that was compared to it. Since I am using the Entity Framework, I needed return a complex type in the Import Function but for some reason it says my current framework doesn't support it. My last option was to use an Entity to return in my stored proc instead. The result that I needed back is the information on both the PersonName that was found and the PersonNameVariation that was recorded. Since I cannot return both entities, I created a view PersonSearchVariationInfo and added it into my Entity Framework in order to use it as the entity to return. The problem is that the search will not always return a Person Name match. It needs to be able to return only the PersonNameVariation data in some cases, meaning that all the fields in the PersonSearchVariationInfo pertaining to PersonName need to be nullable. How can I take my view and make some of the fields nullable? When I do it directly in the Entity Framework I get a mapping error: Error 4 Error 3031: Problem in mapping fragments starting at line 1202:Non-nullable column myproject_vw_PersonSearchVariationInfo.DateAdded in table myproject_vw_PersonSearchVariationInfo is mapped to a nullable entity property. C:\Users\Administrator\Documents\Visual Studio 2010\Projects\MyProject\MyProject.Domain\EntityFramework\MyProjectDBEntities.edmx 1203 15 MyProject.Domain Anyone have any ideas? Thanks, Matt

    Read the article

  • Dealing with the lack of closures in Objective-C

    - by Sean Clark Hess
    Maybe it's just the fact that I've been using http://nodejs.org/ lately, but the lack of closures in Objective-C (iphone) has been really hard to work around. For example, I'm creating service classes. Each service class can have several methods, each of which makes a different URL request. I can use the delegate pattern, but that means that I have to create a new service each time I want to call a method on it (because it has to store the delegate and selector for that request, and new method calls would overwrite them). Even more difficult for me is the fact that I can't easily keep local variables around in the scope for a callback. I have to store anything I want to send back to the delegate on the service class itself, which makes it harder to have more than one method on each class. How do you pros do it? Should I just quit whining and do it another way?

    Read the article

  • Problem with XElement and XslCompiledTransform

    - by Graham Clark
    I'm having some trouble using a combination of XElement and XslCompiledTransform. I've put the sample code I'm using below. If I get my input XML using the GetXmlDocumentXml() method, it works fine. If I use the GetXElementXml() method instead, I get an InvalidOperationException when calling the Transform method of XslComiledTransform: Token Text in state Start would result in an invalid XML document. Make sure that the ConformanceLevel setting is set to ConformanceLevel.Fragment or ConformanceLevel.Auto if you want to write an XML fragment. The CreateNavigator method on both XElement and XmlDocument returns an XPathNavigator. What extra stuff is XmlDocument doing so this all works, and how can I do the same with XElement? Am I just doing something insane? static void Main(string[] args) { XslCompiledTransform stylesheet = GetStylesheet(); // not shown for brevity IXPathNavigable input = this.GetXElementXml(); using (MemoryStream ms = this.TransformXml(input, stylesheet)) { XmlReader xr = XmlReader.Create(ms); xr.MoveToContent(); } } private MemoryStream TransformXml( IXPathNavigable xml, XslCompiledTransform stylesheet) { MemoryStream transformed = new MemoryStream(); XmlWriter writer = XmlWriter.Create(transformed); stylesheet.Transform(xml, null, writer); transformed.Position = 0; return transformed; } private IXPathNavigable GetXElementXml() { var xml = new XElement("x", new XElement("y", "sds")); return xml.CreateNavigator(); } private IXPathNavigable GetXmlDocumentXml() { var xml = new XmlDocument(); xml.LoadXml("<x><y>sds</y></x>"); return xml.CreateNavigator(); }

    Read the article

  • Optimizing Levenshtein Distance Algorithm

    - by Matt
    I have a stored procedure that uses Levenshtein Distance to determine the result closest to what the user typed. The only thing really affecting the speed is the function that calculates the Levenshtein Distance for all the records before selecting the record with the lowest distance (I've verified this by putting a 0 in place of the call to the Levenshtein function). The table has 1.5 million records, so even the slightest adjustment may shave off a few seconds. Right now the entire thing runs over 10 minutes. Here's the method I'm using: ALTER function dbo.Levenshtein ( @Source nvarchar(200), @Target nvarchar(200) ) RETURNS int AS BEGIN DECLARE @Source_len int, @Target_len int, @i int, @j int, @Source_char nchar, @Dist int, @Dist_temp int, @Distv0 varbinary(8000), @Distv1 varbinary(8000) SELECT @Source_len = LEN(@Source), @Target_len = LEN(@Target), @Distv1 = 0x0000, @j = 1, @i = 1, @Dist = 0 WHILE @j <= @Target_len BEGIN SELECT @Distv1 = @Distv1 + CAST(@j AS binary(2)), @j = @j + 1 END WHILE @i <= @Source_len BEGIN SELECT @Source_char = SUBSTRING(@Source, @i, 1), @Dist = @i, @Distv0 = CAST(@i AS binary(2)), @j = 1 WHILE @j <= @Target_len BEGIN SET @Dist = @Dist + 1 SET @Dist_temp = CAST(SUBSTRING(@Distv1, @j+@j-1, 2) AS int) + CASE WHEN @Source_char = SUBSTRING(@Target, @j, 1) THEN 0 ELSE 1 END IF @Dist > @Dist_temp BEGIN SET @Dist = @Dist_temp END SET @Dist_temp = CAST(SUBSTRING(@Distv1, @j+@j+1, 2) AS int)+1 IF @Dist > @Dist_temp SET @Dist = @Dist_temp BEGIN SELECT @Distv0 = @Distv0 + CAST(@Dist AS binary(2)), @j = @j + 1 END END SELECT @Distv1 = @Distv0, @i = @i + 1 END RETURN @Dist END Anyone have any ideas? Any input is appreciated. Thanks, Matt

    Read the article

  • PHP Codeigniter Undefined Offset Error

    - by Matt
    Hello, I am building a Codeigniter shopping cart. On the cart details page I have a form input field allowing the user to type in the quantity required of a product, and a submit button to post the information to the update function. When there is just one item in the cart, when updating the quantity everything works as it should. However, when there is more than one item, changing the quantity of an item and clicking submit results in a ‘Undefined Offset 1: error on the following code in the Model (specifically the two lines within the array) : function validate_update_cart() { $total = $this->cart->total_items(); $item = $this->input->post('rowid'); $qty = $this->input->post('qty'); for($i=0;$i < $total;$i++) { $data = array( 'rowid' => $item[$i], 'qty' => $qty[$i] ); $this->cart->update($data); } } This is the View code to which the above refers: <form action="<?php echo base_url(); ?>home/update" method="post"> <div><input type="hidden" name="rowid[]" value="<?php echo $item['rowid']; ?>"/></div> <div><input type="text" name="qty[]" value="<?php echo $item['qty']; ?>" maxlength="2" class="chg-qty"/></div> <div><input type="submit" value="update" class="update-quantity"/></div> </form> And this is the Controller: function update() { $this->products_model->validate_update_cart(); redirect('cart'); } Please can anyone explain why this is happening? Many thanks, Matt

    Read the article

  • Post on a logged in users facebook wall

    - by Matt Nathanson
    Hey all, I've created a widget that will essentially unlock a music track, providing you post to either your twitter account, or facebook wall. I've signed up through facebook connect and I am able to successfully post onto my own wall... but the functionality I'm looking for is to be able to take ones username and password and automatically log in to facebook, and send my desired message. Like I said, it posts on my wall successfully, it's just not using the username and password from the field to log in to their respective facebooks and post. <?php $facename = $_POST['facename']; $facepass = $_POST['facepass']; define('FB_APIKEY', 'my_api_key'); define('FB_SECRET', 'my_secret_phrase_'); define('FB_SESSION', 'my_session_id'); require_once('facebook.php'); echo "post on wall"; try { $facebook = new Facebook(FB_APIKEY, FB_SECRET); $facebook->api_client->session_key = FB_SESSION; $fetch = array('friends' => array('pattern' => '.*', 'query' => "select uid2 from friend where uid1={$facename}")); echo $facebook->api_client->admin_setAppProperties(array('preload_fql' => json_encode($fetch))); $message = 'I downloaded Automatic Loveletter\'s new single \'To Die For\' here!'; if( $facebook->api_client->stream_publish($message)) echo "Added on FB Wall"; } catch(Exception $e) { echo $e . "<br />"; } ?> Any help in the right direction is greatly appreciated! Thanks, Matt

    Read the article

  • Windows Workflow Foundation 4 (WF4) Delay

    - by Russ Clark
    I'm working with the the Release Candidate of Visual Studio 2010 using Wf4 to write a new workflow for approving resource requests. In my workflow, I would like for a request to expire after a few days if no approval has been made for the request. We did this in WF 3.5 (Visual Studio 2008) by adding a Delay timer into an EventDrivenActivity parallel to the EventDrivenActivity that was awaiting an approver to come and approve the request. If the Delay expired before an approval was made, the EventDrivenActivity would terminate the request. Does anyone know if there is a similar mechanism for doing this in WF4?

    Read the article

  • WCF Service w/ SharePoint Error: Could not find default endpoint element that references contract...

    - by Brian Clark
    Full error message: Could not find default endpoint element that references contract 'PublicationServices.IPublicationService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. I have a SharePoint site that I have already opened a project for in Visual Studio 2010. I also created a project that contains a WCF Service Application and added it to the same solution that contains the project for my SharePoint site. I have created a visual web part in my SharePoint project that I am trying to use to consume the WCF Service. I am doing so like this, from within the user control for my web part: PublicationServiceClient proxy = new PublicationServiceClient(); Just having this line alone in OnPreRender, Page_Load, etc. will generate the above error. I've read previous posts about having to have items in the config file of the WCF service also in the config file of the consuming application. I have done this, I copied this section the Web.config file in my WCF service and have placed it in the system.serviceModel tags of my SharePoint project's app.config file: In other words, this is in both of my config files. When I add this web part to the front page of my SharePoint site though, I get the above error every time. I should also note that I have created a console app that I was able to use with no problems to consume data from this very same WCF service. Any help would be appreciated!

    Read the article

  • Grid View as demoed in iPad

    - by Sean Clark Hess
    I'm trying to develop a grid-like application for the iPad. Has anyone seen a control that displays info in a grid? In the demos they use a grid-like layout in both the iBooks store and the pictures application. Specifically in pictures, they are displaying a dynamic list of data in a grid. I can work around it, of course, but I'd rather use a control if one exists. Thanks!

    Read the article

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