Search Results

Search found 135 results on 6 pages for 'werner'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Generate terminal graphics

    - by Werner
    Hi, which open source software options exist for generating terminal graphics? I mean, there is for instance the nice matplotlib, which can generate beautiful plots from data, in PNG or similar formats. But there are similar alternatives for generating just kind of ascii graphics? Thanks

    Read the article

  • Run script before compilation in Makefile

    - by Werner
    Hi, in a Makefile, I have: all: $(PROG) $(PROG): $(CPP_OBJS) $(CPP_LD) $(CPP_LD_FLAGS) $(CPP_OBJS) -o $(PROG) I would like to add some script before the compilation so I tried: all: $(PROG) $(PROG): $(CPP_OBJS) sh script.sh ; $(CPP_LD) $(CPP_LD_FLAGS) $(CPP_OBJS) -o $(PROG) but it does not work. What is the right way of running a script in this case before the compilation? Thanks

    Read the article

  • ASP.NET dropdownlist callback doesn't work inside div

    - by Wayne Werner
    This seems super weird to me. I have a callback handler done in VB which works fine with this code: <!-- Div Outside Form --> <div class="container"> <form id="querydata" runat="server"> <asp:DropDownList runat="server" ID="myddl" AutoPostBack="true" OnSelectedIndexChanged="myddlhandler"> <asp:ListItem>Hello</asp:ListItem> <asp:ListItem>Goodbye</asp:ListItem> </asp:DropDownList> <asp:Label runat="server" ID="label1"></asp:Label> </form> </div> <!-- Yep, they're matching --> I can change the value and everything is A-OK, but if I change the code to this (div inside form): <form id="querydata" runat="server"> <!-- Div inside form doesn't work :( --> <div class="container"> <asp:DropDownList runat="server" ID="myddl" AutoPostBack="true" OnSelectedIndexChanged="myddlhandler"> <asp:ListItem>Hello</asp:ListItem> <asp:ListItem>Goodbye</asp:ListItem> </asp:DropDownList> <asp:Label runat="server" ID="label1"></asp:Label> </div> </form> It the postback no longer works. Is how asp is supposed to work? Or is it some magic error that only works for me? And most importantly, if asp is not supposed to work this way, how should I be doing this? Thanks!

    Read the article

  • Indent or comment several text lines with VI

    - by Werner
    Hi, can vim or vim be used to comment or indent at the same time a number of lines? For instance: for item in Lista: ind = int(floor(1.0*(item-lmin)/width)) if ind==nintervals: ind=ind-1 print item,ind comment it to: #for item in Lista: #ind = int(floor(1.0*(item-lmin)/width)) #if ind==nintervals: #ind=ind-1 #print item,ind or indent it to: for item in Lista: ind = int(floor(1.0*(item-lmin)/width)) if ind==nintervals: ind=ind-1 print item,ind Thanks P.D. Is relevant the difference between VI and VIM?

    Read the article

  • How do I get a pathname in ASP.NET?

    - by Wayne Werner
    Hi, I'm working on an internal web app and I need to get a directory path from the user. I (obviously) can use the asp:FileUpload to get a file but I can't find anything to just get a directory path. Is there any (preferably simple) way to have a directory-chooser dialog in asp.net? I haven't been able to find any solution on Google or SO yet... Thanks

    Read the article

  • Lisp data security/validation

    - by Wayne Werner
    This is really just a conceptual question for me at this point. In Lisp, programs are data and data are programs. The REPL does exactly that - reads and then evaluates. So how does one go about getting input from the user in a secure way? Obviously it's possible - I mean viaweb - now Yahoo!Stores is pretty secure, so how is it done?

    Read the article

  • Matrix in python

    - by Werner
    Hi, I am very new to Python, I need to read numbers from a file and store them in a matrix like I would do it in fortran or C; for i for j data[i][j][0]=read(0) data[i][j][1]=read(1) data[i][j][2]=read(2) ... ... How can I do the same in Python? I read a bit but got confused with tuples and similar things If you could point me to a similar example it would be great thanks

    Read the article

  • How do you get "in the zone"?

    - by Wayne Werner
    Hi, I've just started my first real programming job and am pleased to discover that this is exactly what I want to do for the rest of my life. When it comes round to ~1 hour before it's time to go home and I think "Man, do I have to go home already?" I'd say that's A Good Thing(tm). One thing I've discovered though is that it takes a little while for my brain to get "in gear" or "in the Zone", so I'm curious what other folks do to get programming at their prime. My current flow is when I get here I visit SO and look at the interesting problems - I find it helps get my brain moving. After 20-30 minutes I start looking at my code/specs/etc to decide what I want/need to work on first. So how do you get started?

    Read the article

  • Bash or python for changing spacing in files

    - by Werner
    Hi, I have a set of 10000 files. In all of them, the second line, looks like: AAA 3.429 3.84 so there is just one space (requirement) between AAA and the two other columns. The rest of lines on each file are completely different and correspond to 10 columns of numbers. Randomly, in around 20% of the files, and due to some errors, one gets BBB 3.429 3.84 so now there are two spaces between the first and second column. This is a big error so I need to fix it, changing from 2 to 1 space in the files where the error takes place. The first approach I thought of was to write a bash script that for each file reads the 3 values of the second line and then prints them with just one space, doing it for all the files. I wonder what do oyu think about this approach and if you could suggest something better, bashm python or someother approach. Thanks

    Read the article

  • How do I connect to SQL Server with VB?

    - by Wayne Werner
    Hi, I'm trying to connect to a SQL server from VB. The SQL server is across the network uses my windows login for authentication. I can access the server using the following python code: import odbc conn = odbc.odbc('SignInspection') c = conn.cursor() c.execute("SELECT * FROM list_domain") c.fetchone() This code works fine, returning the first result of the SELECT. However, I've been trying to use the SqlClient.SqlConnection in VB, and it fails to connect. I've tried several different connection strings but this is the current code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As New SqlClient.SqlConnection conn.ConnectionString = "data source=signinspection;initial catalog=signinspection;integrated security=SSPI" Try conn.Open() MessageBox.Show("Sweet Success") 'Insert some code here, woo Catch ex As Exception MessageBox.Show("Failed to connect to data source.") MessageBox.Show(ex.ToString()) Finally conn.Close() End Try End Sub It fails miserably, and it gives me an error that says "A network-related or instance-specific error occurred... (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) I'm fairly certain it's my connection string, but nothing I've found has given me any solid examples (server=mySQLServer is not a solid example) of what I need to use. Thanks! -Wayne

    Read the article

  • Python or matplotlib limitation error

    - by Werner
    Hi, I wrote an algorithm using python and matplotlib that generates histograms from some text input data. When the number of data input is approx. greater than 15000, I get in the (append) line of my code: mydata = [] for i in range(len(data)): mydata.append(string.atof(data[i])) the error: Traceback (most recent call last): File "get_histogram_picture.py", line 25, in <module> mydata.append(string.atof(data[i])) File "/usr/lib/python2.6/string.py", line 388, in atof return _float(s) ValueError: invalid literal for float(): -a can it be an error in python ? What is the solution ? Thanks

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

< Previous Page | 1 2 3 4 5 6  | Next Page >