Search Results

Search found 3240 results on 130 pages for 'groupwise maximum'.

Page 54/130 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • even small file upload stops activity on apache/rails

    - by Pavel K.
    on my rails(2.3.5) app(currently 50-70rpm, maximum response time around 0.7s), uploading even 700k file(using paperclip plugin) locks up the server for web requests for everyone for 2 minutes! (other apps on same server work normally) does anyone have a clue why that might be happening? i am using some mysql transactions which lock the database also if that might be an issue i read http://www.therailsway.com/2009/4/23/uploading-files but it couldn't be locking server for 2 minutes for a small file, could it?!

    Read the article

  • Bash PWD Shortening

    - by dlibby00
    I'm looking for a bash function that will shorten long path names to keep my PS1 variable from getting excessively long. Something along the lines of: /this/is/the/path/to/a/really/long/directory/i/would/like/shortened might end up as: /t../i../t../p../to/a/r../l../d../i/w../like/shortened something that the took the path and a maximum acceptable number of characters to shorten to would be perfect for my .bashrc file.

    Read the article

  • Characters spilled over multiple columns in Oracle 11g?

    - by vicky21
    This is related to question: How to store unlimited characters in Oracle 11g? If maximum I need is 8000 characters, can I just add 3 more varchar2 columns so that I will have 4 columns with 2000 char each to get 8000 chars. So when the first column is full, values would be spilled over to the next column and so on. Will this design have any bad side effects? Please suggest.

    Read the article

  • Increasing the character length of the Title Column in Sharepoint Site

    - by Nathan Fisher
    Is it possible to increase the length of the Title column for a site above the 255 characters. My requirement is that I use a field that is longer than the maximum 255 chars but because the Title column is a required field I need to enter something in it. Rather than enter garbage just because I have to, I would like to use it. If not, then my current thoughts for a workaround will be make a copy of the first 255 chars of a seperate column that I am able to make longer.

    Read the article

  • ignore some values in insert into select from sql stament

    - by nitroxn
    Suppose that I have a Table Symbols(Symbol, Value) and a Table SymbolValues (Symbol, Value) which contains a list of values for the symbol. How to choose maximum values fromt he SymbolValues table and insert into Symbols table. For Example, The SymbolValues Table has following values A 1 A 2 A 3 B 6 B 7 Then only A 3 and B 7 should be inserted in the Symbols table. Is this possible using insert into select statement. Thanks

    Read the article

  • Jquery to max number from a set of divs

    - by Matias
    Guys, Given the following HTML <div class"myclass">10</div> <div class"myclass">25</div> <div class"myclass">50</div> <div class"myclass">20</div> I want Jquery to return the maximum value found on divs with class:"myclass". (This is 50) I thought of using .find.text() will be a good starting point but cant figure out exactly how, Help is greatly appreciatted, Thanks

    Read the article

  • SQL: How to order values inside group by

    - by Denis Yaremov
    Consider the following MS SQL Server table: ID | X | Y ------+-------+------- 1 | 1 | 1 2 | 1 | 2 3 | 1 | 3 4 | 2 | 40 5 | 2 | 500 6 | 3 | 1 7 | 3 | 100 8 | 3 | 10 I need to select the ID of the row that has the maximum value of Y grouped by x, i.e: ID | X | Y ------+-------+------- 3 | 1 | 3 5 | 2 | 500 7 | 3 | 100 The query will be nested several times so an optimal performance solution is required... Thank you!

    Read the article

  • How can I set time limit on get_file_contents in PHP?

    - by Jagira
    Hello, At times the get_file_contents takes too long and that hangs the entire script. Is there any way of setting a time out limit on get_file_contents, without modifying the maximum execution time of the script? Edit: Its taking long because the file does not exist. I am getting "failed to open stream: HTTP request failed!" error. But it takes forever.

    Read the article

  • Understanding omission failure in distributed systems

    - by karthik A
    The following text says this which I'm not able to quite agree : client C sends a request R to server S. The time taken by a communication link to transport R over the link is D. P is the maximum time needed by S to recieve , process and reply to R. If omission failure is assumed ; then if no reply to R is received within 2(D+P) , then C will never recieve a reply to R . Why is the time here 2(D+P). As I understand shouldn't it be 2D+P ?

    Read the article

  • Rspec and Rails 3 - Problem Validating Nested Attribute Collection Size

    - by MunkiPhD
    When I create my Rspec tests, I keep getting a validation of false as opposed to true for the following tests. I've tried everything and the following is the measly code that I have now - so if it's waaaaay wrong, that's why. class Master < ActiveRecord::Base attr_accessible :name, :specific_size # Associations ---------------------- has_many :line_items accepts_nested_attributes_for :line_items, :allow_destroy => true, :reject_if => lambda { |a| a[:item_id].blank? } # Validations ----------------------- validates :name, :presence => true, :length => {:minimum => 3, :maximum => 30} validates :specific_size, :presence => true, :length => {:minimum => 4, :maximum => 30} validate :verify_items_count def verify_items_count if self.line_items.size < 2 errors.add(:base, "Not enough items to create a master") end end end And here it the items model: class LineItem < ActiveRecord::Base attr_accessible :specific_size, :other_item_type_id # Validations -------------------- validates :other_item_type_id, :presence => true validates :master_id, :presence => true validates :specific_size, :presence => true # Associations --------------------- belongs_to :other_item_type belongs_to :master end The RSpec Tests: before(:each) do @master_lines = [] @master_lines << LineItem.new(:other_item_type_id => 1, :master_id => 2, :specific_size => 1) @master_lines << LineItem.new(:other_item_type_id => 2, :master_id => 2, :specific_size => 1) @attr = {:name => "Some Master", :specific_size => "1 giga"} end it "should create a new instance given a valid name and specific size" do @master = Master.create(@attr) line_item_one = @master.line_items.build(:other_item_type_id => 1, :specific_size => 1) line_item_two = @master.line_items.build(:other_item_type_id => 2, :specific_size => 2) @master.line_items.size === 2 @master.should be_valid end it "should have at least two items to be valid" do master = Master.new(:name => "test name", :specific_size => "1 mega") master_item_one = LineItem.new(:other_item_type_id => 1, :specific_size => 2) master_item_two = LineItem.new(:other_item_type_id => 2, :specific_size => 1) master.line_items << master_item_one master.should_not be_valid master.line_items << master_item_two master.line_items.size.should === 2 master.should be_valid end I'm very new to Rspec and Rails - and I've been failing at this for the past couple of hours. Thanks for any help in advance.

    Read the article

  • jQuery Validator - Dynamic Text

    - by James
    Adding a validator to my form: jQuery.validator.addMethod('whatever', function(val, el) { // whatever goes here }, 'A maximum of ' + $('#my_id_here').val() + ' categories can be selected.'); This doesn't fly. I always get undefined. Is this a good, simple way to do this? Thanks

    Read the article

  • Not using Web Server for html pages

    - by Manoj
    For an intranet application instead of using a proper web server, it has been planned to just deploy static html pages by sharing it over the network. This static html page is continously updated in the background by a program running on that PC and people access this html page by typing the shared file path directly in the browser. A maximum of 10 simultaneous users are expected to access it. Can any one see the disadvantages or advantages in this type of deployment?

    Read the article

  • Javascript Memory Limit

    - by Dänu
    Hey Guys, I was wondering if there is a "maximum" of data a javascript application can store. I guess this is handled by the browser and that each one has it's limitation? Am I guessing right? Wrong? If there isn't a limit, will a page file be created (wouldn't be very secure I guess).

    Read the article

  • UPLOAD DATA IN DATA BASE

    - by rajson
    HI friends, i wish to store image and resume of user in the data base. i am using mysql data base and php5. i want to know that which field i set means data type.and how i set the range (maximum size) for uploaded data.

    Read the article

  • How do you prevent a Hudson slave from archiving artifacts?

    - by Wilfred Springer
    It turns out our slaves spend a considerable amount of time moving the archived artifacts back to the master Hudson node. It at least triples the duration of the build. It would be nice if there would be a way to prevent it. However, setting the maximum number of builds to keep doesn't have an influence at all. Is there another way to prevent sending the results back to the central Hudson master?

    Read the article

  • Crossthread exception and invokerequired solution doesn't change my control value

    - by Pilouk
    EDIT Solution : Here i'm setting my byref value in each object then i'm running a backgroundworker Private Sub TelechargeFichier() Dim DocManquant As Boolean = False Dim docName As String = "" Dim lg As String = "" Dim telechargementFini As Boolean = False lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1478") prgBar.Maximum = m_listeFichiers.Count For i As Integer = 0 To m_listeFichiers.Count - 1 m_listeFichiers(i).Set_ByRefLabel(lblMessage) m_listeFichiers(i).Set_ByRefPrgbar(prgBar) m_listeThreads.Add(New Thread(AddressOf m_listeFichiers(i).DownloadMe)) Next m_bgWorker = New BackgroundWorker m_bgWorker.WorkerReportsProgress = True AddHandler m_bgWorker.DoWork, AddressOf DownloadFiles m_bgWorker.RunWorkerAsync() ''Completed 'lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1383") 'Me.DialogResult = System.Windows.Forms.DialogResult.OK End Sub Here is my downloadFiles function : Note that each start will do the downloadMe function see below too Private Sub DownloadFiles(sender As Object, e As DoWorkEventArgs) For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Start() Next For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Join() Next End Sub I have multiple thread that each will download a ftp file. I would like that each file that have been completed will set a value to a progress bar and a label from my UI thread. For some reason invokerequired never change to false. Here is my little function that start all the thread Private Sub TelechargeFichier() Dim DocManquant As Boolean = False Dim docName As String = "" Dim lg As String = "" Dim telechargementFini As Boolean = False lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1478") prgBar.Maximum = m_listeFichiers.Count For i As Integer = 0 To m_listeFichiers.Count - 1 m_listeFichiers(i).Set_ByRefLabel(lblMessage) m_listeFichiers(i).Set_ByRefPrgbar(prgBar) m_listeThreads.Add(New Thread(AddressOf m_listeFichiers(i).DownloadMe)) Next For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Start() Next For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Join() Next 'Completed lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1383") Me.DialogResult = System.Windows.Forms.DialogResult.OK End Sub Here my property that hold the Byref control from the UI thread. This is in my object which content the addressof function that will download the file (DownloadMe) Public Sub Set_ByRefPrgbar(ByRef prgbar As ProgressBar) m_prgBar = prgbar End Sub Public Sub Set_ByRefLabel(ByRef lbl As EasyDeal.Controls.EasyDealLabel3D) m_lblMessage = lbl End Sub Here is the download function : Public Sub DownloadMe() Dim ftpReq As FtpWebRequest Dim ftpResp As FtpWebResponse = Nothing Dim streamInput As Stream Dim fileStreamOutput As FileStream Try ftpReq = CType(WebRequest.Create(EasyDeal.Controls.Common.FTP_CONNECTION & m_downloadFtpPath & m_filename), FtpWebRequest) ftpReq.Credentials = New NetworkCredential(FTP_USER, FTP_PASS) ftpReq.Method = WebRequestMethods.Ftp.DownloadFile ftpResp = ftpReq.GetResponse streamInput = ftpResp.GetResponseStream() fileStreamOutput = New FileStream(m_outputPath, FileMode.Create, FileAccess.ReadWrite) ReadWriteStream(streamInput, fileStreamOutput) Catch ex As Exception 'Au pire la fichier sera pas downloader Finally If ftpResp IsNot Nothing Then ftpResp.Close() End If Dim nomFichier As String = m_displaynameEN If EasyDealChangeLanguage.GetCurrentLanguageTypes = EasyDealChangeLanguage.EnumLanguageType.Francais Then nomFichier = m_displaynameFR End If If m_lblMessage IsNot Nothing Then EasyDealCommon.TH_SetControlText(m_lblMessage, String.Format(EasyDealChangeLanguage.Instance.GetStringFromResourceName("1479"), nomFichier)) End If If m_prgBar IsNot Nothing Then EasyDealCommon.TH_SetPrgValue(m_prgBar, 1) End If End Try End Sub Here is the crossthread invoke solution function : Public Sub TH_SetControlText(ByVal ctl As Control, ByVal text As String) If ctl.InvokeRequired Then ctl.BeginInvoke(New Action(Of Control, String)(AddressOf TH_SetControlText), ctl, text) Else ctl.Text = text End If End Sub Public Sub TH_SetPrgValue(ByVal prg As ProgressBar, ByVal value As Integer) If prg.InvokeRequired Then prg.BeginInvoke(New Action(Of ProgressBar, Integer)(AddressOf TH_SetPrgValue), prg, value) Else prg.Value += value End If End Sub The problem is the invokerequired never get to false it actually goes in to beginInvoke but never end in the Else section to set the value.

    Read the article

  • Is there a way to reliably detect the total number of CPU cores?

    - by John Sheares
    I need a reliable way to detect how many CPU cores are on a computer. I am creating a numerically intense simulation C# application and want to create the maximum number of running threads as cores. I have tried many of the methods suggested around the internet like Environment.ProcessorCount, using WMI, this code: http://blogs.adamsoftware.net/Engine/DeterminingthenumberofphysicalCPUsonWindows.aspx. None of them seem to think a AMD X2 has two cores. Any ideas?

    Read the article

  • specifying ThreadPoolExecutor problem

    - by Sarmun
    Is there any way to create Executor that will have always at least 5 threads, and maximum of 20 threads, and unbounded queue for tasks (meaning no task is rejected) I tried new ThreadPoolExecutor(5, 20, 60L, TimeUnit.SECONDS, queue) with all possibilities that I thought of for queue: new LinkedBlockingQueue() // never runs more than 5 threads new LinkedBlockingQueue(1000000) // runs more than 5 threads, only when there is more than 1000000 tasks waiting new ArrayBlockingQueue(1000000) // runs more than 5 threads, only when there is more than 1000000 tasks waiting new SynchronousQueue() // no tasks can wait, after 20, they are rejected and none worked as wanted.

    Read the article

  • how to do this in MySql Query??

    - by deep
    ID NAME AMT 1 Name1 1000 2 Name2 500 3 Name3 3000 4 Name1 5000 5 Name2 2000 6 Name1 3000 consider above table as sample. am having a problem in my sql query, Am using like this. Select name,amt from sample where amt between 1000 and 5000 it returns all the values in the table between 1000 and 5000, instead I want to get maximum amount record for each name i.e., 3 name3 3000 4 name1 5000 5 name2 2000

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >