Search Results

Search found 1449 results on 58 pages for 'hints'.

Page 16/58 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • named/bind zone file parser in C#

    - by Michal Rogozinski
    Hi, I'm looking for a bind/named zone file parser in .NET C#. If there is anything I could import/convert I would be interested too. Unfortunately there's not much, or I'm having troubles finding it. My goal is to make sure a zone file is syntax-errors-free before I push it to the server. I'd appreciate any help or hints. Thanks

    Read the article

  • Calculating correlation coefficient using PostgreSQL?

    - by Dave
    I have worked out how to calculate the correlation coefficient between two fields if both are in the same table: SELECT corr(column1, column2) FROM table WHERE <my filters>; ...but I can't work out how to do it when the columns are from different tables (I need to apply the same filters to both tables). Any hints, please?

    Read the article

  • Prototype set selected option based on other select

    - by xain
    Hi, how can I "copy" the selected option between two s that have the same options using prototype ? I tried getting the selected option from the "master" combo using function getSelectedArea() { $$('#areacont1 option').find(function(ele){return !!ele.selected}) } which returns null And setting the second combo using var c2ROptions = $$('select#areacont2 option') c2ROptions[getSelectedArea()].selected = true That obviously doesn't work because the function returns null. Any hints? Thanks.

    Read the article

  • CKEditor disable HTML transformation

    - by flos
    I've got a problem with CKEditor. Especially the br- and img-Tags are transformed to not be valid. In the source-view I see and but when I inspect the rte-source the slashes are gone as well as when submitting the form. Can someone tell me where I can disable this or enable XHTML-conformity? The embedding page is XHTML. Thank to any hints, ideas or solutions.

    Read the article

  • XML: remove child node of a node

    - by nebenmir
    I want to find all nodes in a xml file that have a certain tag-name, lets say "foo". If those foo-tags have them thelves child nodes with node-name "bar", then I want to remove those nodes. The result should be written to a file. // remove this one // don't remove this one Thanx for any hints. As the tag indicates, I would like to do this with python.

    Read the article

  • How do you specify a really large character in UIButton?

    - by Epsilon Prime
    I have a series of buttons that have suit symbols on them. Currently I provide these suit symbols as bitmaps. In preparation for iPhone 4 I'd like to use text instead. However Interface Builder rescales the button to account for whitespace underneath the symbol so I can't get the image to fill the button completely. Any hints on getting Interface Builder to behave?

    Read the article

  • WPF DataGrid Get All SelectedRows

    - by anvarbek raupov
    Have to use free WPF DataGrid (I thought Infragistics libraries are bad, I take it back after this) for this project of mine. Looks like DataGrid doesnt have clean MVVM Friendly way of getting the list of selectedRows ? I can data bind to SelectedItem="{Binding SelectedSourceFile}" but this only shows the 1st selected row. Need to be able to get all selected rows. Any hints to do it cleanly via MVVM ?

    Read the article

  • a constructor as a delegate - is it possible in C#?

    - by akavel
    I have a class like below: class Foo { public Foo(int x) { ... } } and I need to pass to a certain method a delegate like this: delegate Foo FooGenerator(int x); Is it possible to pass the constructor directly as a FooGenerator value, without having to type: delegate(int x) { return new Foo(x); } ? EDIT: For my personal use, the question refers to .NET 2.0, but hints/responses for 3.0+ are welcome as well.

    Read the article

  • How Should I Generate Trade Statistics For CouchDB/Rails3 Application?

    - by James
    My Problem: I am trying to developing a web application for currency traders. The application allows traders to enter or upload information about their trades and I want to calculate a wide variety of statistics based on what the user entered. Now, normally I would use a relational database for this, but I have two requirements that don't fit well with a relational database so I am attempting to use couchdb. Those two problems are: 1) Primarily, I have a companion desktop application that users will be able to work with and replicate to the site using couchdb's awesome replication feature and 2) I would like to allow users to be able to define their own custom things to track about trades and generate results based off of what they enter. The schema less nature of couch seems perfect here, but it may end up being harder than it sounds. (I already know couch requires you to define views in advance and such so I was just planning on sticking all the custom attributes in an array and then emitting the array in the view and further processing from there.) What I Am Doing: Right now I am just emitting each trade in couch keyed by each user's system and querying with the key of the system to get an array of trades per system. Simple. I am not using a reduce function currently to calculate any stats because I couldn't figure out how to get everything I need without getting a reduce overflow error. Here is an example of rows that are getting emitted from couch: {"total_rows":134,"offset":0,"rows":[ {"id":"5b1dcd47221e160d8721feee4ccc64be", "key":["80e40ba2fa43589d57ec3f1d19db41e6","2010/05/14 04:32:37 +0000"], null, "doc":{ "_id":"5b1dcd47221e160d8721feee4ccc64be", "_rev":"1-bc9fe763e2637694df47d6f5efb58e5b", "couchrest-type":"Trade", "system":"80e40ba2fa43589d57ec3f1d19db41e6", "pair":"EUR/USD", "direction":"Buy", "entry":12600, "exit":12700, "stop_loss":12500, "profit_target":12700, "status":"Closed", "slug":"101332132375", "custom_tracking": [{"name":"signal", "value":"Pin Bar"}] "updated_at":"2010/05/14 04:32:37 +0000", "created_at":"2010/05/14 04:32:37 +0000", "result":100}} ]} In my rails 3 controller I am basically just populating an array of trades such as the one above and then extracting out the relevant data into smaller arrays that I can compute my statistics on. Here is my show action for the page that I want to display the stats and all the trades: def show @trades = Trade.by_system(:startkey => [@system.id], :endkey => [@system.id, Time.now ]) @trades.each do |trade| if trade.result > 0 @winning_trades << trade.result elsif trade.result < 0 @losing_trades << trade.result else @breakeven_trades << trade.result end if trade.direction == "Buy" @long_trades << trade.result else @short_trades << trade.result end if trade["custom_tracking"] != nil @custom_tracking << {"result" => trade.result, "variables" => trade["custom_tracking"]} end end end I am omitting some other stuff that is going on, but that is the gist of what I am doing. Then I am calculating stuff in the view layer to produce some results: <% winning_long_trades = @long_trades.reject {|trade| trade <= 0 } %> <% winning_short_trades = @short_trades.reject {|trade| trade <= 0 } %> <ul> <li>Total Trades: <%= @trades.count %></li> <li>Winners: <%= @winning_trades.size %></li> <li>Biggest Winner (Pips): <%= @winning_trades.max %></li> <li>Average Win(Pips): <%= @winning_trades.sum/@winning_trades.size %></li> <li>Losers: <%= @losing_trades.size %></li> <li>Biggest Loser (Pips): <%= @losing_trades.min %></li> <li>Average Loss(Pips): <%= @losing_trades.sum/@losing_trades.size %></li> <li>Breakeven Trades: <%= @breakeven_trades.size %></li> <li>Long Trades: <%= @long_trades.size %></li> <li>Winning Long Trades: <%= winning_long_trades.size %></li> <li>Short Trades: <%= @short_trades.size %></li> <li>Winning Short Trades: <%= winning_short_trades.size %></li> <li>Total Pips: <%= @winning_trades.sum + @losing_trades.sum %></li> <li>Win Rate (%): <%= @winning_trades.size/@trades.count.to_f * 100 %></li> </ul> This produces the following results, which aside from a few things is exactly what I want: Total Trades: 134 Winners: 70 Biggest Winner (Pips): 1488 Average Win(Pips): 440 Losers: 58 Biggest Loser (Pips): -516 Average Loss(Pips): -225 Breakeven Trades: 6 Long Trades: 125 Winning Long Trades: 67 Short Trades: 9 Winning Short Trades: 3 Total Pips: 17819 Win Rate (%): 52.23880597014925 What I Am Wondering- Finally The Actual Questions: I am starting to get really skeptical of how well this method will work when a user has 5,000 trades instead of just 134 like in this example. I anticipate most users will only have somewhere under 200 per year, but some users may have a couple thousand trades per year. Probably no more than 5,000 per year. It seems to work ok now, but the page load times are already getting a tad high for my tastes. (About 800ms to generate the page according to rails logs with about a 250ms of that spent in the view layer.) I will end up caching this page I am sure, but I still need the regenerate the page each time a trade is updated and I can't afford to have this be too slow. Sooo..... Is doing something similar here possible with a straight couchdb reduce function? I am assuming handing this off to couch would possibly help with larger data sets. I couldn't figure out how, but I suppose that doesn't mean it isn't possible. If possible, any hints will be helpful. Could I use a list function if a reduce was not available due to reduce constraints? Are couchdb list functions suitable for this type of calculations? Anyone have any idea of whether or not list functions perform well? Any hints what one would look like for the type of calculations I am trying to achieve? I thought about other options such as running the calculations at the time each trade was saved or nightly if I had to and saving the results to a statistics doc that I could then query so that all the processing was done ahead of time. I would like this to be the last resort because then I can't really filter out trades by time periods dynamically like I would really like to. (I want to have a slider that a user can slide to only show trades from that time period using the startkey and endkey in couchdb if I can.) If I should continue running the calculations inside the rails app at the time of the page view, what can I do to improve my current implementation. I am new to rails, couch and programming in general. I am sure that I could be doing something better here. Do I need to create an array for each stat or is there a better way to do that. I guess I just would really like some advice on how to tackle this problem. I want to keep the page generation time minimal since I anticipate these being some of the highest trafficked pages. My gut is that I will need to offload the statistics calculation to either couch or run the stats in advance of when they are called, but I am not sure. Lastly: Like I mentioned above, one of the primary reasons for using couch is to allow users to define their own things to track per trade. Getting the data into couch is no problem, but how would I be able to take the custom_tracking array and find how many winning trades for each named tracking attribute. If anyone can give me any hints to the possibility of doing this that would be great. Thanks a bunch. Would really appreciate any help. Willing to fork out some $$$ if someone wants to take on the problem for me. (Don't know if that is allowed on stack overflow or not.)

    Read the article

  • Use database dynamically

    - by Redi
    This execution it is giving me an error! Any hints of what am I missing? declare @dbname varchar(500) set @dbname='master' Exec (' Use ' + @dbname + ' go create PROCEDURE [dbo].[krijo_database] @dbname nvarchar(2000), @Direktoria varchar(4000) AS BEGIN declare @stringu nvarchar(100) set @stringu = ''CREATE DATABASE '' + @dbname exec (@stringu) End ')

    Read the article

  • The best way to refresh my .aspx site with a Timer in C#?

    - by radbyx
    I have a default.aspx page that needs to be refresh every 10 sec. My solution so far is a javascript function, but it only works in firefux and not IE. I'm looking for a way to handle the refresh mecanism in the default.aspx.cs page instead, with some sort of Timer. Any good simple sugestions/hints or solutions out there that can lead me in the right direction?

    Read the article

  • How would you program Pascal's triangle in R?

    - by Peter Flom
    I am reading, on my own (not for HW) about programming, and one exercise involved programming Pascal's triangle in R. My first idea was to make a list and then append things to it, but that didn't work too well. Then I thought of starting with a vector, and making a list out of that, at the end. Then I thought of making a matrix, and making a list out of that at the end. Not sure which way to even approach this. Any hints? thanks

    Read the article

  • C# and C++ Library Again

    - by Betamoo
    Please take a look at previous question: http://stackoverflow.com/questions/2892343/c-and-c-library After implementing a wrapper class library in C++/CLI as suggested before, I wonder now how to use C++ pre-compiled header file in C#.....? PS: I did not find a dll file -or something simillar- to import to C# as I have expected... Any hints?

    Read the article

  • C#: Perform Operations on GPU, not CPU (Calculate Pi)

    - by Alex
    Hello, I've recently read a lot about software (mostly scientific/math and encryption related) that moves part of their calculation onto the GPU which causes a 100-1000 (!) fold increase in speed for supported operations. Is there a library, API or other way to run something on the GPU via C#? I'm thinking of simple Pi calculation. I have a GeForce 8800 GTX if that's relevant at all (would prefer card independent solution though). Any hints are appreciated!

    Read the article

  • free (or cheap) css or xhtmlcss editing tools

    - by Crash893
    I'm pretty new to web development and I am working on our company website. I've thus far been doing all the work in notepad++ but i was wondering if there was something a little more friendly to the eyes for layout and WYSIWYG formatting. the catch is i have basically no budget so anything like dreamweaver (which i heard is not the best application for tis anyway ) is out. any suggestions or hints would be greatly appreciated

    Read the article

  • I wrote a new X11 keyboard layout file, how do I get my system to recognize it?

    - by grimborg
    I like to configure my keys my way, so I wrote a keyboard symbols file and I put it in /usr/share/X11/xkb/symbols/cat I use it by running setxkbmap cat -variant dvorak (and it works), but it doesn't show up in the console configuration (dpkg-reconfigure console-setup) nor in the Gnome keyboard settings... nor anywhere else, so I have to run setxkbmap every time. I suppose that I have to register it somewhere, but where? Any hints? Thanks!

    Read the article

  • help troubleshooting deadlocks in sql server database

    - by Makach
    I've got two database servers, (1) production (2) test on the production database I get frequent deadlocks and I'm trying to find out what is causing it. I take a backup of the database in production and restore it in test and when I perform the exact same scenario that yields deadlocks on the production server I am unable to reproduce in test. any ideas/tips/hints would be much appreciated.

    Read the article

  • ASP Classic and JavaScript check for session status

    - by StealthRT
    I am in need of some help with trying to figure out how to go about checking the users session and seeing if they are still logged in or not. The problem being is because i have a static page that pretty much loads everything into "tabs" using jquery. So when the user navigates the page, it really never leaves that same page they started out on. Hints my problem in trying to determine if they are still logged in or not when they click on update their information on their profile or whatnot.

    Read the article

  • Closing a form and then call another one.

    - by elvispt
    Hi. I want to close the current form I'm on (MainForm) and then opening a second one (Form). I've tried: private void buttonStartQuiz_Click(object sender, EventArgs e) { this.Close(); Form2 form2 = new Form2(); form2.ShowDialog(); } Or adding the this.Close(); after the ShowDialog also doesn't work. Any hints? Thank you.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >