Search Results

Search found 4252 results on 171 pages for 'david 85'.

Page 123/171 | < Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >

  • Split a string by two characters

    - by David
    Hi, Firstable i want to match if a string has the following format: $abc #xyz or $abc .xyz. The abc and xyz mean only alphanumeric string. If it's matched then i need to extract the first $abc and the last #xyz, all that using pure javascript and maybe regex. The pattern is in the following order: Dollar Sign Unlimited alphanumeric string space a hash or point Unlimited alphanumeric string Thanks in advance for any help.

    Read the article

  • What is the worst gotcha in WPF?

    - by David
    Hi, I've started to make myself a list of "WPF gotchas": things that bug me and that I had to write down to remember because I fall for them every time.... Now, I'm pretty sure you all stumbled upon similar situations at one point, and I would like you to share your experience on the subject: What is the gotcha that gets you all the time? the one you find the most annoying? (I have a few issues that seem to be without explanation, maybe your submissions will explain them) Here are a few of my "personnal" gotchas (randomly presented): For a MouseEvent to be fired even when the click is on the "transparent" background of a control (e.g. a label) and not just on the content (the Text in this case), the control's Background has to be set to "Brushes.Transparent" and not just "null" (default value for a label) A WPF DataGridCell's DataContext is the RowView to whom the cell belong, not the CellView When inside a ScrollViewer, a Scrollbar is managed by the scrollviewer itself (i.e. setting properties such as ScrollBar.Value is without effect) Key.F10 is not fired when you press "F10", instead you get Key.System and you have to go look for e.SystemKey to get the Key.F10 ... and now you're on.

    Read the article

  • Get file size of BufferedImage before writing the data

    - by David
    I'm working on a Java program that needs to send an image (preferably in PNG format, though I could perhaps use another format if necessary) over the network. The logical way to do this is, of course, to first send the length of the PNG image data, then the data itself. Problem: I don't see any method in ImageIO or anywhere else that will give me the length of the image data. Does this exist somewhere in the Java 1.6 standard library? I know I could just write it to a ByteArrayOutputStream and get the length of the resulting array, but before resorting that I wanted to make sure I'm not missing something built in. And besides, that makes an extra copy of the image data, which I'd rather not do if it's not necessary.

    Read the article

  • Customer count map (Google maps?)

    - by David Hamilton
    I have a two column list consisting of a US zipcode and a count (number of customers in this case). I want to put this data onto a map. Would Google maps API be a good fit for this? It seems like this would be a common enough type of problem to already have an existing (preferably Java based) solution without having to re-invent the wheel. Any suggestions?

    Read the article

  • spell checker: ignore CamelCaseWords

    - by David Oneill
    Is there a way to get the spell checker to properly check camel cased words? "ThisIsSpelledRightly" would be marked as spelled correctly, but "ThisIsNottSpeledRihgt" would be flagged? I use Xubuntu and firefox. I tried asking this over on superuser, but it got ignored.

    Read the article

  • Cannot "Install New Software" in Eclipse 3.5

    - by David E
    I have just installed Eclipse 3.5 for Java EE developers ("Galileo"). I need to add an extra plugin, but when I select the "Install New Software ..." menu item, nothing happens. Literally nothing - no dialog opens, no error message is displayed. If I have the Debug window open, no message are displayed. If I go to Preferences - Install/Update - Available Software Sites, that dialog opens OK, I can manage the list of update sites, and test the connections, and they all appear OK. But I cannot get to use them to actually install anything. Is it just broken, or could there be something more subtle wrong? Thanks.

    Read the article

  • Using ASP.NET Redirect without string URL?

    - by David Dietrich
    For instance, what I have right now is the following: Page.Response.Redirect("Default.aspx", false); Needing to hardcode the string just seems odd to me. The Default.aspx page is already in my project. So is there a way to do the redirect something like the following: Page.Response.Redirect(Default.aspx, false); Where Default.aspx is just the web form. I'd think that this way it would be obvious if there was a problem such as you deleted the web form but didn't update the redirects. Is this possible? Or is there another way entirely I should be looking at this? I suppose I could do something with a static property on the class, but I am wondering if there is a built in thing for this?

    Read the article

  • Magento, 1 db field not saved

    - by david parloir
    Hi there, I have a problem with 1 field of the db. With this code: $expireMonth = Mage::getStoreConfig('points_options/config_points/expiration_period', Mage::app()->getStore()->getId()); if (!is_null($expireMonth) && ($expireMonth > 0)) { $expireDate = date("Y-m-d H:i:s", strtotime("+" . $expireMonth . " month")); } else { $expireDate = NULL; } //die($expireDate); //store in points history table $this->_pointsModel->setCustomerId($this->_customer->getId()) ->setOrdersId('welcome') ->setPointsPending($pointsForNewCustomer) ->setPointsComment(Mage::helper('points')->__('welcome points')) ->setDateAdded(date('Y-m-d H:i:s')) ->setPointsStatus(2)//confirmed ->setPointsType('WE') ->setStoreId(Mage::app()->getStore()->getId()) ->setExpireDate($expireDate) ->save(); every field is saved in the table, except for expire_date. If I uncoment the die($expireData), I see the correct value, something like 2012-01-13 13:21:12. The filed is defined as: `expire_date` datetime NULL Any thaughts? edit: the solution is: $expireDate = date("Y-m-d H:i:s", strtotime("+" . $expireMonth . " months")); check out the "s" in my strtotime expression

    Read the article

  • UIWebView Loading content properly on iOS 6 simulator but not on device?

    - by David Hegner
    I have encountered a weird bug with a released app. My UIWebView is no longer loading content on iOS 6, yet the content still displays in the simulator. The activity indicator displays properly but then it loads a blank url? Again, this only happens on a device, not on the simulator. To provide extra context (in the simulator the NSURLRequest is assigned the proper URL. When run on a device the value is nil.) Here is my code : -(void)loading { if(!self.webView.loading) [self.activityIndicator stopAnimating]; else { [self.activityIndicator startAnimating]; } } - (void)viewDidLoad { [self.webView addSubview:self.activityIndicator]; NSURLRequest *requestUrl = [NSURLRequest requestWithURL:self.url]; [self.webView loadRequest:requestUrl]; self.timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(loading) userInfo:nil repeats:YES]; [super viewDidLoad]; NSLog(@"%@", requestUrl); }

    Read the article

  • How to get number of elements of a class before a certain element

    - by David Shaikh
    I want to know how many elements of a certain class appear in the DOM before an element that let's say has been clicked on. <html> <div class="a"> </div> <div class="b"> <div class="a"> </div> </div> <button>CLick me!</button> <div class="a"> </div> </html> So in the previous DOM tree if the element to be clicked is the button, and Im looking for divs with class "a" it should return 2, even though in the whole tree there are 3, but "before" the button there are only 2. How could I do that? Thanks

    Read the article

  • jquery - DOM traversal question

    - by David
    Hi, Basically what I have here is a button that adds a new list item to an unordered list. Within this list item is a dropdown box (.formSelector) that when changed triggers an ajax call to get the values for another dropdown box (.fieldSelector) in the same list item. The problem is on this line: $(this).closest(".fieldSelector").append( If I change it to $(".fieldSelector").append( the second box updates correctly. The problem with this is that when I have multiple list items it updates every dropdown box on the page with the class fieldSelector, which is undesirable. How can I traverse the DOM to just pick the fieldSelector in the current list item? Any help is greatly appreciated. Complete code: $("button", "#newReportElement").click(function() { $("#reportElements").append("<li class=\"ui-state-default\"> <span class=\"test ui-icon ui-icon-arrowthick-2-n-s \"></span><span class=\"ui-icon ui-icon-trash deleteRange \"></span> <select name=\"form[]\" class=\"formSelector\"><? foreach ($forms->result() as $row) { echo "<option value='$row->formId'>$row->name</option>"; }?></select><select class=\"fieldSelector\" name=\"field[]\"></select></li>"); $(".deleteRange").button(); $('.formSelector').change(function() { var id = $(this).val(); var url = "<? echo site_url("report/formfields");?>" + "/" + id; var atext = "ids:"; $.getJSON(url, function(data){ $.each(data.items, function(i,item){ $(this).closest(".fieldSelector").append( $('<option></option>').val(item.formId).html(item.formLabel) ); }); }); }); return false; });

    Read the article

  • JQuery Dialog with constant aspect ratio

    - by David Semeria
    I need to display an image in a resizable dialog (so far all the specific image popup libraries I have tried do not fit my needs). All I want to do is maintain the aspect ratio during resizing. Sounds easy, but it's not. I thought something like this might work, but no dice: var d = $("").dialog({title:title, width:400, height:400}); d.resizable( "option", "aspectRatio", true ); Any pointers greatly appreciated, tks

    Read the article

  • Problem with plugin - Zend Framework

    - by david
    Hello friends, I have this problem with a plugin in zend framework. I've created on this route: library/Mis/Plugins/Unpluginmas.php in application.ini autoloaderNamespaces[] = "Mis_" resources.frontController.plugins.Unpluginmas = "Mis_Plugins_Unpluginmas" Unpluginmas.php class Mis_Plugins_Unpluginmas extends Zend_Controller_Plugin_Abstract{ Zend Framework not find the plugin. I appreciate if you can help me because I can't find the problem.

    Read the article

  • Regex to split a string (in Java) so that spaces are preserved?

    - by david
    I need to split a string (in Java) into individual words ... but I need to preserve spaces. An example of the text I need to split is something like this: ABC . . . . DEF . . . . GHI I need to see "ABC", " . . . .", "DEF", ". . . .", and "GHI". Obviously splitting on the space character \s isn't going to work, as all the spaces get swallowed up as one space. Any suggestions? Thanks

    Read the article

  • Mercurial: include revisions in diff?

    - by David Wolever
    Is there some way to ask Mercurial to show the revisions being diffed in the output? For example: $ hg diff -r trunk:development diff -r 08d51ecf22cf:ff5673e55b9f --git a/foo.c b/foo.c ... Or something similar? I've found that there have been a few times that I've taken a diff (eg, to review), but have later been unable to recreate it because I've forgotten which revisions it was taken against.

    Read the article

  • How to assemble a WAV file?

    - by David
    I'm doing an educational project in which 1) I record voice commands on a separate device and after appropriate processing etc... 2) I send 16-bit samples encapsulated in UDP packets over Ethernet to the PC. After receiving the packets and "extracting" data (samples) from them, I need to assemble the samples to a WAV file. Any example code? Any suggestions?

    Read the article

  • interpreting assembly instructions

    - by David Lee
    I am trying to translate the following: Action: pushl %ebp movl %esp, %eax subl $32, %esp movl $0, -8(%eax) movl $0, -4(%eax) movl -4(%eax), %eax cmpl 32(%eax), %ebp movl -4(%ebp), %eax sall $2, %ebp addl 8(%ebp), %ebp movl (%ebp), %ebp addl %ebp, -8(%eax) addl $1, -4(%eax) What is the best way to learn assembly and translating this code?

    Read the article

  • How to call a custom php file on magento product page

    - by David
    if getChildHtml('product_type_data') ? maps directly to catalog/product/view/type/simple.phtml by default, how do I map to my own file? If I wanted to create a file that would produce a small image to place on the product page, right under "availability" how would I tell magento to map to where I have put the file? From what I understand getChildHtml('product_type_data') ? defaults to the file path: catalog/product/view/type/simple.phtml so how can I customize the magento defaults and tell it to map to my custom files i've created? I hope I have explained this well enough, if not, please let me know and I will try to explain more. Any help or guidance would be awesome. Thanks.

    Read the article

  • Waiting for a subset of threads in a Java ThreadPool

    - by David Semeria
    Let's say I have a thread pool containing X items, and a given task employs Y of these items (where Y is much smaller than X). I want to wait for all of the threads of a given task (Y items) to finish, not the entire thread pool. If the thread pool's execute() method returned a reference to the employed thread I could simply join() to each of these Y threads, but it doesn't. Does anyone know of an elegant way to accomplish this? Thanks.

    Read the article

  • Confused about std::runtime_error vs. std::logic_error

    - by David Gladfelter
    I recently saw that the boost program_options library throws a logic_error if the command-line input was un-parsable. That challenged my assumptions about logic_error vs. runtime_error. I assumed that logic errors (logic_error and its derived classes) were problems that resulted from internal failures to adhere to program invariants, often in the form of illegal arguments to internal API's. In that sense they are largely equivalent to ASSERT's, but meant to be used in released code (unlike ASSERT's which are not usually compiled into released code.) They are useful in situations where it is infeasible to integrate separate software components in debug/test builds or the consequences of a failure are such that it is important to give runtime feedback about the invalid invariant condition to the user. Similarly, I thought that runtime_errors resulted exclusively from runtime conditions outside of the control of the programmer: I/O errors, invalid user input, etc. However, program_options is obviously heavily (primarily?) used as a means of parsing end-user input, so under my mental model it certainly should throw a runtime_error in the case of bad input. Where am I going wrong? Do you agree with the boost model of exception typing?

    Read the article

  • Combining Content Data in Google Analytics

    - by David Csonka
    When I first start one of my Wordpress blogs, I had the permanent URL for each post include the date of posting. The slug format looked like this: /blog/2010/01/25/this-is-my-article/ Later on, I changed it so that the date was not included in the permanent URL, like this: /blog/this-is-my-article/ and setup a redirect plugin to make sure that users would get to the page they wanted until the site was re-indexed. In Google Analytics, when I review the stats for content I now have multiple records for what is essentially the same page. ie: Top Content List: 45 Pageviews- /blog/this-is-my-article/ 24 Pageviews- /blog/2010/01/25/this-is-my-article/ 33 Pageviews- /blog/some-other-article/ Is there any way to combine those records somehow?

    Read the article

< Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >