Search Results

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

Page 30/150 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • MYSQL - How to increment fields in one row with values from another row

    - by Walker Boh
    I have a table that we'll call 'Sales' with 4 rows: uid, date, count and amount. I want to increment the count and amount values for one row with the count/amount values from a different row in that table. Example: UID | Date | Count | Amount| 1 | 2013-06-20 | 1 | 500 | 2 | 2013-06-24 | 2 | 1000 | Ideal results would be uid 2's count/amount values being incremented by uid 1's values: UID | Date | Count | Amount| 1 | 2013-06-20 | 1 | 500 | 2 | 2013-06-24 | 3 | 1500 | Please note that my company's database is an older version of MYSQL (3.something) so subqueries are not possible. I am curious to know if this is possible outside of doing an "update sales set count = count + 1" and likewise for the amount columns. I have a lot of rows to update and incrementing the values individually is quite time consuming if you can imagine. Thanks for any help or suggestions!

    Read the article

  • Converting the DOM element in a String

    - by Hsm Sharique Hasan
    I am working on svg. I made some shapes in svg using my javascript code. Now what i have to do is to get that code of svg which has been made as i draw some thing. i want to get that code in a form of string so for the sake of reuse or if can put that code in a .svg file it outputs the same what i made by myself using my javascript code. Like My code made this <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="500" id="one"> <g id="container"> <rect id ="rect" x="0" y="0" width="0" height="0" fill="pink" stroke="blue" stroke-width="2" /> </g> Now what should i do to get all the code from to in a form of string and i can print that.

    Read the article

  • Implementing a runtime Look Up Table in C#

    - by Yarok
    Hey all, I'm currently working on a robot interface GUI, using C#. The robot has two sensors, and two powered wheels. I need to let the user the option to load a Look Up Table (LUT) during runtime, one for each sensor, that will tell the robot what to do according to the sensor's reading. I think the best way to do it is using a .csv file, formatted like so: index , right wheel order, left wheel order the index is an int between 0-1023 and is actually the sensor's reading. the orders for the right and left wheel are integers, between -500 - 500. Example - left sensor's readings: 1,10,20 meaning: sensor reads 1 -- left wheel 10 rpm right wheel 20 rpm So my question is this: what is the best way to implement it? using a dataset?(if so, how?) using an array? (if so, how do I load it during runtime?) Any help would be much appreciated, Yarok

    Read the article

  • I'm using the jQuery .scroll() function, why can't I override its effects with another function?

    - by Jason Rhodes
    I'm using the jQuery .scroll() function to make a certain element fade to 0.2 opacity. Since there is no native "scrollstop" indicator, I decided to make the element fade back to 1.0 opacity on hover. However, it doesn't work. Here's my code: $(document).ready(function() { $(window).scroll(function() { $("#navlist").animate({ opacity: 0.2 }, 2000); }); $("#navlist").hover( function() { $(this).animate({ opacity: 1 }, 500); }, function() { $(this).animate({ opacity: 1 }, 500); // just to be safe? } ); }); When I scroll, the #navlist element fades, but when you hover over it nothing happens. But if you refresh the page when you're half way down, the element automatically fades as soon as you refresh, before I've scrolled, and if you try to hover to fade it back in, nothing happens. Any thoughts?

    Read the article

  • Raphael - what is the native delay function to draw circles?

    - by 3gwebtrain
    I am using Raphael, to draw 3 circles. how to i make the circles draw each one by one with some time gap? I know there is a option with settimeout, but apart from is there any native function to make delay to draw the circles? my simple code: <div id="paper"></div> var paper = Raphael('paper',500,500); var c1 = paper.circle(50,50,25); var c2 = paper.circle(100,50,25); var c3 = paper.circle(150,50,25); jsfiddle here

    Read the article

  • Can I pass a string variable into an <a href> tag for a website link?

    - by Joseph
    I am somewhat new to web developing, so I am trying to learn along the way. I have a div that is 500 x 500. Inside of that div I have two divs that are each 250x500. So my outer div is filled up with the two inner divs. I have it setup so that when I click on the first div (the left one) a java script is called, and a prompt pop up box asks for a website URL which is then stored inside of a string variable. How can I make it so that the second div (the right one) takes the string variable from the alert box from the left div and puts it into an a href tag so that I can link to the website from the right div? Can a a href tag accept a value from a variable for its link? Maybe I am going about this all wrong, is there a better way I should be approaching this? Any help is appreciated!!

    Read the article

  • Multiple Scripts With the Same MySQL Query Running At Once => Will There Be Interference?

    - by walden
    I want to have multiple scripts running from cron at the same time. They will all update, say, 500 rows with a unique status ID for that particular script to use. If each script grabs the same type of rows to update, and the scripts run at once, will there be interference between the queries run at the same time? For example, using this query: UPDATE table SET status = <unique script ID> WHERE status = 0 LIMIT 500 Will I get the same rows updating more than once? I'm trying to get each script to get unique rows. I was thinking of using sleep() to make the queries run at different times, but I'm not sure if that's necessary. Thanks.

    Read the article

  • Refactoring a long method that simply populates

    - by Jeune
    I am refactoring a method which is over 500 lines (don't ask me why) The method basically queries a list of maps from the database and for each map in the list does some computation and adds the value of that computation to the map. There are however too many computations and puts being done that the code has reached over 500 lines already! Here's a sample preview: public List<Hashmap> getProductData(...) { List<Hashmap> products = productsDao.getProductData(...); for (Product product: products) { product.put("Volume",new BigDecimanl(product.get("Height")* product.get("Width")*product.get("Length")); if (some condition here) { //20 lines worth of product.put(..,..) } else { //20 lines worth of product.put(..,..) } //3 more if-else statements like the one above try { product.put(..,..) } catch (Exception e) { product.put("",..) } //over 8 more try-catches of the form above } Any ideas on how to go about refactoring this?

    Read the article

  • Swing: set JFrame content area size

    - by igul222
    I'm trying to make a JFrame with a usable content area of exactly 500x500. If I do this... public MyFrame() { super("Hello, world!"); setSize(500,500); } ... I get a window whose full size is 500x500, including the title bar, etc., where I really need a window whose size is something like 504x520 to account for the window border and titlebar. How can I achieve this?

    Read the article

  • Using jQuery to make a group of images appear in order.

    - by Sean Johnson
    I have a page that shows a bunch of thumbnails (around 30), and the client is wanting them to appear one by one, in order, going from left to right on the page. This is what I've tried: var start_opacity = 500; $j('.grid-photo').each(function(i) { start_opacity = start_opacity + 500; setTimeout(function() { $j(i).animate({opacity: 1}, 4000); }, start_opacity); }); It doesn't seem to know what i is referencing. Any thoughts?

    Read the article

  • Can't download file in IE7 but there isn't any problem in Firefox, Chrome, etc..?

    - by levhita
    I have an script that receives an encrypted url and from that generates a download, the most critic par of the script is this: $MimeType = new MimeType(); $mimetype = $MimeType->getType($filename); $basename = basename($filename); header("Content-type: $mimetype"); header("Content-Disposition: attachment; filename=\"$basename\""); header('Content-Length: '. filesize($filename)); if ( @readfile($filename)===false ) { header("HTTP/1.0 500 Internal Server Error"); loadErrorPage('500'); } Downloads works as charm in any Browser except IE, I have seen problems related to 'no-cache' headers but I don't send anything like that, they talk about utf-8 characters, but there is not any utf-8 characters(and the $filename has not any utf-8 characteres neither).

    Read the article

  • After .load() Reset Textbox with User Entered Value using JavaScript and jQuery

    - by Aaron Salazar
    My function below calls a partial view after a user enters a filter-by string into the text box '#DocId'. When the user is done typing, the partial view is displayed with filtered data. Since my textbox needs to be in the partial view, when user is done entering a filter-by string and is shown the filtered data, the textbox is reset and the user entered data is lost. How can I set the value of the textbox back to the user entered string after the partial view is displayed? I'm pretty sure I need to use .val() but I can't seem to get this to work. $(function() { $('#DocId').live('keyup', function() { clearTimeout($.data(this, 'timer')); var val = $(this).val(); var wait = setTimeout(function() { $('#tableContent').load('/CurReport/TableResults', { filter: val }, 500) }, 500); $(this).data('timer', wait); }); }); Thank you, Aaron

    Read the article

  • c# video equivalent to image.fromstream? Or changing the scope of the following script to allow vide

    - by Daniel
    The following is a part of an upload class in a c# script. I'm a php programmer, I've never messed with c# much but I'm trying to learn. This upload script will not handle anything except images, I need to adapt this class to handle other types of media also, or rewrite it all together. If I'm correct, I realize that using (Image image = Image.FromStream(file.InputStream)) basically says that the scope of the following is Image, only an image can be used or the object is discarded? And also that the variable image is being created from an Image from the file stream, which I understand to be, like... the $_FILES array in php? I dunno, I don't really care about making thumbnails right now either way, so if this can be taken out and still process the upload I'm totally cool with that, I just haven't had any luck getting this thing to take anything but images, even when commenting out that whole part of the class... protected void Page_Load(object sender, EventArgs e) { string dir = Path.Combine(Request.PhysicalApplicationPath, "files"); if (Request.Files.Count == 0) { // No files were posted Response.StatusCode = 500; } else { try { // Only one file at a time is posted HttpPostedFile file = Request.Files[0]; // Size limit 100MB if (file.ContentLength > 102400000) { // File too large Response.StatusCode = 500; } else { string id = Request.QueryString["userId"]; string[] folders = userDir(id); foreach (string folder in folders) { dir = Path.Combine(dir, folder); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); } string path = Path.Combine(dir, String.Concat(Request.QueryString["batchId"], "_", file.FileName)); file.SaveAs(path); // Create thumbnail int dot = path.LastIndexOf('.'); string thumbpath = String.Concat(path.Substring(0, dot), "_thumb", path.Substring(dot)); using (Image image = Image.FromStream(file.InputStream)) { // Find the ratio that will create maximum height or width of 100px. double ratio = Math.Max(image.Width / 100.0, image.Height / 100.0); using (Image thumb = new Bitmap(image, new Size((int)Math.Round(image.Width / ratio), (int)Math.Round(image.Height / ratio)))) { using (Graphics graphic = Graphics.FromImage(thumb)) { // Make sure thumbnail is not crappy graphic.SmoothingMode = SmoothingMode.HighQuality; graphic.InterpolationMode = InterpolationMode.High; graphic.CompositingQuality = CompositingQuality.HighQuality; // JPEG ImageCodecInfo codec = ImageCodecInfo.GetImageEncoders()[1]; // 90% quality EncoderParameters encode = new EncoderParameters(1); encode.Param[0] = new EncoderParameter(Encoder.Quality, 90L); // Resize graphic.DrawImage(image, new Rectangle(0, 0, thumb.Width, thumb.Height)); // Save thumb.Save(thumbpath, codec, encode); } } } // Success Response.StatusCode = 200; } } catch { // Something went wrong Response.StatusCode = 500; } } }

    Read the article

  • R: Cut and labels/breaks length conflict

    - by AkselO
    I am working with the cut function to prep data for a barplot histogram but keep running into a seeming inconsistency between my labels and breaks: Error in cut.default(sample(1:1e+05, 500, T), breaks = sq, labels = sprintf("$%.0f", : labels/breaks length conflict Here is an example. I pretend that it is income data, using a sequence of 0 to $100,000 in bins of $10,000. I use the same variable to generate both breaks and labels, with minor formating on the label side. I thought they might for some reason have different lengths when comparing to a character vector, but they appear to have the same length, still. > sq<-seq(0,100000,10000) > cut(sample(1:100000, 500, T),breaks=sq,labels=sprintf("$%.0f",sq)) > length(sprintf("$%.0f",sq)) [1] [11] > length(sq) [1] [11]

    Read the article

  • How Much Does Source Code Cost? Range?

    - by Brain Freeze
    I have taken a job selling a customized "online workplace management application." Our clients' businesses work around the application. Our clients track their time (which is how they get paid), finances and work documents through the application we provide and give their clients access to their interests throught the application. Our clients range from 2 users to 500 users. Each user probably processes 200 files per year and generates a fee for each file in the range of $500-$2500 per file. The application has been refined over a period of years and has cost around a million to develop. Does anyone know what range something like this sells for (source code, add-ons such as support and hosting)? I am trying to wrap my head around it as my background is not in software development.

    Read the article

  • in jqgrid, how can i have the editform disappear after submit

    - by leora
    right now, when i click submit it sends a message to the server and updates the databased and refreshes the screen but it keeps the edit form popup on the screen. Is there anyway to have it disappear once the submit is complete. its kind of annoying because its a little unclear that you are done because the form just sits there (even through the grid has refreshed) i have closeAfterEdit and closeAfterAdd set to true but it doesn't seem to do anything. jQuery("#grid").navGrid("#pager", { }, { height: 380, width: 500, reloadAfterSubmit: true, closeAfterEdit: true, url: siteRoot + controller + "/Update" }, { height: 380, width: 500, reloadAfterSubmit: true, closeAfterAdd: true, url: siteRoot + controller + "/Add" }, { reloadAfterSubmit: true, url: siteRoot + controller + "/Delete" }, { multipleSearch: true }

    Read the article

  • How to keep format within HTML converted to Excel

    - by pojomx
    Hello, I'm working with an HTML table, that contains numbers (formated) and when I export this to xls file (just change extension... hehe) I loss some of the formated data. Example: in html I have " 1,000.00 | 500.00 | 20.00 " and in excel it shows like: "1,000.00 | 500 | 20" I want it to know if it is possible to show the very same format as in html. THankyou :P

    Read the article

  • implicit declaration of function usleep

    - by ant2009
    gcc (GCC) 4.6.3 c89 Hello, I am trying to use usleep. However, I keep getting the following warning: implicit declaration of function usleep I have included the unistd.h header file. The man pages mentions something about this. But I am not sure I understand by it: usleep(): Since glibc 2.12: _BSD_SOURCE || (_XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) && !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) Before glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED But not sure what I a to do with the above? Many thanks for any suggestions,

    Read the article

  • mod_perl and libs

    - by paulj3000
    Hi, I just installed my system with Oracle 64bit Linux5.4 running Apache Server version: Apache/2.2.3 and mod_perl 2. Now, I have my perl libraries set in a specific path: /my/perl/libs and I have adjusted my httpd.conf to compensate for this (I added the below): SetEnv MY_LIBS /my/perl/libs and in my cgi I'm setting my environment to compensate: use lib($ENV{'MY_LIBS'}); Now the problem: Sometimes my perl modules will recognize the path of /my/perl/libs and call all the functions appropriately, and sometimes they won't, thus thowing a 500 error. Some observations: when I restart apache (/etc/init.d/httpd restart), things work fine but then the 500 error comes up. Are there any ideas? What should I be looking at? Thanks

    Read the article

  • Apache/2.2.9, mod_perl/2.0.4: status_line doesn't seem to work

    - by Eugene
    Response is prepared this way: my $r = Apache2::RequestUtil->request; $r->status_line('500 Internal Server Error'); $r->send_cgi_header("Content-Type: text/html; charset=UTF-8\n\n"); print 'Custom error message'; Request: GET /test_page HTTP/1.1 Host: www.xxx.xxx Response: HTTP/1.1 200 OK Date: XXXXXXXXXX Server: Apache/xxxxxxxx Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8 44 Custom error message 0 Why response status is 200 and not 500?

    Read the article

  • Is SQL Server Compact *ever* OK to use on a web server?

    - by Troy
    I'd like to host a personal database for about 500 people (1 database per person) on my web server. A person could possibly share their database with a friend or two. On my web server, I'd have some web services, perhaps for doing synchronization, and maybe even an ASP.NET Web Forms front end to the database. If I restart my IIS web server, would this likely cause database corruptions? Would this be expected to perform ok? If not Compact, should I instead use SQL Express and create a database in SQL Server for each of my 500 people?

    Read the article

  • Writing to pointer out of bounds after malloc() not causing error

    - by marr
    Hi, when I try the code below it works fine. Am I missing something? main() { int *p; p=malloc(sizeof(int)); printf("size of p=%d\n",sizeof(p)); p[500]=999999; printf("p[0]=%d",p[500]); return 0; } I tried it with malloc(0*sizeof(int)) or anything but it works just fine. The program only crashes when I don't use malloc at all. So even if I allocate 0 memory for the array p, it still stores values properly. So why am I even bothering with malloc then?

    Read the article

  • Auto Generated - CREATE Table Script in SQL 2008 throws error

    - by jack
    I scripted the tables in my dev database using SQL 2008 - generate scripts option (Datbase-right click-Tasks-Generate Scripts) and ran it on the staging database, but the script throws the below error for each table Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '('. Msg 319, Level 15, State 1, Line 15 Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon. Below is the script for one of my table ALTER TABLE [dbo].[Customer]( [CustomerID] [int] IDENTITY(1,1) NOT NULL, [FirstName] [nvarchar](500) NULL, [LastName] [nvarchar](500) NULL, [DateOfBirth] [datetime] NULL, [EmailID] [nvarchar](200) NULL, [ContactForOffers] [bit] NULL, CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED ( [CustomerID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO Any help will be much appreciated.

    Read the article

  • Display radio buttons in prolog xpce

    - by Ben03
    I created a menu with Radio Buttons in XPCE prolog, but my radio buttons are showing on the same line, and I want to have each one on a separate line. My code is the following: new(D, dialog('title')), send(D, size, size(500,500)), send(D, append, new(Op, menu(options, marked))), send(Op, append, option1), send(Op, append, option2), send(Op, append, option3), send(Op, size, size(300,300)), send(D, display, Op, point(100, 40)), send(D, append(new(B1,button(ok, message(D, return, Op?selection))))), send(D, display, B1, point(100, 100)), send(D, append(button(cancel, message(D, return, @nil)))), send(D, default_button(ok)), get(D, confirm, Rval), free(D). Thanks in advance

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >