Search Results

Search found 6683 results on 268 pages for 'ole media'.

Page 112/268 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • MPMediaickerController memory leak identified by Leaks instrument

    - by Joe
    This is code from Apple's Addmusic example. MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeMusic]; picker.delegate = self; picker.allowsPickingMultipleItems = YES; picker.prompt = NSLocalizedString (@"Add songs to play", "Prompt in media item picker"); // The media item picker uses the default UI style, so it needs a default-style // status bar to match it visually [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault animated: YES]; [self presentModalViewController: picker animated: YES]; [picker release]; I'm using this code in my app and the Leaks instrument highlights a leak on the line: [self presentModalViewController: picker animated: YES]; I think that this is because this line retains a reference to picker which cannot be subsequently released. Is there any way around this or is Leaks incorrectly identifying a leak?

    Read the article

  • preg_replace only replaces first occurrence then skips to next line

    - by Dom
    Got a problem where preg_replace only replaces the first match it finds then jumps to the next line and skips the remaining parts on the same line that I also want to be replaced. What I do is that I read a CSS file that sometimes have multiple "url(media/pic.gif)" on a row and replace "media/pic.gif" (the file is then saved as a copy with the replaced parts). The content of the CSS file is put into the variable $resource_content: $resource_content = preg_replace('#(url\((\'|")?)(.*)((\'|")?\))#i', '${1}'.url::base(FALSE).'${3}'.'${4}', $resource_content); Does anyone know a solution for why it only replaces the first match per line?

    Read the article

  • Hidden divs for "lazy javascript" loading? Possible security/other issues?

    - by xyld
    I'm curious about people's opinion's and thoughts about this situation. The reason I'd like to lazy load javascript is because of performance. Loading javascript at the end of the body reduces the browser blocking and ends up with much faster page loads. But there is some automation I'm using to generate the html (django specifically). This automation has the convenience of allowing forms to be built with "Widgets" that output content it needs to render the entire widget (extra javascript, css, ...). The problem is that the widget wants to output javascript immediately into the middle of the document, but I want to ensure all javascript loads at the end of the body. When the following widget is added to a form, you can see it renders some <script>...</script> tags: class AutoCompleteTagInput(forms.TextInput): class Media: css = { 'all': ('css/jquery.autocomplete.css', ) } js = ( 'js/jquery.bgiframe.js', 'js/jquery.ajaxQueue.js', 'js/jquery.autocomplete.js', ) def render(self, name, value, attrs=None): output = super(AutoCompleteTagInput, self).render(name, value, attrs) page_tags = Tag.objects.usage_for_model(DataSet) tag_list = simplejson.dumps([tag.name for tag in page_tags], ensure_ascii=False) return mark_safe(u'''<script type="text/javascript"> jQuery("#id_%s").autocomplete(%s, { width: 150, max: 10, highlight: false, scroll: true, scrollHeight: 100, matchContains: true, autoFill: true }); </script>''' % (name, tag_list,)) + output What I'm proposing is that if someone uses a <div class=".lazy-js">...</div> with some css (.lazy-js { display: none; }) and some javascript (jQuery('.lazy-js').each(function(index) { eval(jQuery(this).text()); }), you can effectively force all javascript to load at the end of page load: class AutoCompleteTagInput(forms.TextInput): class Media: css = { 'all': ('css/jquery.autocomplete.css', ) } js = ( 'js/jquery.bgiframe.js', 'js/jquery.ajaxQueue.js', 'js/jquery.autocomplete.js', ) def render(self, name, value, attrs=None): output = super(AutoCompleteTagInput, self).render(name, value, attrs) page_tags = Tag.objects.usage_for_model(DataSet) tag_list = simplejson.dumps([tag.name for tag in page_tags], ensure_ascii=False) return mark_safe(u'''<div class="lazy-js"> jQuery("#id_%s").autocomplete(%s, { width: 150, max: 10, highlight: false, scroll: true, scrollHeight: 100, matchContains: true, autoFill: true }); </div>''' % (name, tag_list,)) + output Nevermind all the details of my specific implementation (the specific media involved), I'm looking for a consensus on whether the method of using lazy-loaded javascript through hidden a hidden tags can pose issues whether security or other related? One of the most convenient parts about this is that it follows the DRY principle rather well IMO because you don't need to hack up a specific lazy-load for each instance in the page. It just "works". UPDATE: I'm not sure if django has the ability to queue things (via fancy template inheritance or something?) to be output just before the end of the </body>?

    Read the article

  • how to get apache mod_cache work with mod_wsgi (django)?

    - by harmv
    I thought i'd speed up my django projects, by letting apache doing some caching for me. Unfortunately I see that apache never caches my dynamic pages. Has mod_cache problems with mod_wsgi served code ? My apache config: <VirtualHost *:80 ServerName myserver.com CacheEnable mem / # for testing only CacheIgnoreQueryString On CacheIgnoreCacheControl On WSGIDaemonProcess aname processes=1 threads=25 WSGIProcessGroup aname Alias /media/ /home/harm/projects/test/media/ WSGIScriptAlias / /home/harm/projects/test/wsgi.py The response does have the correct caching headers: Content-Length 2647 Content-Encoding gzip Vary Accept-Encoding Cache-Control public, max-age=3600 Keep-Alive timeout=15, max=100 Connection Keep-Alive Content-Type application/x-javascript Am I missing something ?

    Read the article

  • How can I use javascript to convert relative href attributes into absolute paths?

    - by jhensley2
    I have a template that gets screenscraped from an outside vendor and need to include absolute paths in the navigation so the externally hosted content will properly link back to our site. Right now the page/template is driven by a global menu app written by our back end development staff... so anyone who updates our site goes in and changes the menus and their paths... Right now all of the links are linking to relative paths back to the root. For example <a href="/">Home</a> <a href="/news/">News</a> <a href="/media/">Media</a> <a href="/other/">Other</a> I need a simple way (preferably with jquery) to prepend "http://www.domain.com" to each of those links.

    Read the article

  • Packaging "hidden" asset files

    - by ChaimKut
    I'm placing the file '.nomedia' into a folder in order to avoid Android's MediaScanner from detecting the media files in the folder. I need to copy this folder (including '.nomedia') from the APK's assets to the SD card (so other apps can make use of these media files, etc.). When I package the APK in Eclipse, it doesn't package the '.nomedia' file. Presumably it's detecting it as a hidden file. Any ideas how to fix this? Is there a secret aapt flag I can use? I'd like to avoid copying the folder and then manually creating a '.nomedia' folder, if possible.

    Read the article

  • Django admin proper urls inside listview

    - by hinnye
    Hi, My current target is to give users the chance to download CSV files from the admin site of my application. I successfully managed to create an additional column in the model's list view this way: def doc_link(self): return '<a href="files/%s">%s</a>' % (self.output, self.output) doc_link.allow_tags = True This shows the file name and creates the link, but sadly - because it's inside my 'searches' view - it has an URL: my_site/my_app/searches/files/13.csv. This is my problem, I would like to have my files stored in the admin media directory, like this: http://my_site/media/files/13.csv Does somebody know how to give url which points "outer" from the model's directory? Maybe somehow tell Django to use the ADMIN_MEDIA_PREFIX in the link? I'd really appreciate any help, thanks!

    Read the article

  • C# - .WAV Playback Randomly High Pitch

    - by Nate Shoffner
    For some reason, when a WAV file is played back using the snippet below, it randomly plays back screwy, like a high pitch noise. It doesn't happen all the time, just randomly. It seems to happen more often when it is played back more frequently. The WAV properties are below along with the code snippet I am using. WAV Properties: Bit Rate - 750kbps Audio Sample Size - 16 bit Channels - 1 (mono) Audio Sample Rate - 44kHz Audio Format - PCM Snippet: System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer(Captcha.Properties.Resources.sound1); myPlayer.Play(); Is this because of the way I am playing the file or the file itself? Thank you.

    Read the article

  • Bitmap brightness issue in c++

    - by Suriyan Suresh
    I have used the following code to adjust the image brightness, i am testing this application in Samsung BADA Platform and its SDK, While i am running this application in bada simulator it never ends runs infinity. Please point out the mistake in the code int BitmapWidth = 0, BitmapHeight = 0; result r = E_SUCCESS; BufferInfo myBuffer; Osp::Media::Image *pImage = null; Osp::Graphics::Canvas *pCanvas = null; Osp::Graphics::Rectangle *pRect = null; String path("/Media/Images/tom1.jpg"); pImage = new Osp::Media::Image(); r = pImage->Construct(); pBitmap2 = pImage->DecodeN(path, BITMAP_PIXEL_FORMAT_ARGB8888,LCD_WIDTH, LCD_HEIGHT); BitmapWidth = pBitmap2->GetWidth(); BitmapHeight = pBitmap2->GetHeight(); pBitmap2->Lock( myBuffer); int nVal = 0; int stride = myBuffer.pitch; byte *p= (byte *)(void *)myBuffer.pPixels; int nWidth = BitmapWidth *3; int nOffset = stride - BitmapWidth*4; for (int y = 0; y < BitmapHeight; ++y) { for (int x = 0; x < nWidth; ++x) { nVal = (int) (p[0] + nBrightness); if (nVal < 0) nVal = 0; if (nVal > 255) nVal = 255; p[0] = (byte) nVal; ++p; } p+= nOffset; } pBitmap2->Unlock(); pCanvas = GetCanvasN(); // Step 3: Create Rectangle pRect = new Osp::Graphics::Rectangle(0, 0, LCD_WIDTH, LCD_HEIGHT); r = pCanvas->DrawBitmap(*pRect, *pBitmap2); pCanvas->Show(); RequestRedraw(true); delete pBitmap2; delete pCanvas; delete pRect;

    Read the article

  • tiny mce pop ups blank in smarty

    - by ashishbhatt
    I am using tiny mce with smarty but it shows blank pop ups such as in image,anchor,preview buttons. The code i have used in my tpl file is `{literal} tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "css/content.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); {/literal}`

    Read the article

  • .NET Publishing files but allowing them to be edited?

    - by acidzombie24
    I had media files require in the project so i did this + set built action to content Now here are my problems I would like my app to check for .NET and to check for other installs which is fine now that i made a prerequisite I would like to copy media files when i publish One of these files is a config file i like the user to edit Problem is after doing 1 which gives me a publish folder with a setup.exe + files i have no idea where my installed files are and if i modify the file.ext.deploy i get an error about the hash of the file modified. Is there a way i can have plain non deploy files or distribute the bin/release folder as i normally do but add something to check my prerequisite?

    Read the article

  • styling the data loaded from another page

    - by zurna
    Tabs plugin I use loads the data from another page. Data loaded is in xml format so I need to style that data loaded. How can I do it? ny suggestion highly appreciated. Data loaded needs to be used in the following: <img src="[ImageURL]" alt="" class="MultimediaImageURL" style="float:left; margin:0 10px 0 0;" /> <div class="MultimediaInfo" style="float:left; width:200px;"> <span class="MultimediaCategory" style="float:left; color:#CCC; font-size:10px; width:100%;">[CategoryName]</span> <span class="MultimediaTitle" style="float:left; color:#D90306; font-weight:bold; width:100%;">[Title]</span> tabs plugin $("div.row-title").tabs("div.panes", {effect: 'ajax'}, function(i) { // get the pane to be opened var pane = this.getPanes().eq(i); // load it with a page specified in the tab's href attribute pane.html('<img src="http://www.refinethetaste.com/FLPM/cp/images/loading.gif" alt="Loading..." />') .load(this.getTabs().eq(i).attr("href")); }); xml <rows> - <row id="1"> <MultimediaTitle>Hagi Goals</MultimediaTitle> <ImageURL>/FLPM/media/images/5Y2K4T5V_sm.jpg</ImageURL> - <Videos> - <VideoID id="1"> <VideoURL>/FLPM/media/videos/0H7T9C0F.flv</VideoURL> </VideoID> - <VideoID id="2"> <VideoURL>/FLPM/media/videos/9L6X9G9J.flv</VideoURL> </VideoID> </Videos> </row> </rows>

    Read the article

  • asp.net mvc ignoreRoute with webservice

    - by boz
    Howdy, Im adding the filevistacontrol to my asp.net MVC web application. I have a media.aspx page that is ignored in the routing with routes.IgnoreRoute("media.aspx"); This works successfully and serves a standard webforms page. Upon adding the filevistacontrol, I can't seem to ignore any calls the control makes to it's webservice. Eg the following ignoreRoute still seems to get picked up by the MvcHandler. routes.IgnoreRoute("FileVistaControl/filevista.asmx/GetLanguageFile/"); The exception thrown is: 'The RouteData must contain an item named 'controller' with a non-empty string value' Thanks in advance.

    Read the article

  • Publishing my project in Visual Basic

    - by Nora
    Hello, I developed a project using VB.Net and I used the following way to publish it: 1- Build - Build "my project" 2- Build - Publish "my project" then I follow the wizard and got the setup file at the end. But when I tried to install it I got an error telling me that my media files couldn't be found. ** I placed the media files in "Debug" folder inside "bin" folder. ** I'm using Microsoft Visual Basic 2008 Express Edition to develop this project. Is there any way to publish this project ?

    Read the article

  • how to get a product's image in magento?

    - by lock
    im running on version 1.3.2.1 but on my client's server they had magento 1.3.0 so my previous code to display images for my local copy: echo $this->helper('catalog/image')->init($_product)->resize(163, 100); does not work on the client's installation looking at the results returned by their magento, ver 1.3.0 actually returns a url although it points to the skin's media folder is there a way to get the absolute image path for the image? or should i make changes somewhere else that would tell magento that the media directory should be on the root?

    Read the article

  • EntityFramework 4.0: can you return different types depending on data in the database?

    - by user200341
    I have a Media table in the database. I also have an IMedia interface. I have two different media types that implements the same interface: 1) AudioMedia 2) PictureMedia What I wonder here, is if I can use EntityFramework (I'm using an EDMX file but I have my models in a separate library, with automatic code generation turned off), and depending on the data in the database, select what type to get (AutioMedia or PictureMedia). Since they are both implementing the same interface (could be changed to an abstract class if needed I suppose), I'm thinking that somewhere along the way you could specify what class it should be. I should perhaps point out that I have a class that inherits from ObjectContext to access the objects. Perhaps there is something that that can be done?

    Read the article

  • Is there a way to embed an mp3 player in a website that isn't flash based (so that the website is iP

    - by hartleybrody
    I did a lot of searching for what I thought would be a pretty common question, but I came up with nothing. If there is another thread with a similar topic, please let me know. Basically, I'm looking for a way to have an .mp3 file play in a website without relying on a flash-based player. I've searched w3 schools and every forum I can think of, but every media player I've found so far has been some sort of proprietary flash player. Doesn't HTML support some sort of native player? I've found some that rely on Windows Media Player which is close, but I want the player to work on an iPhone and something tells me WMP won't get that done... PS, as I'm thinking more about this this idea just popped into my head: a javascipt player and inside the <noscript> tag, put a flash player? I'm running a music blog (@ http://www.freshoncampus.com) so the less code per post, the better...

    Read the article

  • how to view all images in android's built- in gallery from a php page

    - by ramz
    Hi, I am developing an application to display all the images in android's built-in gallery in to a php page. I posted the uri(content://media/extrenal/images/media) of the gallery images to the php page. I was not able to recreate images by using webView function loadUrl(). Should i need to upload the whole gallery to another directory and display the images? Or passing the bitmap itself will do? Please suggest me an idea to solve the problem.

    Read the article

  • give apache permission to write files to folder

    - by user1683645
    I'm trying to give www-data which is the name of the apache on my ubuntu permission to write files to folders. The entire website is in /media/root/data/ and I've got member folders containing the user specific images. apache tmp folder is set to: /media/root/data/tmp and the permission is set for www-data to read and write to it. About member folders that contain images. First off I tried giving www-data the rw permission and upload an image, but it did not work. Everything else in the site works except uploading files. How do I automaticly give apache rw permission to new member folders? And why cant I write to it?

    Read the article

  • How to detect if an element exists in Watir

    - by Rijksband
    Hi, I'm relatively new to Watir but can find no good documentation (examples) regarding how to check if an element exists. There are the API specs, of course, but these make precious little sense to me if I don't find an example. I've tried both combinations but nothing seems to work... if browser.image (:src "/media/images/icons/reviewertools/editreview.jpg").exists then... if browser.image (:src "/media/images/icons/reviewertools/editreview.jpg").exists? then... If anyone has a concrete suggestion as per how to implement this, please help! Thanks!

    Read the article

  • Ubuntu 10.10 Ad-Hoc Setup (from Wireless Router, to Ubuntu Server/Desktop to Wireless Router)

    - by user60375
    Okay, so I know there are different approaches for this, but I will explain my story briefly before getting to the technical stuff. My fiancée and I are going through some financial issues (as I assume a lot of us are). We ended up having to move from our house and stay with some friends/family for 6 months, just to get ourselves caught up. (Medical bills, among other issues,etc). So this is where it gets fun. At our friends house, we are staying in the loft setup which is not near the cable modem and wireless router. I have a "hand-crafted" media center running XBMC, an Ubuntu 10.10 Server/Desktop (multi-purpose, very powerful and tons drive space), two working laptops, a between the two of us we have multiple wireless devices/phones. Now our friends Wireless router doesn't have any options for assigning IP addresses, but my router does. My current setup is: Friends Cable Modem -- Friend's Wireless Router -- Ubuntu 10.10 Server -- My Wireless Router (local-link from Friend's wireless (incoming) to sharing connection on ETH0 (outgoing)) -- to all devices. (Wireless Modem, Ubuntu Server that share's it's wireless incoming connection to the ethernet port my Wireless router share's with the rest of the devices). I setup my router to use default settings from my friend's router, using Google's DNS on my router (disabled DNS setup on Ubuntu Server), everything is assigned nicely and runs smooth. My Ubuntu server was given the address 10.42.43.1 (assuming standard from Network-Manager). (On the Ubuntu machine that shares to my wireless router; I have some server apps installed, but mainly just use Samba/NFS/Tangerine action. My problem/goal is that every device has no problem of accessing the internet from my router, the media-center has an assigned ip address, all services from all devices (ZeroConf, Avanhi, Bonjour, GIT, SSH, FTP, Apache2, etc) all work correctly except from my Ubuntu Server (which serves the wireless connection to ETH0 to another Wireless Router). The Ubuntu 10.10 Server/Desktop is not broadcasting anything (the Zeroconf Service Discovery 0.4 Gnome Applet shows the services from the Ubuntu server but no other computers can see them). I can access it from my Media-Center (Running Xbuntu 10.04) if I direct it to 10.42.43.1, no problem. But I cannot access Tangerine (Daapd) and the Samba shares do not show up on any computers for 10.42.43.1 (not in the WORKGROUP which Samba is setup simple and default but I can direct computers to that address and the shares will add except on a damn Windows 7 parition). Is this an issue with how I have my router setup and possible the gateway? An issue with Network-Manager? And issue with my Ubuntu Server/Desktop? I know there is a lot to that, but it's simpler than I probably have explained? Any help would be appreciated. If you need more details, I can provide them. If there is a better way of my attempting this home-network, please let me know. Thanks in advance for the help.

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >