Daily Archives

Articles indexed Monday April 12 2010

Page 12/116 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • H.264 in Firefox

    - by illuminatedtiger
    Hi all, As I understand it Firefox does not support H.264 encoded video using the tag. I've been told that Flash will quite happily handle such content however I have no experience with Flash nor do I have access to Adobe Creative Suite. I'm developing primarily for Firefox users and recoding our video content to OGG would not be practical. What are my options?

    Read the article

  • Sizers... - wxPython

    - by Francisco Aleixo
    Ok, so I'm learning about sizers in wxPython and I was wondering if it was possible to do something like: ============================================== |WINDOW TITLE _ [] X| |============================================| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxNOTEBOOKxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |________ ___________| |IMAGE | |LoginForm | |________| |___________| ============================================== NOTE:Yeah, I literally got this from http://stackoverflow.com/questions/1892110/wxpython-picking-the-right-sizer-to-use-in-an-application With NOTEBOOK expanded to left and bottom, IMAGE to align to left and bottom and loginform align to right and bottom and I managed to do almost everything but now I have a problem.. The problem is that I can't align Loginform and Image separately (im using Box Sizers), and I would like to. This is the code I'm using that is causing the problem at the moment, any help is appreciated. NOTE:The code might be (HUGELY) sloppy as I'm still learning box sizers. sizer = wx.BoxSizer(wx.VERTICAL) sizer1 = wx.BoxSizer(wx.HORIZONTAL) sizer1.Add(self.nb,1, wx.EXPAND) sizer.Add(sizer1,1, wx.LEFT | wx.RIGHT | wx.EXPAND, 10) sizer.Add((-1, 25)) sizer2 = wx.BoxSizer(wx.VERTICAL) sizer2.Add(self.userLabel, 0) sizer2.Add(self.userText, 0) sizer2.Add(self.pwdLabel, 0) sizer2.Add(self.pwdText, 0) sizer2.Add(self.rem, 0) sizer3 = wx.BoxSizer(wx.HORIZONTAL) sizer3.Add(self.login, 0) sizer3.Add(self.sair,0, wx.LEFT, 5) sizer2.Add(sizer3, 0) sizer4 = wx.BoxSizer(wx.HORIZONTAL) sizer4.Add(image, 1, wx.LEFT | wx.BOTTOM) sizer4.Add(sizer2,0, wx.RIGHT | wx.BOTTOM , 5) sizer.Add(sizer4,0, wx.ALIGN_RIGHT | wx.RIGHT, 10)

    Read the article

  • Detecting if youtube is blocked by company / ISP

    - by Simon_Weaver
    We have Youtube videos on a site and want to detect if it is likely that they will not be able to view them due to (mostly likely) company policy or otherwise. We have two sites: 1) Flex / Flash 2) HTML I think with Flex I can attempt to download http://youtube.com/crossdomain.xml and if it is valid XML assume the site is available But with HTML I dont know how to do it. I cant even think of a 'nice hack'

    Read the article

  • Java: how to initialize private final int value with if-else in constructor?

    - by HH
    $ javac InitInt.java InitInt.java:7: variable right might not have been initialized InitInt(){} ^ 1 error $ cat InitInt.java import java.util.*; import java.io.*; public class InitInt { private final int right; InitInt(){} public static void main(String[] args) { // I don't want to assign any value. // just initialize it, how? InitInt test = new InitInt(); System.out.println(test.getRight()); // later assiging a value } public int getRight(){return right;} } Initialization problem with Constructor, due to if-else -loop InitInt{ // Still the error, "may not be initialized" // How to initialise it, without removing if-else? if(snippetBuilder.length()>(charwisePos+25)){ right=charwisePos+25; }else{ right=snippetBuilder.length()-1; } }

    Read the article

  • A regex for version number parsing

    - by ajborley
    Hi, I have a version number of the following form: version.release.modification where version, release and modification are either a set of digits or the '*' wildcard character. Additionally, any of these numbers (and any preceding .) may be missing. So the following are valid and parse as: 1.23.456 = version 1, release 23, modification 456 1.23 = version 1, release 23, any modification 1.23.* = version 1, release 23, any modification 1.* = version 1, any release, any modification 1 = version 1, any release, any modification * = any version, any release, any modification But these are not valid: *.12 *123.1 12* 12.*.34 Can anyone provide me a not-too-complex regex to validate and retrieve the release, version and modification numbers? Many thanks! Thanks for all the responses! This is ace :) Based on OneByOne's answer (which looked the simplest to me), I added some non-capturing groups (the '(?:' parts - thanks to VonC for introducing me to non-capturing groups!), so the groups that do capture only contain the digits or * character. ^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$ Many thanks to everyone!

    Read the article

  • Apache </Location> Errors

    - by Eddie
    Hi there! I am having real trouble with this installation - Basically this is the erro that I am getting: apache2: Syntax error on line 234 of /etc/apache2/apache2.conf: Syntax error on line 10 of /etc/apache2/conf.d/amberdms-bs.conf: Expected </Location\xc2\xa0/billing_system> but saw </Location> and this is the code that is being used in that modules file: #  # Amberdms Billing System is an open source accounting, service billing and time keeping web application.  #  Alias /billing_system /usr/share/amberdms/billing_system  <Location /billing_system>  Order deny,allow  Allow from all  AllowOverride all    Please help me! I need this software to be installed, but this error has stumped me.

    Read the article

  • Redirecting http request to two different weblogic servers using the Weblogic proxy and Apache2

    - by Jhon
    Hello All, I've read previous posts like "Redirecting https requests to two different weblogic servers using the Weblogic proxy and Apache2". But I have a different situation and I don't think I'm understanding this to well. I have an Apache 2 server (server1) that will receive http request for my application. Then I have two more servers (server2 and server3) with Web Logic 9.2 runing on ports 7000 (server1) and 8000 (server2). I want the users to enter appname.domain.com and be redirected between the two web logic servers, always keeping appname.domain.com (this is hidding servername:port from URL). How can I manage to do that? Thanks in advanced! Jhon.

    Read the article

  • Facebook Application Tab URL

    - by Paul
    I have a facebook application that can be added to fan pages as a tab. The application requires that users are authenticated in order to use it. This can be accomplished by using requirelogin=1 in a link which is visible only to users who have NOT added the application. This part works fine. However, after the user has given my application permission from the dhtml pop up that requirelogin opens, I want the tab to reload. In order to do that, I need the full URL to be included in the link as follows: <a href="http://www.facebook.com/pages/PAGE_NAME/PAGE_ID?v=app_APP_ID" requirelogin=1>Authorize</a> I cannot figure out how to get the full url or, at least, the PAGE_NAME to build this url dynamically. Seems like the app should be able to know where it is without any special permissions.

    Read the article

  • Use SSIS to populate Excel workbook generated using OOXML

    - by Maulik
    We are trying to generate MS Excel workbook using OOXML and populate data using SSIS. We are able to generate Workbook and sheets, also able to create columns and insert data in Header cell. We can also populate data using SSIS. But the Sheet (DocumentFormat.OpenXml.Spreadsheet.Sheet) and all cells (DocumentFormat.OpenXml.Spreadsheet.Cell) becomes OpenXmlUnknownElement. So we are not able to read sheet / cell using following Code. Sheet sheet = workbookPart.Workbook.Descendants().Where(s = s.Name == "Sheet1").SingleOrDefault(); We are able to read the same file if we first open it using MS Excel and save.

    Read the article

  • MIPS assembly: how to declare integer values in the .data section?

    - by Barney
    I'm trying to get my feet wet with MIPS assembly language using the MARS simulator. My main problem now is how do I initialize a set of memory locations so that I can access them later via assembly language instructions? For example, I want to initialize addresses 0x1001000 - 0x10001003 with the values 0x99, 0x87, 0x23, 0x45. I think this can be done in the data declaration (.data) section of my assembly program but I'm not sure of the syntax. Is this possible? Alternatively, in the .data section, how do I specify storing the integer values in some memory location (I don't care where, but I just want to reference them somewhere). So I'm looking for the C equivalent of "int x = 20, y=30, z=90;" I know how to do that using MIPS instructions but is it possible to declare something like that in the .data section of a MIPS assembly program?

    Read the article

  • osx run app on every file in folder

    - by Charles
    I want to use jsmin to minify every js file in a directory, and js files in subfolders as well. I would want to use the compiled vers of jsmin found here: http://www.ejeliot.com/blog/73 What is the osx equivalent of a batch file? Looking for something like this for OSX: http://superuser.com/questions/116417/run-a-batch-command-for-every-file-in-a-directory Thanks.

    Read the article

  • What is the code behind this javascript?

    - by Kat
    Hi, I'm trying to find out how they were able to create this site. http://www.cpeople.ru, i am trying to build my portfolio to look something like it. Particularly, I want the slider effect of the menu. Please help me out. Thanks. :)

    Read the article

  • How to send a reply message to sender machine via serial port using c#

    - by karthik
    I am using the below code to receive the message via serial port which is working fine. Now i need to send back a acknowledgment message to the sender machine. How can send the message ? private void MonitorSP_DataReceived(object sender, SerialDataReceivedEventArgs e) { try { System.IO.Ports.SerialPort SP = (System.IO.Ports.SerialPort)sender; //Get the ports available in system string[] theSerialPortNames = System.IO.Ports.SerialPort.GetPortNames(); string strAvlPortNames = ""; foreach (string s in theSerialPortNames) { strAvlPortNames += s.ToString() + ", "; } //Read an contruct the message Thread.Sleep(1000); string msg = SP.ReadExisting(); string ConstructedMsg = "Port's Found : " + strAvlPortNames + "\n" + "Port Used : " + SP.PortName + "\n" + "Message Received : " + msg; if (InvokeRequired) { richTextBox1.Invoke(new MethodInvoker(delegate { richTextBox1.Text = ConstructedMsg; })); //Send acknowlegement to sender port SP.Write(SP.PortName); return; } } catch (Exception ex) { MessageBox.Show(ex.StackTrace.ToString()); } }

    Read the article

  • server|configuration problem, a php script just die with no error log & no reason

    - by Roberto
    Hi (first of all, thanks for your attention & sorry for my bad english hahaha also this is not a programming error, or thats what I think, I think this is an error in some configuration of the server or something else but I dont know what) I have a php script (is running like a process of linux, its not running on the web browser) that send SMS via SMPP on the port 2055 (using sockets in php) & then inserts like 10,000 rows into a dababase on MySQL, the script gets the data from a XML file; firts it was running in a shared server (Hostgator is our hosting provider) & at the begining it worked fine, with no trouble, but 5 months later an error appear, the process just die with no reason, the script only sent & inserted 700 rows in the table of the database & the process didnt show any warning or error, nothing appears in the error logs, & I didnt make any change in the script Hostgator never helped us hahaha so we decided to move the script from the shared server to a dedicated server; I thought it was a memory problem or something like that, but when we move the script to the dedicated server the problem just get worse, the script die when has just sent & inserted 40 to 50 rows to the database the information about this error: the shared server is on Red Hat 4.1.2-46 & the dedicated server is on CentOS 5.4 I have commented the line that sends the SMS, & the problem remains in the shared server, at the begining the script was fine, but then the script started to die when has just inserted 700 aprox. in the database, & now the script is dying when has inserted 2500 rows, its better but we didnt change anything in the dedicated server, the script dies when has just inserted like 40 row in the table the script, before it dies, change to a zombie process & we dont know why the usage of memory appears to be 0.3%, and of the cpu appears to be 0.7% to 1% I have changed the max memory limit of php to 128Mb, and even to -1 (so php wont have any limit) but the problem remains we have the limit of 50 connections of mysql at the same time, so I think this is not the problem Im using mysqli to connect from php to mysql Hostgator report that they haven't made any change or update in the servers what could be the problem?? what should I do??? what should I search??? is something in the logic Im missing?? what steps do I have to follow when managing & searching problems of process on Linux??? thank you very much, I think this is not a programming problem, but you have more experience than me, you can tell me thanks!!! bye!!! :)

    Read the article

  • What technologies should I focus on to work as a developer in Japan?

    - by Atomiton
    I'm thinking of one day moving to Japan and I was wondering if anyone here has any experience working there. I'm curious as to what languages/technology are popular there for web development and software development. I have heard Ruby is/was strong there due to its founder being Japanese. What would you recommend someone focus on if they wanted to work as a developer in Japan? I have heard Microsoft has a strong base in Japan, but my guess is that whatever platform has supported unicode or Shift-JIS the best would be the strongest.

    Read the article

  • Silverlight handling multiple key press combinations.

    - by SilverDark
    I have a Silverlight application in which I catch certain key presses such as TAB or CTRL to perform some action. However, I want to be able to handle multiple keys pressed at the same time such as CTRL + R or something like that. Is there any way to do that in Silverlight, and if so, how? Thank you in advance.

    Read the article

  • Searches (and general querying) with HBase and/or Cassandra (best practices?)

    - by alexeypro
    I have User model object with quite few fields (properties, if you wish) in it. Say "firstname", "lastname", "city" and "year-of-birth". Each user also gets "unique id". I want to be able to search by them. How do I do that properly? How to do that at all? My understanding (will work for pretty much any key-value storage -- first goes key, then value) u:123456789 = serialized_json_object ("u" as a simple prefix for user's keys, 123456789 is "unique id"). Now, thinking that I want to be able to search by firstname and lastname, I can save in: f:Steve = u:384734807,u:2398248764,u:23276263 f:Alex = u:12324355,u:121324334 so key is "f" - which is prefix for firstnames, and "Steve" is actual firstname. For "u:Steve" we save as value all user id's who are "Steve's". That makes every search very-very easy. Querying by few fields (properties) -- say by firstname (i.e. "Steve") and lastname (i.e. "l:Anything") is still easy - first get list of user ids from "f:Steve", then list from "l:Anything", find crossing user ids, an here you go. Problems (and there are quite a few): Saving, updating, deleting user is a pain. It has to be atomic and consistent operation. Also, if we have size of value limited to some value - then we are in (potential) trouble. And really not of an answer here. Only zipping the list of user ids? Not too cool, though. What id we want to add new field to search by. Eventually. Say by "city". We certainly can do the same way "c:Los Angeles" = ..., "c:Chicago" = ..., but if we didn't foresee all those "search choices" from the very beginning, then we will have to be able to create some night job or something to go by all existing User records and update those "c:CITY" for them... Quite a big job! Problems with locking. User "u:123" updates his name "Alex", and user "u:456" updates his name "Alex". They both have to update "f:Alex" with their id's. That means either we get into overwriting problem, or one update will wait for another (and imaging if there are many of them?!). What's the best way of doing that? Keeping in mind that I want to search by many fields? P.S. Please, the question is about HBase/Cassandra/NoSQL/Key-Value storages. Please please - no advices to use MySQL and "read about" SELECTs; and worry about scaling problems "later". There is a reason why I asked MY question exactly the way I did. :-)

    Read the article

  • How to dynamically choose two fields from a Linq query as a result

    - by Dr. Zim
    If you have a simple Linq query like: var result = from record in db.Customer select new { Text = record.Name, Value = record.ID.ToString() }; which is returning an object that can be mapped to a Drop Down List, is it possible to dynamically specify which fields map to Text and Value? Of course, you could do a big case (switch) statement, then code each Linq query separately but this isn't very elegant. What would be nice would be something like: (pseudo code) var myTextField = db.Customer["Name"]; // Could be an enumeration?? var myValueField = db.Customer["ID"]; // Idea: choose the field outside the query var result = from record in db.Customer select new { Text = myTextField, Value = myValueField };

    Read the article

  • How to design Models the correct way: Object-oriented or "Package"-oriented?

    - by ajsie
    I know that in OOP you want every object (from a class) to be a "thing", eg. user, validator etc. I know the basics about MVC, how they different parts interact with each other. However, i wonder if the models in MVC should be designed according to the traditional OOP design, that is to say, should every model be a database/table/row (solution 2)? Or is the intention more like to collect methods that are affecting the same table or a bunch of related tables (solution 1). example for an Address book module in CodeIgniter, where i want be able to "CRUD" a Contact and add/remove it to/from a CRUD-able Contact Group. Models solution 1: bunching all related methods together (not real object, rather a "package") class Contacts extends Model { function create_contact() {) function read_contact() {} function update_contact() {} function delete_contact() {} function add_contact_to_group() {} function delete_contact_from_group() {} function create_group() {} function read_group() {} function update_group() {} function delete_group() {} } Models solution 2: the OOP way (one class per file) class Contact extends Model { private $name = ''; private $id = ''; function create_contact() {) function read_contact() {} function update_contact() {} function delete_contact() {} } class ContactGroup extends Model { private $name = ''; private $id = ''; function add_contact_to_group() {} function delete_contact_from_group() {} function create_group() {} function read_group() {} function update_group() {} function delete_group() {} } i dont know how to think when i want to create the models. and the above examples are my real tasks for creating an Address book. Should i just bunch all functions together in one class. then the class contains different logic (contact and group), so it can not hold properties that are specific for either one of them. the solution 2 works according to the OOP. but i dont know why i should make such a dividing. what would the benefits be to have a Contact object for example. Its surely not a User object, so why should a Contact "live" with its own state (properties and methods). you experienced guys with OOP/MVC, please shed a light on how one should think here in this very concrete task.

    Read the article

  • E-Commerce website using blogging service

    - by Rohit
    I have been selling software products since last few years. I now want to sell them online. I have three ways in my mind: Using TypePad and integrating PayPal code in it. Get designed my own website. Buy a shopping cart online app. like Volusion etc. I am not selling all the products but only selected software products. I want to know which is the best solution in terms on cost, manageability and getting online response.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >