Daily Archives

Articles indexed Monday April 26 2010

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

  • How to find which delimiter was used during string split (VB.NET)

    - by typoknig
    Hi all, lets say I have a string that I want to split based on several characters, like ".", "!", and "?". How do I figure out which one of those characters split my string so I can add that same character back on to the end of the split segments in question? Dim linePunctuation as Integer = 0 Dim myString As String = "some text. with punctuation! in it?" For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "." Then linePunctuation += 1 Next For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "!" Then linePunctuation += 1 Next For i = 1 To Len(myString) If Mid$(entireFile, i, 1) = "?" Then linePunctuation += 1 Next Dim delimiters(3) As Char delimiters(0) = "." delimiters(1) = "!" delimiters(2) = "?" currentLineSplit = myString.Split(delimiters) Dim sentenceArray(linePunctuation) As String Dim count As Integer = 0 While linePunctuation > 0 sentenceArray(count) = currentLineSplit(count)'Here I want to add what ever delimiter was used to make the split back onto the string before it is stored in the array.' count += 1 linePunctuation -= 1 End While

    Read the article

  • How to colorize section headings in LaTeX like this?

    - by Nazgulled
    Hi, Accidently I created this nice colored effect on my LaTeX TOC: http://i43.tinypic.com/o5aptl.png Which I like and want to keep, I created this effect like this: \definecolor{Section1}{rgb}{0.09,0.21,0.36} \section{\color{Section1}Introdução} However, as you can see on the TOC sidebar, there was a nasty side effect. I tried to fix it like this: \section[Introdução]{\color{Section1}Introdução} But didn't work, the sidebar TOC was fixed but on the TOC list, the blue color was gone and was now red instead (default for clickable TOC heading links) I also tried: {\color{Section1}\section{Introdução}} But the effect was the same, fixed TOC but no color on the TOC list. Any suggestions?

    Read the article

  • Power Analysis in [R] for Two-Way Anova

    - by Thomas
    I am trying to calculate the necessary sample size for a 2x2 factorial design. I have two questions. 1) I am using the package pwr and the one way anova function to calculate the necessary sample size using the following code pwr.anova.test(k = , n = , f = , sig.level = , power = ) However, I would like to look at two way anova, since this is more efficient at estimating group means than one way anova. There is no two-way anova function that I could find. Is there a package or routine in [R] to do this? 2) Moreover, am I safe in assuming that since I am using a one-way anova power calculations, that the sample size will be more conservative (i.e. larger)?

    Read the article

  • In Applescript, why do local variables in handlers capture "with" labeled parameters?

    - by outis
    In Applescript, if you declare a handler using "with" labeled parameters, local variables get the values of the arguments and the parameters themselves are undefined. For example: on bam of thing with frst and scnd local eat_frst return {thing: thing, frst:frst, scnd:scnd} -- this line throws an error end bam bam of "bug-AWWK!" with frst without scnd results in an error message that "scnd" isn't defined in the second line of bam. thing and frst are both defined, getting the arguments passed in the call to bam. Why is this happening? Why is scnd undefined? Note: I know that declaring variables as "local" within a handler is unnecessary. It's done in the examples for illustrative purposes.

    Read the article

  • New Book From Luís Abreu: ASP.NET 4.0 – The Complete Course (Portuguese)

    - by Paulo Morgado
    Thsi book, with several practical examples, presents how to build web applications using ASP.NET 4.0. Starts by introducing the framework to build pages and controls and gradually introduces all the new features available. More compact that its previous versions  (part of the content was moved to FCA’s site in the form of apendices), this new book gives emphasis to to the new features in ASP.NET 4.0 and targets both developers new to ASP.NET and developers moving from previous versions of ASP.NET. This time there’s good new for Brazilian readers. The book will be distributed in Brazil by: Zamboni Comércio de Livros Ltda. Av.Parada Pinto, 1476 São Paulo – SP Telf. / Fax: +55 11 2233-2333 E-mail: [email protected] Our book (LINQ Com C# (Portuguese)) isn’t still distributed in Brazil, but, if you want it, you can always try that distributer.

    Read the article

  • I'm trying to grasp the concept of creating a program that uses a MS SQL database, but I'm used to r

    - by Sergio Tapia
    How can I make a program use a MS SQL server, and have that program work on whatever computer it's installed on. If you've been following my string of questions today, you'd know that I'm making an open source and free Help Desk suite for small and medium businesses. The client application. The client application is a Windows Forms app. On installation and first launch on every client machine, it'll ask for the address of the main Help Desk server. The server. Here I plan to handle all incoming help requests, show them to the IT guys, and provide WCF services for the Client application to consume. My dilemma lies in that, I know how to make the program run on my local machine; but I'm really stumped on how to make this work for everyone who wants to download and install the server bit on their Windows Server. Would I have to make an SQL Script and have it run on the MS SQL server when a user wants to install the 'server' application? Many thanks to all for your valuable time and effort to teach me. It's really really appreciated. :)

    Read the article

  • R Install/Update on Mac OS X (Snow Leopard): where does R put files during install/config?

    - by doug
    In sum, there's a stray preference-like file or two (probably just one) that i can't find. Here's the whole story: I recently attempted to update my R install from 2.10 to 2.11. As i have done before, i installed from source. I know that all of the dependencies are correctly installed and made available to R, because my prior install worked fine. When i upgraded to 2.11, i am unable to install packages (no exception thrown, it just doesn't appear to complete the install and is unresponsive so i have to quit + restart R. Given i install from source, there are any number of points in the process that i could have messed up. What i need to do now is "start over" which requires that i clear out my my prior install. I am having trouble doing that. There is still at least one preference file or something like that i can't find and one of these is causing the problem, so i need to find it and terminate it with extreme prejudice before i do a fresh install. Although i set a number of flags during the install, i have never opted out of the default install locations during the config step. There has to be one or more preference files still in my file structure (and that's also accessible to the new install of R) because after i follow all of the steps below, then do a fresh install, when i start R for the first time, some of my preferences have persisted (e.g., quartz settings, GUI background color, editor selection, etc.). Again, the problem is that i just cannot locate those files. Finally, the problem can't be that during my last install from source, i inadvertently caused a preference file to be sent to an off-spec location--because again, a fresh R install (whether from source or from the OS X binaries) is finding those files Here's what i've done prior to attempting a clean install of R: Removed files from these locations: ~/.RData ~/.RHistory /Applications/R64.app /Applications/R.app /Library/Frameworks/R.framework (i also removed all symlinks from these) Cleared all RAM and disk caches, in particular the directory where i know R caches: ~/Library/Caches/R* (in fact i've cleared this entire directory) Checked for all 'hidden' files in the OS X directories where login/startup files are often placed: /etc/ ~/ In addition, i've checked R-help, and i've also read through the relevant portions of 'R Installation and Administration'--no luck. I've also searched searched my file structure using the various bash utilities, which nearly always solves problems of this sort quite easily, but in this case obviously searching by name or even pattern is more problematic.

    Read the article

  • Varchar2 and Oracle quick question

    - by DAVID
    Hi guys im using varchar2 for a product name field, but when i query the databa from the run SQL command line it shows too many empty spaces, how can i fixe this withouth changing the datatype here is the link to the ss http://img203.imageshack.us/img203/20/varchar.jpg

    Read the article

  • Visual Studio 2008 - Focus on textbox doesn't work when run from VS2008 as admin

    - by Steve
    This is a minor, esoteric problem and not a showstopper, but I'm wondering what other VS2008 idiosyncrasies are out there. If you make a web app, add a textbox and run a focus function for the textbox on page load, it works when you run VS not as administrator from a Vista non-administrator account or if you run the page from a browser instance run on its own, not from VS. If you browse the page from VS as Admin, the focus doesn't work. This for Cassini and from the local IIS. Stuff like this just makes me trust VS a tad less.

    Read the article

  • Problem including dynamic image in Eclipse BIRT 2.5.0 report on Windows

    - by schmeedy
    I have a BIRT 2.5.0 report design with a dynamic image (URL is specified through report parameter, image formats tried - .png, .bmp). When running the report from our application on Ubuntu, everything renders OK. When doing exactly the same thing on Windows, there's following message instead of the actual image: Current report item is not supported in this report format. Same problem occurs when including image with a fixed URL - even though the image is displayed and loaded in the Report Designer, it's not rendered in report generated from our application. Again, this happens only on Windows. The only way I managed to get the image into a rendered report was through embedding it into the report design file, which is not suitable as the image has to be dynamic.

    Read the article

  • ASP.NET, JQuery - Sharing regular expressions

    - by Steve
    If you have a fair number of regular expressions used by both client (javascript) and server side code (C#, vb.net) and want to store them in one place to avoid duplication, where do you store them? I could use registerscript and write out the regex as strings, but just wondering if there is something more elegant.

    Read the article

  • Windows 7 Audio Mixer - Alternative?

    - by barfoon
    Hey everyone, Does anyone know of an app that could serve as an alternative to the mixer in Windows 7? I am looking to quickly adjust the volume of various devices easily (preferably with a keystroke to open the panel perhaps?). If anyone knows of any other tools/shortcuts, please post them here. Thanks!

    Read the article

  • Wireframe mock-up software

    - by Dave Jarvis
    Requirements Looking for wireframe mock-up software for web apps with the following constraints: Desktop application (supports Linux) (can be online) Export all pages to separate image files (PNG or SVG preferred) Template for all pages Drag and drop standard HTML widgets for <forms> Tabbed panels (that allow content on the different tabs) Shuttle controls Saves in an XML format (XSLT could convert to HTML) Widget alignment and resizing (relative to other widgets) Under $100.00 USD Examples That come close: Cacoo - Not a desktop application; does not have a true tabbed panel widget Pencil - Export feature has serious bugs (missing text); no template? Balsamiq - Installation proved cantankerous on Linux (due to Adobe AIR) Mockingbird - No shuttle controls; no auto-resize of widgets Pencil & paper - Not a good look for a formal document presented to clients Any others that meet the requirements?

    Read the article

  • Android XML - how to get items aligned far left, center, and far right

    - by 68060
    Hi, I have this XML code which generates a button, a textview and another button, How do I go about getting the button to appear in far left, the textview in the center and the last button on the far right? < ?xml version="1.0" encoding="utf-8"?> < LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" <Button android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Cancel"> </Button> <TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="New Place"> </TextView> <Button android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Save"> </Button>

    Read the article

  • Remove deleted page from Google search results

    - by Steven
    So I have a website that I recently made changes to, and one of the changes was removing a page from the site. I deleted the page, it doesn't exist anymore. However, when you search for my site, one of the results is the page that I deleted. People are clicking on the page and getting an error. How do I remove that page from the search results?

    Read the article

  • date() is showing December 1969

    - by Doug
    $sql = "SELECT * FROM news ORDER BY `news_id` DESC LIMIT 1"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $date = $row['time_posted']; echo "<i> " .date("Y/m/d", $date) . "</i>: "; I used timestamp in mysql. So, what's the problem?

    Read the article

  • Vim, LaTeX, and version controlI

    - by Bkkbrad
    I'm writing a LaTeX document in vim, and I have it hard wrapping at 80 characters to make reading easier. However, this causes problems with tracking changes with in version control. For example, inserting "Lorem ipsum" at the beginning of this text: 1 Dolor sit amet, consectetur adipiscing elit. Phasellus bibendum lobortis lectus 2 quis porta. Aenean vestibulum magna vel purus laoreet at molestie massa 3 suscipit. Vestibulum vestibulum, mauris nec convallis ultrices, tellus sapien 4 ullamcorper elit, dignissim consectetur justo tellus et nunc. results in: 1 Lorum ipsum dolor sit amet, consectetur adipiscing elit. Phasellus bibendum 2 lobortis lectus quis porta. Aenean vestibulum magna vel purus laoreet at 3 molestie massa suscipit. Vestibulum vestibulum, mauris nec convallis ultrices, 4 tellus sapien ullamcorper elit, dignissim consectetur justo tellus et nunc. When I review this change in git, it tells me that all the lines of the paragraph have changed because of the wrapping, even though only one semantic change has occurred. One way around this problem is to have every sentence on its own line. This looks the same in the rendered document, but the source now is harder to read, because each line has quite a different line length: 1 Lorum ipsum dolor sit amet, consectetur adipiscing elit. 2 Phasellus bibendum lobortis lectus quis porta. 3 Aenean vestibulum magna vel purus laoreet at molestie massa suscipit. 4 Vestibulum vestibulum, mauris nec convallis ultrices, tellus sapien ullamcorper elit, dignissim consectetur justo tellus et nunc. (If I soft wrap at 80, things still look bad, just in a different way.) Is it possible to have my text on disk with one newline per sentence, but display and edit it in vim as if the text of each paragraph was one long line, soft wrapped at 80 characters? I assume it requires some vim-foo rather than tweaking git or LaTeX.

    Read the article

  • How to determine if a file will be logically moved or physically moved.

    - by Frederic Morin
    The facts: When a file is moved, there's two possibilities: The source and destination file are on the same partition and only the file system index is updated The source and destination are on two different file system and the file need to be moved byte per byte. (aka copy on move) The question: How can I determine if a file will be either logically or physically moved ? I'm transferring large files (700+ megs) and would adopt a different behaviors for each situation. Edit: I've already coded a moving file dialog with a worker thread that perform the blocking io call to copy the file a meg at a time. It provide information to the user like rough estimate of the remaining time and transfer rate. The problem is: how do I know if the file can be moved logically before trying to move it physically ?

    Read the article

  • iPhone MFMailComposeViewController's "cancel" button displays Action Sheet w/ incorrect orientation.

    - by user211790
    I've been trying to add in-app email functionality and have been somewhat successful. The MailCompose view is displayed properly. But when "Cancel" is pressed the Action Sheet with "Delete", "Save as Draft" and "Cancel" animates in from the left as if the view controller is set to portrait mode*, yet the width (or height depending on how you look at it) is that of an action sheet in landscape mode as seen in the following image: http://dansandland.com/storage/screen-shot-2.png *The view controller is set to Landscape Left, both in the plist file and the shouldAutorotateToInterfaceOrientation method of all view controllers. MFMailComposeViewController code in a view controller: MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; controller.mailComposeDelegate = self; [controller setSubject:@"In app email..."]; [controller setMessageBody:@"...email body." isHTML:NO]; [self presentModalViewController:controller animated:YES]; [controller release]; Any ideas?

    Read the article

  • DWR and Jquery into spring MVC 2.5

    - by Mark Estrada
    Hi, From my shallow reading, Spring MVC does not support jquery directly. It does enable integration with DWR framework. From my understanding of DWR, it is an ajax framework that allows you to call javas methods from javascript. Can I use both in my application? With Jquery handling most of the javascript code and client side interaction and DWR making the ajax calls? I am leaning towards learning jquery but there is no out of the box support for it in spring 2.5.

    Read the article

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