Search Results

Search found 311 results on 13 pages for 'wayne werner'.

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

  • Is it possible to read Fortran formatted data in Python?

    - by Werner
    I get output files from very old Fortran programs, which look like: 0.81667E+00 -0.12650E+01 -0.69389E-03 0.94381E+00 -0.11985E+01 -0.11502E+00 0.96064E+00 -0.11333E+01 -0.17616E+00 0.10202E+01 -0.12435E+01 -0.93917E-01 0.10026E+01 -0.10904E+01 -0.15108E+00 0.90516E+00 -0.11030E+01 -0.19139E+00 0.98624E+00 -0.11598E+01 -0.22970E+00 Is it possible to read this in Python and convert the numbers to "normal" floats?

    Read the article

  • View plain text files with different background colors in Mac OSX, for different programming languag

    - by Werner
    Hi, I work with Mac OS X Leopard. I usually have 5 or 10 text files opened at the same time with different programming languages; one for a bash script, another for a python one, etc. When I use exposé all of them look the same, so it is difficult to select them. I wonder how could I work with just plain text files in OSX, so when they are opened in an editor the background color changes or some other thign, so when using exposé it is clear to me which window belongs to what language. I thought about inserting some kind of info to the last line of each document, and then creat some applescript that converts it to RTF or someother text document which includes color in bacjground, so then it is opened with textmate or someother app. Do you know a better approach for this? Thanks

    Read the article

  • How do I make a docstring in VB.NET?

    - by Wayne Werner
    Hi, I'm writing a .dll in Visual Basic. When writing code in Visual Studio if I do something like Console.WriteLine( it will pop up a tooltip with a bit of documentation for the function. Is it possible to write something in my function/sub that would provide that information to Visual Studio? Thanks

    Read the article

  • On-the-fly thumbnails PHP

    - by Wayne
    I came up with this: <?php $dir = $_GET['dir']; header('Content-type: image/jpeg'); $create = imagecreatetruecolor(150, 150); $img = imagecreatefromjpeg($dir); imagecopyresampled($create, $img, 0, 0, 0, 0, 150, 150, 150, 150); imagejpeg($create, null, 100); ?> It works by accessing: http://domain.com/image.php?dir=thisistheimage.jpg Which works fine... but the output is awful: Can someone fix my code for the image to be 150 x 150 covering the black area... Thanks.

    Read the article

  • PHP 5.4: disable warning "Creating default object from empty value"

    - by Werner
    I want to migrate code from PHP 5.2 to 5.4. This worked fine so far except that all the code I use makes extensive use of just using an object with a member without any initialisation, like: $MyObject->MyMember = "Hello"; which results in the warning: "Creating default object from empty value" I know that the solution would be to use: $MyObject = new stdClass(); $MyObject->MyMember = "Hello"; but it would be A LOT OF WORK to change this in all my code, because I use this many times in different projects. I know, it's not good style, but unfortunately I'm not able to spend the next weeks adding this to all of my code. I know I could set the php error_reporting to not reporting warnings, but I want to be able to still get other warnings and notices. This warning doesn't seem to be effected by enable or disable E_STRICT at all. So is there a way to just disable this warning?!

    Read the article

  • How to abort iPhone's NSXMLParser wait

    - by Wayne Lo
    When init the NSXLParser as below: NSXMLParser* xmlParser=[[NSXMLParser alloc] initWithContentsOfURL:[NSURL URLWithString:urlstring]]; if the server is down, it will wait for quite some time before the thread returns. It is really annoying even if I exit the application and restart the application, it will continue to wait with a black screen until it times out. How to I abort the init? Is there a better way to check whether the server is up before calling the parser? Thanks for helping.

    Read the article

  • Matplotlib installation problems

    - by Werner
    Hi, I need to install matplotlib in a remote linux machine, and I am a normal user there. I downlodad the source and run python setup.py build but I get errors, related with numpy, which is not installed, so I decieded to install it first. I download and compile with python setup.py build My question now is, how do I tell to teh matplotlib installation where the numpy files have been installed? Thanks

    Read the article

  • Vertical Aligned Text and Image in list

    - by Wayne
    Is there a way of vertical aligning text and an image in a list? e.g. <li>Some text here <img src="image.jpg" alt="" /></li> The text doesn't align in the middle of the side of the image, it appears at the bottom then the image is next to it. I need the text to be in the center point between the image on the side. What's the best way of doing it? I know having a image inside a list isn't valid HTML (AFAIK). Thanks :)

    Read the article

  • Fastest way to sort files

    - by Werner
    Hi, I have a huge text file with lines like: -568.563626 159 33 -1109.660591 -1231.295129 4.381508 -541.181308 159 28 -1019.279615 -1059.115975 4.632301 -535.370812 155 29 -1033.071786 -1152.907805 4.420473 -533.547101 157 28 -1046.218277 -1063.389677 4.423696 What I want is to sort the file, depending on the 5th column, so I would get -568.563626 159 33 -1109.660591 -1231.295129 4.381508 -535.370812 155 29 -1033.071786 -1152.907805 4.420473 -533.547101 157 28 -1046.218277 -1063.389677 4.423696 -541.181308 159 28 -1019.279615 -1059.115975 4.632301 For this I use: for i in file.txt ; do sort -k5n $i ; done I wonder if this is the fastest or more efficient way Thanks

    Read the article

  • How do I get IE to open a file with its associated application?

    - by Wayne
    MSTest produces an XML file with a .trx extension containing test results. If I have a .trx file on a machine without Visual Studio installed, I get prompted to "Use the Web Service..." or "Select from a list...", which is expected. If I have a .trx file on my development machine and I open it, it opens in Visual Studio, which is expected. If I click a link on a web page or in an email which gets a .trx file from my build server, it ALWAYS opens the XML in IE. How do I configure IE (or IIS on the build server) to open the remote .trx file in Visual Studio, if it's installed, or prompt if it's not? UPDATE: If I rename the .trx file on the server and give it various extensions (eg. .bmp, .msi, .txt, .zip), it still opens as XML in IE, so it's clearly going by the content of the file and not the declared MIME type.

    Read the article

  • Custom UIProgressView drawing weirdness

    - by Werner
    I am trying to create my own custom UIProgressView by subclassing it and then overwrite the drawRect function. Everything works as expected except the progress filling bar. I can't get the height and image right. The images are both in Retina resolution and the Simulator is in Retina mode. The images are called: "[email protected]" (28px high) and "[email protected]" (32px high). CustomProgressView.h #import <UIKit/UIKit.h> @interface CustomProgressView : UIProgressView @end CustomProgressView.m #import "CustomProgressView.h" @implementation CustomProgressView - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code } return self; } // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, 16); UIImage *progressBarTrack = [[UIImage imageNamed:@"progressBarTrack"] resizableImageWithCapInsets:UIEdgeInsetsZero]; UIImage *progressBar = [[UIImage imageNamed:@"progressBar"] resizableImageWithCapInsets:UIEdgeInsetsMake(4, 4, 5, 4)]; [progressBarTrack drawInRect:rect]; NSInteger maximumWidth = rect.size.width - 2; NSInteger currentWidth = floor([self progress] * maximumWidth); CGRect fillRect = CGRectMake(rect.origin.x + 1, rect.origin.y + 1, currentWidth, 14); [progressBar drawInRect:fillRect]; } @end The resulting ProgressView has the right height and width. It also fills at the right percentage (currently set at 80%). But the progress fill image isn't drawn correctly. Does anyone see where I go wrong?

    Read the article

  • Why does Custom UITableViewCell *sometimes* cause an NSInvalidArgumentException?

    - by Wayne Hartman
    I have created a custom UITableViewCell, but when I dequeue the cell, sometimes it throws an NSInvalidArgumentException: [UITableViewCell nameLabel]: unrecognized selector sent to instance 0x3b4e7f0 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[UITableViewCell nameLabel]: unrecognized selector sent to instance 0x3b4e7f0' Now, my custom UITableViewCell does have an attribute nameLabel, so I am confused why it is throwing this error. Below is the code I use to dequeue the cell: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; CTMenuItemVO* key = [[[self retrieveCartItems] allKeys] objectAtIndex:row]; NSNumber* quantity = [[self retrieveCartItems] objectForKey:key]; static NSString* SectionsTableIdentifier = @"SectionsTableIdentifier2"; OrderItemCell* cell = (OrderItemCell*)[tableView dequeueReusableCellWithIdentifier: SectionsTableIdentifier]; if (cell == nil) { NSArray* topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"OrderItemCell" owner:nil options:nil]; for(id currentObject in topLevelObjects) { if ([currentObject isKindOfClass:[UITableViewCell class]]) { cell = (OrderItemCell*) currentObject; break; } } } cell.nameLabel.text = key.Name; cell.qtyLabel.text = [quantity stringValue]; return cell; }

    Read the article

  • Chrome extension javascript array bug?

    - by Wayne Werner
    Hi, I'm working on a Google Chrome extension. In the popup I have the following code: var bookmarks = []; function appendBMTnode(node){ bookmarks.push([node[0].title, node[0].id]); } function addchildren(results){ for(x = 0; x < results.length; x++){ bookmarks.push([results[x].title, results[x].id]); chrome.bookmarks.getChildren(results[x].id, addchildren); } } function getallbookmarks(){ chrome.bookmarks.get('0', appendBMTnode); chrome.bookmarks.getChildren('0', addchildren); } console.debug(bookmarks.length); console.debug(bookmarks); Now, I would assume that the first command would issue the # of bookmarks I have. Indeed, when I use Chrome's debugger and add bookmarks.length to the watch list, 418 is the value. In the console of the debugger I can write bookmarks.length and it will give me the correct length. I can type for(x = 0; x < bookmarks.length; x++){ console.debug(bookmarks[x]); } and I get string representations of each inner array. However, that original console.debug(bookmarks.length) gives an output of zero. And if I add console.debug(bookmarks[0]); to the popup.html it tells me that the value is undefined. This seems like a bug to me, but my real question is how can I iterate over this list? Thanks

    Read the article

  • Refactoring an ASP.NET 2.0 app to be more "modern"

    - by Wayne M
    This is a hypothetical scenario. Let's say you've just been hired at a company with a small development team. The company uses an internal CRM/ERP type system written in .NET 2.0 to manage all of it's day to day things (let's simplify and say customer accounts and records). The app was written a couple of years ago when .NET 2.0 was just out and uses the following architectural designs: Webforms Data layer is a thin wrapper around SqlCommand that calls stored procedures Rudimentary DTO-style business objects that are populated via the sprocs A "business logic" layer that acts as a gateway between the webform and database (i.e. code behind calls that layer) Let's say that as there are more changes and requirements added to the application, you start to feel that the old architecture is showing its age, and changes are increasingly more difficult to make. How would you go about introducing refactoring steps to A) Modernize the app (i.e. proper separation of concerns) and B) Make sure that the app can readily adapt to change in the organization? IMO the changes would involve: Introduce an ORM like Linq to Sql and get rid of the sprocs for CRUD Assuming that you can't just throw out Webforms, introduce the M-V-P pattern to the forms Make sure the gateway classes conform to SRP and the other SOLID principles. Change the logic that is re-used to be web service methods instead of having to reuse code What are your thoughts? Again this is a totally hypothetical scenario that many of us have faced in the past, or may end up facing.

    Read the article

  • ASP.NET MVC Render Ajax / Standard View

    - by Wayne
    I am a little confused and making it alot more complicated than this needs to be! Here is what I have... A view which displays a drop down of US States. When the user chooses a state it loads a list of data from a database and returns the results (populates the View Model) and the View renders the information. What I wanted to do was have have the dropdown trigger an Ajax event which performs the data load, but also wanted it to depreciate if the user didn't have Javascript enabled. How would I go about rendering the view with AND without javascript / ajax? Hope that makes sense. Thanks for your help.

    Read the article

  • Execute a dll function in ASP.Net Bin not working, II7.

    - by Wayne Lo
    I am developing a remote control application where a client (aspx page in a browser) can request a server to "launch a notepad" (for testing purpose, for real life, turning off a light bulb, etc). So I created a dll with a simple function for launching the notepad (on the server side) and dropped this dll in the root bin folder. It worked fine when the aspx page is running under ASP.NET development server (launched from Visual Studio). But when I tested the same aspx page under a FireFox browser, it did not work (launch the notepad) even though it did call for the same function (I stepped through in debugger). Is this a permission issue? How do I set this up in IIS manager, or even better in web.config? Please help.

    Read the article

  • Problem with thumbnails after newly added - PHP on-the-fly method

    - by Wayne
    Hey again... to those that may have read my previous question that got solved a couple minutes ago .< The on-the-fly php script works perfectly, but when I went to upload new images into a gallery which I made myself, the images are resized to 150 x 150 for what I wanted... however, when it comes to new images being added it is all black... As you can see the three black images that were uploaded to the folder and the directory added to the database. What is causing this? If I view the source, the code is fine... the while loop in the PHP generates an output like this: <div class="view-wrap" id="photo-10"> <div class="view-icon"> <div class="img-label"> <a href="#" id="10" class="delete"><img src="img/small-delete.png" /> Delete</a> </div> <a href="img/events/Paintballing/24251_1395408043148_1170626626_1204038_5382765_n.jpg"> <img src="image.php?dir=img/events/Paintballing/24251_1395408043148_1170626626_1204038_5382765_n.jpg" alt="" width="110" height="110" /> </a> </div> </div> An example of one block. If I view the source (in Firefox) and click on the image.php?dir=img/events/Paintballing/24251_1395408043148_1170626626_1204038_5382765_n.jpg by exmaple, I can see the thumbnail at it's 150 x 150 size but in the layout, it shows a black thumbnail... Does anyone know why this is happening?

    Read the article

  • ASP.NET server data persistence

    - by Wayne Werner
    Hi, I'm not really sure exactly how the question should be phrased, so please be patient if I ask the wrong thing. I'm writing an ASP.NET application using VB as the code behind language. I have a data access class that connects to the DB to run the query (parameterized, of course), and another class to perform the validation tasks - I access this class from my aspx page. What I would like is to be able to store the data server side and wait for the user to choose from a few options based on the validity of the data. But unless my understanding is completely off, having persistent data objects on the server will give problems when multiple users connect? My ultimate goal is that once the data has been validated the end user can't modify it. Currently I'm validating the data, but I still have to retrieve it from the web form AFTER the user says OK, which obviously leaves open the possibility of injecting bad data either accidentally (unlikely) or on purpose (also unlikely for the use, but I'd prefer not to take the chance). So am I completely off in my understanding? If so, can someone point me to a resource that provides some instructions on keeping persistent data on the server, or provide instruction? Thanks!

    Read the article

  • Click to make body text larger | JavaScript

    - by Wayne
    Please note this is just an example: <img src="img/normal-font.png" onclick="javascript:document.body.style.fontSize = '13px';" /> &nbsp; <img src="img/medium-font.png" onclick="javascript:document.body.style.fontSize = '14px';" /> &nbsp; <img src="img/large-font.png"onclick="javascript:document.body.style.fontSize = '15px';" /> The body text does indeed enlarge if I choose one of them, but what I like to include is remembering what option you've chosen by reading cookies. In fact, I have no experience in creating cookies in JS, only in PHP. Could someone come up with an example of how to make cookies the simpliest way remembering my option, but whenever someone clicks another one, it should get rid of the cookie that was last set, e.g. Cookie value has 15px, then should update it or remove it with a new cookie with a new value of 13px and so on. Thanks :)

    Read the article

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