Daily Archives

Articles indexed Saturday April 10 2010

Page 6/89 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • actionscript swf: why the swf is cached in one web server

    - by Bin Chen
    Hi, I have one swf and a program to load this swf. The swf is put in a server. I encounter a weird problem that if I put this swf in serverA, each time my program will issue a http request to that webserver(with 304 response). But when I move the swf from serverA to serverB, some weird things happen, the progrom will only issue the first time http request, and after that, it didn't send any http request, it looks like it uses the cache in the disk. I wonder is how can I configure serverA make the behavior the same as serverB, as I guess the problem may exists in the http response that make the program not retrieving the swf from serverB any more. Bin

    Read the article

  • Can't install Eclipse Valgrind plugin

    - by h4rp0
    I'm trying to install Valgrind (0.4.0) plugin in Eclipse from technology.linuxtools Update Site (http://download.eclipse.org/technology/linuxtools/update) but I get the following error: Cannot complete the request. See the details. Cannot find a solution satisfying the following requirements org.eclipse.swt [3.4.1.v3449c]. According to "About plugins", my Eclipse has version 3.4.2 installed. Any help would be much appreciated. Thanks

    Read the article

  • What happens when you run out of ram with mlockall set?

    - by James Dean
    I am working on a C++ application that requires a large amounts of memory for a batch run. ( 20gb) Some of my customers are running into memory limits where sometimes the OS starts swapping and the total run time doubles or worse. I have read that I can use the mlockall to keep the process from being swapped out. What would happen when the process memory requirements approaches or exceeds the the available physical memory in this way? I guess the answer might be OS specific so please list the OS in your answer.

    Read the article

  • PHP 5.2.12 - Interesting Switch Statement Bug With Integers and Strings

    - by Levi Hackwith
    <?php $var = 0; switch($var) { case "a": echo "I think var is a"; break; case "b": echo "I think var is b"; break; case "c": echo "I think var is c"; break; default: echo "I know var is $var"; break; } ?> Maybe someone else will find this fascinating and have an answer. If you run this, it outputs I think the var is a when clearly it's 0. Now, I'm most certain this has something to do with the fact that we're using strings in our switch statement but the variable we're checking is an integer. Does anyone know why PHP behaves this way? It's nothing too major, but it did give me a bit of a headache today. Thanks folks!

    Read the article

  • Sortable_element with RJS does not working

    - by jaycode
    I have a list of images where user can arrange their orders. When user uploaded an image, I want the list to still be sortable. I am using a similar upload that was described here: http://kpumuk.info/ruby-on-rails/in-place-file-upload-with-ruby-on-rails/ Please help. Here are the code for upload in view file: <% form_for [:admin, @new_image], :html => { :target => 'upload_frame', :multipart => true } do |f| %> <%= hidden_field_tag :update, 'product_images'%> <%= f.hidden_field :image_owner_id %> <%= f.hidden_field :image_owner_type %> <%= f.file_field :image_file %><br /> or get image from this URL: <%= f.text_field :image_file_url %> <%= f.hidden_field :image_file_temp %><br /> <%= f.submit "Upload Image" %> <% end %> And in controller view: def create @image = Image.new(params[:image]) logger.debug "params are #{params.inspect}" if @image.save logger.debug "initiating javascript now" responds_to_parent do render :update do |page| logger.debug "javascript test #{sortable_element("product_images", :url => sort_admin_images_path, :handle => "handle", :constraint => false)}" page << "show_notification('Image Uploaded');" page.replace_html params[:update], :partial => '/admin/shared/editor/images', :locals => {:object => @image.image_owner, :updated_image => @image} page << sortable_element("product_images", :url => sort_admin_images_path, :handle => "handle", :constraint => false) end end #render :partial => '/admin/shared/editor/images', :locals => {:object => @image.image_owner, :updated_image => @image} else responds_to_parent do render :update do |page| page << "show_notification('Image Upload Error');" end end end end Or, to rephrase the question: Running this: page.replace_html params[:update], :partial => '/admin/shared/editor/images', :locals => {:object => @image.image_owner, :updated_image => @image} page << sortable_element("product_images", :url => sort_admin_images_path, :handle => "handle", :constraint => false) Will NOT adding sortable list feature. Please help, Thank you

    Read the article

  • move_uploaded_file() error

    - by James R.
    I have a website on free hosting - 000webhost.com and it allows you to upload images. However, when I try to upload an image, I get these errors: Warning: move_uploaded_file(images/SmallSmileyFace.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/a6621074/public_html/m/write.php on line 76 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpcmW3mo' to 'images/SmallSmileyFace.jpg' in /home/a6621074/public_html/m/write.php on line 76 This is the code: if (!empty($_FILES['fileImage']['name'])) { // check image type and size if ((($imagetype == 'image/gif') || ($imagetype == 'image/jpeg') || ($imagetype == 'image/pjpeg') || ($imagetype == 'image/png')) && ($imagesize > 0) && ($imagesize <= 32768)) { if ($_FILES['fileImage']['error'] == 0) { //move file $target = 'images/' . $image; if (move_uploaded_file($_FILES['fileImage']['tmp_name'], $target)) { $query = "INSERT INTO reviews (post_date, food_name, location, cafeteria, review, image, rating, user_id) VALUES (NOW(), '$foodname', '$location', '$cafeteria', '$review', '$image', $rate, $id)"; mysqli_query($dbc, $query); //confirm success echo '<p>Thank you for your submission!</p>'; } else { echo '<p class="errmsg">There was a problem uploading your image.</p>'; } } @unlink($_FILES['fileImage']['tmp_name']); } else { echo '<p class="errmsg">The screen shot must be a GIF, JPEG, or PNG image file no greater than 32KB in size.</p>'; } } Any ideas?

    Read the article

  • Stop VBA Evaluate from calling target function twice

    - by Abiel
    I am having trouble getting VBA's Evaluate() function to only execute once; it seems to always run twice. For instance, consider the trivial example below. If we run the RunEval() subroutine, it will call the EvalTest() function twice. This can be seen by the two different random numbers that get printed in the immediate window. The behavior would be the same if we were calling another subroutine with Evaluate instead of a function. Can someone explain how I can get Evaluate to execute the target function once instead of twice? Thank you. Sub RunEval() Evaluate "EvalTest()" End Sub Public Function EvalTest() Debug.Print Rnd() End Function

    Read the article

  • how to get all group images in facebook using FACEBOOK API

    - by From.ME.to.YOU
    Hello i'm trying to get all the images from a facebook group using facebook API i have a problem i can't get all the photos using $facebook->api_client->call_method('Photos.get', array('subj_id' => $uid)); http://wiki.developers.facebook.com/index.php/Photos.get what i'm using now is the method $albums = $facebook->api_client->photos_getAlbums($uid, NULL); http://wiki.developers.facebook.com/index.php/Photos.getAlbums and then loop for ever album on $facebook->api_client->call_method('Photos.get', array('subj_id' => $uid)); then i add every new array results to my big array $big_array = array_merge($big_array,$result_array_from_that_call); 2 problems occurs here : 1- sometimes this calls fails - i think because of too many calls per second - 2- the request takes a v.long time to process is there a better way to do that? Thanks guys Cheers EDIT :: i tried to get all the images using $facebook->api_client->call_method('Photos.get', array('subj_id' => $uid)); and using $uid as the group ID but that's doesn't work " don't know why maybe because all the images is listed in groups "

    Read the article

  • C# .NET 4.0 and Generics

    - by Mr Snuffle
    I was wondering if anyone could tell me if this kind of behaviour is possible in C# 4.0 I have an object hierarchy I'd like to keep strongly typed. Something like this class ItemBase {} class ItemType<T> where T : ItemBase { T Base { get; set; } } class EquipmentBase : ItemBase {} class EquipmentType : ItemType<EquipmentBase> {} What I want to be able to do to have something like this ItemType item = new EquipmentType(); And I want item.Base to return type ItemBase. Basically I want to know if it's smart enough to strongly typed generic to a base class without the strong typing. Benefit of this being I can simply cast an ItemType back to an EquipmentType and get all the strongly typedness again. I may be thinking about this all wrong...

    Read the article

  • Why is IIS Anonymous authentication being used with administrative UNC drive access?

    - by Mark Lindell
    My account is local administrator on my machine. If I try to browse to a non-existent drive letter on my own box using a UNC path name: \mymachine\x$ my account would get locked out. I would also get the following warning (Event ID 100, Type “Warning”) 5 times under the “System” group in Event Viewer on my box: The server was unable to logon the Windows NT account 'ourdomain\myaccount' due to the following error: Logon failure: unknown user name or bad password. I would also get the following warning 3 times: The server was unable to logon the Windows NT account 'ourdomain\myaccount' due to the following error: The referenced account is currently locked out and may not be logged on to. On the domain controller, Event ID 680 of type “Failure Audit” would appear 4 times under the “Security” group in Event Viewer: Logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 Logon account: myaccount Followed by Event ID 644: User Account Locked Out: Target Account Name: myaccount Target Account ID: OURDOMAIN\myaccount Caller Machine Name: MYMACHINE Caller User Name: STAN$ Caller Domain: OURDOMAIN Caller Logon ID: (0x0,0x3E7) Followed by another 4 errors having Event ID 680. Strangely, every time I tried to browse to the UNC path I would be prompted for a user name and password, the above errors would be written to the log, and my account would be locked out. When I hit “Cancel” in response to the user name/password prompt, the following message box would display: Windows cannot find \mymachine\x$. Check the spelling and try again, or try searching for the item by clicking the Start button and then clicking Search. I checked with others in the group using XP and they only got the above message box when browsing to a “bad” drive letter on their box. No one else was prompted for a user name/password and then locked out. So, every time I tried to browse to the “bad” drive letter, behind the scenes XP was trying to login 8 times using bad credentials (or, at least a bad password as the login was correct), causing my account to get locked out on the 4th try. Interestingly, If I tried browsing to a “good” drive such as “c$” it would work fine. As a test, I tried logging on to my box as a different login and browsing the “bad” UNC path. Strangely, my “ourdomain\myaccount” account was getting locked out – not the one I was logged in as! I was totally confused as to why the credentials for the other login were being passed. After much Googling, I found a link referring to some IIS settings I was vaguely familiar with from the past but could not see how they would affect this issue. It was related to the IIS directory security setting “Anonymous access and authentication control” located under: Control Panel/Administrative Tools/Computer Management/Services and Applications/Internet Information Services/Web Sites/Default Web Site/Properties/Directory Security/Anonymous access and authentication control/Edit/Password I found no indication while scouring the Internet that this property was related to my UNC problem. But, I did notice that this property was set to my domain user name and password. And, my password did age recently but I had not reset the password accordingly for this property. Sure enough, keying in the new password corrected the problem. I was no longer prompted for a user name/password when browsing the UNC path and the account lock-outs ceased. Now, a couple of questions: Why would an IIS setting affect the browsing of a UNC path on a local box? Why had I not encountered this problem before? My password has aged several times and I’ve never encountered this problem. And, I can’t remember the last time I updated the “Anonymous access” IIS password it’s been so long. I’ve run the script after a password reset before and never had my account locked-out due to the UNC problem (the script accesses UNC paths as a normal part of its processing). Windows Update did install “Cumulative Security Update for Internet Explorer 7 for Windows XP (KB972260)” on my box on 7/29/2009. I wonder if this is responsible.

    Read the article

  • Messages released from MailScanner quarantine are marked as DUPLICATEDELIVER in Exchange 2007

    - by kdl
    I have installed Postfix with MailScanner on CentOS 5.4 as a smarthost for Exchange 2007. When a message gets quarantined and I later release it (http://wiki.mailscanner.info/doku.php?id=documentation%3Aconfiguration%3Amta%3Apostfix%3Ahow%5Fto%3Arelease%5Fquarantined%5Fmail), it gets delivered to the Exhcange box but does not appear in a user's mailbox. Exchange message tracking log shows the message is marked as DUPLICATEDELIVER and therefore dropped. How can I work around this situation? Maybe changing a message ID somehow while at the Postfix box or some other way? Thanks.

    Read the article

  • Cannot copy non-latin characters from PDF document

    - by user17381
    Hi, I have a pdf file which contains some non-latin european characters. If I copy some text with the highlight tool, and paste it into another program (word, notepad) - the 'special' characters do not transfer correctly (I get other odd characters in their place). I have tried copying the text from both Acrobat Reader and Foxit. Is there anything I can do here to copy this? Thanks

    Read the article

  • How to estimate size of data to transfer when using DbCommand.ExecuteXXX?

    - by Yadyn
    I want to show the user detailed progress information when performing potentially lengthy database operations. Specifically, when inserting/updating data that may be on the order of hundreds of KB or MB. Currently, I'm using in-memory DataTables and DataRows which are then synced with the database via TableAdapter.Update calls. This works fine and dandy, but the single call leaves little opportunity to glean any kind of progress info to show to the user. I have no idea how much data is passing through the network to the remote DB or its progress. Basically, all I know is when Update returns and it is assumed complete (barring any errors or exceptions). But this means all I can show is 0% and then a pause and then 100%. I can count the number of rows, even going so far to cound how many are actually Modified or Added, and I could even maybe calculate per DataRow its estimated size based on the datatype of each column, using sizeof for value types like int and checking length for things like strings or byte arrays. With that, I could probably determine, before updating, an estimated total transfer size, but I'm still stuck without any progress info once Update is called on the TableAdapter. Am I stuck just using an indeterminate progress bar or mouse waiting cursor? Would I need to radically change our data access layer to be able to hook into this kind of information? Even if I can't get it down to the precise KB transferred (like a web browser file download progress bar), could I at least know when each DataRow/DataTable finishes or something? How do you best show this kind of progress info using ADO.NET?

    Read the article

  • Linq: the linked objects are null, why?

    - by user46503
    Hello, I have several linked tables (entities). I'm trying to get the entities using the following linq: ObjectQuery<Location> locations = context.Location; ObjectQuery<ProductPrice> productPrice = context.ProductPrice; ObjectQuery<Product> products = context.Product; IQueryable<ProductPrice> res1 = from pp in productPrice join loc in locations on pp.Location equals loc join prod in products on pp.Product equals prod where prod.Title.ToLower().IndexOf(Word.ToLower()) > -1 select pp; This query returns 2 records, ProductPrice objects that have linked object Location and Product but they are null and I cannot understand why. If I try to fill them in the linq as below: res = from pp in productPrice join loc in locations on pp.Location equals loc join prod in products on pp.Product equals prod where prod.Title.ToLower().IndexOf(Word.ToLower()) > -1 select new ProductPrice { ProductPriceId = pp.ProductPriceId, Product = prod }; I have the exception "The entity or complex type 'PBExplorerData.ProductPrice' cannot be constructed in a LINQ to Entities query" Could someone please explain me what happens and what I need to do? Thanks

    Read the article

  • How to enforce remote gnupg signing of Mercurial repository only when new tags are created?

    - by Tim Post
    I know how to configure the Mercurial signing extension. The problem that I'm having is that I don't want to sign each individual change set, I only want to sign revisions that introduce new version tags. That's easily accomplished locally, however I can't come up with a way to enforce this on the remote server. I'd like people to continue to be able to push their changes as normal, unless adding a release tag, which should be accompanied by a signature. The end result should be that anyone cloning our repository can easily see a list of signed revisions, which point to a list of signed releases. Hopefully, I've just missed something obvious in hooklib. Has anyone else accomplished this, if so, how?

    Read the article

  • How do you traverse and store XML in Blackberry Java app?

    - by Greg
    I'm having a problem accessing the contents of an XML document. My goal is this: Take an XML source and parse it into a fair equivalent of an associative array, then store it as a persistable object. the xml is pretty simple: <root> <element> <category_id>1</category_id> <name>Cars</name> </element> <element> <category_id>2</category_id> <name>Boats</name> </element> </root> Basic java class below. I'm pretty much just calling save(xml) after http response above. Yes, the xml is properly formatted. import java.io.IOException; import java.util.Hashtable; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.util.Vector; import net.rim.device.api.system.PersistentObject; import net.rim.device.api.system.PersistentStore; import net.rim.device.api.xml.parsers.DocumentBuilder; import net.rim.device.api.xml.parsers.DocumentBuilderFactory; public class database{ private static PersistentObject storeVenue; static final long key = 0x2ba5f8081f7ef332L; public Hashtable hashtable; public Vector venue_list; String _node,_element; public database() { storeVenue = PersistentStore.getPersistentObject(key); } public void save(Document xml) { venue_list = new Vector(); storeVenue.setContents(venue_list); Hashtable categories = new Hashtable(); try{ DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory. newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); docBuilder.isValidating(); xml.getDocumentElement ().normalize (); NodeList list=xml.getElementsByTagName("*"); _node=new String(); _element = new String(); for (int i=0;i<list.getLength();i++){ Node value=list.item(i).getChildNodes().item(0); _node=list.item(i).getNodeName(); _element=value.getNodeValue(); categories.put(_element, _node); } } catch (Exception e){ System.out.println(e.toString()); } venue_list.addElement(categories); storeVenue.commit(); } The code above is the work in progress, and is most likely heavily flawed. However, I have been at this for days now. I can never seem to get all child nodes, or the name / value pair. When I print out the vector as a string, I usually end up with results like this: [{ = root, = element}] and that's it. No "category_id", no "name" Ideally, I would end up with something like [{1 = cars, 2 = boats}] Any help is appreciated. Thanks

    Read the article

  • How can you tell MYSQL to TRIM the X number of characters, beginning from the Back?

    - by Tim
    How do I write the following in MYSQL? SELECT SUBSTRING(value - (1 TRAILING CHARACTER)) FROM table; Basically substring(value, 2) trims the first letters. But I need to trim the last letters. I can't use substring(value, -4, 3) because I don't know the length of the value. Here's another example: SELECT * FROM table WHERE SUBSTRING(value - (4 TRAILING CHARACTER)) in (SELECT SUBSTRING(value - (1 TRAILING CHARACTER)) FROM table);

    Read the article

  • Safari doesn't set Cookie but IE / FF does.

    - by Gomez
    Hi all, I found a strange cookie problem on safari. If you surf to http://2much.ch you can enter with FF/IE and surf inside the site. But if you use safari, you can enter only once; you can't surf inside the site. I found that Safari doesn't set the entered cookie, but FF/IE does. What is wrong here?

    Read the article

  • Why can't I set a cookie and redirect?

    - by Damian
    I´m having a problem setting a cookie and doing a 302 redirect In chrome the cookie is not being set (I haven't tested safari), in other browsers I was having the same problem until I added Path=/ to the cookie an now it works. This is how the header looks; the status is 302 Found Content-Type text/html; charset=iso-8859-1 Expires Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie alasca-flash=error-Message<Required<error-Name<Required<error-Sex<Required<error-Age<Required<;Path=/ Location /messages/sdf Content-Length 0 Server Jetty(6.1.x) Any idea on why the cookie is not set? Or any workaround? Thanks!

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >