Search Results

Search found 229 results on 10 pages for 'samurai fox'.

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

  • In Objective C, what's the best way to extract multiple substrings of text around multiple patterns?

    - by Matt
    For one NSString, I have N pattern strings. I'd like to extract substrings "around" the pattern matches. So, if i have "the quick brown fox jumped over the lazy dog" and my patterns are "brown" and "lazy" i would like to get "quick brown fox" and "the lazy dog." However, the substrings don't necessarily need to be delimited by whitespace. I have a hunch that there's a very easy solution to this, but I admit a disturbing lack of knowledge of Objective C string functions.

    Read the article

  • The dynamic Type in C# Simplifies COM Member Access from Visual FoxPro

    - by Rick Strahl
    I’ve written quite a bit about Visual FoxPro interoperating with .NET in the past both for ASP.NET interacting with Visual FoxPro COM objects as well as Visual FoxPro calling into .NET code via COM Interop. COM Interop with Visual FoxPro has a number of problems but one of them at least got a lot easier with the introduction of dynamic type support in .NET. One of the biggest problems with COM interop has been that it’s been really difficult to pass dynamic objects from FoxPro to .NET and get them properly typed. The only way that any strong typing can occur in .NET for FoxPro components is via COM type library exports of Visual FoxPro components. Due to limitations in Visual FoxPro’s type library support as well as the dynamic nature of the Visual FoxPro language where few things are or can be described in the form of a COM type library, a lot of useful interaction between FoxPro and .NET required the use of messy Reflection code in .NET. Reflection is .NET’s base interface to runtime type discovery and dynamic execution of code without requiring strong typing. In FoxPro terms it’s similar to EVALUATE() functionality albeit with a much more complex API and corresponiding syntax. The Reflection APIs are fairly powerful, but they are rather awkward to use and require a lot of code. Even with the creation of wrapper utility classes for common EVAL() style Reflection functionality dynamically access COM objects passed to .NET often is pretty tedious and ugly. Let’s look at a simple example. In the following code I use some FoxPro code to dynamically create an object in code and then pass this object to .NET. An alternative to this might also be to create a new object on the fly by using SCATTER NAME on a database record. How the object is created is inconsequential, other than the fact that it’s not defined as a COM object – it’s a pure FoxPro object that is passed to .NET. Here’s the code: *** Create .NET COM InstanceloNet = CREATEOBJECT('DotNetCom.DotNetComPublisher') *** Create a Customer Object Instance (factory method) loCustomer = GetCustomer() loCustomer.Name = "Rick Strahl" loCustomer.Company = "West Wind Technologies" loCustomer.creditLimit = 9999999999.99 loCustomer.Address.StreetAddress = "32 Kaiea Place" loCustomer.Address.Phone = "808 579-8342" loCustomer.Address.Email = "[email protected]" *** Pass Fox Object and echo back values ? loNet.PassRecordObject(loObject) RETURN FUNCTION GetCustomer LOCAL loCustomer, loAddress loCustomer = CREATEOBJECT("EMPTY") ADDPROPERTY(loCustomer,"Name","") ADDPROPERTY(loCustomer,"Company","") ADDPROPERTY(loCUstomer,"CreditLimit",0.00) ADDPROPERTY(loCustomer,"Entered",DATETIME()) loAddress = CREATEOBJECT("Empty") ADDPROPERTY(loAddress,"StreetAddress","") ADDPROPERTY(loAddress,"Phone","") ADDPROPERTY(loAddress,"Email","") ADDPROPERTY(loCustomer,"Address",loAddress) RETURN loCustomer ENDFUNC Now prior to .NET 4.0 you’d have to access this object passed to .NET via Reflection and the method code to do this would looks something like this in the .NET component: public string PassRecordObject(object FoxObject) { // *** using raw Reflection string Company = (string) FoxObject.GetType().InvokeMember( "Company", BindingFlags.GetProperty,null, FoxObject,null); // using the easier ComUtils wrappers string Name = (string) ComUtils.GetProperty(FoxObject,"Name"); // Getting Address object – then getting child properties object Address = ComUtils.GetProperty(FoxObject,"Address");    string Street = (string) ComUtils.GetProperty(FoxObject,"StreetAddress"); // using ComUtils 'Ex' functions you can use . Syntax     string StreetAddress = (string) ComUtils.GetPropertyEx(FoxObject,"AddressStreetAddress"); return Name + Environment.NewLine + Company + Environment.NewLine + StreetAddress + Environment.NewLine + " FOX"; } Note that the FoxObject is passed in as type object which has no specific type. Since the object doesn’t exist in .NET as a type signature the object is passed without any specific type information as plain non-descript object. To retrieve a property the Reflection APIs like Type.InvokeMember or Type.GetProperty().GetValue() etc. need to be used. I made this code a little simpler by using the Reflection Wrappers I mentioned earlier but even with those ComUtils calls the code is pretty ugly requiring passing the objects for each call and casting each element. Using .NET 4.0 Dynamic Typing makes this Code a lot cleaner Enter .NET 4.0 and the dynamic type. Replacing the input parameter to the .NET method from type object to dynamic makes the code to access the FoxPro component inside of .NET much more natural: public string PassRecordObjectDynamic(dynamic FoxObject) { // *** using raw Reflection string Company = FoxObject.Company; // *** using the easier ComUtils class string Name = FoxObject.Name; // *** using ComUtils 'ex' functions to use . Syntax string Address = FoxObject.Address.StreetAddress; return Name + Environment.NewLine + Company + Environment.NewLine + Address + Environment.NewLine + " FOX"; } As you can see the parameter is of type dynamic which as the name implies performs Reflection lookups and evaluation on the fly so all the Reflection code in the last example goes away. The code can use regular object ‘.’ syntax to reference each of the members of the object. You can access properties and call methods this way using natural object language. Also note that all the type casts that were required in the Reflection code go away – dynamic types like var can infer the type to cast to based on the target assignment. As long as the type can be inferred by the compiler at compile time (ie. the left side of the expression is strongly typed) no explicit casts are required. Note that although you get to use plain object syntax in the code above you don’t get Intellisense in Visual Studio because the type is dynamic and thus has no hard type definition in .NET . The above example calls a .NET Component from VFP, but it also works the other way around. Another frequent scenario is an .NET code calling into a FoxPro COM object that returns a dynamic result. Assume you have a FoxPro COM object returns a FoxPro Cursor Record as an object: DEFINE CLASS FoxData AS SESSION OlePublic cAppStartPath = "" FUNCTION INIT THIS.cAppStartPath = ADDBS( JustPath(Application.ServerName) ) SET PATH TO ( THIS.cAppStartpath ) ENDFUNC FUNCTION GetRecord(lnPk) LOCAL loCustomer SELECT * FROM tt_Cust WHERE pk = lnPk ; INTO CURSOR TCustomer IF _TALLY < 1 RETURN NULL ENDIF SCATTER NAME loCustomer MEMO RETURN loCustomer ENDFUNC ENDDEFINE If you call this from a .NET application you can now retrieve this data via COM Interop and cast the result as dynamic to simplify the data access of the dynamic FoxPro type that was created on the fly: int pk = 0; int.TryParse(Request.QueryString["id"],out pk); // Create Fox COM Object with Com Callable Wrapper FoxData foxData = new FoxData(); dynamic foxRecord = foxData.GetRecord(pk); string company = foxRecord.Company; DateTime entered = foxRecord.Entered; This code looks simple and natural as it should be – heck you could write code like this in days long gone by in scripting languages like ASP classic for example. Compared to the Reflection code that previously was necessary to run similar code this is much easier to write, understand and maintain. For COM interop and Visual FoxPro operation dynamic type support in .NET 4.0 is a huge improvement and certainly makes it much easier to deal with FoxPro code that calls into .NET. Regardless of whether you’re using COM for calling Visual FoxPro objects from .NET (ASP.NET calling a COM component and getting a dynamic result returned) or whether FoxPro code is calling into a .NET COM component from a FoxPro desktop application. At one point or another FoxPro likely ends up passing complex dynamic data to .NET and for this the dynamic typing makes coding much cleaner and more readable without having to create custom Reflection wrappers. As a bonus the dynamic runtime that underlies the dynamic type is fairly efficient in terms of making Reflection calls especially if members are repeatedly accessed. © Rick Strahl, West Wind Technologies, 2005-2010Posted in COM  FoxPro  .NET  CSharp  

    Read the article

  • How to run RMI in NetBeans?

    - by Samurai
    We can run RMI in netbeans by following steps. Right click build.xml - Run target - Other targets - startRMI But what i need is to start RMI registry through Java code. Is it possible? Help me.

    Read the article

  • Adding look and feel into java application

    - by Samurai
    I am working with NetBeans 6.5 IDE and i have downloaded a look and feel jar file. I added that to NetBeans by palette manager but i don't know how to use it to my application using code. Anybody please tell me that how to add look and feel into my application? Thanks..

    Read the article

  • create jar file with images and database

    - by Samurai
    Hi I am using NetBeans IDE and I have my images (what I am using in my project) in a folder named Images. When I am building jar it doesn't take that images. The code I am using to set image is, buttonObj.setIcon(new ImageIcon("\Images\a.jpg") any help please.

    Read the article

  • .NET Framework 4 updates breaking MMC.exe and other CLR.dll Exceptions

    - by Fox
    I've seen this issue floating around the net the last few weeks and I'm facing exactly the same issue. My servers are set to auto install updates using Windows update (not clever, I know), and since about 2 months ago, I've been getting strange Exceptions. The first thing that happens is that MMC.exe just crashes randomly and sometimes on startup of the console. The exception in the Windows Application log is as follow: Faulting application name: mmc.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc808 Faulting module name: mscorwks.dll, version: 2.0.50727.5448, time stamp: 0x4e153960 Secondly, on the same server, I have some custom Windows services which constantly crash with exceptions : Faulting application name: Myservice.exe, version: 1.0.0.0, time stamp: 0x4f44cb11 Faulting module name: clr.dll, version: 4.0.30319.239, time stamp: 0x4e181a6d Exception code: 0xc0000005 Fault offset: 0x000378aa The exception is not in my code. I've tested and retested it. My server has the following .NET Framework updates installed: Does anyone have any idea?

    Read the article

  • Windows 7 : Any way to disable "show caracter" in WIFI network properties?!

    - by Fox
    Hi everyone, Here's my issue. I'm working in a school as IT Tech and I'm currently planning to roll out Windows 7 on students laptop. The issue is : When you go to the properties of a WIFI network, you have the fields to input the WIFI key, WPA2 key here in my case, and you also have a checkbox that allow you to "unmask" the caracters of the wifi key. This is actually the problem. Anyone who can access the WIFI network properties, will be able to see the WIFI key, which is really an issue in a school envrironnement where student are all eager to get the key for their precious IPod Touch, what I don't want to happen for obvious reasons... So, is there a way to disable that checkbox or else, make the field cleared out when the checkbox is checked, just like it was on Windows XP or Vista? Thanks all for your answer.

    Read the article

  • Windows 8.1 unable to play Music or the Audio from videos through Optical Out

    - by Zion Fox
    I am having an issue with my audio output, where any music file, and the audio side of videos are not being played through my optical audio output. I am running a Realtek HD Audio device built on Revision 1.0 on a GA-P55A-UD6 Gigabyte Board, which runs through it's optical output to an Astro A40 Mixamp, which does some upscaling before sending it to the headset. Now, notification sounds, and sounds/videos/music played through the browser or programs like Skype or games are working fine. This seems to specifically effect Foobar2000 and Media Player Classic. I have updated these two programs to their latest revisions, in addition to the soundcard drivers to no avail, and searching the error code thrown by Foobar2000: Unrecoverable playback error: The parameter is incorrect. (0x80070057) through Google returns not very helpful results, other than the one potentially mentioning DRM. This issue I am having a very hard time resolving, and am wondering if anyone here has experienced similar issues after updating.

    Read the article

  • Laptop battery: is voltage really important to respect?

    - by Fox
    I got an Acer Aspire 5100 and I just bought a new battery (after the stock battery just died yesterday). But I saw something after buying and I'm wondering whether it's really important or not. My stock battery was a 6-cell 4000mah 11.1v and the new battery is an 8-cell 4800mah 14.8v . I know that 8-cell and 4800mah is okay, but what about the 14.8v instead of 11.1v? The battery description says it's compatible with my laptop model (AS5100, model BL51), but the voltage difference makes me wonder. Will the laptop only take what it needs? Or will it be getting 14.8v straight in the brain? I know that my wall plug claims to output 19v, so logically I'm thinking a higher voltage battery shouldn't be a problem. Am I correct in thinking this? Thanks in advance for your answers!

    Read the article

  • Setup 2003 R2 Radius server to work on vista/seven

    - by Fox
    Hi All, I'm currently trying to configure my 2003 R2 server RADIUS module to enable WIFI client to authenticate throught my Active Directory. The RADIUS server use MS-CHAP V2 as encryption method. I got several Access Point running DD-WRT, configured to use WPA2-Enterprise security that use Radius Server. Everything is setup, and almost working. When I say almost working, I mean, I can login using my AD Credential on my IPod or even on a MacBook running OS X, Windows XP also work with some little tweak in connection properties. The problem is Windows Vista or Windows Seven clients computers that are not inside domain. It doesn't work at all, it doesn't even prompt for user/password/domain. I already install the patch for IAS to make the certsrv compatible with Vista and Seven, but still doesn't work. Anyone ever encounter the same issue I have right now? I'm searching for a solution to this for several already and still not find anything. Looks like many people have the same issue too. Thanks all for you eventual answers.

    Read the article

  • Laptop connected to external monitor results in desktop overflow

    - by Andrew Fox
    I have a laptop (MSi FX600) connected to an external monitor (Toshiba 19AV500U) with the screen resolution set to the monitors recommended setting of 1440x900. The problem is the desktop is overflowing the display, meaning all edges of the desktop are cut off, so I cannot see the close, minimize buttons on the top and I only see half of the taskbar at the bottom. I have tried many different resolutions but none of them solve the problem. I have had this same problem when connecting to other external monitors in the past, but not all of them, it seems to be fairly random. I have tried to find a way to manually adjust the resolution but I cannot see a way to do this in my settings. All windows updates are up to date, I am connecting through an HDMI cable and I have it set to display only on the external monitor and not extended desktop.

    Read the article

  • What is the real meaning of the "Select a language [for] non-Unicode programs..." dialog?

    - by Joshua Fox
    What is the real meaning of the "Select a language to match the language version of the non-Unicode programs you want to use" dialog under Control Panel-Regional Settings-Advanced in WinXP and Win2003? According to the dialog text, Windows will use this to display the resource strings such as menus. The treatment of text files is application-specific, so this setting will not affect that. But can I expect any other change in behavior from this setting? Any insights into what is really going wrong?

    Read the article

  • Is anyone else having issues with opening app links on iOS6 iPad3?

    - by lindon fox
    Links to ios apps (to the app store) are not working for me on my iPad 3/iOS 6. I thought it was my code causing the problem initially, but then I tried it on an iPhone, and an older iPad 2 and they both worked. I looked into it further and it seems no links are working (that I can find). I have googled, but I have not found anything yet. Is there anyone else having this problem? Example: link - this link will work on my computer and phone, but not on my iPad3 running iOS6 - it will just bring up the app store app showing the main screen.

    Read the article

  • jQuery does not return a JSON object to Firebug when JSON is generated by PHP

    - by Keyslinger
    The contents of test.json are: {"foo": "The quick brown fox jumps over the lazy dog.","bar": "ABCDEFG","baz": [52, 97]} When I use the following jQuery.ajax() call to process the static JSON inside test.json, $.ajax({ url: 'test.json', dataType: 'json', data: '', success: function(data) { $('.result').html('<p>' + data.foo + '</p>' + '<p>' + data.baz[1] + '</p>'); } }); I get a JSON object that I can browse in Firebug. However, when using the same ajax call with the URL pointing instead to this php script: <?php $arrCoords = array('foo'=>'The quick brown fox jumps over the lazy dog.','bar'=>'ABCDEFG','baz'=>array(52,97)); echo json_encode($arrCoords); ?> which prints this identical JSON object: {"foo":"The quick brown fox jumps over the lazy dog.","bar":"ABCDEFG","baz":[52,97]} I get the proper output in the browser but Firebug only reveals only HTML. There is no JSON tab present when I expand GET request in Firebug.

    Read the article

  • Confused about Ajax, Basic XMLHTTPRequest

    - by George
    I'm confused about the basics of Ajax. Right now I'm just trying to build a basic Ajax request using plain JavaScript to better understand how things work (as opposed to using Jquery or another library). First off, do you always need to pass a parameter or can you just retrieve data? In its most basic form, could I have an html document (located on the same server) that just has plain text, and another html document retrieve that text and load it on to the page? So I have fox.html with just text that says "The quick brown fox jumped over the lazy dog." and I want to pull in that text into ajax.html on load. I have the following on ajax.html <script type="text/javascript"> function createAJAX() { var ajax = new XMLHttpRequest(); ajax.open('get','fox.html',true); ajax.send(null); ajax = ajax.responseText; return(ajax); } document.write(createAJAX()); </script> This currently writes nothing when I load the page.

    Read the article

  • How to store dynamic references to parts of a text

    - by Antoine L
    In fact, my question concerns an algorithm. I need to be able to attach annotations to certain parts of a text, like a word or a group of words. The first thing that came to me to do so is to store the position of this part (indexes) in the text. For instance, in the text 'The quick brown fox jumps over the lazy dog', I'd like to attach an annotation to 'quick brown fox', so the indexes of the annotation would be 4 - 14. But since the text is editable (other annotations could provoke a modification from text's author), the annoted part is likely to move (the indexes could change). In fact, I don't know how to update the indexes of the annoted part. What if the text becomes 'Everyday, the quick brown fox jumps over the lazy dog' ? I guess I have to watch every change of the text in the front-end application ? The front-end part of the application will be HTML with Javascript. I will be using PHP to develop the back-end part and every text and annotation will be stored in a database.

    Read the article

  • Browser dependent problem rendering WMD with Showdown.js?

    - by CMPalmer
    This should be easy (at least no one else seems to be having a similar problem), but I can't see where it is breaking. I'm storing Markdown'ed text in a database that is entered on a page in my app. The text is entered using WMD and the live preview looks correct. On another page, I'm retrieving the markdown text and using Showdown.js to convert it back to HTML client-side for display. Let's say I have this text: The quick **brown** fox jumped over the *lazy* dogs. 1. one 1. two 4. three 17. four I'm using this snippet of Javascript in my jQuery document ready event to convert it: var sd = new Attacklab.showdown.converter(); $(".ClassOfThingsIWantConverted").each(function() { this.innerHTML = sd.makeHtml($(this).html()); } I suspect this is where my problem is, but it almost works. In FireFox, I get what I expected: The quick brown fox jumped over the lazy dogs. one two three four But in IE (7 and 6), I get this: The quick brown fox jumped over the lazy dogs. 1. one 1. two 4. three 17. four So apparently, IE is stripping the breaks in my markdown code and just converting them to spaces. When I do a view source of the original code (prior to the script running), the breaks are there inside the container DIV. What am I doing wrong? UPDATE It is caused by the IE innerHTML/innerText "quirk" and I should have mentioned before that this one on an ASP.Net page using data bound controls - there are obviously a lot of different workarounds otherwise.

    Read the article

  • Flash SWF not initializing until visible - can I force them to initialize?

    - by Jason
    I have an application that needs to render about 100 flash graphs (as well as other DOM stuff) in a series of rows that vertically extend many times beyond the current visible window - in other words, the users have to scroll down see see all the different graphs. This application is also dynamic and when a user changes a value in the DOM (anywhere on the page) it will need to propagate that change to all the Flash graphs at the same time. So I setup all the externalInterface callbacks and was careful to not let any JS start going until the ever-so-important "flashIsReady" call and...it worked great until I tried to update() the existing swf's with new data. Here was the behavior: - All the swfs load (initially) in both IE/Fox = good. - Updating swfs with new content works in IE but not in Fox = not good - Updating swfs with new content works in Fox --ONLY IF-- I scrolled down to the bottom of the page, then back to the top -- BEFORE -- I triggered an update(). So then I started tracing out each time a swf called the JS to say "flash is ready" and I realized, Firfox only renders swfs as they become visible. And To be honest - that's fine and actually, I am pretty sure that IE does this too. But the problem is that not only does Firefox not initialize the swf, Firefox doesn't even acknowledge the swf exists (expect for after onload) if it has not yet been visible. And the proof is that you get JS errors saying: "[FlashDOMID].FlashMethod is not a function". However, scroll down a little, wait until its visible and suddenly the trace starts lighting up "Flash Ready", "Flash Ready", "Flash Ready" and once they are all ready, everything works fine. Someone told me that FF does not init swf's until visible - can I force it? I can post code if you need...but its pretty heavy (hard to strip out the relevant from the rest) and I would like to avoid it (for your sakes) if possible. The question is simple - have you had this happen and if so, did you find a solution? Does anyone now how to force a not-yet-visible swf to initialize? Thanks guys.

    Read the article

  • Cost to licence characters or ships for a game

    - by Michael Jasper
    I am producing a game pitch document for a university game design class, and I am looking for examples of licencing cost for using characters or ships from other IP holders in a game. For example: cost of using an X-Wing in a game, licencing from Lucas cost of using the Enterprise in a game, licencing from Paramount cost of using the Space Shuttle (if any), licencing from Nasa EDIT The closest information I can find is from an article about Nights of the Old Republic, but isn't nearly specific enough for my needs: What Kotick means by Lucas being the principal beneficiary of the success of The Old Republic is that there are most likely clauses in the license agreement that give percentages, points, or another denomination of revenue out to Lucas and his people just for the Star Wars name, and that amount is presumed to be a great deal of money. Kotick is saying that because the cost of the license is so prohibitive, as he has personally had experience with in his position as CEO of Activision Blizzard, that EA will not be able to be profitable because of the hemorrhaging of money to the licensor. EDIT 2 Another vague source stating that FOX uses a "five-figure rule" (assuming between $10,000 - $99,000) It seems FOX, like most studios, will not license individuals to create new works based upon their products. They will only commission individuals of their choosing if they elect to branch out into expanded product lines related to those licenses. Alternately, they are open to making the licencing available to large corporations with access to global markets, but only if those corporations agree to what Ms Friedman called a "five-figure guarantee". Presumably this means that the corporation seeking the licensing must agree to pay a 5-figure sum for that license, and be confident that their product will sell enough volume to recoup that fee, and to produce sufficient profits to make the acquisition worth their while. Thank you!

    Read the article

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