Search Results

Search found 841 results on 34 pages for 'frequency'.

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

  • What would be a good way to request comments?

    - by WarpEnterprises
    In the project/team I'm working the frequency of comments is a little low. One reason might be that it is not clear to the long-time devs what lines in the code really needs a comment (each part of the project has quite fixed devs). To increase this we plan to let team members review the code and check in "requests for comments", which the main dev of that part should replace with useful comments. Do you think this could work? If "yes": what tags should we use to mark? (e.g. //TODO please comment) Can you think of alternatives for this process? Edit: I appreciate your answers about best practice in commenting and writing code, and I completey agree. But my question targets the cases where refactoring is not an option (not wanting to change working code, not wanting to "accuse" main dev of producing code that needs refactoring,...) - so only more or better comments are an option (at least for this question).

    Read the article

  • Should I install programs from a source tarball (`.tar.gz`), from the Ubuntu Software Centre, or from elsewhere?

    - by Flimm
    There are several ways to install an application in Ubuntu: You can download a source tarball (generally a .tar.gz or a .tar.bz2 file) and install it manually. (See How to install a .tar.gz (or .tar.bz2) file?) You can download a .deb file and install it manually, using dpkg or the Software Centre. You can search for the application in the Ubuntu Software Centre and install it there, or use apt with the official Ubuntu repositories. You can find a PPA or a third-party repo, and install it from there. What are the pros and cons of each method? Please discuss security implications, frequency of updates and program reliability of each method in your answer.

    Read the article

  • installation of mac os 10.6.2

    - by mahesh
    hi this is mahesh.i had run mac by using vmware workstation 7.0 in my windows pc.i installed mac 10.4.8 os succesfully.but i cant able to install mac10.6.2 version.it shows an error that "invalid front-side bus frequency 66000000 hz,disabling cpu".please help me to solve this and suggest any link to easily understand how to install mac 0s 10.6.2 succesfully.

    Read the article

  • Tab Controls effecting other Controls.

    - by VBeginner
    Hopefully I've explained myself good enough this time. Can't seem to get a real answer. Trying to make it so when I select certain tabs, certain controls on the left will disappear or reappear. http://img43.imageshack.us/img43/7533/scrnshotg.jpg Also, when "Stats" is selected, I need it to auto-select "Frequency" Ex. On click/focus/select (whatever, nothing seems to work)... ComboBox.Visible = True Thank you.

    Read the article

  • fft understanding

    - by maximus
    Can somebody give a good explanation of FFT image transform How the FFT transformed image and it's Re^2+Im^2 image can be analyzed? I just want to understand something when loiking to the image and it's frequency.

    Read the article

  • Python - calculate multinomial probability density functions on large dataset?

    - by Seafoid
    Hi, I originally intended to use MATLAB to tackle this problem but the inbuilt functions has limitations that do not suit my goal. The same limitation occurs in NumPy. I have two tab-delimited files. The first is a file showing amino acid residue, frequency and count for an in-house database of protein structures, i.e. A 0.25 1 S 0.25 1 T 0.25 1 P 0.25 1 The second file consists of quadruplets of amino acids and the number of times they occur, i.e. ASTP 1 Note, there are 8,000 such quadruplets. Based on the background frequency of occurence of each amino acid and the count of quadruplets, I aim to calculate the multinomial probability density function for each quadruplet and subsequently use it as the expected value in a maximum likelihood calculation. The multinomial distribution is as follows: f(x|n, p) = n!/(x1!*x2!*...*xk!)*((p1^x1)*(p2^x2)*...*(pk^xk)) where x is the number of each of k outcomes in n trials with fixed probabilities p. n is 4 four in all cases in my calculation. I have created three functions to calculate this distribution. # functions for multinomial distribution def expected_quadruplets(x, y): expected = x*y return expected # calculates the probabilities of occurence raised to the number of occurrences def prod_prob(p1, a, p2, b, p3, c, p4, d): prob_prod = (pow(p1, a))*(pow(p2, b))*(pow(p3, c))*(pow(p4, d)) return prob_prod # factorial() and multinomial_coefficient() work in tandem to calculate C, the multinomial coefficient def factorial(n): if n <= 1: return 1 return n*factorial(n-1) def multinomial_coefficient(a, b, c, d): n = 24.0 multi_coeff = (n/(factorial(a) * factorial(b) * factorial(c) * factorial(d))) return multi_coeff The problem is how best to structure the data in order to tackle the calculation most efficiently, in a manner that I can read (you guys write some cryptic code :-)) and that will not create an overflow or runtime error. To data my data is represented as nested lists. amino_acids = [['A', '0.25', '1'], ['S', '0.25', '1'], ['T', '0.25', '1'], ['P', '0.25', '1']] quadruplets = [['ASTP', '1']] I initially intended calling these functions within a nested for loop but this resulted in runtime errors or overfloe errors. I know that I can reset the recursion limit but I would rather do this more elegantly. I had the following: for i in quadruplets: quad = i[0].split(' ') for j in amino_acids: for k in quadruplets: for v in k: if j[0] == v: multinomial_coefficient(int(j[2]), int(j[2]), int(j[2]), int(j[2])) I haven'te really gotten to how to incorporate the other functions yet. I think that my current nested list arrangement is sub optimal. I wish to compare the each letter within the string 'ASTP' with the first component of each sub list in amino_acids. Where a match exists, I wish to pass the appropriate numeric values to the functions using indices. Is their a better way? Can I append the appropriate numbers for each amino acid and quadruplet to a temporary data structure within a loop, pass this to the functions and clear it for the next iteration? Thanks, S :-)

    Read the article

  • Microsoft Charting Histogram Zero With Line

    - by Brownman98
    I am currently developing an application that uses chart control to create a histogram. The histogram displays data correctly however I would like to center the data. Right now the Min and Max are automatically set. I would like the graph to always force its to be displayed symmetrically. Here is an example of what I'm trying to accomplish. Basically I would like it to look like a normal distribution graph. Does anyone know how I can do the the following: Get the graph to be displayed symmetrically? Always show a zero line. Here is the aspx markup. <asp:Chart ID="ChartHistogram" runat="server" Height="200" Width="300"> <Series> <asp:Series Name="SeriesDataHistogram" ChartType="RangeColumn" Color="#4d5b6e" BorderColor="#ffffff" BorderDashStyle="NotSet"> </asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartAreaMain" BorderColor="#CCCCCC"> <AxisX TitleFont="Arial, 7pt" LabelAutoFitMaxFontSize="7"> <MajorGrid LineColor="#FFFFFF" Interval="5" /> <LabelStyle Format="P1" /> </AxisX> <AxisY Title="Frequency" TitleFont="Arial, 7pt" LabelAutoFitMaxFontSize="7"> <MajorGrid LineColor="#FFFFFF" /> </AxisY> </asp:ChartArea> </ChartAreas> </asp:Chart> Here is the code behind private void DrawHistogram(List<ReturnDataObject> list) { foreach (ReturnDataObject r in list) this.ChartHistogram.Series["SeriesDataHistogram"].Points.AddY(r.ReturnAmount); // HistogramChartHelper is a helper class found in the samples Utilities folder. HistogramChartHelper histogramHelper = new HistogramChartHelper(); // Show the percent frequency on the right Y axis. histogramHelper.ShowPercentOnSecondaryYAxis = false; // Create histogram series histogramHelper.CreateHistogram(ChartHistogram, "SeriesDataHistogram", "Histogram"); } Thanks for any help.

    Read the article

  • OpenAL tone generation on iPhone

    - by Sj
    So I have been looking around for some time now on a way to produce a variable tone on the iPhone using OpenAL, the issue being the Apple has deprecated the ALUT part of OpenAL that has the alutCreateBufferWaveform that would be perfect for this. I was wondering if anyone had any idea how to make a tone generator using OpenAL on the iPhone SDK. All I need is the ability to produce a certain frequency tone consistantly over and over again. This is a last resort so sorry if it sounds kind of stupid.

    Read the article

  • High quality graph/waveform display component in C#.

    - by dlopeztt
    Hi, I'm looking for a fast, professionally looking and customizable waveform display component in C#. I'm wanting to display mainly real-time audio waveforms (fast!) in both time and frequency domain. I would like the ability to zoom, change axis settings, display multiple channels, customize the feel and colors etc... Anybody knows of anything, whether commercial or not? Thank you! Diego

    Read the article

  • How does one calculate CPU utilization programmatically ?

    - by Scott Davies
    Hi, I have a benchmarking program that calculates the time (in milliseconds and ticks), for a persistance to Entity Framework 4.0. Is there a way to calculate CPU load ? I am guessing that I would need to query Windows to find out my CPU frequency, how many cores, etc. Does this sound right ? If so, what part of the .NET framework relates to querying the system ? I am guessing System.Diagnostics ? Thanks, Scott

    Read the article

  • Job scheduler UI widget?

    - by tinny
    Does anyone know of a good Job scheduler UI widget? The ideal component would be a Javascript widget (hopefully JQuery) that allows a user to select a frequency which is converted to a cron expression. Anything good out there?

    Read the article

  • Select random row from MySQL (with probability)

    - by James Simpson
    I have a MySQL table that has a row called cur_odds which is a percent number with the percent probability that that row will get selected. How do I make a query that will actually select the rows in approximately that frequency when you run through 100 queries for example? I tried the following, but a row that has a probability of 0.35 ends up getting selected around 60-70% of the time. SELECT * FROM table ORDER BY RAND()*cur_odds DESC

    Read the article

  • Playing an arbitrary tone with Android.

    - by fiXedd
    Is there any way to make Android emit a sound of arbitrary frequency (meaning, I don't want to have pre-recorded sound files)? I've looked around and ToneGenerator was the only thing I was able to find that was even close, but it seems to only be capable of outputting the standard DTMF tones. Any ideas?

    Read the article

  • Grep and Awk in Windows Invalid Char in Expression Error

    - by Nathan
    I am new to grep and awk - using Windows 7 (I downloaded grep and awk for windows from GnuWin). I am have having trouble running this script: grep -Fwf dictionary.txt frequency.txt | awk '{print $2 "," $1}' I get the error: awk: '{print awk: ^ invalid char ''' in expression I believe it might have something to do with having to use double quotes in Windows, but I tried all the combinations I can think of and still it doesn't work. Can anyone help? Thanks

    Read the article

  • Dynamic programming solution to the subset-sum decision problem

    - by Gail
    How can a dynamic programming solution for the unbounded knapsack decision problem be used to come up with a dynamic programming solution to the subset-sum decision problem? This limitation seems to render the unbounded knapsack problem useless. In the unbounded knapsack, we simply store true or false for if some subset of integers sum up to our target value. However, if we have a limit on the frequency of the use of these integers, the optimal substructure at least appears to fail. How can this be done?

    Read the article

  • Creating simple waveforms with CoreAudio

    - by Koning Baard
    I am new to CoreAudio, and I would like to output a simple sine wave and square wave with a given frequency and amplitude through the speakers using CA. I don't want to use sound files as I want to synthesize the sound. What do I need to do this? And can you give me an example or tutorial? Thanks.

    Read the article

  • Is the Finch audio library for iPhone capable of doing this?

    - by mystify
    I need to: - start / stop sounds with lengths between 0.1 and 10 seconds - change the playback volume I want to / would like to / would be nice to have to: - change the playback speed - change the playback pitch / frequency - pause an sound and resume playing it later - play a sound backwards Is Finch my best friend here?

    Read the article

  • MS Access MSChart.Graph.8 not printing

    - by Tanj
    Software: Microsoft Access 2007 SP2 Database File Version: Access 2000 I have an access program that I inherited from a previous employee. It uses forms for reports and since I don't have much experience in access I have continued to do this. I have created a copy of the program for another project and modified it to suit. I am having trouble getting more then one chart to print. All the charts display in form view, they all have the same properties (excepting data, position, etc.) For some reason they are not printing. They don't even show up in the print preview. I am thinking it must be something with the graphs themselves as they sometimes lose all information. I have to open the graphs in edit mode and change the data source from column to row and back again so that it gets redrawn. (Refresh doesn't fix it) So right now I don't even have a clue as to where to look so ideas are welcome. Edit #1 It seems to be a problem with linking to an unbound form. Subform Field Linker: Can't build a link between unbound forms. The query for the main form is SELECT tTest.ixTest, tMotorTypes.ixMotorType, tMotorTypes.asMotorType, tMotorTypes.fDeprecated, tTestType.asTest, tTest.asSerialNum, tTest.asOrderNum, tTest.asFrameNum, tTest.asRotorNum, tTest.asOperator, tTest.iStation, tTest.dtTestDate, tTest.ixTestType FROM tMotorTypes INNER JOIN (tTestType INNER JOIN tTest ON tTestType.ixTestType=tTest.ixTestType) ON tMotorTypes.ixMotorType=tTest.ixMotorType; The query for the chart is: SELECT qGraphRSTTemperatures.Frequency, qGraphRSTTemperatures.[Drive End], qGraphRSTTemperatures.[Non Drive End], qGraphRSTTemperatures.[Air In], qGraphRSTTemperatures.Core FROM qGraphRSTTemperatures ORDER BY qGraphRSTTemperatures.ixTemperature; Query qGraphRSTTemperatures: SELECT tElectricalData.dblFrequency AS Frequency, tTemperatures.dblDrvEnd AS [Drive End], tTemperatures.dblNonDrvEnd AS [Non Drive End], tTemperatures.dblAirIn AS [Air In], tTemperatures.dblCore AS Core, tSubTest.ixTest, tTemperatures.ixTemperature FROM (tSubTest INNER JOIN tElectricalData ON tSubTest.ixSubTest = tElectricalData.ixSubTest) LEFT JOIN tTemperatures ON tElectricalData.ixElectrical = tTemperatures.ixElectrical WHERE (((tSubTest.ixSubTestType)=5)) ORDER BY tSubTest.ixTest, tTemperatures.ixTemperature; So how come, in the form view it shows the graph with the correct data when linked thus: Child field: ixTest Master field: ixTest but won't print the graph. The graph will print if I remove the links, but then I have all the data from chart query as it is not limited by ixTest. edit #2 It seems to be a data retrieval/rendering issue in printing. Is there anything in printing that changes the context of records with respect to parent/child relationships?

    Read the article

  • how to programatically determine Bluetooth master/slave roles?

    - by Rich
    So in a bluetooth piconet, there is one master with upto seven slaves. The master sets the clock and frequency hop that the slaves sync with. But is there a way to determine which device is the master and which is the slave? I'm mainly interested in portable devices (Android,iPhone) but beggars can't be choosers, if anybody has info in this field I would be interested. Thanks

    Read the article

  • Is it good practice to use std::size_t all over the place?

    - by dehmann
    I have a lot of constants in my code that are unsigned numbers, e.g. counters, frequency cutoffs, lengths, etc. I started using std::size_t for all of these, instead of int or unsigned int. Is that the right thing to do? I started it because the STL containers use it for their sizes, it's used for string position, etc.

    Read the article

  • Return only the new database items since last check in Rails

    - by Smith
    I'm fairly new to Ruby, and currently trying to implement an AJAX style commenting system. When the user views a topic, all the current comments on that topic will be displayed. The user can post a comment on the page of a topic and it should automatically display without having to refresh the page, along with any new comments that have been posted since the last comment currently displayed to the user. The comments should also automatically refresh at a specified frequency. I currently have the following code: views/idea/view.html.erb <%= periodically_call_remote(:update => "div_chat", :frequency => 1, :position => "top", :url => {:controller => "comment", :action => :test_view, :idea_id => @idea.id } ) %> <div id="div_chat"> </div> views/comment/test_view.html.erb <% @comments.each do |c| %><div id="comment"> <%= c.comment %> </div> <% end %> controllers/comment_controller.rb class CommentController < ApplicationController before_filter :start_defs def add_comment @comment = Comment.new params[:comment] if @comment.save flash[:notice] = "Successfully commented." else flash[:notice] = "UnSuccessfully commented." end end def test_render @comments = Comment.find_all_by_idea_id(params[:idea_id], :order => "created_at DESC", :conditions => ["created_at > ?", @latest_time] ) @latest = Comment.find(:first, :order => "created_at DESC") @latest_time = @latest.created_at end def start_defs @latest = Comment.find(:first, :order => "created_at ASC") @latest_time = @latest.created_at end end The problem is that every time periodically_call_remote makes a call, it returns the entire list of comments for that topic. From what I can tell, the @latest_time gets constantly reset to the earliest created_at, rather than staying updated to the latest created_at after the comments have been retrieved. I'm also not sure how I should directly refresh the comments when a comment is posted. Is it possible to force a call to periodically_call_remote on a successful save?

    Read the article

  • Visual Studio C++ list iterator not decementable

    - by user69514
    I keep getting an error on visual studio that says list iterator not decrementable: line 256 My program works fine on Linux, but visual studio compiler throws this error. Dammit this is why I hate windows. Why can't the world run on Linux? Anyway, do you see what my problem is? #include <iostream> #include <fstream> #include <sstream> #include <list> using namespace std; int main(){ /** create the list **/ list<int> l; /** create input stream to read file **/ ifstream inputstream("numbers.txt"); /** read the numbers and add them to list **/ if( inputstream.is_open() ){ string line; istringstream instream; while( getline(inputstream, line) ){ instream.clear(); instream.str(line); /** get he five int's **/ int one, two, three, four, five; instream >> one >> two >> three >> four >> five; /** add them to the list **/ l.push_back(one); l.push_back(two); l.push_back(three); l.push_back(four); l.push_back(five); }//end while loop }//end if /** close the stream **/ inputstream.close(); /** display the list **/ cout << "List Read:" << endl; list<int>::iterator i; for( i=l.begin(); i != l.end(); ++i){ cout << *i << " "; } cout << endl << endl; /** now sort the list **/ l.sort(); /** display the list **/ cout << "Sorted List (head to tail):" << endl; for( i=l.begin(); i != l.end(); ++i){ cout << *i << " "; } cout << endl; list<int> lReversed; for(i=l.begin(); i != l.end(); ++i){ lReversed.push_front(*i); } cout << "Sorted List (tail to head):" << endl; for(i=lReversed.begin(); i!=lReversed.end(); ++i){ cout << *i << " "; } cout << endl << endl; /** remove first biggest element and display **/ l.pop_back(); cout << "List after removing first biggest element:" << endl; cout << "Sorted List (head to tail):" << endl; for( i=l.begin(); i != l.end(); ++i){ cout << *i << " "; } cout << endl; cout << "Sorted List (tail to head):" << endl; lReversed.pop_front(); for(i=lReversed.begin(); i!=lReversed.end(); ++i){ cout << *i << " "; } cout << endl << endl; /** remove second biggest element and display **/ l.pop_back(); cout << "List after removing second biggest element:" << endl; cout << "Sorted List (head to tail):" << endl; for( i=l.begin(); i != l.end(); ++i){ cout << *i << " "; } cout << endl; lReversed.pop_front(); cout << "Sorted List (tail to head):" << endl; for(i=lReversed.begin(); i!=lReversed.end(); ++i){ cout << *i << " "; } cout << endl << endl; /** remove third biggest element and display **/ l.pop_back(); cout << "List after removing third biggest element:" << endl; cout << "Sorted List (head to tail):" << endl; for( i=l.begin(); i != l.end(); ++i){ cout << *i << " "; } cout << endl; cout << "Sorted List (tail to head):" << endl; lReversed.pop_front(); for(i=lReversed.begin(); i!=lReversed.end(); ++i){ cout << *i << " "; } cout << endl << endl; /** create frequency table **/ const int biggest = 1000; //create array size of biggest element int arr[biggest]; //set everything to zero for(int j=0; j<biggest+1; j++){ arr[j] = 0; } //now update number of occurences for( i=l.begin(); i != l.end(); i++){ arr[*i]++; } //now print the frequency table. only print where occurences greater than zero cout << "Final list frequency table: " << endl; for(int j=0; j<biggest+1; j++){ if( arr[j] > 0 ){ cout << j << ": " << arr[j] << " occurences" << endl; } } return 0; }//end main

    Read the article

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