Search Results

Search found 626 results on 26 pages for 'finder'.

Page 22/26 | < Previous Page | 18 19 20 21 22 23 24 25 26  | Next Page >

  • ejb testing issues with netbeans and openejb

    - by SibzTer
    I have created a netbeans 6.7 EnterpriseApplication project with ejb and war modules with a test stateless session ejb with a simple sayHello() method. I also added the openEjb library in order to unit test the ejb. Everything runs fine except that I keep getting the following error: Testsuite: com.myapp.test.NewEmptyJUnitTest Apache OpenEJB 3.1.1 build: 20090530-06:18 http://openejb.apache.org/ INFO - openejb.home = C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb INFO - openejb.base = C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service) INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) INFO - Found ClientModule in classpath: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant.jar INFO - Found ClientModule in classpath: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant-launcher.jar INFO - Found EjbModule in classpath: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb\build\jar INFO - Found ClientModule in classpath: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\lib\OpenEJB\xml-resolver-1.2.jar INFO - Found ClientModule in classpath: C:\Users\me\Documents\Downloads\glassfish\lib\webservices-tools.jar INFO - Beginning load: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant.jar INFO - Beginning load: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant-launcher.jar INFO - Beginning load: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb\build\jar INFO - Beginning load: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\lib\OpenEJB\xml-resolver-1.2.jar INFO - Beginning load: C:\Users\me\Documents\Downloads\glassfish\lib\webservices-tools.jar INFO - Configuring enterprise application: classpath.ear WARN - No application-client.xml found assuming annotations present: classpath.ear, module: ant.jar WARN - No application-client.xml found assuming annotations present: classpath.ear, module: ant-launcher.jar WARN - No application-client.xml found assuming annotations present: classpath.ear, module: xml-resolver-1.2.jar WARN - No application-client.xml found assuming annotations present: classpath.ear, module: webservices-tools.jar java.lang.Exception: Could not load 1/0/com/sun/codemodel/CodeWriter.class at org.apache.xbean.finder.ClassFinder.readClassDef(ClassFinder.java:730) .... Turns out that I am getting the glassfish library webservices-tools.jar from somewhere somehow and I cant find out how to get rid of it so that I dont get the bunch of Exceptions whenever I try to run any junit tests. Has anyone faced this issue before? Can you help me resolve it please? Thanks.

    Read the article

  • Facial recognition/detection PHP or software for photo and video galleries

    - by Peter
    I have a very large photo gallery with thousands of similar people, objects, locations, things. The majority of the people in the photos have their own user accounts and avatar photos to match. There are also logical short lists of people potentially in the photo based on additional data available for each photo. I allow users to tag photos with their friends and people they know but an automated process would be better. I've used photo tagger/finder from face.com integrating with Facebook photos and the Google Picasa photo tagger for personal albums also does the same thing and is exactly what I'm looking to do. Is there a PHP script, API for Google Picasa, face.com or other recognition service or any other open source project that provides server-side facial recognition and/or grouping photos by similarity? Examples: As you can see, various photo sharing sites offer the feature, but are there any that provide an API for images stored on my own server or something extensive enough to link into my own gallery and tagging system? viewdle - Face recognition/Tagging for video PHP - Face detection in pure PHP Xarg OpenCV Face.com - app for finding and tagging photos in Facebook Google Picasa - photo sharing TeraSnaps - photo sharing site Google Portrait - photo grouping from Google Image results FaceOnIt - Video face recognition PittPatt - Detection, Recognition, Video Face Mining BetaFace ChaosFace - Real-time Face Detector

    Read the article

  • Can I embed a custom font in an iPhone application?

    - by Airsource Ltd
    I would like to have an app include a custom font for rendering text, load it, and then use it with standard UIKit elements like UILabel. Is this possible? I found these links: http://discussions.apple.com/thread.jspa?messageID=8304744 http://forums.macrumors.com/showthread.php?t=569311 but these would require me to render each glyph myself, which is a bit too much like hard work, especially for multi-line text. I've also found posts that say straight out that it's not possible, but without justification, so I'm looking for a definitive answer. EDIT - failed -[UIFont fontWithName:size:] experiment I downloaded Harrowprint.tff (downloaded from here) and added it to my Resources directory and to the project. I then tried this code: UIFont* font = [UIFont fontWithName:@"Harrowprint" size:20]; which resulted in an exception being thrown. Looking at the TTF file in Finder confirmed that the font name was Harrowprint. EDIT - there have been a number of replies so far which tell me to read the documentation on X or Y. I've experimented extensively with all of these, and got nowhere. In one case, X turned out to be relevant only on OS X, not on iPhone. Consequently I am setting a bounty for this question, and I will award the bounty to the first person who provides an answer (using only documented APIs) who responds with sufficient information to get this working on the device. Working on the simulator too would be a bonus. EDIT - it appears that the bounty auto-awards to the answer with the highest nunber of votes. Interesting. No one actually provided an answer that solved the question as asked - the solution that involves coding your own UILabel subclass doesn't support word-wrap, which is an essential feature for me - though I guess I could extend it to do so.

    Read the article

  • Python doctest error

    - by user74283
    Hi I recently started experimenting with python currently reading "Think like a computer scientist: Learning python v2nd edition" I have been having some trouble with doctest. I use a windows 7 machine and Eclipse IDE with pydev. My question is when i run the script below i get the error below. Said script is below the the error message Traceback (most recent call last): File "C:\Users\shaytac\PythonProjects\test.py", line 21, in doctest.testmod() File "C:\Python26\lib\doctest.py", line 1829, in testmod for test in finder.find(m, name, globs=globs, extraglobs=extraglobs): File "C:\Python26\lib\doctest.py", line 852, in find self._find(tests, obj, name, module, source_lines, globs, {}) File "C:\Python26\lib\doctest.py", line 906, in _find globs, seen) File "C:\Python26\lib\doctest.py", line 894, in _find test = self._get_test(obj, name, module, globs, source_lines) File "C:\Python26\lib\doctest.py", line 978, in _get_test filename, lineno) File "C:\Python26\lib\doctest.py", line 597, in get_doctest return DocTest(self.get_examples(string, name), globs, File "C:\Python26\lib\doctest.py", line 611, in get_examples return [x for x in self.parse(string, name) File "C:\Python26\lib\doctest.py", line 573, in parse self._parse_example(m, name, lineno) File "C:\Python26\lib\doctest.py", line 631, in _parse_example self._check_prompt_blank(source_lines, indent, name, lineno) File "C:\Python26\lib\doctest.py", line 718, in _check_prompt_blank line[indent:indent+3], line)) ValueError: line 2 of the docstring for main.compare lacks blank after : 'compare(5, 4) ' def compare(a, b): """ >>>compare(5, 4) 1 >>>compare(7, 7) 0 >>>compare(2, 3) -1 >>>compare(42, 1) 1 """ if a > b : return 1 if a == b : return 0 if a < b : return -1 if __name__ == '__main__': import doctest doctest.testmod()

    Read the article

  • Accessing a class's containing namespace from within a module

    - by SFEley
    I'm working on a module that, among other things, will add some generic 'finder' type functionality to the class you mix it into. The problem: for reasons of convenience and aesthetics, I want to include some functionality outside the class, in the same scope as the class itself. For example: class User include MyMagicMixin end # Should automagically enable: User.name('Bob') # Returns first user named Bob Users.name('Bob') # Returns ALL users named Bob User(5) # Returns the user with an ID of 5 Users # Returns all users I can do the functionality within these methods, no problem. And case 1 (User.name('Bob')) is easy. Cases 2–4, however, require being able to create new classes and methods outside User. The Module.included method gives me access to the class, but not to its containing scope. There is no simple "parent" type method that I can see on Class nor Module. (For namespace, I mean, not superclass nor nested modules.) The best way I can think to do this is with some string parsing on the class's #name to break out its namespace, and then turn the string back into a constant. But that seems clumsy, and given that this is Ruby, I feel like there should be a more elegant way. Does anyone have ideas? Or am I just being too clever for my own good?

    Read the article

  • Inconsistency in modified/created/accessed time on mac

    - by Seth Johnson
    I'm having trouble using os.utime to correctly set the modification time on the mac (Mac OS X 10.6.2, running Python 2.6.1 from /usr/bin/python). It's not consistent with the touch utility, and it's not consistent with the properties displayed in the Finder's "get info" window. Consider the following command sequence. The 'created' and 'modified' times in the plain text refer to the "get info" window attributes. As a reminder, os.utime takes arguments (filename, (atime, mtime)). >>> import os >>> open('tempfile','w').close() 'created' and 'modified' are both the current time. >>> os.utime('tempfile', (1000000000, 1500000000) ) 'created' is the current time, 'modified' is July 13, 2017. >>> os.utime('tempfile', (1000000000, 1000000000) ) 'created' and 'modified' are both September 8, 2001. >>> os.path.getmtime('tempfile') 1000000000.0 >>> os.path.getctime('tempfile') 1269021939.0 >>> os.path.getatime('tempfile') 1269021951.0 ...but the os.path.get?time and os.stat don't reflect it. >>> os.utime('tempfile', (1500000000, 1000000000) ) 'created' and 'modified' are still both September 8, 2001. >>> os.utime('tempfile', (1500000000, 1500000000) ) 'created' is September 8, 2001, 'modified' is July 13, 2017. I'm not sure if this is a Python problem or a Mac stat problem. When I exit the Python shell and run touch -a -t 200011221234 tempfile neither the modification nor the creation times are changed, as expected. Then I run touch -m -t 200011221234 tempfile and both 'created' and 'modified' times are changed. Does anyone have any idea what's going on? How do I change the modification and creation times consistently on the mac? (Yes, I am aware that on Unixy systems there is no "creation time.")

    Read the article

  • Changing classes on multiple divs when selecting specific radio buttons

    - by Rob
    Hey everyone I got a javascript problem I can't seem to find a specific solution for on the web. What I want to be able to do is select one of the radio buttons and have that change the class of #home-right to either .rackmount or .shipping and add the class of .displaynone to the type of dimensions I don't want shown. <div id="home-right" class="rackmount"> <h4 class="helvneuebcn">Case Finder</h4> <div class="cta-options"> <input type="radio" value="Shipping and Storage" name="" checked> Shipping and Storage<br/> <input type="radio" value="Rackmount Enclosures" name=""> Rackmount Enclosures<br/> </div> <div class="shipping-dimensions displaynone"> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">H x </span></div> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">W x </span></div> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">L</span></div> </div> <div class="rackmount-dimensions"> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">U Height x </span></div> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">Rack Depth</span></div> </div> <div class="clear"></div> <input type="button" value="Submit" class="findcase"> </div>

    Read the article

  • Can't create new xib files in Xcode projects

    - by Reed Olsen
    This one is a doozy... My buddy just downloaded the iPhone SDK on his Snow Leopard MacBook Pro. No matter what kind of project he creates (Window Based, View Based, etc...,) he can't create or use his own xib files. The project will compile and run fine until he adds a new xib file. Here are some symptoms: When he selects a pre-generated xib in Xcode (such as MainWindow.xib), no preview is shown on the right hand side. Double clicking on this file will open it in interface builder (This is correct behavior). When he selects his own custom xib, the preview pane displays the XML content of the xib. Double clicking on his custom xib opens up the XML file in Xcode - as if it were a standard code file (This is jacked up). Opening his custom xib from finder opens it in Interface Builder. When building the application, the build warning says something to the effect of "Warning: No rule to process file /path/to/CustomXib of type sourcecode.xib for architecture i386" At runtime he gets the error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "MyCustomXib"' We've uninstalled Xcode from the command line and reinstalled. I've verified that it's the right version for his machine. I'm stumped!

    Read the article

  • Monitor file selection in explorer (like clipboard monitoring) in C#

    - by Christian
    Hi, I am trying to create a little helper application, one scenario is "file duplication finder". What I want to do is this: I start my C# .NET app, it gives me an empty list. Start the normal windows explorer, select a file in some folder The C# app tells me stuff about this file (e.g. duplicates) How can I monitor the currently selected file in the "normal" windows explorer instance. Do I have to start the instance using .NET to have a handle of the process. Do I need a handle, or is there some "global hook" I can monitor inside C#. Its a little bit like monitoring the clipboard, but not exactly the same... Any help is appreciated (if you don't have code, just point me to the right interops, dlls or help pages :-) Thanks, Chris EDIT 1 (current source, thanks to Mattias) using SHDocVw; using Shell32; public static void ListExplorerWindows() { foreach (InternetExplorer ie in new ShellWindowsClass()) DebugExplorerInstance(ie); } public static void DebugExplorerInstance(InternetExplorer instance) { Debug.WriteLine("DebugExplorerInstance ".PadRight(30, '=')); Debug.WriteLine("FullName " + instance.FullName); Debug.WriteLine("AdressBar " + instance.AddressBar); var doc = instance.Document as IShellFolderViewDual ; if (doc != null) { Debug.WriteLine(doc.Folder.Title); foreach (FolderItem item in doc.SelectedItems()) { Debug.WriteLine(item.Path); } } }

    Read the article

  • Xcode - duplicate Target - new Target fails to build

    - by SirRatty
    Hi all, using Xcode 3.2.5 on 10.6.6 (10J521) I have an Xcode project containing 1 Target: "MyApp". It builds and runs successfully. As well as source and resource files, the Target contains a "Copy Files" build phase which copies "Sparkle.framework" in. The framework is in the same directory as the project. I want to duplicate this Target. Steps taken: Did "Clean all Targets". Right-clicked on the "MyApp" Target within Xcode, and then chose "Duplicate". Renamed the duplicated target to "MyAppTarget2". Selected "MyAppTarget2" as the Active Target from the popup menu in the top-left. Did "Build". The problem: error: Sparkle/Sparkle.h: No such file or directory This is puzzling! Each Build step appears to have been replicated in the duplicated Target, including the "Copy Files" phase. The Sparkle.framework exists at the path indicated by [Get Info on the Copy Phase item]. If I right-click on the Sparkle.framework file within the "Copy Files" build phase of the duplicated Target, and select "Reveal in Finder", then the correct Sparkle.framework file is shown. The required file exists at Sparkle.framework/Headers/Sparkle.h If I switch back to the original "MyApp" target, it builds and runs successfully. Am I doing something obviously wrong here? Thanks.

    Read the article

  • std::locale breakage on MacOS 10.6 with LANG=en_US.UTF-8

    - by fixermark
    I have a C++ application that I am porting to MacOSX (specifically, 10.6). The app makes heavy use of the C++ standard library and boost. I recently observed some breakage in the app that I'm having difficulty understanding. Basically, the boost filesystem library throws a runtime exception when the program runs. With a bit of debugging and googling, I've reduced the offending call to the following minimal program: #include <locale> int main ( int argc, char *argv [] ) { std::locale::global(std::locale("")); return 0; } This program fails when I run this through g++ and execute the resulting program in an environment where LANG=en_US.UTF-8 is set (which on my computer is part of the default bash session when I create a new console window). Clearing the environment variable (setenv LANG=) allows the program to run without issues. But I'm surprised I'm seeing this breakage in the default configuration. My questions are: Is this expected behavior for this code on MacOS 10.6? What would a proper workaround be? I can't really re-write the function because the version of the boost libraries we are using executes this statement internally as part of the filesystem library. For completeness, I should point out that the program from which this code was synthesized crashes when launched via the 'open' command (or from the Finder) but not when Xcode runs the program in Debug mode. edit The error given by the above code on 10.6.1 is: $ ./locale terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Abort trap

    Read the article

  • Link checker ; how to avoid false positives

    - by Burnzy
    I'm working a on a link checker/broken link finder and I am getting many false positives, after double checking I noticed that many error codes were returning webexceptions but they were actually downloadable, but in some other cases the statuscode is 404 and i can access the page from the browse. So here is the code, its pretty ugly, and id like to have something more, id say practical. All the status codes are in that big if are used to filter the ones i dont want to add to brokenlink because they are valid links ( i tested them all ). What i need to fix is the structure (if possible) and how to not get false 404. Thank you! try { HttpWebRequest request = ( HttpWebRequest ) WebRequest.Create ( uri ); request.Method = "Head"; request.MaximumResponseHeadersLength = 32; // FOR IE SLOW SPEED request.AllowAutoRedirect = true; using ( HttpWebResponse response = ( HttpWebResponse ) request.GetResponse() ) { request.Abort(); } /* WebClient wc = new WebClient(); wc.DownloadString( uri ); */ _validlinks.Add ( strUri ); } catch ( WebException wex ) { if ( !wex.Message.Contains ( "The remote name could not be resolved:" ) && wex.Status != WebExceptionStatus.ServerProtocolViolation ) { if ( wex.Status != WebExceptionStatus.Timeout ) { HttpStatusCode code = ( ( HttpWebResponse ) wex.Response ).StatusCode; if ( code != HttpStatusCode.OK && code != HttpStatusCode.BadRequest && code != HttpStatusCode.Accepted && code != HttpStatusCode.InternalServerError && code != HttpStatusCode.Forbidden && code != HttpStatusCode.Redirect && code != HttpStatusCode.Found ) { _brokenlinks.Add ( new Href ( new Uri ( strUri , UriKind.RelativeOrAbsolute ) , UrlType.External ) ); } else _validlinks.Add ( strUri ); } else _brokenlinks.Add ( new Href ( new Uri ( strUri , UriKind.RelativeOrAbsolute ) , UrlType.External ) ); } else _validlinks.Add ( strUri ); }

    Read the article

  • How do I get my code to read the spaces between longs?

    - by WahtsUpWorld
    I apologize for any inconvenience that may occur in answering my question, I'm fairly new to programming and I'm so far only in the last weeks of my community college Java I class. The problem I am facing is in my code of which I cannot seem to get the PrintWriter to address the spaces in between my longs' phone number and social security I.D. The entire code consists of two classes in which one pulls from the other the information needed to parse and present the file writer/print writer. Here is the entire code w/ the second class after it: public class FinalProjectGroup1 { public static void main(String[] args) { } public String name; public long ssid; public double pay; public String address; public long number; public void cleanUpConstructor() {} public FinalProjectGroup1(String name, String address, double pay, long ssid, long number){ this.name = name; this.pay = pay; this.ssid = ssid; this.address = address; this.number = number; cleanUpConstructor(); } public void setName(String name) { this.name = name; } public String getName() { return name; } public void setPay(double pay) { this.pay = pay; } public double getPay() { return pay; } public void setSSID(long ssid) { this.ssid = ssid; } public long getSSID() { return ssid; } public void setAddress(String address) { this.address = address; } public String getAddress() { return address; } public void setNumber(long number) { this.number = number; } public long getNumber() { return number; } } SECOND CLASS import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JLabel; import java.awt.Font; import javax.swing.JFileChooser; import javax.swing.JButton; import javax.swing.JTextField; import FinalProjectGroup1; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.io.FileWriter; import java.io.PrintWriter; public class FinalProjectGroup1Window { public JFrame frmTheBosssSecretary; public JTextField txtName; public JTextField txtSSID; public JTextField txtAddress; public JTextField txtNumber; public JTextField txtPay; public JTextField txtFindName; public JTextField txtFindSSID; public JTextField txtFindPay; public JTextField txtFolder; public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { FinalProjectGroup1Window window = new FinalProjectGroup1Window(); window.frmTheBosssSecretary.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } public FinalProjectGroup1Window() { initialize(); } private void initialize() { frmTheBosssSecretary = new JFrame(); frmTheBosssSecretary.setFont(new Font("Times New Roman", Font.PLAIN, 12)); frmTheBosssSecretary.setTitle("The Boss's Secretary: Employee Generator/Finder"); frmTheBosssSecretary.setBounds(100, 100, 547, 302); frmTheBosssSecretary.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frmTheBosssSecretary.getContentPane().setLayout(null); JLabel lblFile = new JLabel("Employee Folder:"); lblFile.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblFile.setBounds(10, 10, 93, 14); frmTheBosssSecretary.getContentPane().add(lblFile); JLabel lblFindEmployee = new JLabel("Employee Finder"); lblFindEmployee.setFont(new Font("Times New Roman", Font.BOLD, 18)); lblFindEmployee.setBounds(194, 159, 142, 20); frmTheBosssSecretary.getContentPane().add(lblFindEmployee); JLabel lblEmployeeName = new JLabel("Employee Name:"); lblEmployeeName.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblEmployeeName.setBounds(10, 35, 93, 14); frmTheBosssSecretary.getContentPane().add(lblEmployeeName); JLabel lblSSID = new JLabel("Employee SSID:"); lblSSID.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblSSID.setBounds(10, 135, 85, 14); frmTheBosssSecretary.getContentPane().add(lblSSID); JLabel lblAddress = new JLabel("Employee Address:"); lblAddress.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblAddress.setBounds(10, 60, 105, 14); frmTheBosssSecretary.getContentPane().add(lblAddress); JLabel lblPhoneNumber = new JLabel("Employee Phone Number:"); lblPhoneNumber.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblPhoneNumber.setBounds(10, 85, 134, 14); frmTheBosssSecretary.getContentPane().add(lblPhoneNumber); JLabel lblPayRate = new JLabel("Employee Pay Rate:"); lblPayRate.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblPayRate.setBounds(10, 110, 105, 14); frmTheBosssSecretary.getContentPane().add(lblPayRate); JLabel lblFindEmployeeName = new JLabel("Find Employee Name:"); lblFindEmployeeName.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblFindEmployeeName.setBounds(10, 183, 115, 14); frmTheBosssSecretary.getContentPane().add(lblFindEmployeeName); JLabel lblFindSSID = new JLabel("Find Employee SSID:"); lblFindSSID.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblFindSSID.setBounds(10, 208, 105, 14); frmTheBosssSecretary.getContentPane().add(lblFindSSID); JLabel lblFindPay = new JLabel("Find Employee Address:"); lblFindPay.setFont(new Font("Times New Roman", Font.PLAIN, 12)); lblFindPay.setBounds(10, 233, 124, 14); frmTheBosssSecretary.getContentPane().add(lblFindPay); txtFolder = new JTextField(); txtFolder.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtFolder.setBounds(105, 7, 314, 20); frmTheBosssSecretary.getContentPane().add(txtFolder); txtFolder.setColumns(10); txtName = new JTextField(); txtName.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtName.setBounds(99, 32, 247, 20); frmTheBosssSecretary.getContentPane().add(txtName); txtName.setColumns(10); txtAddress = new JTextField(); txtAddress.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtAddress.setBounds(109, 57, 237, 20); frmTheBosssSecretary.getContentPane().add(txtAddress); txtAddress.setColumns(10); txtNumber = new JTextField(); txtNumber.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtNumber.setBounds(141, 82, 160, 20); frmTheBosssSecretary.getContentPane().add(txtNumber); txtNumber.setColumns(10); txtPay = new JTextField(); txtPay.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtPay.setBounds(116, 107, 105, 20); frmTheBosssSecretary.getContentPane().add(txtPay); txtPay.setColumns(10); txtSSID = new JTextField(); txtSSID.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtSSID.setBounds(97, 132, 124, 20); frmTheBosssSecretary.getContentPane().add(txtSSID); txtSSID.setColumns(10); txtFindName = new JTextField(); txtFindName.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtFindName.setBounds(122, 180, 314, 20); frmTheBosssSecretary.getContentPane().add(txtFindName); txtFindName.setColumns(10); txtFindSSID = new JTextField(); txtFindSSID.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtFindSSID.setBounds(122, 205, 122, 20); frmTheBosssSecretary.getContentPane().add(txtFindSSID); txtFindSSID.setColumns(10); txtFindPay = new JTextField(); txtFindPay.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtFindPay.setBounds(141, 230, 237, 20); frmTheBosssSecretary.getContentPane().add(txtFindPay); txtFindPay.setColumns(10); JButton btnAddEmployee = new JButton("Add Employee"); btnAddEmployee.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { String name = txtName.getText(); String address = txtAddress.getText(); double pay = Double.parseDouble(txtPay.getText()); long ssid = Long.parseLong(txtSSID.getText()); long number = Long.parseLong(txtNumber.getText()); FinalProjectGroup1 ee = new FinalProjectGroup1(name, address, pay, ssid, number); FileWriter writer = new FileWriter(txtFolder.getText(), true); PrintWriter pw = new PrintWriter(writer); pw.println(ee.getName() + ", " + ee.getAddress() + ", " + ee.getNumber() + ", " + ee.getPay() + ", " + ee.getSSID()); pw.close(); } catch (Exception e) { return; } } }); JButton btnFolder = new JButton("Folder"); btnFolder.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { JFileChooser bsearch = new JFileChooser(); int result = bsearch.showOpenDialog(null); if (result != JFileChooser.APPROVE_OPTION) return; txtFolder.setText(bsearch.getSelectedFile().getAbsolutePath()); } }); btnFolder.setFont(new Font("Times New Roman", Font.PLAIN, 12)); btnFolder.setBounds(429, 6, 75, 23); frmTheBosssSecretary.getContentPane().add(btnFolder); btnAddEmployee.setFont(new Font("Times New Roman", Font.PLAIN, 12)); btnAddEmployee.setBounds(356, 42, 159, 107); frmTheBosssSecretary.getContentPane().add(btnAddEmployee); JButton btnFindName = new JButton("Find"); btnFindName.setFont(new Font("Times New Roman", Font.PLAIN, 12)); btnFindName.setBounds(446, 179, 69, 23); frmTheBosssSecretary.getContentPane().add(btnFindName); JButton btnFindSSID = new JButton("Find"); btnFindSSID.setFont(new Font("Times New Roman", Font.PLAIN, 12)); btnFindSSID.setBounds(250, 204, 85, 23); frmTheBosssSecretary.getContentPane().add(btnFindSSID); JButton btnFindAddress = new JButton("Find"); btnFindAddress.setFont(new Font("Times New Roman", Font.PLAIN, 12)); btnFindAddress.setBounds(389, 229, 85, 23); frmTheBosssSecretary.getContentPane().add(btnFindAddress); } } The problem here lies in the JButton Add Employee. Where, as previously mentioned, the long's phone number and social security I.D. don't show the spaces in the text file.

    Read the article

  • Ruby on Rails App not starting in production mode

    - by Ermin
    Everything works fine in development mode, but when I try to start my app in production mode (RAILS_ENV=production script/server) I get the following error: /opt/ruby1.8/lib/ruby/gems/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/conditions.rb:81:in `method_missing': protected method `scope' called for #<Class:0x7f41de524410> (NoMethodError) from /opt/ruby1.8/lib/ruby/gems/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/association_conditions.rb:19:in `method_missing' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/association_ordering.rb:27:in `method_missing' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/ordering.rb:30:in `method_missing' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/or_conditions.rb:28:in `method_missing' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1959:in `method_missing_without_paginate' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/will_paginate-2.3.12/lib/will_paginate/finder.rb:170:in `method_missing' from /opt/ruby1.8/lib/ruby/gems/1.8/gems/acts_as_commentable-3.0.0/lib/comment_methods.rb:12:in `included' from .../app/models/comment.rb:2:in `include' from .../app/models/comment.rb:2 from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'... Now it seems to me it that the acts_as_commentable gem is causing this. But how come, it works fine in development mode.

    Read the article

  • Which text margin does SWT Table use when drawing text?

    - by Zordid
    I got a relatively easy question - but I cannot find anything anywhere to answer it. I use a simple SWT table widget in my application that displays only text in the cells. I got an incremental search feature and want to highlight text snippets in all cells if they match. So when typing "a", all "a"s should be highlighted. To get this, I add an SWT.EraseItem listener to interfere with the background drawing. If the current cell's text contains the search string, I find the positions and calculate relative x-coordinates within the text using event.gc.stringExtent - easy. With that I just draw rectangles "behind" the occurrences. Now, there's a flaw in this. The table does not draw the text without a margin, so my x coordinate does not really match - it is slightly off by a few pixels! But how many?? Where do I retrieve the cell's text margins that table's own drawing will use? No clue. Cannot find anything. :-( Bonus question: the table's draw method also shortens text and adds "..." if it does not fit into the cell. Hmm. My occurrence finder takes the TableItem's text and thus also tries to mark occurrences that are actually not visible because they are consumed by the "...". How do I get the shortened text and not the "real" text within the EraseItem draw handler? Thanks!

    Read the article

  • Show values in TDropDownList in PRADO.

    - by Muhammad Sajid
    I m new to PRADO, I have a file Home.page with code: <%@ Title="Contact List" %> <h1>Contact List</h1> <a href="<%= $this->Service->constructUrl('insert')%>">Create New Contact</a> <br/> <com:TForm> <com:TDropDownList ID="personInfo"> <com:TListItem Value="value 1" Text="item 1" /> <com:TListItem Value="value 2" Text="item 2" Selected="true" /> <com:TListItem Value="value 3" Text="item 3" /> <com:TListItem Value="value 4" Text="item 4" /> </com:TDropDownList> </com:TForm> & Home.php with code <?php class Home extends TPage { /** * Populates the datagrid with user lists. * This method is invoked by the framework when initializing the page * @param mixed event parameter */ public function onInit($param) { parent::onInit($param); // fetches all data account information $rec = ContactRecord::finder()->findAll(); } } ?> the $rec contain array of all values. Now I want to show all name in Dropdown list. I tried my best but fail. Can anyone help me? Thanks

    Read the article

  • jQuery removing elements from DOM put still reporting as present

    - by RyanP13
    Hi, I have an address finder system whereby a user enters a postcode, if postcode is validated then an address list is returned and displayed, they then select an address line, the list dissappears and then the address line is split further into some form inputs. The issue i am facing is when they have been through the above process then cleared the postcode form field, hit the find address button and the address list re-appears. Event though the list and parent tr have been removed from the DOM it is still reporting it is present as length 1? My code is as follows: jQuery // when postcode validated display box var $addressList = $("div#selectAddress > ul").length; // if address list present show the address list if ($addressList != 0) { $("div#selectAddress").closest("tr").removeClass("hide"); } // address list hidden by default // if coming back to modify details then display address inputs var $customerAddress = $("form#detailsForm input[name*='customerAddress']"); var $addressInputs = $.cookies.get('cpqbAddressInputs'); if ($addressInputs) { if ($addressInputs == 'visible') { $($customerAddress).closest("tr").removeClass("hide"); } } else { $($customerAddress).closest("tr").addClass("hide"); } // Need to change form action URL to call post code web service $("input.findAddress").live('click', function(){ var $postCode = encodeURI($("input#customerPostcode").val()); if ($postCode != "") { var $formAction = "customerAction.do?searchAddress=searchAddress&custpc=" + $postCode; $("form#detailsForm").attr("action", $formAction); } else { alert($addressList);} }); // darker highlight when li is clicked // split address string into corresponding inputs $("div#selectAddress ul li").live('click', function(){ $(this).removeClass("addressHover"); //$("li.addressClick").removeClass("addressClick"); $(this).addClass("addressClick"); var $splitAddress = $(this).text().split(","); $($customerAddress).each(function(){ var $inputCount = $(this).index("form#detailsForm input[name*='customerAddress']"); $(this).val($splitAddress[$inputCount]); }); $($customerAddress).closest("tr").removeClass("hide"); $.cookies.set('cpqbAddressInputs', 'visible'); $(this).closest("tr").fadeOut(250, function() { $(this).remove(); }); });

    Read the article

  • Uploading Binary iPhone App "The signature was invalid" again again and again...

    - by user338386
    Hello! I'm going crazy! I'm trying to upload the binary of my first application but I have always the same error! "The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate." I did everything, EVERYTHING!! I created the request for the certificate, used it for both developer and distribution certificate, created the provisioning profile (12 times!!!) always cleaning my keychain and my Xcode deleting the old certificates and profiles.. I reboot the machine, reboot Xcode, the log is correct, but... I can't upload my app!!!! Checked if my iPhone is connected (i tried with iPhone disconneted too). I checked the certificate in both my project settings "Distribuition" Configuration (duplicate of "Release" configuration) and in my target settings. Reveal in finder, compress the app and sent the zip... I tried with Application Loader and iTunes connect online.. but nothing! NOTHING!! I've spent 8 hours! And again i can't have my app uploaded!!! I'm really going crazy! Can anyone help me pleeease? Thx!

    Read the article

  • Snow Leopard mounted directory changes permissions sporadically

    - by Galen
    I have a smb mounted directory: /Volumes/myshare This was mounted via Finder "Connect to Server..." with smb://myservername/myshare Everything good so far. However, when I try to access the directory via PHP (running under Apache), it fails with permission denied about 10% of the time. By this I mean that repeated accesses to my page sometimes result in a failure. My PHP page looks like: <?php $cmd = "ls -la /Volumes/ 2>&1"; exec($cmd, $execOut, $exitCode); echo "<PRE>EXIT CODE = $exitCode<BR/>"; foreach($execOut as $line) { echo "$line <BR/>"; } echo "</PRE>"; ?> When it succeeds it looks like: EXIT CODE = 0 total 40 drwxrwxrwt@ 4 root admin 136 Jun 14 12:34 . drwxrwxr-t 30 root admin 1088 Jun 4 13:09 .. drwx------ 1 galen staff 16384 Jun 14 09:28 myshare lrwxr-xr-x 1 root admin 1 Jun 11 16:05 galenhd - / When it fails it looks like: EXIT CODE = 1 ls: myshare: Permission denied total 8 drwxrwxrwt@ 4 root admin 136 Jun 14 12:34 . drwxrwxr-t 30 root admin 1088 Jun 4 13:09 .. lrwxr-xr-x 1 root admin 1 Jun 11 16:05 galenhd - / OTHER INFO: I'm working with the PHP (5.3.1), and Apache server that comes out of the box with Snow Leopard. Also, if I write a PHP script that loops and retries the "ls -la.." from the command-line, it doesn't seem to fail. Nothing is changing about the code and/or filesystem between succeeds and fails, so this appears to be a truly intermittent failure. This is driving me crazy. Anyone have any idea what might be going on? Thanks, Galen

    Read the article

  • Mail Rule to Run Applescript Not Working?

    - by William Andy Hainline
    Question for my fellow AppleScripters. I have the following script which runs just fine if you run it in AppleScript Editor or Script Debugger, but that won't run at all if you try to run it from a Mail rule. The script is correctly placed in ~/Library/Application Scripts/com.apple.mail, and shows up in the "Run AppleScript" menu in the Mail rule, but simply refuses to work when new mail arrives. on perform_mail_action(info) tell application "Mail" set theMessages to |SelectedMessages| of info repeat with thisMessage in theMessages set AppleScript's text item delimiters to {""} set thisSender to sender of thisMessage as string set quotepos to offset of "\"" in thisSender if (quotepos is not 0) then set thisSender to (text items (quotepos + 1) through -1) ¬ of thisSender as string set quotepos to offset of "\"" in thisSender if (quotepos is not 0) then set thisSender to (text items 1 through (quotepos - 1)) ¬ of thisSender as string end if else set atpos to offset of "@" in thisSender if (atpos is not 0) then set thisSender to (text items 1 through (atpos - 1)) ¬ of thisSender as string end if set brkpos to offset of "<" in thisSender if (brkpos is not 0) then set thisSender to (text items (brkpos + 1) through -1) ¬ of thisSender as string end if end if tell application "Finder" to say "Mail from " & thisSender end repeat end tell end perform_mail_action Any ideas?

    Read the article

  • How to Create the Upload File for Application Loader?

    - by Ohad Regev
    When I use Application Loader, I get to the point where it asks me to "Choose..." the file to be uploaded. If I understand correctly, it supposes to be the appName.app file I see under "Products" on my app bundle (I right click it and select "Show in Finder" to get to the specific file in library; then I'm supposed to ZIP it and the ZIP file is what I will choose in Application Loader). First, am I correct with this assumption? if yes... What should I define different in XCode than the way I used to build the application for testing (on simulator and on my personal iPhone)? Should I change the Info---Command-line build use from Debug to Release? How should I define the Build Settings---Code Signing section (in which field should I select the "iPhone Developer" option and in which should it be "iPhone Distribution")? Are there any other important Info/Build Settings/p.list/etc... fields I should relate to? any help will be appreciated...

    Read the article

  • Synthetic click doesn't switch application's menu bar (Mac OS X)

    - by Rok
    Hi. I'm developing some sort of air mouse application for iPhone platform. This applications connects to one computer service which generates mouse events on Mac OS X. I'm generating this events with CGEventCreateMouseEvent() and CGEventPost(). But I've encountered one problem. Let's say you are using Safari and then you click on free desktop space. If you do this with regular mouse it will hide Safari's top menu bar and show Finder menu bar. But on these synthetic events it doesn't act like that. Do I have to post some other event or set some additional properties? Here is my code for mouse up, mouse down: - (void)mouseUp:(int)button { int type = (button == LEFT_BUTTON) ? kCGEventLeftMouseUp : kCGEventRightMouseUp; int mouseButton = (button == LEFT_BUTTON) ? kCGMouseButtonLeft : kCGMouseButtonRight; leftMouseDown = (button == LEFT_BUTTON) ? NO : leftMouseDown; rightMouseDown = (button == RIGHT_BUTTON) ? NO : rightMouseDown; CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateHIDSystemState); CGEventRef event = CGEventCreateMouseEvent (source, type, CGSCurrentInputPointerPosition(), mouseButton); CGEventSetType(event, type); CGEventPost(kCGHIDEventTap, event); CFRelease(event); } - (void)mouseDown:(int)button { int type = (button == LEFT_BUTTON) ? kCGEventLeftMouseDown : kCGEventRightMouseDown; int mouseButton = (button == LEFT_BUTTON) ? kCGMouseButtonLeft : kCGMouseButtonRight; leftMouseDown = (button == LEFT_BUTTON) ? YES : leftMouseDown; rightMouseDown = (button == RIGHT_BUTTON) ? YES : rightMouseDown; CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateHIDSystemState); CGEventRef event = CGEventCreateMouseEvent (source, type, CGSCurrentInputPointerPosition(), mouseButton); CGEventSetType(event, type); CGEventPost(kCGHIDEventTap, event); CFRelease(event); }

    Read the article

  • Ways to support manually executed tests? (that can be used on a Mac)

    - by Rinzwind
    Are there any tools that can be used on a Mac to support manually executed tests? I have a number of tests that I'm executing manually and which I'm currently documenting using merely a plain text file. "Tools" can be interpreted rather loosely here, anything that's a step up from the plain text file would be useful: a template for some suitable application, supporting AppleScript scripts, a web-based system, a full-blown application ... Some things that would be great to have better support for (see also the example below): Checking off each step while you're manually executing the test. Showing the next step(s) in a small window that is always kept in front of all other windows. Automatically updating the 'last tested' and 'using svn revision' info. Keeping a record of all previous testing rounds (not just the last one). ... Any suggestions for any such "tools" that can be used on a Mac? An example (faked) entry from the plain text file to give you a better idea of what I'm looking for: - Check that exported web pages render properly in Safari. Last tested: 2010-03-24 Using SVN revision: 1000 Steps: - Open a new document. - Add some items to the document. - Export the document to a web page "Test.html" in a new folder "Export Test" on the Desktop. - Open the web page in Safari, script: tell application "Finder" open file "Test.html" of folder "Export Test" of desktop end tell Expected results: - The web page should appear properly with all items shown. Clean up steps: - Remove the folder "Export Test" from the Desktop. ( Note: for those unaware, the snippet of AppleScript in the above can be executed from most text editing applications through the Services menu by selecting the snippet and using: the application menu Services Script Editor Run as AppleScript. This is quite useful to automate some steps for tests that are difficult to automate as a whole. )

    Read the article

  • AppleScript: open frontmost file with another application

    - by jacobianism
    I'd like to write an AppleScript program to do the following (Automator would be fine too): I want to open the current active TextMate file (possibly there are several tabs open and other windows) with the application Transmit 2. (This will upload the file over FTP using Transmit's DockSend feature.) Here I've used a specific application (TextMate) but ideally I'd like it to work for any file currently active in any application. Ultimately I will assign a keyboard shortcut to run it. Here's what I have so far: tell application (path to frontmost application as text) set p to path of document 1 end tell tell application "Finder" open POSIX file p using "Transmit 2" end tell I've tried many variants of this and nothing works. EDIT: I have found this page: http://wiki.macromates.com/Main/Howtos and someone has made exactly the script I'm looking for: tell application "Transmit" to open POSIX file "$TM_FILEPATH" This is for Transmit [not 2] and I think for TextMate pre v2. I get the error (when using Transmit 2): Transmit 2 got an error: AppleEvent handler failed. One of the updates to v2 has broken it (not sure which one).

    Read the article

  • Search Alternative Search Engines from within Bing’s Search Page

    - by Asian Angel
    So you love using Bing Search but may still be curious to see what another search engine will provide if used. Now you can search using another search engine from within the Bing Search page and enjoy numbered results using two simple user scripts. Note: These user scripts may also be added to other browsers as well (i.e. Iron, Opera, etc.). Before Bing Search does nicely on searches but what if you would like to try the same search with another search engine? Having to manually open a new tab, navigate to the appropriate website, and then start a new search is not too convenient. Another possible frustration for some people may be knowing just how many search results that they have looked through. Well, both of these small problems are easy to fix with two wonderful user scripts. Installing the Scripts The first script that we installed (you may do either one first) was for adding alternative search engine links. Click “Install” to get started… Note: For our example we had the Greasemonkey extension installed. When the confirmation window pops up click on “Install” to finish adding the user script to Firefox. Repeating the same procedure as above add your second script to Firefox. Confirm the second user script installation and you are ready to enjoy nicer Bing Search results. After As you can see there are two small unobtrusive differences in our search results. The alternative search engine links are conveniently located at the top of the page and now you can easily know just how many search results that you have looked through. The results when we decided to try the search in a transfer over to Yahoo. Our search transferred to Ask Search. The alternative search links can be very helpful if Bing is not providing the kind of search results that you are hoping for. Still going very nicely past the 100 mark… Conclusion If you have been wanting a small booster to searching with Bing then these two scripts will get you on your way. Using Opera Browser? See our how-to for adding user scripts to Opera here. Links Install the Bing (Alternate Search Engine Links) User Script Install the Bing Numbered Search Results User Script Download the Greasemonkey extension for Firefox (Mozilla Add-ons) Download the Stylish extension for Firefox (Mozilla Add-ons) Similar Articles Productive Geek Tips Organize Your Firefox Search Engines Into FoldersFix for Slow "Instant Search" In Outlook 2007Gain Access to a Search Box in Google ChromeManage Web Searches In SafariModify Firefox’s Search Bar Behavior with SearchLoad Options TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Heaven & Hell Finder Icon Using TrueCrypt to Secure Your Data Quickly Schedule Meetings With NeedtoMeet Share Flickr Photos On Facebook Automatically Are You Blocked On Gtalk? Find out Discover Latest Android Apps On AppBrain

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26  | Next Page >