Search Results

Search found 42712 results on 1709 pages for 'core text'.

Page 97/1709 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • Magento config XML for adding a controller action to a core admin controller

    - by N. B.
    I'm trying to add a custom action to a core controller by extending it in a local module. Below I have the class definition which resides in magento1_3_2_2/app/code/local/MyCompany/MyModule/controllers/Catalog/ProductController.php class MyCompany_MyModule_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController { public function massAttributeSetAction(){ ... } } Here is my config file at magento1_3_2_2/app/code/local/MyCompany/MyModule/etc/config.xml: ... <global> <rewrite> <mycompany_mymodule_catalog_product> <from><![CDATA[#^/catalog_product/massAttributeSet/#]]></from> <to>/mymodule/catalog_product/massAttributeSet/</to> </mycompany_mymodule_catalog_product> </rewrite> <admin> <routers> <MyCompany_MyModule> <use>admin</use> <args> <module>MyCompany_MyModule</module> <frontName>MyModule</frontName> </args> </MyCompany_MyModule> </routers> </admin> </global> ... However, https://example.com/index.php/admin/catalog_product/massAttributeSet/ simply yields a admin 404 page. I know that the module is active - other code is executing fine. I feel it's simply a problem with my xml syntax. Am I going about this the write way? I'm hesitant because I'm not actually rewriting a controller method... I'm adding one entirely. However it does make sense in that, the original admin url won't respond to that action name and it will need to be redirected. I'm using Magento 1.3.2.2 Thanks for any guidance.

    Read the article

  • How to benchmark on multi-core processors

    - by Pascal Cuoq
    I am looking for ways to perform micro-benchmarks on multi-core processors. Context: At about the same time desktop processors introduced out-of-order execution that made performance hard to predict, they, perhaps not coincidentally, also introduced special instructions to get very precise timings. Example of these instructions are rdtsc on x86 and rftb on PowerPC. These instructions gave timings that were more precise than could ever be allowed by a system call, allowed programmers to micro-benchmark their hearts out, for better or for worse. On a yet more modern processor with several cores, some of which sleep some of the time, the counters are not synchronized between cores. We are told that rdtsc is no longer safe to use for benchmarking, but I must have been dozing off when we were explained the alternative solutions. Question: Some systems may save and restore the performance counter and provide an API call to read the proper sum. If you know what this call is for any operating system, please let us know in an answer. Some systems may allow to turn off cores, leaving only one running. I know Mac OS X Leopard does when the right Preference Pane is installed from the Developers Tools. Do you think that this make rdtsc safe to use again? More context: Please assume I know what I am doing when trying to do a micro-benchmark. If you are of the opinion that if an optimization's gains cannot be measured by timing the whole application, it's not worth optimizing, I agree with you, but I cannot time the whole application until the alternative data structure is finished, which will take a long time. In fact, if the micro-benchmark were not promising, I could decide to give up on the implementation now; I need figures to provide in a publication whose deadline I have no control over.

    Read the article

  • Core jQuery event modification problem

    - by DSKVR
    I am attempting to overwrite a core jQuery event, in this case the keydown event. My intention is to preventDefault() functionality of Left(37), Up(38), Right(39) and Down(40) to maintain the consistency of hot keys in my web application. I am using the solution provided here for the conditional charCode preventDefault problem. For some reason, my function overwrite is simply not firing, and I cannot put my finger on the problem. I am afraid that over the past 30 minutes this issue has resulted in some hair loss. Anybody have the remedy? /* Modify Keydown Event to prevent default PageDown and PageUp functionality */ (function(){ var charCodes = new Array(37,38,39,40); var original = jQuery.fn.keydown; jQuery.fn.keydown = function(e){ var key=e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; alert('now why is my keydown mod not firing?'); if($.inArray(key,charCodes)) { alert('is one of them, do not scroll page'); e.preventDefault(); return false; } original.apply( this, arguments ); } })();

    Read the article

  • unclear use of @property in window app using core data

    - by Matt
    Looking through a Window based application ive used to experiment with as a way of getting my head around core data, ive noticed that the appdelegate has the following code myAppDelegate.h #import <UIKit/UIKit.h> #import <CoreData/CoreData.h> @interface iCaptureFreeAppDelegate : NSObject <UIApplicationDelegate> { NSManagedObjectModel *managedObjectModel; NSManagedObjectContext *managedObjectContext; NSPersistentStoreCoordinator *persistentStoreCoordinator; UIWindow *window; UITabBarController *tabBarController; } myAppDelegate.m #import "myAppDelegate.h" @interface iCaptureFreeAppDelegate (PrivateCoreDataStack) @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel; @property (nonatomic, retain) NSManagedObjectContext *managedObjectContext; @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; @end @implementation iCaptureFreeAppDelegate @synthesize window, tabBarController; // code .... // - (NSManagedObjectContext *) managedObjectContext { } - (NSManagedObjectModel *)managedObjectModel { } - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { } // etc..... i want to understand a few things about what this project is doing why the properties in the category declaration? (if i delete the privateCoreDataStack category everything still works...) why the properties appear to be linked with the methods in the implementation ... managedObjectContext {} etc why the members in the .h file have the same name as the properties and the methods why code completion lets me use dot '.' to access the members but then fails on compilation say it cant find a getter thanks !

    Read the article

  • Getting TexBox's ID's .... to Calculate

    - by jjj
    i have : vb code: Private Sub Calculation() Dim txt1 As Decimal txt1 = (CS_Incoms_done.Text / CS_Incoms_target.Text) * 100 CS_Incom_Result.Text = "%" + FormatNumber(txt, 2, TriState.False) Dim txt2 As Decimal txt2 = (CS_GovernmentService_done.Text / CS_GovernmentService_target.Text) * 100 CS_GovernmentService_Result.Text = "%" + FormatNumber(txt2, 2, TriState.False) Dim txt3 As Decimal txt3 = (CS_RentBox_done.Text / CS_RentBox_target.Text) * 100 CS_RentBox_Result.Text = "%" + FormatNumber(txt3, 2, TriState.False) Dim txt4 As Decimal txt4 = (CS_ServiceAdvertising_done.Text / CS_ServiceAdvertising_target.Text) * 100 CS_ServiceAdvertising_Result.Text = "%" + FormatNumber(txt4, 2, TriState.False) Dim txt5 As Decimal txt5 = (CS_ServiceCatogray_done.Text / CS_ServiceCatogray_target.Text) * 100 CS_ServiceCatogray_Result.Text = "%" + FormatNumber(txt5, 2, TriState.False) End Sub i just show you 5 textbox's of 100 textbox's .... and don't want to complete all the textbox's like this ... i want a simple code to do it.. ... as you notice , every three textbox's are look a like on the first two parts of their id's..~ for example -- CS_ServiceCatogray _Result.Text, CS_ServiceCatogray _done.Text and CS_ServiceCatogray _target.Text... ~..and the last part is the same in all textbox's for geving the Result .. _Result.Text , _done.Text and _target.Text So... i had an idea to take the id and put the Similar two parts in an array... and use For Each something like: Dim allItems As Array For Each item As Control In panel4.Controls Select Case item.[GetType]().Name Case "TextBox" 'here just be sure that this item is not saved in the allItems array ,if it is not do >>' allItems[Last_Item_Saved_Index+1] = DirectCast(item, TextBox).ID ', but i want to save just the two Similar parts of the textboxs ids' 'i am not sure if this completely correct, but i wanted to do something like it[' Dim partOFtxt As String = allItems[Last_Item_Saved_Index] Dim txt As Decimal = (partOFtxt + "_done.Text") / (partOFtxt + "_target.Text") (partOFtxt + "_Result.Text") = "%" + FormatNumber(txt, 2, TriState.False) ']' 'end condition' Exit Select Case Else Exit Select End Select Next i hope that you get the idea.. if you have a better idea ... it would be nice.. Thanks in advance..

    Read the article

  • move carat to the end of a text input field AND make the end visible

    - by user322384
    I'm going insane. I have an autosuggest box where users choose a suggestion. On the next suggestion selection the value of the text input box exceeds its size. I can move the carat to the end of the input field crossbrowser, no problem. But on Chrome and Safari I cannot SEE the carat at the end. The end of the text is not visible. Is there a way to move the carat to the end of a text input field AND have the end of the field visible so that the user is not confused about where the input carat went? what I got so far: <html> <head><title>Field update test</title></head> <body> <form action="#" method="POST" name="testform"> <p>After a field is updated the carat should be at the end of the text field AND the end of the text should be visible</p> <input type="text" name="testbox" value="" size="40"> <p><a href="javascript:void(0);" onclick="add_more_text();">add more text</a></p> </form> <script type="text/javascript"> <!-- var count = 0; function add_more_text() { var textfield = document.testform.elements['testbox']; textfield.blur(); textfield.focus(); if (count == 0) textfield.value = ''; // clear old count++; textfield.value = (count ? textfield.value : '') + ", " + count + ": This is some sample text"; // move to the carat to the end of the field if (textfield.setSelectionRange) { textfield.setSelectionRange(textfield.value.length, textfield.value.length); } else if (textfield.createTextRange) { var range = textfield.createTextRange(); range.collapse(true); range.moveEnd('character', textfield.value.length); range.moveStart('character', textfield.value.length); range.select(); } // force carat visibility for some browsers if (document.createEvent) { // Trigger a space keypress. var e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 0, 32); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 0, 32); } textfield.dispatchEvent(e); // Trigger a backspace keypress. e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 8, 0); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 8, 0); } textfield.dispatchEvent(e); } } // --> </script> </body> </html> Thanks

    Read the article

  • simple CATextLayer scaling problem

    - by dersubtile
    I'm having a simple scaling problem with CATextLayer, but i just couldn't figure it out: I want the CATextLayer to proportionally grow in size with it's superlayer: if the superlayer's width is 300 the text size of CATextLayer should be 12 and if the supeview's width is 600 the text size should be 24. I couldn't find a working solution! Can you please give me a clue? Thanks, Julian.

    Read the article

  • Windows 7 ODBC Text Driver

    - by nute
    Some software requires me to setup an ODBC Text Driver. In the Windows 7 control panel ODBC Data Source Administrator, the only driver available is "SQL Server". How do I find/download/install a TEXT driver? Thanks Nathan

    Read the article

  • windows xp mode for windows 7 - save text input language settings

    - by Gero
    When I change the 'default language' in 'text services and input languages' in windows xp mode from EN-US to DE-DE the settings are reverted with the next logoff / reboot - EN-US is the default language again. Is there a way around this behaviour? I'm using the default 'XPMUser' in windows xp mode. I also checked 'turn off advanced text services' and disabled the language bar and windows xp remembers these settings - just not the default language..

    Read the article

  • Default Text Color in Apple Mail.app

    - by Axeva
    Is there any way to set the default font color for new messages in Mail.app? It's trivial to set the actual font, and text size. I cannot seem to get the application to change the text color though. It always defaults to black. After 5 or 6 major revisions of OS X, surely someone has thought of this, right?

    Read the article

  • UILabel text doesn't word wrap

    - by iFloh
    Hi, I have a long text string (including \n newline charactersthat I feed into a UILabel for display. The UILabel is dynamically setup to provide sufficient space foor the text. My code looks like this: myText = [NSString stringWithFormat:@"%@some text: %@ \n \n %@", myText, moreText1, moreText2]; NSLog(@"%@", myText); myLabelSize = [vLabelText sizeWithFont:[UIFont fontWithName:@"Helvetica" size:(15.0)] constrainedToSize:cMaxLabelSize lineBreakMode:UILineBreakModeWordWrap]; UILabel *lBody = [[UILabel alloc] initWithFrame:CGRectMake(cFromLeft, vFromTop, vLabelSize.width, vLabelSize.height)]; lBody.font = [UIFont fontWithName:@"Helvetica" size:(15.0)]; lBody.lineBreakMode = UILineBreakModeWordWrap; lBody.textAlignment = UITextAlignmentLeft; lBody.backgroundColor = [UIColor cyanColor]; [myScrollView addSubview:lBody]; lBody.text = vLabelText; My problem is that the text does not wrap, but truncates after the first line. The \n newlines are ignored. any ideas?

    Read the article

  • UITextView text disappear

    - by user153412
    Hi, i create an uitextview dynamically then i write my text into it. Sometime, when i create the uitextview, the cursor disappear and i see no text in it. If i run the application again, i can see the text inside the textview that i've created before. I've tried to set the cursor position to zero or scroll the text to the top but it doesn't work... Any suggestion? Here is a screen capture. You can see the gray uitextview, the keyboard (the textview is the firstresponder) but no cursor or text. http://yfrog.com/hqschermata20100325a11213p PS: i'm sorry for my bad english.

    Read the article

  • "Must Have" Text/Terminal applications?

    - by timepilot
    I spend most of my time in Linux using tiled window managers such as Awesome or DWM. As a result, prefer to use text/terminal applications. Some of my favorites are: Vim, mc, Htop, MOC, GNU Screen, WeeChat, rTorrent, ELinks and Lynx. What are your must-install text/terminal applications?

    Read the article

  • How to embed a text field on my desktop in osx

    - by mechko
    How would I go about embedding a text field on my desktop? That is, I want to be able to type into it, but it needs to sit behind my windows at all times. I know I can use geektool to display text. Is there a similar program or piece of code that would allow me to do what I want? I am trying to hack together a twitter/fb/chat client which will not take up a separate window.

    Read the article

  • MySQL UNHEX to text

    - by boj
    I have a forum application that stores data about users in MySQL. There's a field called 'password' of type 'varbinary(100), with the function UNHEX, and then a string of hexadecimal characters. I was wondering how secure this was, so I googled around trying to find how to convert it to text, and I couldn't find anything. So my question is as follows: Is it possible to convert this to text? How would one go about doing this?

    Read the article

  • What text file search tool are you using?

    - by user156144
    I am working on legacy projects with thousands of files spanning more than 10 projects. I am wondering what other people are using for searching string in a text file. I am using windows and i typically search on 10,000 files to make sure some code is not called from other places. I've tried numerous text search tools mentioned here such as Actual Search & Replace, Ultraedit, notepad++ but they all take very long time to search due to the large # of files they have to look into.

    Read the article

  • Automate Excel Text Import Wizard?

    - by Dave Mackey
    I receive files on occasion in a fixed width format. I need to import them into Excel but Excel doesn't perfectly pick up the columns. I can do it manually each time with the Text Import Wizard, but I'm wondering if there is a way to create a "text import template" or something similar - since these files are always the same format.

    Read the article

  • Converting HTML to plain text in PHP for e-mail

    - by jstayton
    I use TinyMCE to allow minimal formatting of text within my site. From the HTML that's produced, I'd like to convert it to plain text for e-mail. I've been using a class called html2text, but it's really lacking in UTF-8 support, among other things. I do, however, like that it maps certain HTML tags to plain text formatting — like putting underscores around text that previously had <i> tags in the HTML. Does anyone use a similar approach to converting HTML to plain text in PHP? And if so: Do you recommend any third-party classes that I can use? Or how do you best tackle this issue? Thanks!

    Read the article

  • JLabel with separate text and icon background colours

    - by emeraldjava
    Hey, I have a simple Jlabel element with text and icon setting the background changes the full label colour. I want to be able to only render the background colour on the text section of the label, ie - to have separate backgrounds/foregrounds for the icon and text. Selecting/deselecting the label will flip the colour behind the icon and text. Is this possible to do this by just extending JLabel, and if so which methods should i be looking to customise? My alternative idea is to create a panel with two separate label elements, one with an icon the other with text. It seems a bit messy, and before i start i'm wondering is there a smarter way of achieving this with Swing.

    Read the article

  • select just pasted text

    - by ldigas
    Pretty simple - how can one select just pasted text (after pasting it) ? I'm editing some files which are purely data, and I get "lost" sometimes ... so it would help if I could select it or somehow otherwise mark the text I've just pasted as to have a visual confirmaton, and to know from where to continue. Can it be done ?

    Read the article

  • browser ctrl-f find and non-visible text

    - by David Pilling
    Can the browser feature of contrl+F to find text be integrated with text in popup windows. I'd like to have some scientific reference information given when someone hovers over a species name in a web page. Generating the popup, tooltip style text is no problem, the problem is that anyone using Ctrl+F won't be able to find it, or if I position the text out of view when not required, it will be found but be invisible. The same sort of effect applies to "accordion" style expanding text areas. I'm looking for some sort of event generated when find is highlighting a result.

    Read the article

  • Rotating text in postscript

    - by Mrgreen
    I have the following postscript code: /outputtext { /data exch def /rot exch def /xfont exch def /Times-Roman findfont xfont scalefont setfont /y1 exch def /x1 exch def x1 y1 moveto rot rotate data show } def % x y fontsize rotation (text) outputtext 20 300 12 0 (text1) outputtext 20 400 12 90 (text2) outputtext 20 500 12 90 (text3) outputtext 20 600 12 0 (text4) outputtext showpage The function simply outputs text based on a x, y co-ords and the text to display, there is also a variable for rotation. For some reason when I output text with a rotation of 0 degrees, all other text that comes after that will not work, I can't seem to figure out why this is the case. In the example above, 'text1' and 'text2' will display, but not 3 and 4.

    Read the article

  • Curser control using Masked Text Box in C#

    - by George
    I seem to have asked this question twice ! I kept getting a message saying New Members can only add a new Question every 20 minutes, try again later !!! Sorry for the duplication ! Please ignore this one !! Thanks. In my app in C# I have several input fields that I need to capture. I need them to be of specific sizes and type and I have used masked Text Boxes for these. I have fields like name which is 20 text charachters long, and a certificate number which is 5 numeric characters with a preceding C etc. This works fine except with I click on a field with the mouse, the cursor does not go to the begining of the fild, or the end of any input text. Is there a way of allowing this to happen using Masked Text Box or will I have to use normal Text Box and do all the field validation manually ?

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >