Search Results

Search found 1967 results on 79 pages for 'james porter'.

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

  • Concatenating text in an ASP.NET localized label

    - by James B
    Trying to localize text in ASP.NET labels... want to add a ':' after the localized text. I could just add the ':' to the localized text in the resource file, but that seems silly... there should be an easy way to do this. <asp:Label id="RoleTypeLabel" runat="server" Text='<%$ Resources: GS3, RoleTypeLabel %>:' AssociatedControlID="RoleTypeDropDown"></asp:Label> (note the ':' at the end of Text='...') Of course, this doesn't work... and neither does anything I can think of to concatenate a ':' onto the end of the localized text. Anyone know how to do it? TIA, James

    Read the article

  • How to add a timeout value when using Java's Runtime.exec()?

    - by James Adams
    I have a method I am using to execute a command on the local host. I'd like to add a timeout parameter to the method so that if the command being called doesn't finish in a reasonable amount of time the method will return with an error code. Here's what it looks like so far, without the ability to timeout: public static int executeCommandLine(final String commandLine, final boolean printOutput, final boolean printError) throws IOException, InterruptedException { Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec(commandLine); if (printOutput) { BufferedReader outputReader = new BufferedReader(new InputStreamReader(process.getInputStream())); System.out.println("Output: " + outputReader.readLine()); } if (printError) { BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream())); System.out.println("Error: " + errorReader.readLine()); } return process.waitFor(); } Can anyone suggest a good way for me to implement a timeout parameter? Thanks in advance for any suggestions! --James

    Read the article

  • Why won't asp.net create cookies in localhost?

    - by James McConnell
    Okay, this is really kinda starting to bug me. I have a simple Web project setup located at: "C:\Projects\MyTestProject\". In IIS on my machine, I have mapped a virtual directory to this location so I can run my sites locally (I understand I can run it from Visual Studio, I like this method better). I have named this virtual directory "mtp" and I access it via http://localhost/mtp/index.aspx. All this is working fine. However, whenever I try to create a cookie, it simply never gets written out? I've tried this in FF3 and IE7 and it just plain won't write the cookie out. I don't get it. I do have "127.0.0.1 localhost" in my hosts file, I can't really think of anything else I can do. Thanks for any advice. James

    Read the article

  • eclipse: Dynamic web project: linked WebContent folder?

    - by jeff porter
    Hello all, I'm trying to change a java project into a Dynamic web project, unfortunatly the project looks nothing like what it needs to easily move to a Dynamic web project. So, my question is... Change I change the "WebContent" directory to a linked folder? So that I can change the "WebContent" folder from C:\tools\eclipse_galiloe\workspace\Test\WebContent to C:\project\jsps Thanks!

    Read the article

  • Text overflowing floated div

    - by James Hatton
    I have a problem with a fluid layout I am attempting to create. I was wondering why I am not able to get overflow:hidden to work on the left menu text on this site. As you can see here, I have labelled in blue, the text which I would like contained within the left menu div, although it overflows and pushes the rest of the site down with it. Please see here for a JS Bin: http://jsbin.com/OcoJEpe/2/edit?html,css,output Thanks for your help. James.

    Read the article

  • Deserialize jSON Google AJAX Translation API

    - by Chris Porter
    I've got the JSON coming back like this: {"responseData": [{"responseData":{"translatedText":"elefante"},"responseDetails":null,"responseStatus":200},{"responseData":{"translatedText":"Burro"},"responseDetails":null,"responseStatus":200}], "responseDetails": null, "responseStatus": 200} And I need to parse it into a ResponseData object I have set-up: public class ResponseData { public string translatedText = string.Empty; public object responseDetails = null; public HttpStatusCode responseStatus = HttpStatusCode.OK; public List<ResponseData> responseData { get; set; } } I Deserialize it like this: JavaScriptSerializer serializer = new JavaScriptSerializer(); ResponseData translation = serializer.Deserialize<ResponseData>(responseJson); But no matter what the translated text is always empty.

    Read the article

  • Why doesnt R.raw.'songname' not work on android devices?

    - by James Rattray
    I have some media (Audio tracks) on an app... With file path 'R.raw.test' I use some code to get it into a mediaplayer... MediaPlayer.create(Textbox.this, R.raw.fly); And it works PERFECTLY on the Android Emulator... (Plays track on click of button) Can someone explain why, when I put it on my Archos (5 IT) it doesnt work at all? -As soon as the button is clicked, it crashes... Do you have to do something to file paths or what? Please help... Thanks alot... James

    Read the article

  • Converting a string to an integer (Android)

    - by James Rattray
    I'm not 100% on how to do this so i'm asking... May seem stupid but... How do I convert a string into an integer? Background info: I have a textbox I have the user enter a number into... it then: EditText et = (EditText) findViewById(R.id.entry1); String hello = et.getText().toString(); gets the string 'hello' Now I want to convert it to a integer so I can get the number they typed in -will be used later on in code... Is there a way to get the edittext to a integer? -That would skip the middle man... If not, string to integer will be just fine... Thanks alot, James

    Read the article

  • 500 error for long url iis7

    - by Chris Porter
    I was getting 404 errors for some long URLs on a website I'm developing. After a bit of digging I discovered that this occurs when the length of certain aspects of the URL exceed configurable limits in IIS7. In this case the maxQueryString attribute of the requestLimits property needed to be increased in the web.config <system.webServer> <security> <requestFiltering> <requestLimits maxQueryString="4096" maxAllowedContentLength="4096" maxUrl="8192" > </requestLimits> </requestFiltering> </security> This fixed the problem instantly on my development server but on the remote server I now get: 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. And that's all the information it gives me.

    Read the article

  • NamedPipeClientStream StreamReader problem in C++

    - by Chris Porter
    When reading from a NamedPipes server using the .net NamedPipeClientStream class I can only get the data on the first read in C++, every time it's just an empty string. In c# it works every time. pipeClient = gcnew NamedPipeClientStream(".", "Server_OUT", PipeDirection::In); try { pipeClient->Connect(); } catch(TimeoutException^ e) { // swallow } StreamReader^ sr = gcnew StreamReader(pipeClient); String^ temp; while (temp = sr->ReadLine()) { // = sr->ReadLine(); Console::WriteLine("Received from server: {0}", temp); } sr->Close();

    Read the article

  • reverse colortransform alpha AS3

    - by Chris Porter
    I'm fading out a Bitmap in AS3 by repeatedly applying a ColorTransform every frame to its BitmapData; _bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, .9, 0, 0, 0, 1)); When applying the apparent reverse to fade it back in I get a discoloured image. _bitmap.colorTransform(_bitmap.rect, new ColorTransform(1, 1, 1, 1.1, 0, 0, 0, 1)); The problem appears to occur only to fully faded-out images. If I only go part way it is recoverable. fading out: faded back

    Read the article

  • NHibernate Unique Constraint on Name and Parent Object fails because NH inserts Null

    - by James
    Hi, I have an object as follows Public Class Bin Public Property Id As Integer Public Property Name As String Public Property Store As Store End Class Public Class Store Public Property Id As Integer Public Property Bins As IEnumerable(Of Bin) End Class I have a unique constraint in the database on Bin.Name and BinStoreID to ensure unique names within stores. However, when NHibernate persists the store, it first inserts the Bin records with a null StoreID before performing an update later to set the correct StoreID. This violates the Unique Key If I persist two stores with a Bin of the same name because The Name columns are the same and the StoreID is null for both. Is there something I can add to the mapping to ensure that the correct StoreID is included in the INSERT rather than performing an update later? We are using HiLo identity generation so we are not relying on DB generated identity columns Thanks James

    Read the article

  • Eclipse and JavaFX? is it just me?

    - by jeff porter
    I'm looking at learning JavaFX. I've tried setting Eclipse to develop a small app and I've downloaded the Eclipse plugin. Eclipse JavaFX plugin BUT... it just seems, well, flakey. So I have 3 questions... 1: Is there a better plugin? 2: Or is there some great set of tutorials out there that I'm missing? 3: finally, is it meant to be easy to call Java code from FX? I'm stuggling, it there a good example somewhere? On questions 1 & 2, Eclipse underlines code in red that just shouln't be. For example.. see this image... Why does it underline bit of imports in red? I know this is little of an open ended question. So I guess my main question is this... Is my experiance of JavaFX and Eclipse the best I can hope for? Or am I missing something ? (and I'm not looking for a Yes/No response) :-) Just looking for a discussion on how best to learn/develop JavaFx.

    Read the article

  • JavaFX: JNLP file error

    - by jeff porter
    Hello everyone, I'm getting the following error when I upload a JavaFX app to a website, but I don't get it locally. I'm presuming that I'm missing something like the 'codebase' tag, but I'm not sure where it goes, can anyone help me out please? Java Console error: exception: JNLP file error: iShout_Foxpro_browser.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct.. java.io.FileNotFoundException: JNLP file error: iShout_Foxpro_browser.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct. at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: java.io.FileNotFoundException: JNLP file error: iShout_Foxpro_browser.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct. HTML file source... <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>app_one</title> </head> <body> <script src="http://dl.javafx.com/1.3/dtfx.js"></script> <script> javafx( { archive: "app_one.jar", draggable: true, width: 480, height: 320, code: "app.Main", name: "app_one" } );

    Read the article

  • Logs overwritten in CruiseCControl.NET when there is multiple MSBuild Tasks.

    - by James Poulose
    I have two MSBuild tasks in my CC.NET config. In the end of the execution, i can see two blocks of warnings/errors in the log and published email. But the problem is that the contents of both the blocks are the same and that is from the second MSBuild task!! In another way, the second MSBuild task overwrites the first log, and then creates another one for itself effectively creating two exactly identical block!!! Do anybody have any thoughts on this? I am happy to provide more information if you require about the environment and configuration. Thanks, James Poulose

    Read the article

  • Regular Expression find a phrase not inside an HTML tag

    - by James Buckingham
    Hi there, I'm struggling a bit with this regular expression and wondered if anyone was about to help me please? What I need to do is isolate the 1st phrase inside a string which is NOT inside an HTML tag. So the examples I have at the moment are: This is some test text about ITS for the ITS department. Also worth mentioning ABS as well I guess.ITS, ... and ... This is some ITS test text about ITS for the ITS department. Also worth mentioning ABS as well I guess So in the first example I want it to ignore the wrapped ITS and give me the ITS at the end of the 1st sentence. In the second example I want it to return the ITS at the start of the 2nd sentence. The aim is to replace these with my own custom wrapped acronym tags in a ColdFusion application I'm writing. Thanks a lot, James

    Read the article

  • NSLinguisticTagger on the contents of an NSTextStorage- crashing bug

    - by Remy Porter
    I'm trying to use an NSLinguisticTagger to monitor the contents of an NSTextStorage and provide some contextual information based on what the user types. To that end, I have an OverlayManager object, which wires up this relationship: -(void) setView:(NSTextView*) view { _view = view; _layout = view.layoutManager; _storage = view.layoutManager.textStorage; //get the TextStorage from the view [_tagger setString:_storage.string]; //pull the string out, this grabs the mutable version [self registerForNotificationsOn:self->_storage]; //subscribe to the willProcessEditing notification } When an edit occurs, I make sure to trap it and notify the tagger (and yes, I know I'm being annoyingly inconsistent with member access, I'm rusty on Obj-C, I'll fix it later): - (void) textStorageWillProcessEditing:(NSNotification*) notification{ if ([self->_storage editedMask] & NSTextStorageEditedCharacters) { NSRange editedRange = [self->_storage editedRange]; NSUInteger delta = [self->_storage changeInLength]; [_tagger stringEditedInRange:editedRange changeInLength:delta]; //should notify the tagger of the changes [self highlightEdits:self]; } } The highlightEdits message delegates the job out to a pool of "Overlay" objects. Each contains a block of code similar to this: [tagger enumerateTagsInRange:range scheme:NSLinguisticTagSchemeLexicalClass options:0 usingBlock:^(NSString *tag, NSRange tokenRange, NSRange sentenceRange, BOOL *stop) { if (tag == PartOfSpeech) { [self applyHighlightToRange:tokenRange onStorage:storage]; } }]; And that's where the problem is- the enumerateTagsInRange method crashes out with a message: 2014-06-04 10:07:19.692 WritersEditor[40191:303] NSMutableRLEArray replaceObjectsInRange:withObject:length:: Out of bounds This problem doesn't occur if I don't link to the mutable copy of the underlying string and instead do a [[_storage string] copy], but obviously I don't want to copy the entire backing store every time I want to do tagging. This all should be happening in the main run loop, so I don't think this is a threading issue. The NSRange I'm enumerating tags on exists both in the NSTextStorage and in the NSLinguisticTagger's view of the string. It's not even the fact that the applyHighlightToRange call adds attributes to the string, because it crashes before even reaching that line. I attempted to build a test case around the problem, but can't replicate it in those situations: - (void) testEdit { NSAttributedString* str = [[NSMutableAttributedString alloc] initWithString:@"Quickly, this is a test."]; text = [[NSTextStorage alloc] initWithAttributedString:str]; NSArray* schemes = [NSLinguisticTagger availableTagSchemesForLanguage:@"en"]; tagger = [[NSLinguisticTagger alloc] initWithTagSchemes:schemes options:0]; [tagger setString:[text string]]; [text beginEditing]; [[text mutableString] appendString:@"T"]; NSRange edited = [text editedRange]; NSUInteger length = [text changeInLength]; [text endEditing]; [tagger stringEditedInRange:edited changeInLength:length]; [tagger enumerateTagsInRange:edited scheme:NSLinguisticTagSchemeLexicalClass options:0 usingBlock:^(NSString *tag, NSRange tokenRange, NSRange sentenceRange, BOOL *stop) { //doesn't matter, this should crash }]; } That code doesn't crash.

    Read the article

  • Sending email from Drupal contact form, but GMail marks it as "Forged"

    - by James Shields
    Hi, My Drupal site sends email to a GMail account, but the emails sent all go into the Spam folder, and GMail puts up a bar with the message "This message was likely forged and did not originate from your account." Although I can create a filter to prevent them going to Spam, I want to start sending newsletters, and I suspect they'll have the same problem. I suspect the problem is with the way I've set up either PHP or Drupal to send mail. As far as I know it's just using the sendmail function. I've set the from address to "info@..." where ... is the site domain. Any tips on how I can make set up my outgoing mail so it won't be refused by GMail (and presumably other major mail providers)? Thanks, James

    Read the article

  • Getting a variable out of a Public Void (Android)

    - by James Rattray
    I have this code: hubSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) { final MediaPlayer mp2 = MediaPlayer.create(Textbox.this, R.raw.hero); mp2.start(); } public void onNothingSelected(AdapterView<?> parentView) { } }); (The code basically runs when a new item is selected of a spinner and then plays a song, -which later will be a variable based on what was picked, but i'm fine as it is for now) Problem: And I want to be able to use 'mp2' out of this public void, (I want a button which pauses it) How can I do this? Please explain/show... Thanks alot James

    Read the article

  • Facebook canvas app showing wordpress blog in iframe - how to link to specific pages?

    - by James Olney
    Sorry for the cumbersome title. I have a Facebook canvas app that is call up a Wordpress site in an iFrame. This is fine and works as hoped but is there a way to link directly to a page within it? For example the page I want to reach is actually: www.blog.com/monkeys/ But I want to be able to use a link like this: www.facebook.com/monkeyblogapp/app_243495067635997/monkeys/ So that I can give out that URL and get people to see the right bit of content but within the Facebook environment. I have seen people mention callback urls (like this one which as far as I can tell just means having the app addresses match the website Direct links to pages in Facebook iFrame application?) but that doesn't work. Any suggestions? many thanks James

    Read the article

  • Echo mysql results in a loop?

    - by Roy D. Porter
    I am using turn.js to make a book. Every div within the 'deathnote' div becomes a new page. <div id="deathnote"> //starts book <div style="background-image:url(images/coverpage.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"></div> //creates new page </div> //ends book What I am doing is trying to get 3 'content' (content being a name and cause of death) divs onto 1 page, and then generate a new page. So here is what i want: <div id="deathnote"> //starts book <div style="background-image:url(images/coverpage.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"> //creates new page but leaves it open <div> CONTENT </div> <div> CONTENT </div> <div> CONTENT </div> </div> //ends the page </div> //ends book Seems simple enough, however the content is data from a MySQL DB, so i have to echo it in using PHP. Here is what i have so far <div id="deathnote"> <div style="background-image:url(images/coverpage.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <?php $pagecount = 0; $db = new mysqli('localhost', 'username', 'passw', 'DB'); if($db->connect_errno > 0){ die('Unable to connect to database [' . $db->connect_error . ']'); } $sql = <<<SQL SELECT * FROM `TABLE` SQL; if(!$result = $db->query($sql)){ die('There was an error running the query [' . $db->error . ']'); } //IGNORE ALL OF THE GARBAGE ABOVE. IT IS SIMPLE CONNECTING SCRIPT THAT I KNOW WORKS //THE METHOD I AM HAVING TROUBLE WITH IS BELOW $pagecount = 0; while($row = $result->fetch_assoc()){ //GETS THE VALUE (and makes sure it isn't nothing echo '<div style="background-image:url(images/paper.jpg);">'; //THIS OPENS A NEW PAGE while ($pagecount !== 3) { //KEEPS COUNT OF HOW MUCH CONTENT DIVS IS ON THE PAGE while($row = $result->fetch_assoc()){ //START A CONTENT DIV echo '<div class="content"><div class="name">' . $row['victim'] . '</div><div class="cod">' . $row['cod'] . '</div></div>'; //END A CONTENT DIV $pagecount++; //UP THE PAGE COUNT } } $pagecount=0; //PUT IT BACK TO 0 echo '</div>'; //END PAGE } $db->close(); ?> <div style="background-image:url(images/backpage.jpg);"></div> //BACK PAGE </div> At the moment i seem to be causing and infinite loop so the page won't load. The problem resides within the while loops. Any help is greatly appreciated. Thanks in advance guys. :)

    Read the article

  • Should I stick only to AWS RDS Automated Backup or DB Snapshots?

    - by James Wise
    I am using AWS RDS for MySQL. With it comes on backup, I understand that amazon provides two types of backup - automated backup and database (DB) snapshot. The difference is explain in here - http://aws.amazon.com/rds/faqs/#23. However, I am still confuse if should I stick to automated backup only or both automated and manual (db snapshots). What do you think guys? What's the setup of your own? I heard to others that automated backup is not reliable due to some unrecoverable database when the DB instance is crashed so the DB snapshots are the way to rescue you. If I will do daily DB snapshots as similar settings to automated backup, I have gonna pay much bunch of bucks. Hope anyone could enlighten me or advise me the right set up. Thanks. James

    Read the article

  • Where to observe application deployed by Jenkins?

    - by James
    Question from a first-time Jenkins user. So I hope you wouldn't mind if the question is too silly. I have installed jenkins on a Ubuntu machine, and is accessible at localhost:8080. I have successfully configured it to work with Maven2 and Git as well. Next, I created a job/project (A Java/Spring application), and got it to build without error on Jenkins as well. Now my question is, where do I see this application running? :) Best Regards James

    Read the article

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