Daily Archives

Articles indexed Wednesday June 2 2010

Page 9/120 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • HTML5 <video> callbacks?

    - by Andrew
    I'm working on a site for a client and they're insistent on using HTML5's video tag as the delivery method for some of their video content. I currently have it up and running with a little help from http://videojs.com/ to handle the Internet Explorer Flash fallback. One thing they've asked me to do is, after the videos finish playing (they're all a different length), fade them out and then fade a picture in place of the video --- think of it like a poster frame after the video. Is this even possible? Can you get the timecode of a currently playing movie via Javascript or some other method? I know Flowplayer (http://flowplayer.org/demos/scripting/grow.html) has an onFinish function, is that the route I should take in lieu of the HTML5 video method? Does the fact that IE users will be getting a Flash player require two separate solutions? Any input would be greatly appreciated. I'm currently using jQuery on the site, so I'd like to keep the solution in that realm if at all possible. Thanks!

    Read the article

  • Tab control in Silverlight 3.0 and Dirty data

    - by Vinayak Bhosale
    We are using tab control in our project. While using this control i came across a few issues like - When the tab control loads, it invokes constructor of all the xaml pages that form the individual tabs. Can this be avoided? Is there any event with tab control that we can use to identify dirty data on the previous tab that i may have visited. I mean can i prevent user from navigating to some other tab before saving the changes on current tab.

    Read the article

  • jboss envers for versioning?

    - by cometta
    I have entities that required versioning support and from time to time, i will need to retrieve old version of the entity . should i just use options available 1. http://stackoverflow.com/questions/762405/database-data-versioning 2. jboss envers (can this be used on any web server,tomcat,jetty, appengine) ? 3. any similar library like jboss that ease to do versioning?

    Read the article

  • Thread Proc for an instancable class?

    - by user146780
    Basically I have a class and it is instincable (not static). Basically I want the class to be able to generate its own threads and manage its own stuff. I don't want to make a global callback for each instance I make, this doesnt seem clean and proper to me. What is the proper way of doing what I want. If I try to pass the threadproc to CreateThread and it is the proc from a class instance the compiler says I cannot do this. What is the best way of achieving what I want? Thanks

    Read the article

  • Grayscale in matlab

    - by ruthenium
    I'm trying to convert a 2D array to grayscale but using mat2gray doesn't do anything and imshow() appears to create a binary image that when I graph I cannot rotate it, e.g. the original array is 2d but maps in 3d. So, what is the best way to take a grayscale of 2d array in Matlab so if you have A=rand(5,10) or something and want to take a grayscale of that, what is the best way?

    Read the article

  • WPF binding problem

    - by xine
    I've got some bindings in UI: <Window x:Class="Tester.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="377" Width="562" xmlns:my="clr-namespace:MyApp"> <Grid> <TextBlock Text="{Binding Path=current.Text}" Name="Text1" /> <TextBlock Text="{Binding Path=current.o.Text}" Name="Text2" /> </Grid> </Window> Code: class Coordinator : INotifyPropertyChanged{ List<Myclass1> list; int currId = 0; public Myclass1 current{ return list[currId]; } public int CurrId { get { return currId; } set { currId = value; this.PropertyChanged(this,new PropertyChangedEventArgs("current")); } } class Myclass1{ public string Text{get;} public Myclass2 o{get;} } class Myclass2{ public string Text{get;} } When currId changes Tex1 in UI changes too,but Text2 doesn't. I'm assuming this happens because Text2's source isn't updated. Does anyone know how to fix it?

    Read the article

  • How to open URL's in rails?

    - by yuval
    I'm trying to read in the html of a certain website. Trying @something = open("http://www.google.com/") fails with the following error: Errno::ENOENT in testController#show No such file or directory - http://www.google.com/ Going to http://www.google.com/, I obviously see the site. What am I doing wrong? Thanks!

    Read the article

  • Launching Intent.ACTION_VIEW intent not working on saved image file

    - by Savvas Dalkitsis
    First of all let me say that this questions is slightly connected to another question by me. Actually it was created because of that. I have the following code to write a bitmap downloaded from the net to a file in the sd card: // Get image from url URL u = new URL(url); HttpGet httpRequest = new HttpGet(u.toURI()); HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = (HttpResponse) httpclient.execute(httpRequest); HttpEntity entity = response.getEntity(); BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity); InputStream instream = bufHttpEntity.getContent(); Bitmap bmImg = BitmapFactory.decodeStream(instream); instream.close(); // Write image to a file in sd card File posterFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/Android/data/com.myapp/files/image.jpg"); posterFile.createNewFile(); BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(posterFile)); Bitmap mutable = Bitmap.createScaledBitmap(bmImg,bmImg.getWidth(),bmImg.getHeight(),true); mutable.compress(Bitmap.CompressFormat.JPEG, 100, out); out.flush(); out.close(); // Launch default viewer for the file Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(posterFile.getAbsolutePath()),"image/*"); ((Activity) getContext()).startActivity(intent); A few notes. I am creating the "mutable" bitmap after seeing someone using it and it seems to work better than without it. And i am using the parse method on the Uri class and not the fromFile because in my code i am calling these in different places and when i am creating the intent i have a string path instead of a file. Now for my problem. The file gets created. The intent launches a dialog asking me to select a viewer. I have 3 viewers installed. The Astro image viewer, the default media gallery (i have a milstone on 2.1 but on the milestone the 2.1 update did not include the 3d gallery so it's the old one) and the 3d gallery from the nexus one (i found the apk in the wild). Now when i launch the 3 viewers the following happen: Astro image viewer: The activity launches but i see nothing but a black screen. Media Gallery: i get an exception dialog shown "The application Media Gallery (process com.motorola.gallery) has stopped unexpectedly. Please try again" with a force close option. 3D gallery: Everything works as it should. When i try to simply open the file using the Astro file manager (browse to it and simply click) i get the same option dialog but this time things are different: Astro image viewer: Everything works as it should. Media Gallery: Everything works as it should. 3D gallery: The activity launches but i see nothing but a black screen. As you can see everything is a complete mess. I have no idea why this happens but it happens like this every single time. It's not a random bug. Am i missing something when i am creating the intent? Or when i am creating the image file? Any ideas?

    Read the article

  • how to write a constructor...

    - by Nima
    is that correct to write a constructor like this? class A { A::A(const A& a) { .... } }; if yes, then is it correct to invoke it like this: A* other; ... A* instance = new A(*(other)); if not, what do you suggest? Thanks

    Read the article

  • Xcode 3.2 says the version of iPhone OS isn't supported when my iPhone OS is version 3.1.3

    - by fr0man
    I just went through the whole certificate/keychain/provisioning/appID/profile/DNA test process to get my app running on my iPhone. Turns out my iPhone OS was out of date (3.0.1 I think), so I updated it. Now it says The version of iPhone OS on “Stefanie's phone” does not match any of the versions of iPhone OS supported for development with this copy of Xcode. Please restore the device to a version of the OS listed below. If necessary, the latest version of Xcode is available here. OS Installed on Stefanie's phone 3.1.3 (7E18) Xcode Supported iPhone OS Versions 3.1.2 (7D11) 3.1.1 (7C146) 3.1.1 (7C145) 3.1 (7C144) 3.0.1 (7A400) 3.0 2.2.1 2.2 2.1.1 2.1 2.0.2 (5C1) 2.0.1 (5B108) 2.0 (5A347) But I have Xcode 3.2.1, which is supposed to support iPhone OS 3.1.3. What am I doing wrong? I have a cruddy internet connection (HughesNet), so I can't upgrade the Xcode SDK without it taking literally days.

    Read the article

  • ColdFusion MVC frameworks & RESTful Service mismatch?

    - by Henry
    Most CF MVC Frameworks use the front controller pattern. Usually Search Engine Safe (SES) plugin together with URL Rewrite are used to construct friendly URLs. However, when it comes to implementing RESTful services, using a MVC framework seems like a layer of complexity added on top of another layer of complexity. How should one tame this beast? Any nice and clean approach of supporting RESTful services with ColdFusion? Any MVC framework out there that can expose RESTful services easily? Thanks

    Read the article

  • Importing ctype; embedding python in C++ application

    - by Drew
    I'm trying to embed python within a C++ based programming language (CCL: The compuatational control language, not that any of you have heard of it). Thus, I don't really have a "main" function to make calls from. I have made a test .cc program with a main, and when I compile it and run it, I am able to import my own python modules and system modules for use. When I embed my code in my CCL-based program and compile it (with g++), it seems I have most functionality, but I get the import error: ImportError: /usr/lib/python2.6/lib-dynload/_ctypes.so: undefined symbol: PyType_GenericNew Can someone explain this to me and how to go about solving it? It seems like I've linked the objects correctly. Thanks.

    Read the article

  • How can I determine PerlLogHandler performance impact?

    - by Timmy
    I want to create a custom Apache2 log handler, and the template that is found on the apache site is: #file:MyApache2/LogPerUser.pm #--------------------------- package MyApache2::LogPerUser; use strict; use warnings; use Apache2::RequestRec (); use Apache2::Connection (); use Fcntl qw(:flock); use File::Spec::Functions qw(catfile); use Apache2::Const -compile => qw(OK DECLINED); sub handler { my $r = shift; my ($username) = $r->uri =~ m|^/~([^/]+)|; return Apache2::Const::DECLINED unless defined $username; my $entry = sprintf qq(%s [%s] "%s" %d %d\n), $r->connection->remote_ip, scalar(localtime), $r->uri, $r->status, $r->bytes_sent; my $log_path = catfile Apache2::ServerUtil::server_root, "logs", "$username.log"; open my $fh, ">>$log_path" or die "can't open $log_path: $!"; flock $fh, LOCK_EX; print $fh $entry; close $fh; return Apache2::Const::OK; } 1; What is the performance cost of the flocks? Is this logging process done in parallel, or in serial with the HTTP request? In parallel the performance would not matter as much, but I wouldn't want the user to wait another split second to add something like this.

    Read the article

  • When failure is a feature

    Warning: this post is going to be slightly off-topic and non-technical. Well, not computer science technical at least. I was reading an article in SciAm this morning about the possibility of a robot uprising. Dont laugh yet, this is a very real, if still quite remote possibility. The main idea that was described was that AI could rise one day to self-awareness and to an ability to improve itself through self-replication beyond human abilities to control it. Sure, thats one possibility, and some...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Outlook 2007 font sizes

    - by Flack
    Hello, Something really strange seems to have happened to my Outlook 2007. Everything was working fine for a long time now but at the end of today, all of a sudden, all of the fonts in Outlook are messed up. The font size of mails I write is huge (I am not zoomed in) and the font sizes of the buttons are big too, specifically the "Send", "To", and "Cc" buttons. I tried changing the font sizes through Outlook, but some of the buttons on the "Mail Format" tab in Options are not working, mainly the "Stationary and Fonts" button. I hit it but no window opens. This is all happening on my x64 machine. I took a look at my x32 machine, which also has Outlook 2007 installed and everything is ok there. Below is a link to an image comparing the broken, large font Outlook (top of picture) and the normal, working outlook. The text in the mails I compose is also abnormally large in the broken Outlook. Big font Outlook buttons. Any ideas? This came out of no where after a few months of no problems. Thanks.

    Read the article

  • How to capture a click on a href value using jQuery

    - by tonsils
    Hi, I have the following HTML code in the backend, ie. <div class="navi"> <a class="" href="0"></a> <a class="" href="1"></a> <a class="" href="2"></a> <a class="" href="3"></a> </div> Apologies for the basic question but I would like to use jQuery to capture the user's click when they only click on the href value of "0" Basically want to hide a div called "info" when the user clicks on the where the href="0" Unsure how to do? Thanks.

    Read the article

  • wxPython ListCtrl Column Ignores Specific Fields

    - by g.d.d.c
    I'm rewriting this post to clarify some things and provide a full class definition for the Virtual List I'm having trouble with. The class is defined like so: from wx import ListCtrl, LC_REPORT, LC_VIRTUAL, LC_HRULES, LC_VRULES, \ EVT_LIST_COL_CLICK, EVT_LIST_CACHE_HINT, EVT_LIST_COL_RIGHT_CLICK, \ ImageList, IMAGE_LIST_SMALL, Menu, MenuItem, NewId, ITEM_CHECK, Frame, \ EVT_MENU class VirtualList(ListCtrl): def __init__(self, parent, datasource = None, style = LC_REPORT | LC_VIRTUAL | LC_HRULES | LC_VRULES): ListCtrl.__init__(self, parent, style = style) self.columns = [] self.il = ImageList(16, 16) self.Bind(EVT_LIST_CACHE_HINT, self.CheckCache) self.Bind(EVT_LIST_COL_CLICK, self.OnSort) if datasource is not None: self.datasource = datasource self.Bind(EVT_LIST_COL_RIGHT_CLICK, self.ShowAvailableColumns) self.datasource.list = self self.Populate() def SetDatasource(self, datasource): self.datasource = datasource def CheckCache(self, event): self.datasource.UpdateCache(event.GetCacheFrom(), event.GetCacheTo()) def OnGetItemText(self, item, col): return self.datasource.GetItem(item, self.columns[col]) def OnGetItemImage(self, item): return self.datasource.GetImg(item) def OnSort(self, event): self.datasource.SortByColumn(self.columns[event.Column]) self.Refresh() def UpdateCount(self): self.SetItemCount(self.datasource.GetCount()) def Populate(self): self.UpdateCount() self.datasource.MakeImgList(self.il) self.SetImageList(self.il, IMAGE_LIST_SMALL) self.ShowColumns() def ShowColumns(self): for col, (text, visible) in enumerate(self.datasource.GetColumnHeaders()): if visible: self.columns.append(text) self.InsertColumn(col, text, width = -2) def Filter(self, filter): self.datasource.Filter(filter) self.UpdateCount() self.Refresh() def ShowAvailableColumns(self, evt): colMenu = Menu() self.id2item = {} for idx, (text, visible) in enumerate(self.datasource.columns): id = NewId() self.id2item[id] = (idx, visible, text) item = MenuItem(colMenu, id, text, kind = ITEM_CHECK) colMenu.AppendItem(item) EVT_MENU(colMenu, id, self.ColumnToggle) item.Check(visible) Frame(self, -1).PopupMenu(colMenu) colMenu.Destroy() def ColumnToggle(self, evt): toggled = self.id2item[evt.GetId()] if toggled[1]: idx = self.columns.index(toggled[2]) self.datasource.columns[toggled[0]] = (self.datasource.columns[toggled[0]][0], False) self.DeleteColumn(idx) self.columns.pop(idx) else: self.datasource.columns[toggled[0]] = (self.datasource.columns[toggled[0]][0], True) idx = self.datasource.GetColumnHeaders().index((toggled[2], True)) self.columns.insert(idx, toggled[2]) self.InsertColumn(idx, toggled[2], width = -2) self.datasource.SaveColumns() I've added functions that allow for Column Toggling which facilitate my description of the issue I'm encountering. On the 3rd instance of this class in my application the Column at Index 1 will not display String values. Integer values are displayed properly. If I add print statements to my OnGetItemText method the values show up in my console properly. This behavior is not present in the first two instances of this class, and my class does not contain any type checking code with respect to value display. It was suggested by someone on the wxPython users' group that I create a standalone sample that demonstrates this issue if I can. I'm working on that, but have not yet had time to create a sample that does not rely on database access. Any suggestions or advice would be most appreciated. I'm tearing my hair out on this one.

    Read the article

  • MYSQL trigger gets deleted automatically

    - by Mirage
    I have using mysql 5.1 with cpanel /whm centOS. I had to use trigger for one of my website. so i installed trigger as root so that when something gets inserted on one table there some more rows gets inserted in other table Everything was working fine, but i have seen that there is no trigger in my dtabase. How does that be deleted from DB. I am bit worried because currently site is not live , but it can cause problem if this happens in live site. Does any mysql updation cause the trigger to delete. but i have no updated. How can i make sure it don't happen in future Thanks

    Read the article

  • How can I compile CoffeeScript from .NET?

    - by liammclennan
    I want to write a HttpHandler that compiles CoffeeScript on-the-fly and sends the resulting javascript. I have tried Ms Jscript and IronJS without success. I don't want to use Rhino because the java dependency would make it too difficult to distribute. Has anyone compiled CoffeeScript from .NET or have any idea how it could be done?

    Read the article

  • Designing a frontend/backend architecture

    - by wrp
    What are some good information sources on designing programs with a client/server architecture? This is for development of a desktop application, not a Web service. The only books I have found on client/server apps deal with the case of a thin client connecting to a remote database. Two good examples of what I mean are Mathematica and SuperCollider. I'm looking for platform- and language-agnostic discussion of the issues in developing a frontend/backend system. Especially useful topics would be allocation of responsibilities and options for message passing.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >