Search Results

Search found 549 results on 22 pages for 'mister ar'.

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

  • Run SQL Scripts from C# application across domains

    - by Saravanan AR
    To run sql script files from my C# application, I referred this. http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/43e8bc3a-1132-453b-b950-09427e970f31 it works perfectly when my machine and DB server are in the same domain. my problem now is, i'm executing this console application from a machine (name: X, user id: abc, domain D1). the SQL server is in another machine (name: Y, domain: D2). I use VPN to connect to machine Y with user id 'abc' and work on SQL in remote desktop. how can i run sql scripts across domains? I use this in a custom activity in my TFS build template as the last step to run the scripts in the target database which is in domain D2. i'm getting this error: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)" is it possible to connect to the DB using the admin user ID of machine Y in domain D2?

    Read the article

  • What is the best (Windows) program launcher?

    - by AR
    One of the biggest general productivity boosters I've used is a good program launcher. I was a long-time user of SlickRun, and I've tried a few others. My current favorite is Executor - by far the best I've used. Other options: Executor: My current favorite Vista Start Menu: Pretty good, actually, but Executor is similar (binds to Win+Z) and much more flexible. Quicksilver: For Macs only, but it seems to be the gold standard against which most other launchers are measured. Google Desktop: Press Ctrl+Ctrl and it's a quick launcher! AutoHotKey: Much,much more than just a launcher - more than I need, really. SlickRun: simple and unobtrusive Launchy: Seems to be the launcher of choice for many StackOverflow users :) Colibri: "Type Ahead - Information at the tip of your wings". Quite a cool concept. Many, many others. Scott Hanselman outlines some more here. I realize that everyone will have their own preferences, but the question is: is there anything that really stands out in terms of speed, features, and especially productivity increase?

    Read the article

  • How to remember last state with Jquery?

    - by AR
    I have a menu with submenus that can be toggled (hide/show type deal). Is there a relatively easy way to remember last state of the menu? (I hide/show submenu when clicking on a header and change a style of the header so the background arrow will change (up/down)). It works fine, but I'd like it to remember last state, so when user goes to another page on the site and gets back, the menu shows the same way as user left it. I'm not really good with cookies so any help will be appreciated. Yeah, menu is generated dynamically from the db using PHP. There are now only 2 headers with submenus, but there will be more so I'd need some method that's "scalable" for any number of submenus. There is also no need to remember it for longer then one visit. Current url is this: http://valleyofgeysers.com/geysers.php

    Read the article

  • What do you use for a RAM disk on Windows Server?

    - by thelsdj
    We currently use AR Soft RAM Disk on some Windows 2003 servers for storing short lived temporary files. Looking forward to a move to 64-bit Windows Server 2008 I'm wondering what options there are for a RAM disk since it appears AR Soft RAM Disk was discontinued in 2005. I'm not looking for any physical disk backing, just a pure RAM disk that appears like a normal drive to Windows. Does anyone have any experience with RAM disks on Windows Server 2008, especially for 64-bit?

    Read the article

  • ffmpeg works on terminal not with PHP exec

    - by goliatone
    If I execute a ffmpeg command from terminal, I get the desired result: ffmpeg -i src.mp4 -ar 22050 -ab 32 -f flv -s 320x240 video.flv Terminal's output ... video:3404kB audio:1038kB global headers:0kB muxing overhead 2.966904% Then, if called via PHP exec: exec("ffmpeg -i src.mp4 -ar 22050 -ab 32 -f flv -s 320x240 video.flv", $o, $v); var_dump($o); var_dump($v); the output is: array(0) { } int(1) Any thoughts on how to approach this?

    Read the article

  • (C#) Label.Text = Struct.Value (Microsoft.VisualStudio.Debugger.Runtime.CrossThreadMessagingException)

    - by Kyle
    I have an app that I'm working on that polls usage from an ISP (Download quota). I've tried threading this via 'new Thread(ThreaProc)' but that didn't work, now trying an IAsyncResult based approach which does the same thing... I've got no idea on how to rectify, please help? The need-to-know: // Global public delegate void AsyncPollData(ref POLLDATA pData); // Class scope: private POLLDATA pData; private void UpdateUsage() { AsyncPollData PollDataProc = new AsyncPollData(frmMain.PollUsage); IAsyncResult result = PollDataProc.BeginInvoke(ref pData, new AsyncCallback(UpdateDone), PollDataProc); } public void UpdateDone(IAsyncResult ar) { AsyncPollData PollDataProc = (AsyncPollData)ar.AsyncState; PollDataProc.EndInvoke(ref pData, ar); // The Exception occurs here: lblStatus.Text = pData.LastError; } public static void PollUsage(ref POLLDATA PData) { PData.LastError = "Some string"; return; }

    Read the article

  • C#: How to set AsyncWaitHandle in Compact Framework?

    - by Thorsten Dittmar
    Hi, I'm using a TcpClient in one of my Compact Framework 2.0 applications. I want to receive some information from a TCP server. As the Compact Framework does not support the timeout mechanisms of the "large" framework, I'm trying to implement my own timeout-thing. Basically, I want to do the following: IAsyncResult result = client.BeginRead(buffer, 0, size, ..., stream); if (!result.AsyncWaitHandle.WaitOne(5000, false)) // Handle timeout private void ReceiveFinished(IAsyncResult ar) { NetworkStream stream = (NetworkStream)ar.AsyncState; int numBytes = stream.EndRead(ar); // SIGNAL IASYNCRESULT.ASYNCWAITHANDLE HERE ... HOW?? } I'd like to call Set for the IAsyncResult.AsyncWaitHandle, but it doesn't have such a method and I don't know which implementation to cast it to. How do I set the wait handle? Or is it automatically set by calling EndRead? The documentation suggests that I'd have to call Set myself... Thanks for any help!

    Read the article

  • How should I do custom sort in Python 3?

    - by S.Mark
    In Python 2.x, I could pass custom function to sorted and .sort functions >>> x=['kar','htar','har','ar'] >>> >>> sorted(x) ['ar', 'har', 'htar', 'kar'] >>> >>> sorted(x,cmp=customsort) ['kar', 'htar', 'har', 'ar'] Because, in My language, consonents are comes with this order "k","kh",....,"ht",..."h",...,"a" But In Python 3.x, looks like I could not pass cmp keyword >>> sorted(x,cmp=customsort) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'cmp' is an invalid keyword argument for this function Is there any alternatives or should I write my own sorted function too?

    Read the article

  • how to omit extra bits in a file?

    - by thinthinyu
    I want to omit extra bit in txt file.eg ....ÿ 0111111110111101100011011010010001 in this string we want to omit extra bit "ÿ " which is appeared when we save a binary string. Save fun is as follow. please help me. void LFSR_ECDlg::Onsave() { this-UpdateData(); CFile bitstream; char strFilter[] = { "Stream Records (*.mpl)|*.mpl| (*.pis)|*.pis|All Files (*.*)|*.*||" }; CFileDialog FileDlg(FALSE, ".mpl", NULL, 0, strFilter); if( FileDlg.DoModal() == IDOK ) { if( bitstream.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite) == FALSE ) return; CArchive ar(&bitstream, CArchive::store); CString txt; txt=""; txt.Format("%s",m_B);//by ANO AfxMessageBox (txt);//by ANO txt=m_B;//by ANO ar <<txt;//by ANO ar.Close(); } else return; bitstream.Close();

    Read the article

  • Jobs magically disappear from queue (delayed_job mongoid 2 on heroku)

    - by Hayk Saakian
    lets say i do something like arrs = Article.where(:body => nil) i'll have arrs.count is let's say 900 and i do arrs.each do |ar| ar.delay.download_via_diffbot #a method that takes some time, does some http, and writes a non-nil value to ar.body end now i'll watch the logs, and a wait a few minutes on ~5 dynos do the jobs, and do a count again: arrs.count is now ~800 so wtf, i thought i just told my workers to do ~900 jobs, what happened to the other 800? i can confirm that i'm only making ~100 HTTP requests b/c the api reporting shows me this, also simply watching the logs is telling enough that 900 jobs are not happening.

    Read the article

  • Intellitrace bug causes &ldquo;Operation could destabilize the runtime&rdquo; exception

    - by Magnus Karlsson
    We cant use it when we use simplemembership to handle external authorizations.   Server Error in '/' Application. Operation could destabilize the runtime. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Security.VerificationException: Operation could destabilize the runtime. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [VerificationException: Operation could destabilize the runtime.] DotNetOpenAuth.OpenId.Messages.IndirectSignedResponse.GetSignedMessageParts(Channel channel) +943 DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElement.GetExtensionsDictionary(IProtocolMessage message, Boolean ignoreUnsigned) +282 DotNetOpenAuth.OpenId.ChannelElements.<GetExtensions>d__a.MoveNext() +279 DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElement.ProcessIncomingMessage(IProtocolMessage message) +594 DotNetOpenAuth.Messaging.Channel.ProcessIncomingMessage(IProtocolMessage message) +933 DotNetOpenAuth.OpenId.ChannelElements.OpenIdChannel.ProcessIncomingMessage(IProtocolMessage message) +326 DotNetOpenAuth.Messaging.Channel.ReadFromRequest(HttpRequestBase httpRequest) +1343 DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.GetResponse(HttpRequestBase httpRequestInfo) +241 DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.GetResponse() +361 DotNetOpenAuth.AspNet.Clients.OpenIdClient.VerifyAuthentication(HttpContextBase context) +136 DotNetOpenAuth.AspNet.OpenAuthSecurityManager.VerifyAuthentication(String returnUrl) +984 Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.VerifyAuthenticationCore(HttpContextBase context, String returnUrl) +333 Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.VerifyAuthentication(String returnUrl) +192 PrioMvcWebRole.Controllers.AccountController.ExternalLoginCallback(String returnUrl) in c:hiddenforyou lambda_method(Closure , ControllerBase , Object[] ) +127 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +250 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39 System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +87 System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +439 System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +439 System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +15 System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +34 System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +221 System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +42 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +523 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +176 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

    Read the article

  • SQL SERVER – Implementing IF … THEN in SQL SERVER with CASE Statements

    - by Pinal Dave
    Here is the question I received the other day in email. “I have business logic in my .net code and we use lots of IF … ELSE logic in our code. I want to move the logic to Stored Procedure. How do I convert the logic of the IF…ELSE to T-SQL. Please help.” I have previously received this answer few times. As data grows the performance problems grows more as well. Here is the how you can convert the logic of IF…ELSE in to CASE statement of SQL Server. Here are few of the examples: Example 1: If you are logic is as following: IF -1 < 1 THEN ‘TRUE’ ELSE ‘FALSE’ You can just use CASE statement as follows: -- SQL Server 2008 and earlier version solution SELECT CASE WHEN -1 < 1 THEN 'TRUE' ELSE 'FALSE' END AS Result GO -- SQL Server 2012 solution SELECT IIF ( -1 < 1, 'TRUE', 'FALSE' ) AS Result; GO If you are interested further about how IIF of SQL Server 2012 works read the blog post which I have written earlier this year . Well, in our example the condition which we have used is pretty simple but in the real world the logic can very complex. Let us see two different methods of how we an do CASE statement when we have logic based on the column of the table. Example 2: If you are logic is as following: IF BusinessEntityID < 10 THEN FirstName ELSE IF BusinessEntityID > 10 THEN PersonType FROM Person.Person p You can convert the same in the T-SQL as follows: SELECT CASE WHEN BusinessEntityID < 10 THEN FirstName WHEN BusinessEntityID > 10 THEN PersonType END AS Col, BusinessEntityID, Title, PersonType FROM Person.Person p However, if your logic is based on multiple column and conditions are complicated, you can follow the example 3. Example 3: If you are logic is as following: IF BusinessEntityID < 10 THEN FirstName ELSE IF BusinessEntityID > 10 AND Title IS NOT NULL THEN PersonType ELSE IF Title = 'Mr.' THEN 'Mister' ELSE 'No Idea' FROM Person.Person p You can convert the same in the T-SQL as follows: SELECT CASE WHEN BusinessEntityID < 10 THEN FirstName WHEN BusinessEntityID > 10 AND Title IS NOT NULL THEN PersonType WHEN Title = 'Mr.' THEN 'Mister' ELSE 'No Idea' END AS Col, BusinessEntityID, Title, PersonType FROM Person.Person p I hope this solution is good enough to convert the IF…ELSE logic to CASE Statement in SQL Server. Let me know if you need further information about the same. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Function, SQL Query, SQL Server, SQL Tips and Tricks, T SQL

    Read the article

  • Async CTP (C# 5): How to make WCF work with Async CTP

    - by javarg
    If you have recently downloaded the new Async CTP you will notice that WCF uses Async Pattern and Event based Async Pattern in order to expose asynchronous operations. In order to make your service compatible with the new Async/Await Pattern try using an extension method similar to the following: WCF Async/Await Method public static class ServiceExtensions {     public static Task<DateTime> GetDateTimeTaskAsync(this Service1Client client)     {         return Task.Factory.FromAsync<DateTime>(             client.BeginGetDateTime(null, null),             ar => client.EndGetDateTime(ar));     } } The previous code snippet adds an extension method to the GetDateTime method of the Service1Client WCF proxy. Then used it like this (remember to add the extension method’s namespace into scope in order to use it): Code Snippet var client = new Service1Client(); var dt = await client.GetDateTimeTaskAsync(); Replace the proxy’s type and operation name for the one you want to await.

    Read the article

  • Daily tech links for .net and related technologies - May 10-12, 2010

    - by SanjeevAgarwal
    Daily tech links for .net and related technologies - May 10-12, 2010 Web Development jQuery Templates and Data Linking (and Microsoft contributing to jQuery) - ScottGu ASP.NET MVC and jQuery Part 4 – Advanced Model Binding - Mister James Creating an ASP.NET report using Visual Studio 2010 - Part 1 & Part 2 & Part 3 - rajbk Caching Images in ASP.NET MVC -Evan How to Localize an ASP.NET MVC Application - mikeceranski Localization in ASP.NET MVC 2 using ModelMetadata - Raj Kiamal Web Design...(read more)

    Read the article

  • How Does AutoPatch Handle Shared E-Business Suite Products?

    - by Steven Chan
    Space... is big. Really big. You just won't believe how vastly hugely mindbogglingly big it is.~ Douglas AdamsDouglas Adams could have been talking about the E-Business Suite.  Depending upon whom you ask (and how you count them), there are between 200 to 240 products in Oracle E-Business Suite.  The products that make up Oracle E-Business Suite are tightly integrated. Some of these products are known as shared or dependent products. Installed and registered automatically by Rapid Install, such products depend on components from other products for full functionality.For example:General Ledger (GL) depends on Application Object Library (FND) and Oracle Receivables (AR)Inventory (INV) depends on FND and GLReceivables (AR) depends on FND, INV, and GLIt can sometimes be challenging to craft a patching strategy for these types of product dependencies.  To help you with that, our Applications Database (AD) team has recently published a new document that describes the actions AutoPatch takes with shared Oracle E-Business Suite products:Patching Shared Oracle E-Business Suite Products (Note 1069099.1)

    Read the article

  • How can I convert .mp4 files to .3gp using ffmpeg?

    - by harisibrahimkv
    I would like to download a few videos from youtube and convert them to 3gp so that I can play them on my phone. I would like to know how this can be done using ffmpeg. I tried the various results on the net only to get the following errors. I used: ffmpeg -i dil.mp4 -sameq -ab 64k -ar 44100 dilenada.3gp I got: Unsupported codec for output stream #0.1 Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) - 29.92 (359/12) I used: ffmpeg -y -i dil.mp4 -r 20 -s 352x288 -b 400k -acodec libfaac -ac 1 -ar 2000 -ab 24k dilenada.3gp I got: Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 29.92 (359/12) Unknown encoder 'libfaac' What am I doing wrong?

    Read the article

  • “Could not create the file”, “Access is denied” and “Unrecoverable build error” in building setup project in VS 2008

    - by Mister Cook
    When building a setup project I get a message: Error with setup build: Error 27 Could not create the file 'C:\Users\MyName\AppData\Local\Temp\VSI1E1A.tmp' 'Access is denied.' I have tried the following (from http://support.microsoft.com/kb/329214/EN-US) regsvr32 "C:\Program Files (x86)\Common Files\Microsoft Shared\MSI Tools\mergemod.dll" The DLL registers but this does not fix my problem. Also, I tried a Clean build, deleting the temp folder, ran VS2008 as administratror, restart my PC but it occurs every time. I have no anti-virus software running and running on Windows 7 64-bit. This operation worked fine until recently. I have read many other users see this but found no solution. The only half solution I found was to edit setup properties and switch to Package files as Loose uncompressed files. This works but is not ideal as I need a full installer.

    Read the article

  • Windows: Hotkey assistance

    - by Mister X
    Well, I'm wondering is there's any way to link a single key on my keyboard to a file. I wish to execute the file upon pressing the key. I tried using the built in shortcut hotkey system and it didn't work out for me. It really needs to be one single key.

    Read the article

  • PageMethod with Custom Handler

    - by Mister Cook
    I have a page based web method which works fine, using [WebMethod], i.e [WebMethod] public static void DoSomethingOnTheServer() { } I also have a custom page handler to make SEO friendly URLs possible, e.g http://localhost/MySite/A_nice_url.ext = http://localhost/MySite/page.aspx?id=1 I am using Server.Transfer in my ProcessRequest handler to achieve this. This all works fine. Also, my page method works fine when the user requests the URL such as: http://localhost/MySite/page.aspx?id=1 However, when the user requests the custom handled URL, i.e. http://localhost/MySite/A_nice_url.ext The client reports that the PageMethod has been successfully completed, but it has not been called at all. I'm guessing it has something to do with my custom handler, so I have modified it to include PathInfo: public void ProcessRequest(HttpContext context) { // ... (code to determine id) ... // Transfer to the required page string actualPath = "~/page.aspx" + context.Request.PathInfo + "?id=" + determinedId; context.Server.Transfer(actualPath); } So now if a PageMethod is called, it will result in: http://localhost/MySite/page.aspx/DoSomethingOnTheServer?id=1 I'm wondering if this is the correct syntax for calling a PageMethod. When I try Server.Transfer reports: Error executing child request for /MySite/page.aspx/DoSomethingOnTheServer I've experimented with HttpContext.RewritePath but not sure how to actually make it perform the request. This does not seem to work, any ideas?

    Read the article

  • Python: Count lines and differentiate between them

    - by Mister X
    I'm using an application that gives a timed output based on how many times something is done in a minute, and I wish to manually take the output (copy paste) and have my program, and I wish to count how many times each minute it is done. An example output is this: 13:48 An event happened. 13:48 Another event happened. 13:49 A new event happened. 13:49 A random event happened. 13:49 An event happened. So, the program would need to understand that 2 things happened at 13:48, and 3 at 13:49. I'm not sure how the information would be stored, but I need to average them after, to determine an average of how often it happens. Sorry for being so complicated!

    Read the article

  • Calling Object Methods in Code

    - by Mister R2
    I'm a bit new to PHP, and I'm more experienced with strongly-typed languages such as JAVA, C# or C++.I'm currently writing a web tool in PHP, and I am having an issue trying to do what I want. The simple idea of what I want to do in code is run through some emails I used PHP-IMAP to get. I then create email objects (a class I defined), and put them in an array. Later on the code, however, I cycle through those emails to display them. However, as you might have guessed I'd have an issue with, I try to use an Email Class object method in that later loop -- and I'm pretty sure PHP doesn't know that the variables in the array happen to be Email Class objects! I wrote a toString method, and I want to call it in the loop. While I don't need to do this for the final version of this tool, I would like to find out what I'm missing. This is the class and the loop where I'm calling the method: include 'imap_email_interface.php'; class ImapEmail implements imap_email_interface { // Email data var $msgno; var $to; var $from; var $subject; var $body; var $attachment; // Email behavior /* PHP 4 ~ legacy constructor */ public function ImapEmail($message_number) { $this->__construct(); $this->msgno = $message_number; } /* PHP 5 Constructor */ public function __construct($message_number) { $this->msgno = $message_number; } public function send($send_to) { // Not Yet Needed! Seriously! } public function setHeaderDirectly($TO, $FROM, $SUBJECT) { $this->to = $TO; $this->from = $FROM; $this->subject = $SUBJECT; } public function setHeaderIndirectly($HEADER) { if (isset($HEADER->to[0]->personal)) $this->to = '"'.$HEADER->to[0]->personal.'", '.$HEADER->to[0]->mailbox.'@'.$HEADER->to[0]->host; else $this->to = $HEADER->to[0]->mailbox.'@'.$HEADER->to[0]->host; $this->from = '"'.$HEADER->from[0]->personal.'", '.$HEADER->from[0]->mailbox.'@'.$HEADER->from[0]->host; $this->subject = $HEADER->subject; } public function setBody($BODY) { $this->body = $BODY; } public function setAttachment($ATTCH) { $this->attachment = $ATTCH; } public function toString() { $str = '[TO]: ' . $this->to . '<br />' . '[FROM]: ' . $this->from . '<br />' . '[SUBJECT]: ' . $this->subject . '<br />'; $str .= '[Attachment]: '.$this->attachment.'<br />'; return $str; } } ?> The Loop: foreach ($orderFileEmails as $x) { $x->toString(); echo '<br /><br />'; } Any ideas?

    Read the article

  • Matching Line Boundaries in a Regular Expression (Pattern.MULTILINE/(?m)) is broken in Java?

    - by Mister M. Bean
    The example on http://www.exampledepot.com/egs/java.util.regex/Line.html gives false for me twice but should'nt! Why? CharSequence inputStr = "abc\ndef"; String patternStr = "abc$"; // Compile with multiline enabled Pattern pattern = Pattern.compile(patternStr, Pattern.MULTILINE); Matcher matcher = pattern.matcher(inputStr); boolean matchFound = matcher.find(); // true // Use an inline modifier to enable multiline mode matchFound = pattern.matches(".*abc$.*", "abc\r\ndef"); // false System.out.println(matchFound); // false matchFound = pattern.matches("(?m).*abc$.*", "abc\r\ndef"); // true System.out.println(matchFound);// false !!!!!

    Read the article

  • Whats the difference between \z and \Z in a regular expression and when and how do I use it?

    - by Mister M. Bean
    From http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html: \Z The end of the input but for the final terminator, if any \z The end of the input But what does it mean in practice? Can you give me an example when I use either the \Z or \z. In my test I thought that "StackOverflow\n".matches("StackOverflow\\z") will return true and "StackOverflow\n".matches("StackOverflow\\Z") returns false. But actually both return false. Where is the mistake?

    Read the article

  • How to rotate a figure without moving around the stage(actionscript)

    - by Mister PHP
    package { import flash.display.MovieClip; import flash.events.Event; public class Bullet extends MovieClip { private var mc:MovieClip; public function Bullet() { mc = new MovieClip(); mc.graphics.beginFill(0); mc.graphics.drawRect(120, 120, 40, 40); mc.graphics.endFill(); addChild(mc); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function onEnterFrame(e:Event):void{ mc.rotation += 10; } } } how can i make the rotation of the circle without moving him around the stage, just staying in the place he was before and just rotate, not moving anywhere is that posible?? if you try this code you'll see that the circle is rotating and moving around the stage, so that i don't want, how can i change this?

    Read the article

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