Daily Archives

Articles indexed Tuesday May 25 2010

Page 18/118 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • What exactly does it mean when $_FILES is empty?

    - by Mike
    I am working on an upload script and when testing my error checks, I attempted to upload a 17MB TIFF file. When I do this the $_FILES array is empty. The script works fine for what I need it to do, which is to upload JPEG files. My solution is to test if $_FILES is empty or not before continuing with the upload script. Can anybody explain why $_FILES is empty when a TIFF is attempted to be uploaded? Is my solution, to check if $_FILES is empty or not, an okay one?

    Read the article

  • Generating Running Sum of Ratings in SQL

    - by Koobz
    I have a rating table. It boils down to: rating_value created +2 april 3rd -5 april 20th So, every time someone gets rated, I track that rating event in the database. I want to generate a rating history/time graph where the rating is the sum of all ratings up to that point in time on a graph. I.E. A person's rating on April 5th might be select sum(rating_value) from ratings where created <= april 5th The only problem with this approach is I have to run this day by day across the interval I'm interested in. Is there some trick to generating a running total using this sort of data? Otherwise, I'm thinking the best approach is to create a denormalized "rating history" table alongside the individual ratings.

    Read the article

  • Ignoring a character along with word boundary in regex

    - by DavidP6
    I am using gsub in Ruby to make a word within text bold. I am using a word boundary so as to not make letters within other words bold, but am finding that this ignores words that have a quote after them. For example: text.gsub(/#{word}\b/i, "<b>#{word}</b>") text = "I said, 'look out below'" word = below In this case the word below is not made bold. Is there any way to ignore certain characters along with a word boundary?

    Read the article

  • Django: How do I add arbitrary html attributes to input fields on a form?

    - by User
    I have an input field that is rendered with a template like so: <div class="field"> {{ form.city }} </div> Which is rendered as: <div class="field"> <input id="id_city" type="text" name="city" maxlength="100" /> </div> Now suppose I want to add an autocomplete="off" attribute to the input element that is rendered, how would I do that? Or onclick="xyz()" or class="my-special-css-class"?

    Read the article

  • wrapper not containing content div

    - by madelikethis
    Hi, I'm trying to get my wrapper to hold my content but it won't. I've taken out the floats and added "overflow: visible" no no avail. I'm thinking it's because of my z-indexing and negative margins, but have tried taking these out and still no change. Any ideas? http://www.jenniferhope.com/bio (the float is still in this example.) Thanks for any help you can offer!

    Read the article

  • What is Blue Dragon

    - by Luke101
    I have searched the blue dragon website but cold not find any useful information on what it is. What is blue dragon? What is it used for and why would someone use it?

    Read the article

  • How to remember the prior page before accessing subsequent pages across frame

    - by Ricky
    Hi guys: I get two frames, says A and B. Clicking a link in A will trigger page in B changing from URL_A to URL_B. How do I remember URL_A, so that when users click cacnel button in URL_B, they can go back to URL_A? how do I get mainFrame's URL in fraTopMenu? <frameset rows="60,*" cols="*" frameborder="no" border="0" framespacing="0"> <frame src="/Common/Manager/TopMenu.aspx" name="fraTopMenu" scrolling="no" noresize="noresize" id="fraTopMenu" title="" /> <frameset rows="*" cols="185,*" framespacing="0" frameborder="no" border="0"> <frame src="/Common/Manager/LeftMenu.aspx" name="leftFrame" id="leftFrame" title="" /> <frame src="<%= MainUrl %>" name="mainFrame" id="mainFrame" /> </frameset> </frameset>

    Read the article

  • How can I overlay a watermark on an already resampled image in PHP (using GD) ?

    - by Rick
    Here's my current code: define('IMG_WIDTH', (isset ($_GET['width'])) ? (int) $_GET['width'] : 99); define('IMG_HEIGHT', (isset ($_GET['height'])) ? (int) $_GET['height'] : 75); $image = imagecreatefromjpeg($_GET['image']); $origWidth = imagesx($image); $origHeight = imagesy($image); $croppedThumb = imagecreatetruecolor(IMG_WIDTH, IMG_HEIGHT); if ($origWidth > $origHeight) { $leftOffset = ($origWidth - $origHeight) / 2; imagecopyresampled($croppedThumb, $image, 0, 0, $leftOffset, 0, IMG_WIDTH, IMG_HEIGHT, $origHeight, $origHeight); } else { $topOffset = ($origHeight - $origWidth) / 2; imagecopyresampled($croppedThumb, $image, 0, 0, 0, $topOffset, IMG_WIDTH, IMG_HEIGHT, $origWidth, $origWidth); } It basically takes an image and re-sizes it to create a thumbnail. It works quite nicely. What I would like to do now is add a watermark to the bottom right corner. I've seen the imagecopymerge function used for this... However, that doesn't seem to allow me to supply a resampled image as the source. How can I take my already modified image and add a watermark? :/ I've thought of saving the image to /tmp and then unlink()'ing it once I've added the watermark but that seems like a bit of a mess...

    Read the article

  • Silverlight Cream for May 24, 2010 -- #868

    - by Dave Campbell
    In this Issue: Victor Gaudioso, Weidong Shen, SilverLaw, Alnur Ismail, Damon Payne, and Karl Erickson. Shoutout: Tim Greenfield posted his slides and materials (not the padlock yet) from Portland Code Camp: Rx for Silverlight at Portland CodeCamp András Velvárt posted his material from his User Group talk: 20 Silverlight 4 demos in one zip file From SilverlightCream.com: New Silverilght Video Tutotial: How to Build Your Very Own Tutorial Cam Do you like the video Victor Gaudioso has of himself in his tutorials? well... in this one, he explains how to go about doing just that for yourself! A Sample Silverlight 4 Application Using MEF, MVVM, and WCF RIA Services - Part 1 Weidong Shen has part 1 of a new series up on Code Project about Siverlight, MVVM, MEF, and WCF RIA Services. Silver Spot Light - Silverlight 4 SilverLaw posted a control to the Expression Gallery and I have to agree with his comment "You' ll love to switch it on and off & on and off & on and off ... ;-)" A Distributable (.exe) Silverlight OOB Application Alnur Ismail has a step-by-step post up on building an OOB app deployable in an exe file. You'll need a file from a post by Tim, but there's a link in the post. DataContract based Binary Serialization for Silverlight Damon Payne serves up on a promise to post about a subject he's been discussing: DataContract based Binary Serialization for Silverlight... and he's writing about the process he followed, plus all the code is available. Creating a Custom Out-of-Browser Window in Silverlight 4 Karl Erickson at the Silverlight SDK blog discusses OOB visualization effects... what you can and can't do, and what limitations you're up against. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Can items deleted from "Trash" be recovered?

    - by Miraaj
    Hi all, In mac we have option to delete items securely from trash, while deleting it warns that: once deleted items will not be recovered. I want to know that is there any way by which items deleted "normally, (not securely)" from "Trash" can be recovered? Thanks, Miraaj

    Read the article

  • Ajax Talk at .NET Developers Association

    - by Stephen Walther
    Thanks everyone who came to my Ajax talk tonight at the .NET Developers Association! The slides and demos from the talk can be downloaded by clicking the following link:   ASP.NET Ajax: What’s New?    You need Visual Studio  2010 to view the code samples. The first project, named Demos, contains the following samples: ASPAjax4 1_CompositeScripts.aspx – Demonstrates how to use the ScriptManger to combine, compress, and cache JavaScript files automatically. 2_EnableCdn.aspx – Demonstrates how to retrieve ASP.NET Ajax framework scripts from the Microsoft Ajax CDN automatically. jQuery 1_Selectors.aspx – Demonstrates how to use jQuery selectors 2_WebForms.aspx – Demonstrates how to use the client tablesorter plugin with ASP.NET Web Forms. 3_MVC.aspx – Demonstrates how to use jQuery animation and the templating plugin with ASP.NET MVC. 4_OData.aspx – Demonstrates how to use jQuery with the Netflix API by using JSONP and odata. 5_Templating.aspx – Demonstrates how to use jQuery client templating. 6_TemplateConditionals.aspx – Demonstrates how to use logic within a jQuery template. 7_DataLinking.aspx – Demonstrates how to perform data-binding in jQuery. 8_Converters.aspx – Demonstrates how to defines converters that work with data-binding. The second project, named ACT_Tools, illustrates how to use the Microsoft Ajax Minifier and the JSBuild JavaScript preprocessor. When you perform a build in Visual Studio, all JavaScript and CSS files are minified automatically. Furthermore, any *.pre.js file is processed using the JSBuild preprocessor and the output is saved to the ScriptOutput folder. Select Show All Files in Visual Studio to see the generated results of the minifier and the preprocessor.

    Read the article

  • [PHP] What exactly does it mean when $_FILES is empty?

    - by Mike
    I am working on a PHP upload script and when testing my error checks, I attempted to upload a 17MB TIFF file. When I do this the $_FILES array is empty. The script works fine for what I need it to do, which is to upload JPEG files. My solution is to test if $_FILES is empty or not before continuing with the upload script. Can anybody explain why $_FILES is empty when a TIFF is attempted to be uploaded? Is my solution, to check if $_FILES is empty or not, an okay one? Does this have something to do with settings in php.ini?

    Read the article

  • Javascript using asp.net

    - by jimson
    I have a Login Page Contains two text boxes one is user name,password and one button if the two textboxes are empty that time how i can avoid post back of the buuton if any value enterd that time only postback occuers,,,, not using required fiekd validator any method is avilable in javascript.......

    Read the article

  • How to select visibility of specific worksheet at the opening of Excel using Spreadsheet XML

    - by user211607
    Hi, I am getting spreadsheet xml from a code logic (Flex Grids to spreadsheet xml). I have 3 worksheets (A, B, C) in that spreadsheet xml. I am opening this spreadsheet xml in Excel. I want to view worksheet B when I am opening the spreadhseet xml in Excel. Is there any tag/code, I need to add so that worksheet B will be visible at initial? I can add that code in code logic Thanks ... Atul

    Read the article

  • C# Image saving from onPaint method

    - by cheesebunz
    Hi anyone knows how to save an image from the rectangle i created? protected override void OnPaint(PaintEventArgs e) { Bitmap bitmap = new Bitmap(@"Pictures/testing.jpg"); Image img = bitmap; int width = testing.Width / 3; int height = testing.Height / 3; Rectangle destrect = new Rectangle(0, 0, width, height); GraphicsUnit units = GraphicsUnit.Pixel; System.Drawing.Imaging.ImageAttributes imageAttr= new System.Drawing.Imaging.ImageAttributes(); //1.1.jpg// //e.Graphics.DrawImage(img,destrect,0,0, width, height, units, imageAttr); //1.2.jpg// e.Graphics.DrawImage(img, destrect, width, 0,width, height, units, imageAttr); base.OnPaint(e); } I have the desired image that is cropped but i don't know how to save .. Would greatly appreciate any help .

    Read the article

  • setting page access permissions in drupal

    - by Nikhil Patil
    I'm new to drupal. Its a very dumb question I guess. I have enabled PHP filter module so that I can create a new page with my own PHP code in it. This particular page I want to be accessible to only authenticated users, not visible to anonymous users. How can I achieve this? Can I set permissions for individual pages in drupal? Or is it possible to identify that an anonymous user is trying to access the current page through PHP code?

    Read the article

  • Ruby generic filesystem libraries

    - by webdestroya
    I am looking for a "Virtual File System" type library for ruby. I want to be able to have a completely generic file system that I can easily switch between using Local files and using S3 or using FTP or something like that. (Identical to VFS for Java) Has anybody used any type of generic file system for ruby (I just need it to support local files and Amazon S3) Any pointers would be much appreciated.

    Read the article

  • Encyption in DATA access block

    - by Sathish
    I am using enterprise library DATA access block in my application and now i want to Encrypt the connection string and store it in the Config file and consume it in my application after decrypting the same. How can i do this

    Read the article

  • keyboard interaction with Cocoa?

    - by mactonny
    Hey guys, I am trying do write an application(server) which receives the keyboard instructions from the client and execute them on the server end. It's more like those screen recorders which records your keyboard and mouse events and replay them. For example, you pull up a textedit on the server, type whatever you like on the client and you can see those letters on the server. I have no clues what materials I should look into, any suggestions?

    Read the article

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