Search Results

Search found 3747 results on 150 pages for '500'.

Page 58/150 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • 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

  • Can MySQL reasonably perform queries on billions of rows?

    - by haxney
    I am planning on storing scans from a mass spectrometer in a MySQL database and would like to know whether storing and analyzing this amount of data is remotely feasible. I know performance varies wildly depending on the environment, but I'm looking for the rough order of magnitude: will queries take 5 days or 5 milliseconds? Input format Each input file contains a single run of the spectrometer; each run is comprised of a set of scans, and each scan has an ordered array of datapoints. There is a bit of metadata, but the majority of the file is comprised of arrays 32- or 64-bit ints or floats. Host system |----------------+-------------------------------| | OS | Windows 2008 64-bit | | MySQL version | 5.5.24 (x86_64) | | CPU | 2x Xeon E5420 (8 cores total) | | RAM | 8GB | | SSD filesystem | 500 GiB | | HDD RAID | 12 TiB | |----------------+-------------------------------| There are some other services running on the server using negligible processor time. File statistics |------------------+--------------| | number of files | ~16,000 | | total size | 1.3 TiB | | min size | 0 bytes | | max size | 12 GiB | | mean | 800 MiB | | median | 500 MiB | | total datapoints | ~200 billion | |------------------+--------------| The total number of datapoints is a very rough estimate. Proposed schema I'm planning on doing things "right" (i.e. normalizing the data like crazy) and so would have a runs table, a spectra table with a foreign key to runs, and a datapoints table with a foreign key to spectra. The 200 Billion datapoint question I am going to be analyzing across multiple spectra and possibly even multiple runs, resulting in queries which could touch millions of rows. Assuming I index everything properly (which is a topic for another question) and am not trying to shuffle hundreds of MiB across the network, is it remotely plausible for MySQL to handle this? UPDATE: additional info The scan data will be coming from files in the XML-based mzML format. The meat of this format is in the <binaryDataArrayList> elements where the data is stored. Each scan produces = 2 <binaryDataArray> elements which, taken together, form a 2-dimensional (or more) array of the form [[123.456, 234.567, ...], ...]. These data are write-once, so update performance and transaction safety are not concerns. My naïve plan for a database schema is: runs table | column name | type | |-------------+-------------| | id | PRIMARY KEY | | start_time | TIMESTAMP | | name | VARCHAR | |-------------+-------------| spectra table | column name | type | |----------------+-------------| | id | PRIMARY KEY | | name | VARCHAR | | index | INT | | spectrum_type | INT | | representation | INT | | run_id | FOREIGN KEY | |----------------+-------------| datapoints table | column name | type | |-------------+-------------| | id | PRIMARY KEY | | spectrum_id | FOREIGN KEY | | mz | DOUBLE | | num_counts | DOUBLE | | index | INT | |-------------+-------------| Is this reasonable?

    Read the article

  • Combining FileStream and MemoryStream to avoid disk accesses/paging while receiving gigabytes of data?

    - by w128
    I'm receiving a file as a stream of byte[] data packets (total size isn't known in advance) that I need to store somewhere before processing it immediately after it's been received (I can't do the processing on the fly). Total received file size can vary from as small as 10 KB to over 4 GB. One option for storing the received data is to use a MemoryStream, i.e. a sequence of MemoryStream.Write(bufferReceived, 0, count) calls to store the received packets. This is very simple, but obviously will result in out of memory exception for large files. An alternative option is to use a FileStream, i.e. FileStream.Write(bufferReceived, 0, count). This way, no out of memory exceptions will occur, but what I'm unsure about is bad performance due to disk writes (which I don't want to occur as long as plenty of memory is still available) - I'd like to avoid disk access as much as possible, but I don't know of a way to control this. I did some testing and most of the time, there seems to be little performance difference between say 10 000 consecutive calls of MemoryStream.Write() vs FileStream.Write(), but a lot seems to depend on buffer size and the total amount of data in question (i.e the number of writes). Obviously, MemoryStream size reallocation is also a factor. Does it make sense to use a combination of MemoryStream and FileStream, i.e. write to memory stream by default, but once the total amount of data received is over e.g. 500 MB, write it to FileStream; then, read in chunks from both streams for processing the received data (first process 500 MB from the MemoryStream, dispose it, then read from FileStream)? Another solution is to use a custom memory stream implementation that doesn't require continuous address space for internal array allocation (i.e. a linked list of memory streams); this way, at least on 64-bit environments, out of memory exceptions should no longer be an issue. Con: extra work, more room for mistakes. So how do FileStream vs MemoryStream read/writes behave in terms of disk access and memory caching, i.e. data size/performance balance. I would expect that as long as enough RAM is available, FileStream would internally read/write from memory (cache) anyway, and virtual memory would take care of the rest. But I don't know how often FileStream will explicitly access a disk when being written to. Any help would be appreciated.

    Read the article

  • mySQL Inconsistent Performance

    - by Jon Hatfield
    Hi, I'm running a mySQL query that joins various tables of 500,000+ rows. Sometimes it takes a second, other times around 15 seconds! This is on my local machine. I have experienced similarly varied times before on other intensive queries, does anyone know why this is? Thanks

    Read the article

  • ArrayList and Map problem in grails

    - by xain
    Hi, I have a service that contains a map: static Map cargosMap = ['1':'item1','2':'item 2','3':'item 3'] that is returned via a method in the service: static Map getCargos() { [cargosMap] } A controller calls it like this: def mform = { Map cargos = empService.getCargos() [cargos:cargos] } In the gsp, I have the select: <g:select name="cg1" from="${cargos}" /> But I'm getting the exception: Error 500: Executing action ....caused exception: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ... with class 'java.util.ArrayList' to class 'java.util.Map' Any clues ? Thanks

    Read the article

  • Need to Post json data using jQuery.ajax

    - by Anil Bhat
    I have a json of the following format which I need to send in the Ajax request through POST method: { “gbus”: [ { "code": "*" } ], “regions”: [ { "code": "*" } ], “offices”: [ { "code": "*" } ], “contracttypes”: [ { "code": "*" } ], “jobnumbers”: [ { "code": "*" } ], “disciplines”: [ { "code": "*" } ] } Its not working for me, giving 500 error always when I try to submit it. Please suggest if you have any idea.

    Read the article

  • What is GC holes?

    - by tianyi
    I wrote a long TCP connection socket server in C#. Spike in memory in my server happens. I used dotNet Memory Profiler(a tool) to detect where the memory leaks. Memory Profiler indicates the private heap is huge, and the memory is something like below(the number is not real,what I want to show is the GC0 and GC2's Holes are very very huge, the data size is normal): Managed heaps - 1,500,000KB Normal heap - 1400,000KB Generation #0 - 600,000KB Data - 100,000KB "Holes" - 500,000KB Generation #1 - xxKB Data - 0KB "Holes" - xKB Generation #2 - xxxxxxxxxxxxxKB Data - 100,000KB "Holes" - 700,000KB Large heap - 131072KB Large heap - 83KB Overhead/unused - 130989KB Overhead - 0KB Howerver, what is GC hole? I read an article about the hole: http://kaushalp.blogspot.com/2007/04/what-is-gc-hole-and-how-to-create-gc.html The author said : The code snippet below is the simplest way to introduce a GC hole into the system. //OBJECTREF is a typedef for Object*. { PointerTable *pTBL = o_pObjectClass->GetPointerTable(); OBJECTREF aObj = AllocateObjectMemory(pTBL); OBJECTREF bObj = AllocateObjectMemory(pTBL); //WRONG!!! “aObj” may point to garbage if the second //“AllocateObjectMemory” triggered a GC. DoSomething (aOb, bObj); } All it does is allocate two managed objects, and then does something with them both. This code compiles fine, and if you run simple pre-checkin tests, it will probably “work.” But this code will crash eventually. Why? If the second call to “AllocateObjectMemory” triggers a GC, that GC discards the object instance you just assigned to “aObj”. This code, like all C++ code inside the CLR, is compiled by a non-managed compiler and the GC cannot know that “aObj” holds a root reference to an object you want kept live. ======================================================================== I can't understand what he explained. Does the sample mean aObj becomes a wild pointer after GC? Is it mean { aObj = (*aObj)malloc(sizeof(object)); free(aObj); function(aObj);? } ? I hope somebody can explain it.

    Read the article

  • htaccess redirect when there is a space in url

    - by Mahsa Teimourikia
    I want to redirect from a old url which still appears in the google search to the new one. the old url is this: http://www.marionettecolla.org/file%20_mostra_milano/mostra_marionette-milano.htm and I want to redirect it to the home page: http://www.marionettecolla.org/ I used this in my .htaccess: Redirect http://marionettecolla.org/file\ _mostra_milano/mostra_marionette-milano.htm http://marionettecolla.org/ but I am getting Error 500... Does anybody know how to solve this problem?

    Read the article

  • How do I edit .htaccess to allow both rails and wordpress requests?

    - by jakefuentes
    I want to run an instance of wordpress within my rails app. I currently have wordpress files housed in public/wordpress, but I need to configure my .htaccess file to allow both types of requests. How do I do that? currently, .htaccess is: General Apache options AddHandler fcgid-script .fcgi RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)/!$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 "Application error Application failed to start properly"

    Read the article

  • jQuery slider onChange auto submit form

    - by bikey77
    I'm using a jQuery slider as a price range selector in a form. I'd like to have the form submit automatically when one of the values has been changed. I used a couple of examples I found on SO but they didn't work with my code. <form action="itemlist.php" method="post" enctype="application/x-www-form-urlencoded" name="priceform" id="priceform" target="_self"> <div id="slider-holder"> Prices: From <span id="pricefromlabel">100 &#8364;</span> To <span id="pricetolabel">500 &#8364;</span> <input type="hidden" id="pricefrom" name="pricefrom" value="100" /> <input type="hidden" id="priceto" name="priceto" value="500" /> <div id="slider-range"></div> <input name="Search" type="submit" value="Search" /> </div> </form> This is the code that displays the values of the slider and updates 2 hidden form fields I use to store the prices in order to submit: <script> $(function() { $("#slider-range" ).slider({ range: true, min: 0, max: 1000, values: [ <?=$minprice?>, <?=$maxprice?> ], start: function (event, ui) { event.stopPropagation(); }, slide: function( event, ui ) { $( "#pricefrom" ).val(ui.values[0]); $( "#priceto" ).val(ui.values[1]); $( "#pricefromlabel" ).html(ui.values[0] + ' &euro;'); $( "#pricetolabel" ).html(ui.values[1] + ' &euro;'); } }); return false; }); </script> I've tried adding this code as well as an data-autosubmit="true" attribute to the div but no result. $(function() { $('[data-autosubmit="true"]').change(function() { parentForm = $(this).('#priceform'); clearTimeout(submitTimeout); submitTimeout = setTimeout(function() { parentForm.submit() }, 100); }); I've also tried adding a $.post() event to the slider but I'm not very good with jQuery so I'm probably doing it wrong. Any help will be appreciated.

    Read the article

  • Cannot add or update a child row: a foreign key constraint fails

    - by Tom
    table 1 +----------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+----------------+ | UserID | int(11) | NO | PRI | NULL | auto_increment | | Password | varchar(20) | NO | | | | | Username | varchar(25) | NO | | | | | Email | varchar(60) | NO | | | | +----------+-------------+------+-----+---------+----------------+ table2 +------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------+----------------+ | UserID | int(11) | NO | MUL | | | | PostID | int(11) | NO | PRI | NULL | auto_increment | | Title | varchar(50) | NO | | | | | Summary | varchar(500) | NO | | | | +------------------+--------------+------+-----+---------+----------------+ com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (myapp/table2, CONSTRAINT table2_ibfk_1 FOREIGN KEY (UserID) REFERENCES table1 (UserID)) What have I done wrong? I read this: http://www.w3schools.com/Sql/sql_foreignkey.asp and i don't see whats wrong. :S

    Read the article

  • Jquery fadeout function redraws old image

    - by Mirage
    I am using this function to fadeout the old image on click and then fade in new image $("#left_img img").fadeOut(1000, function() { $(this).attr("src","/image/p2r.gif").fadeIn(500); }); The problem is when first image is faded out then before the new image fades in , the first image loads again for 1 second and then new image fades in

    Read the article

  • [iPhone Obj-C] How to move a label with the wave of the iPhone?

    - by Didi
    The code below is from the book Beginning iPhone 3 Development, chapter 15, using the accelerometer to control a ball. I want to use a label instead of the ball, and only move in the x direction. However, I donno how to revise the code to achieve this goal. Can anyone please help me? THX so much!!!! (id)initWithCoder:(NSCoder *)coder { if (self = [super initWithCoder:coder]) { self.image = [UIImage imageNamed:@"ball.png"]; self.currentPoint = CGPointMake((self.bounds.size.width / 2.0f) + (image.size.width / 2.0f), (self.bounds.size.height / 2.0f) + (image.size.height / 2.0f)); ballXVelocity = 0.0f; ballYVelocity = 0.0f; } return self; } (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } (void)drawRect:(CGRect)rect { // Drawing code [image drawAtPoint:currentPoint]; } (void)dealloc { [image release]; [acceleration release]; [super dealloc]; } //#pragma mark - - (CGPoint)currentPoint { return currentPoint; } - (void)setCurrentPoint:(CGPoint)newPoint { previousPoint = currentPoint; currentPoint = newPoint; if (currentPoint.x < 0) { currentPoint.x = 0; //ballXVelocity = 0; ballXVelocity = - (ballXVelocity / 2.0); } if (currentPoint.y < 0){ currentPoint.y = 0; //ballYVelocity = 0; ballYVelocity = - (ballYVelocity / 2.0); } if (currentPoint.x > self.bounds.size.width - image.size.width) { currentPoint.x = self.bounds.size.width - image.size.width; //ballXVelocity = 0; ballXVelocity = - (ballXVelocity / 2.0); } if (currentPoint.y > self.bounds.size.height - image.size.height) { currentPoint.y = self.bounds.size.height - image.size.height; //ballYVelocity = 0; ballYVelocity = - (ballYVelocity / 2.0); } CGRect currentImageRect = CGRectMake(currentPoint.x, currentPoint.y, currentPoint.x + image.size.width, currentPoint.y + image.size.height); CGRect previousImageRect = CGRectMake(previousPoint.x, previousPoint.y, previousPoint.x + image.size.width, currentPoint.y + image.size.width); [self setNeedsDisplayInRect:CGRectUnion(currentImageRect, previousImageRect)]; } (void)draw { static NSDate *lastDrawTime; if (lastDrawTime != nil) { NSTimeInterval secondsSinceLastDraw = -([lastDrawTime timeIntervalSinceNow]); ballYVelocity = ballYVelocity + -(acceleration.y * secondsSinceLastDraw); ballXVelocity = ballXVelocity + acceleration.x * secondsSinceLastDraw; CGFloat xAcceleration = secondsSinceLastDraw * ballXVelocity * 500; CGFloat yAcceleration = secondsSinceLastDraw * ballYVelocity * 500; self.currentPoint = CGPointMake(self.currentPoint.x + xAcceleration, self.currentPoint.y +yAcceleration); } // Update last time with current time [lastDrawTime release]; lastDrawTime = [[NSDate alloc] init]; }

    Read the article

  • Div / CSS / ZIndex - how to overlap pictures?

    - by Kovu
    Hi, I have 5 pictures, and I will overlap these 5. I read a lot of HowTo CSS / Div and overlapping, but I didn't get it at all. I have a normal 500 width div container as "content" filler. Into this div, I will have 5 pictures that are overlapping each other. I try all "position:", but nothing fills what I want.

    Read the article

  • Form filter in symfony: imposible when a field is type "date"

    - by user248959
    Hi, anyone has tried to create a symfony form filter from a class which has a field of type "date" ? When i do it, i get this error: 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens stack trace I think the error dependens on this command: 'SELECT b.id AS b_id, b.day AS b_day FROM birthday b WHERE b.day = ? AND b.day <= ?', array('month' = '1','day' = '2', 'year' = '2014') but i dont know how can i solve it.. Any idea? Javi

    Read the article

  • Javascript passing value to open window

    - by user244394
    Hi! How do i go about passing the value of width ,height,resize received as parameter to window.open using javascript? Thanks Example function poponload(mywidth,myheight,resizeVal) { testwindow = window.open ("http://www.yahoo.com", "mywindow","location=1,status=1,scrollbars=1,width=+mywidth+,height=myheight,resizeVal"); testwindow.moveTo(0,0); } <body onload="javascript: poponload(200, 500,yes)">

    Read the article

  • Get functions called with GDB

    - by Werner
    Hi, I am using GDB to understand a C++ program. I put a break in the middle of the running which turns to be something like: break main.cpp:500 and I would like to see which functions have been called before. I tried "backtrace" but it shows only info about main, as previous calls to previous functions have already finished. My question is how can I get (with GDB or another method) the info about which functions have been called before this point, even if the call has been returned. Thanks

    Read the article

  • priority_queue with dynamic priorities

    - by Layne
    Hey, I have a server application which accepts incomming queries and executes them. If there are too many queries they should be queued and if some of the other queries got executed the queued queries should be executed as well. Since I want to pass queries with different priorities I think using a priority_queue would be the best choice. e.g. The amout of the axcepting queries (a) hit the limt and new queries will be stored in the queue. All queries have a priority of 1 (lowest) if some of the queries from (a) get executed the programm will pick the query with the highest priority out of the queue and execute it. Still no problem. Now someone is sending a query with a priority of 5 which gets added to the queue. Since this is the query with the highest priority the application will execute this query as soon as the running queries no longer hit the limit. There might be the worst case that 500 queries with a priority of 1 are queued but wont be executed since someone is always sending queries with a priority of 5 hence these 500 queries will be queued for a looooong time. In order to prevent that I want to increase the prioritiy of all queries which have a lower priority than the query with the higher priority, in this example which have a priority lower than 5. So if the query with a priority of 5 gets pulled out of the queue all other queries with a priority < 5 should be increased by 0.2. This way queries with a low priority wont be queued for ever even if there might be 100 queries with a higher priority. I really hope can help me to solve the problem with the priorities: Since my queries consist of an object I thought something like this might work: class Query { public: Query( std::string p_stQuery ) : stQuery( p_stQuery ) {}; std::string getQuery() const {return stQuery;}; void increasePriority( const float fIncrease ) {fPriority += fIncrease;}; friend bool operator < ( const Query& PriorityFirst, const Query& PriorityNext ) { if( PriorityFirst.fPriority < PriorityNext.fPriority ) { if( PriorityFirst.fStartPriority < PriorityNext.fStartPriority ) { Query qTemp = PriorityFirst; qTemp.increasePriority( INCREASE_RATE ); } return true; } else { return false; } }; private: static const float INCREASE_RATE = 0.2; float fPriority; // current priority float fStartPriority; // initialised priority std::string stQuery; };

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >