Daily Archives

Articles indexed Monday May 17 2010

Page 23/112 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Why Silverlight Mediaplayer (Not MedieElement) doesn't have a next Button?

    - by Subhen
    Hi, I try implementing silverlight mediaPlayer that is available from expression blend int my projecct. Just found out that there is no next buttom for the Media Player. So I have to override the button proporties in the onApplyTemplate(). Am I missing something so that I am not able to enable the Next and Prev Button or this is just the Silverlight MediaPlayer it self. Thanks, Subhen

    Read the article

  • How to store data in mysql, to get the fastest performance?

    - by Oden
    Hey, I'm thinking about it, witch of the following two query types would give me the fastest performance for a user messaging module inside my site: The first one i thought about is a multi table setup, witch has a connection table, and a main table. The connection table holds the connection between accounts, and the messaging table. In this case a query would look like following, to get some data of the author, and the messages he has sent: SELECT m.*, a.username FROM messages AS m LEFT JOIN connection_table ON (message_id = m.id) LEFT JOIN accounts AS a ON (account_id = a.id) WHERE m.id = '32341' Inserting into it is a little bit more "complicated". My other idea, and in my thought the better solution of this problem is that i store the data i would use in a connection table in the same table where is store the data of the mail. Sounds like i would get lots of duplicated entries, but no, because i have a field witch has text type and holds user ids like this: *24*32*249* If I want to query them, i use the mysql LIKE method. Deleting is an other problem, but for this i have one more field where i store who has deleted the post. Sad about that i don't know how to join this. So what would you recommend? Are there other ways?

    Read the article

  • Manipulating a NSTextField via AppleScript

    - by Garry
    A little side project I'm working on is a digital life assistant, much like project JARVIS. What I'm trying to do is speak to my mac, have my words translated to text and then have the text interpreted by my program. Currently, my app is very simple, consisting of a single window containing a single wrapped NSTextView. Using MacSpeech Dictate, When I say the custom command "Jeeves", MacSpeech ensures that my app is frontmost, highlights any text in the TextField and clears it, then presses the Return key to trigger the textDidEndEditing method of NSTextField. This is done via Applescript. MacSpeech then switches to dictation mode and the next sentence I say will appear in the NSTextField. What I can't figure out is how to signify that I have finished saying a command to my program. I could simply say another keyword like "execute" or something similar that would send an AppleScript return keystroke to my app (thereby triggering the textDidEndEditing event) but this is cumbersome. Is there a notification that happens when text is pasted into a NSTextField? Would a timer work that would fire after maybe three seconds once my program becomes frontmost (three seconds should be sufficient for me to say a command)? Thanks,

    Read the article

  • Why is my interface is not showing when i run the project?

    - by Nubkadiya
    i have configured the Sphinx and i have used Main thread to do the recognition part. so that i can avoid the buttons. so currently my design is when the application runs it will check any voice recognition and prompt in the labels. but when i run the project it dont display the interface of the application. only the frame shows. here is the code. if you guys can provide me with any solution for this. it will be great. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * FinalMainWindow.java * * Created on May 17, 2010, 11:22:29 AM */ package FYP; import edu.cmu.sphinx.frontend.util.Microphone; import edu.cmu.sphinx.recognizer.Recognizer; import edu.cmu.sphinx.result.Result; import edu.cmu.sphinx.util.props.ConfigurationManager; //import javax.swing.; //import java.io.; public class FinalMainWindow extends javax.swing.JFrame{ Recognizer recognizer; private void allocateRecognizer() { ConfigurationManager cm; cm = new ConfigurationManager("helloworld.config.xml"); this.recognizer = (Recognizer) cm.lookup("recognizer"); this.recognizer.allocate(); Microphone microphone = (Microphone) cm.lookup("microphone");// TODO add // your if (!microphone.startRecording()) { // System.out.println("Cannot start microphone."); //this.jlblDest.setText("Cannot Start Microphone"); // this.jprogress.setText("Cannot Start Microphone"); System.out.println("Cannot Start Microphone"); this.recognizer.deallocate(); System.exit(1); } } boolean allocated; // property file eka....... //code.google.com private void voiceMajorInput() { if (!allocated) { this.allocateRecognizer(); allocated = true; } Result result = recognizer.recognize(); if (result != null) { String resultText = result.getBestFinalResultNoFiller(); System.out.println("Recognized Result is " +resultText); this.jhidden.setText(resultText); } } /** Creates new form FinalMainWindow */ public FinalMainWindow() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jhidden = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jhidden.setText("jLabel1"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(51, 51, 51) .addComponent(jhidden) .addContainerGap(397, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(45, 45, 45) .addComponent(jhidden) .addContainerGap(293, Short.MAX_VALUE)) ); pack(); }// </editor-fold> /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { // new FinalMainWindow().setVisible(true); FinalMainWindow mw = new FinalMainWindow(); mw.setVisible(true); mw.voiceMajorInput(); new FinalMainWindow().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JLabel jhidden; // End of variables declaration }

    Read the article

  • Is 1 for TRUE or FALSE ?

    - by CharlesChipy
    I always forget :S How do you remember which number stands for TRUE or FALSE? (when I started css the colors black and white always confused me. Is white #FFFFFF or #000000. A trick I came up with: black is 0,because z0rr0 is dressed in …)

    Read the article

  • What is an SSH key?

    - by acidzombie24
    I signed up for github and notice the ssh key option which looked interesting. I originally expected something like an ssl key (name, co name, etc). After going through it i notice i only put a password and it is always myuser@comp-name (this is windows). Why? I thought it was a user/pass id and i can create separate keys for separate purpose for privacy reasons. Now i see i am required to use one to create a repository. Also i see something about a 'private key file' when looking at options. What exactly is an SSH Key and how can i create a separate user without creating a separate login in windows.

    Read the article

  • How to return a message from my repository class to my controller and then to my view in asp.net-mvc

    - by Pandiya Chendur
    I use this for checking an existing emailId in my table and inserting it...It works fine how to show message to user when he tries to register with an existing mailId.... if (!taxidb.Registrations.Where(u => u.EmailId == reg.EmailId).Any()) { taxidb.Registrations.InsertOnSubmit(reg); taxidb.SubmitChanges(); } and my controller has this, RegistrationBO reg = new RegistrationBO(); reg.UserName = collection["UserName"]; reg.OrgName = collection["OrgName"]; reg.Address = collection["Address"]; reg.EmailId = collection["EmailId"]; reg.Password = collection["Password"]; reg.CreatedDate = System.DateTime.Now; reg.IsDeleted = Convert.ToByte(0); regrep.registerUser(reg); Any sugesstion how to show "EmailID" already exists to the user with asp.net mvc...

    Read the article

  • Question about AJAX

    - by Doug
    function showHint(str) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("games").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","hw9.database.php?name="+str,true); xmlhttp.send(); } I'm learning AJAX at the moment. The code here basically receives the echo from the PHP and then puts it in element id games. My question is, if I wanted to have AJAX send 3 different http requests to 3 different PHP scripts and if I wanted to retrieve data from each one and then put it in 3 different element id's then would I make 3 copies of this same function? I would imagine that there should be a more efficient way. Thanks!

    Read the article

  • Apple in-app-purchase ALWAYS with 30 % for Apple?

    - by swalkner
    Hi all, I know that Apple keeps 30 % of the money I make with in-app-purchase. But does that always count? I mean, if there's a feature allowing the user to buy something with an SMS-message, is that allowed? If yes, does Apple also keep 30 % then? Or if I make a WebService-call with username/password and return something to the user then, is it possible to charge that call and keep the money for myself? I thougt that those are options which are not allowed, but there are some apps out there which exactly do it that way - are they only "lucky" and Apple didn't see that or is it allowed to sell services that way? Thanks a lot for your answers, Stefan

    Read the article

  • Having Problems Getting FreeTTS and JSAPI Working

    - by Travis
    I have a simple project idea based off of FreeTTS and the JSAPI (Java Speech API) I've downloaded and unpacked FreeTTS and run their build script. Then tried compiling my code linking in the lib directory into the class path like this: javac -cp /home/travis/Desktop/freetts-1.2/lib HelloUnleashedReader.java Which then compiles to java bytecode just fine. However when I run: java HelloUnleashedReader I get the following error: Exception in thread "main" java.lang.NoClassDefFoundError: javax/speech/EngineModeDesc Any help on this issue would be greatly appreciated as there are many sites around the net discussing problems with getting it to work but not many that discuss their solution.

    Read the article

  • Gap appears between navigation bar and view after rotating & tab switching

    - by Bogatyr
    My iphone application is showing strange behavior when rotating: a gap appears between the navigation title and content view inside a tab bar view (details on how to reproduce are below). I've created a tiny test case that exhibits the same problem: a custom root UIViewController, which creates and displays a UITabBarController programmatically, which has two tabs: 1) plain UIViewController, and 2) UINavigationController created programmatically with a single plain UIViewController content view. The complete code for the application is in the root controller's viewDidLoad (every "*VC" class is a totally vanilla UIViewController subclass with XIB for user interface from XCode, with only the view background color changed to clearly identify each view, nothing else). Here's the viewDidLoad code, and the shouldAutorotateToInterfaceOrientation code, this code is the entire application basically: - (void)viewDidLoad { [super viewDidLoad]; FirstVC *fvc = [[FirstVC alloc] initWithNibName:@"FirstVC" bundle:nil]; NavContentsVC *ncvc = [[NavContentsVC alloc] initWithNibName:@"NavContentsVC" bundle:nil]; UINavigationController *svc = [[UINavigationController alloc] initWithRootViewController:ncvc]; NSMutableArray *localControllersArray = [[NSMutableArray alloc] initWithCapacity:2]; [localControllersArray addObject:fvc]; [localControllersArray addObject:svc]; fvc.title = @"FirstVC-Title"; ncvc.title = @"NavContents-Title"; UITabBarController *tbc = [[UITabBarController alloc] init]; tbc.view.frame = CGRectMake(0, 0, 320, 460); [tbc setViewControllers:localControllersArray]; [self.view addSubview:tbc.view]; [localControllersArray release]; [ncvc release]; [svc release]; [fvc release]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } Here's how to reproduce the problem: 1) start application 2) rotate device (happens in simulator, too) to landscape (UITabBar properly rotates) 3) click on tab 2 4) rotate device to portrait -- notice gap of root view controller's background color of about 10 pixels high beneath the Navigation title bar and the Navigation content view. 5) click tab 1 6) click tab 2 And the gap is gone! From my real application, I see that the gap remains during all VC push and pops while the NavigationController tab is active. Switching away to a different tab and back to the Nav tab clears up the gap. What am I doing wrong? I'm running on SDK 3.1.3, this happens both on the simulator and on the device. Except for this particular sequence, everything seems to work fine. Help!

    Read the article

  • Lexer written in Javascript?

    - by Phobis
    I have a project where a user needs to define a set of instructions for a ui that is completely written in javascript. I need to have the ability to parse a string of instructions and then translate them into instructions. Is there any libraries out there for parsing that are 100% javascript? Or a generator that will generate in javascript? Thanks!

    Read the article

  • jQuery not replacing text in ReportViewer

    - by firedrawndagger
    I'm trying to replace text that I got back in the ReportViewer using jQuery. My div, wrapped in the table cell, display "empty" as text - which I plan on replacing with my own formatted text on the client side. I can use jQuery just fine to set a class on the div (which is inside a td element). Example: jQuery('div:contains("empty")').addClass('replacetext'); But for some reason I cannot do this: jQuery('div:contains("empty")').replaceWith('<div>Hello World</div>'); I tried this out on some other elements on the page and jQuery does work... but it seems like this issue is ReportViewer (I'm using 2008) specific.

    Read the article

  • iText PdfPTables, document.add with writeSelectedRows

    - by J2SE31
    I am currently modifying an existing system that generates reports with iText and java. The report template is as follows: Header1(PdfPTable) Header2(PdfPTable) Body(PdfPTable) I am currently using the writeSelectedRows to display Header1 and Header2, but document.add is used to display the Body. The problem is that the system is setup to write the headers AFTER the body has already been displayed on the screen, so I am displaying my headers on top of my body content. My question is how do I add my body table (using document.add) and have it display about halfway down the page (or any predetermined vertical position)? This way I would have sufficient room to display my headers above the body table. Note: I believe the body table is using document.add to facilitate automatic paging if the body content is too large.

    Read the article

  • Mysql return value as 0 in the fetch result.

    - by Karthik
    I have this two tables, -- -- Table structure for table `t1` -- CREATE TABLE `t1` ( `pid` varchar(20) collate latin1_general_ci NOT NULL, `pname` varchar(20) collate latin1_general_ci NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `t1` -- INSERT INTO `t1` VALUES ('p1', 'pro1'); INSERT INTO `t1` VALUES ('p2', 'pro2'); -- -------------------------------------------------------- -- -- Table structure for table `t2` -- CREATE TABLE `t2` ( `pid` varchar(20) collate latin1_general_ci NOT NULL, `year` int(6) NOT NULL, `price` int(3) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -- Dumping data for table `t2` -- INSERT INTO `t2` VALUES ('p1', 2009, 50); INSERT INTO `t2` VALUES ('p1', 2010, 60); INSERT INTO `t2` VALUES ('p3', 2007, 200); INSERT INTO `t2` VALUES ('p4', 2008, 501); my query is, SELECT * FROM `t1` LEFT JOIN `t2` ON t1.pid = t2.pid Getting the result, pid pname pid year price p1 pro1 p1 2009 50 p1 pro1 p1 2010 60 p2 pro2 NULL NULL NULL My question is, i want to get the price value is 0 instead of NULL. How can i write the query to getting the price value is 0. Thanks in advance for help.

    Read the article

  • Flexible string handling in Visual Studio 2008 C++

    - by David
    I'm slowly starting to get the hang of the _T stuff in Visual Studio 2008 c++, but a few things still elude me. I can see the benefit of the flexibility, but if I can't get the basics soon, I think I'll go back to the standard way of doing this - much less confusing. The idea with the code below is that it scans the parameters for -d and then stores the text that follows that in the string variable fileDir. It also ignores any other parameters. Any help is appreciated. //Console application Parameters::Parameters(int argc, _TCHAR* argv[]) { _Tstring fileDir; // Is there some kind of _t variable to use here for a string? for (int i = 0; i < argc; i = i + 1) { if (_tccmp(argv[i], _T("-d")) == 0) // this appeared to accept anything starting with - { i = i + 1; fileDir = argv[i] } } _tprintf("Parameter value found: %s\n", fileDir); }

    Read the article

  • jquery two different date validation

    - by mckenzie
    hello, var cin = $("#datepicker").val(); var cout = $("#datepicker2").val(); dateformat is : dateFormat: 'DD, d MM, yy' how do i use jquery to check cin(checkin) date not past cout(checkout) date? which means, cout date cannot earlier then cin date

    Read the article

  • Convert danish numbers to english ?

    - by francisf
    Hi , How do i convert a danish number to an english format for example : 8,5 is decimal number representation in danish and in english it would be 8.5 Now i need to convert 8,5 to 8.5 my current culture is danish and i am trying to convert this in javascript (NOT C#) Regards, Francis P.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >