Search Results

Search found 1025 results on 41 pages for 'josh kelley'.

Page 5/41 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • how to find the last instance of a setting in a config file

    - by Glenn Kelley
    I am trying to figure out how to find the last entry of a string in multiple config files across a server. Each of the strings will be in the /home/***usernamewouldbehere/public_html/typo3conf/localconf.php file In short - the last entry in the config files will point to the database server the application is utilizing - and we need to know which accounts point to which db server. While I can run something like this - grep "$_db_host" /home/*/public_html/conf/localconf.php It does not really help much because it gives us way to much information ... and not what we really need. What i really need to know is the last entry of this string $_db_host = 'xx'; and to sort them out in an export file Since the config files may have multiple entries (example below) $_db_host = 'localhost'; $_db_host = '10.0.1.234'; It would be great to list in a file all of those that have the entry for 'localhost' and then list all of those that have the entry for '10.0.1.234' (or whichever server there may be there) but even if I need to do that manually that would be great. I am not sure how to get to it using Awk - ... and really stuck What I am hoping for is something that would be piped as follows db_host = localhost /home/username1/www/conf/localconf.php db_host = localhost / home/username2/public_html/conf/localconf.php db_host= '10.1.2.23' /home/username55/public_html/conf/localconf.php hoping that helps you help me :-)

    Read the article

  • What is the best way to scale images in Java?

    - by Peter Kelley
    I have a web application written in Java (Spring, Hibernate/JPA, Struts2) where users can upload images and store them in the file system. I would like to scale those images so that they are of a consistent size for display on the site. What libraries or built in functions will offer the best results? I will consider the following criteria in making my decision (in this order): Free/Open Source (essential) Easy to implement Quality of results Performance Size of executable

    Read the article

  • Is There a Good Pattern for Creating a Unique Id based on a Type?

    - by Michael Kelley
    I have a template that creates a unique identifier for each type it is instanced. Here's a streamlined version of the template: template <typename T> class arType { static const arType Id; // this will be unique for every instantiation of arType<>. } // Address of Id is used for identification. #define PA_TYPE_TAG(T) (&arType<T >::Id) This works when you have an executable made purely of static libraries. Unfortunately we're moving to an executable made up of dlls. Each dlls could potentially have its own copy of Id for a type. One obvious solution is to explicitly instantiate all instances of arType. Unfortunately this is cumbersome, and I'd like to ask if anyone can propose a better solution?

    Read the article

  • How do I get python to load .NET .dlls referenced by mixed mode .dlls?

    - by Michael Kelley
    I have a python .pyd that is a mixed mode C++ DLL. The DLL loads fine and loads unmanaged C++ dlls without a problem, but when it tries to load the .NET dlls referenced by the managed C++ dlls it fails with this error message: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly '...' Copying these .NET dlls to the directory that pythod_d.exe is contained in allows the .NET libraries to load successfully, but this is not a good long term solution. Is there an environment variable I have to set or some command line option to python_d.exe that will solve my problem? Note that using IronPython or Python .NET is NOT acceptable.

    Read the article

  • What broke in this Javascript 1.2 snippet?

    - by Rob Kelley
    A friend has pointed me to his old website and says "the submit form just stopped working a while ago. I'm sure it's something simple." The form asks a child for a certain word from a book, and based on the answer, it should redirect the child to a success page or a failure page. It's using Javascript 1.2, circa 2001. You can see this form in in-action at: http://www.secrethidingplaces.com/login1.html Any idea why it's failing? The HTML does this: <script src="password.js" type="text/javascript" language="JavaScript1.2"> </script> <script type="text/javascript" language="JavaScript1.2"> <!-- function showRightPage () { return window.location.href = "extra.html" ; } function showWrongPage () { return window.location.href = "sorry2.html" ; } //--> </script> and then this: document.write ( '<form name="questionForm" action="javascript:checkAnswer()" method="post">' ) ; ... document.write ( '<input type="text" name="userAnswer" value="" size="90">' ) ; document.write ( '<INPUT TYPE="image" NAME="submit" SRC="stock/btn_send.gif" width="121" height="41" BORDER="0" ALT="submit">' ) ; document.write ( '\</p>' ) ; document.write ( '\</form>' ) ; I'm assuming there's something ugly in CheckAnswer from ./password.js . I can hack the form to bypass that javascript and go straight to the success page: document.write ( '<form name="questionForm" action="extra.html" method="post">' ) ; but I'd like to help my friend get his kids site working again. The CheckAnswer function is below. Is something going wrong in here? function checkAnswer () { currentAnswer = answersArray [ choiceNumber ] ; if (agt.indexOf("msie") != -1) { rawAnswer = document.questionForm.userAnswer.value ; } else { rawAnswer = document.callThis.document.questionForm.userAnswer.value ; } lcAnswer = rawAnswer.toLowerCase ( ) ; includedAnswer = lcAnswer.indexOf ( "currentAnswer" ) ; zadaAnswer = lcAnswer.indexOf ( "zada" ) ; brendanAnswer = lcAnswer.indexOf ( "brendan" ) ; nineAnswer = lcAnswer.indexOf ( "nine" ) ; thirtyAnswer = lcAnswer.indexOf ( "thirty" ) ; if ( choiceNumber == 0 ) { if ( includedAnswer == -1 && zadaAnswer == -1 && brendanAnswer == -1 ) { checked = "wrong" ; } } if ( choiceNumber == 8 ) { if ( includedAnswer == -1 && zadaAnswer == -1 && nineAnswer == -1 ) { checked = "wrong" ; } } if ( choiceNumber == 16 ) { if ( includedAnswer == -1 && zadaAnswer == -1 && thirtyAnswer == -1 ) { checked = "wrong" ; } } if ( choiceNumber != 0 && choiceNumber != 8 && choiceNumber != 16 ) { if ( includedAnswer == -1 && zadaAnswer == -1 ) { checked = "wrong" ; } } if ( checked == "wrong" ) { showWrongPage () ; } else { showRightPage () ; } } Thanks!

    Read the article

  • EVENT RECAP: Oracle Day & Product Fair - Ft. Lauderdale

    - by cwarticki
    Are you attending any of the Oracle Days and other Events? They are fantastic!  Keep track of the Oracle Events by following @OracleEvents on Twitter.  Also, stay in the know by subscribing to one of the several Oracle Newsletters. Those will also keep you posted of upcoming in-person and webcast events. From the Oracle Events website, simply navigate to your geography and refine your options to locate what interests you. You can also perform keyword searches. Today, I had the opportunity to participate in the Oracle Day & Product Fair in Ft. Lauderdale, Florida  Thanks to those who stopped by to ask your support questions and watched me demo My Oracle Support features and best practices. (Bob Stanoch, Sales Consulting Manager giving the 2nd keynote address on Exadata below) Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} It was a pleasant surprise to run into my former Oracle colleague Josh Tieso.  Josh (pictured right) is Sr. Oracle DBA at United Healthcare. He used to work for Oracle Support years ago but for the last 6 years at UHC. Josh is a member of the ERP DBA team, working with Exalogic, Oracle ERP R12, & RAC. Along the exhibit/vendor row, I met with Marco Gangano, National Sales Manager at Mythics. It was great getting to meet Marco and I look forward to working with his company with regards to Support Best Practices. In addition, Lissette Paez (left) was representing TAM Training.  TAM Training is an Oracle University, award-winning training partner.  They cover training across the scope of Oracle products with 7 facilities in the U.S.  Lissette and I have done a couple of these Oracle Days before.  It's great to see familiar faces.  A little while ago, I was down in this area to work with Citrix with an onsite session on Support Best Practices.  Pablo Leon and Alberto Gonzalez (right)came to chat with me over at the Support booth.  They wanted to know when I was giving my session.  Unfortunately, not this time guys. I'm on booth duty only. Keep in touch. Many thanks to our sponsors: BIAS, Cloudera, Intel and TekStream Solutions.Come attend one of the many Oracle Days & other events planned for you. -Chris WartickiGlobal Customer Management

    Read the article

  • Introducing Oracle System Assistant

    - by B.Koch
    by Josh Rosen One of the challenges with today's servers is getting the server up and running and understanding what all of the steps are once you plug the server in for the first time. So many different pieces come into play: installing drivers, updating firmware, configuring RAID, and provisioning the operating system. All of these steps must be done before you can even start using the server. Finding the latest firmware and drivers, making sure you have the right versions, and knowing that all the different software and firmware components work together properly can be a real challenge. If not done correctly, such as if you separately downloading disk firmware or controller firmware that doesn't match the existing OS drivers, you could experience bugs, performance problems, and incompatibilities. Gone are the days of having to locate the tools and drivers media that shipped with the server only to find out that newer versions of software and firmware are available on the web. Oracle has solved these challenges in the new X3-2 family of servers by introducing Oracle System Assistant. Oracle System Assistant is an innovative tool that is built-in to every new x86 server. It provides step-by-step assistance with configuring the server, updating firmware and drivers, and provisioning the operating system. Once you have completed all of the steps in the Oracle System Assistant tool, the server is ready to use. Oracle System Assistant was designed to be easy and straightforward. Starting it is as simple as pressing F9 when the server is booting. You'll need a keyboard, monitor, and mouse or you can use the remote console feature of Oracle ILOM (Integrated Lights Out Manager) to access a virtual KVM to the server from any machine. From there Oracle System Assistant will walk you through each of the steps necessary to set up your server. After configuring the network settings for Oracle System Assistant, the next step is to check for any new software or firmware for the server. Oracle System Assistant connects back to Oracle using your My Oracle Support account and downloads any updates that were made available to you for this specific server. This is where you really start to see the innovation that went into Oracle System Assistant. Firmware for Oracle ILOM and BIOS, operating system drivers, and other system firmware (including for option cards and disk drivers) come as a single bundle, downloading as a single unit, that has been engineered and tested to work together by Oracle. Oracle System Assistant figures out the right combination for your server, so you don't have to. Now that the server has the latest firmware, Oracle System Assistant will next walk you through configuring the hardware. From Oracle System Assistant, you can configure many Oracle ILOM settings, including the network settings and initial user accounts. This ensures that ILOM is accessible and ready to use. Oracle System Assistant is where all parts of the server come together. In addition to communicating with Oracle ILOM and interacting with BIOS, Oracle System Assistant understands and can configure the storage subsystem. Before installing the operating system, Oracle System Assistant can detect the storage configuration and configure RAID for all disks in the system. At this point, the server is ready to be provisioned with the host operating system. You can use Oracle System Assistant to provision a supported OS, including Oracle Linux, Oracle VM, RHEL, SuSe Linux, and Windows. And by using Oracle System Assistant, you can be sure that the proper OS drivers are installed for each of the installed hardware components. With Oracle System Assistant, initial setup of the server has never been easier. If we can innovate around problems and find solutions to make our servers easier to manage, this reduces IT costs and makes managing servers simpler. I think with Oracle System Assistant we have done just that. Josh Rosen is a Principal Product Manager at Oracle and previously spent more than a decade as a developer and architect of system management software. Josh has worked on system management for many of Oracle's hardware products ranging from the earliest blade systems to the latest Oracle x86 servers.

    Read the article

  • Noob Objective-C/C++ - Linker Problem/Function Def Problem

    - by Josh
    There is a static class Pipe, defined in C++ header that I'm including. The function I'm interested in calling (from Objetive-c) is here: static ERC SendUserGet(const UserId &_idUser,const GUID &_idStyle,const ZoneId &_idZone,const char *_pszMsg); I have access to an objetive-c data structure that appears to store a copy of userID, and zoneID -- it looks like: @interface DataBlock : NSObject { GUID userID; GUID zoneID; } Looked up the GUID def, and its a struct with a bunch of overloaded operators for equality. UserId and ZoneId from the first function signature are #typedef GUID Now when I try to call the function, no matter how I cast it (const UserId), (UserId), etc, I get the following linker error: "Pipe::SendUserGet(_GUID const&, _GUID const&, _GUID const&, char const*)", referenced from: -[PeoplePaneController clickGet:] in PeoplePaneController.o Is this a type/function signature error, or truly some sort of linker error? I have the headers where all these types and static classes are defined #imported -- I tried #include too, just in case, since I'm already stumbling :P Forgive me, I come from a web tech background, so this c-style memory management and immutability stuff is super hazy. Thanks, Josh

    Read the article

  • URL detection with JavaScript

    - by josh
    Hi! I'm using the following script to force a specific page - when loaded for the first time - into a (third-party) iFrame. <script type="text/javascript"> if(window.top==window) { location.reload() } else { } </script> (For clarification: This 'embedding' is done automatically by the third-party system but only if the page is refreshed once - for styling and some other reasons I want it there from the beginning.) Right now, I'm wondering if this script could be enhanced in ways that it's able to detect the current URL of its 'parent' document to trigger a specific action? Let's say the URL of the third-party site is 'http://cgi.site.com/hp/...' and the URL of the iFrame 'http://co.siteeps.com/hp/...'. Is it possible to realize sth. like this with JS: <script type="text/javascript"> if(URL is 'http://cgi.site.com/hp/...') { location.reload() } if(URL is 'http://co.siteeps.com/hp/...') { location.do-not.reload() resp. location.do-nothing() } </script> TIA josh

    Read the article

  • Android 2.2 and "Bad address family" on Socket Connect

    - by Josh
    I have a fairly simple game that works perfectly on every version now up through 2.1, but with the new 2.2 (Froyo) release I am unable to create a socket. I am using the mina package for nio, and get this exception: W/System.err( 263): java.net.SocketException: Bad address family W/System.err( 263): at org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl(Native Method) W/System.err( 263): at org.apache.harmony.luni.platform.OSNetworkSystem.connect(OSNetworkSystem.java:115) W/System.err( 263): at org.apache.harmony.nio.internal.SocketChannelImpl.connect(SocketChannelImpl.java:272) W/System.err( 263): at org.apache.harmony.nio.internal.PipeImpl$SinkChannelImpl.finishConnect(PipeImpl.java:164) W/System.err( 263): at org.apache.harmony.nio.internal.PipeImpl.(PipeImpl.java:48) W/System.err( 263): at org.apache.harmony.nio.internal.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:51) W/System.err( 263): at org.apache.harmony.nio.internal.SelectorImpl.(SelectorImpl.java:141) W/System.err( 263): at org.apache.harmony.nio.internal.SelectorProviderImpl.openSelector(SelectorProviderImpl.java:58) W/System.err( 263): at java.nio.channels.Selector.open(Selector.java:48) W/System.err( 263): at org.apache.mina.transport.socket.nio.SocketConnector.startupWorker(SocketConnector.java:248) W/System.err( 263): at org.apache.mina.transport.socket.nio.SocketConnector.connect(SocketConnector.java:210) W/System.err( 263): at org.apache.mina.transport.socket.nio.SocketConnector.connect(SocketConnector.java:137) W/System.err( 263): at org.apache.mina.common.support.BaseIoConnector.connect(BaseIoConnector.java:40) Later in the log, usually immediately following I get this: W/System.err( 263): java.lang.NullPointerException W/System.err( 263): at org.apache.harmony.nio.internal.SelectorImpl.wakeup(SelectorImpl.java:418) W/System.err( 263): at org.apache.mina.transport.socket.nio.SocketConnector.connect(SocketConnector.java:222) W/System.err( 263): at org.apache.mina.transport.socket.nio.SocketConnector.connect(SocketConnector.java:137) W/System.err( 263): at org.apache.mina.common.support.BaseIoConnector.connect(BaseIoConnector.java:40) I have done all the googling and looking around I can think of and found nothing. The closest I have come seems to be an old JDK bug with ipv6 support on XP and Vista machines (I'm running Vista). Recommendations included disabling ipv6 (that did not work) and disabling ipv4 and leaving ipv6 (will not work for me as my router and ISP don't support it and so could not test anyway). Any thoughts, suggestions, things I have not tried? Thanks, Josh

    Read the article

  • Long running stats process - thoughts on language choice?

    - by Josh
    I am on a LAMP stack for a website I am managing. There is a need to roll up usage statistics (a variety of things related to our desktop product), and I initially tackled the problem with PHP (being that I had a bunch of classes to work with the data already). All worked well on my dev box which was using 5.3 Long story short, 5.1 memory management seems to suck a lot worse, and I've had to do a lot of fooling to get the long term roll up scripts to run in a fixed memory space. Our server guys are unwilling to upgrade php at this time. I've since moved my dev server back to 5.1 so I don't run into this problem again... For mining of mysql databases to roll up statistics for different periods and resolutions, potentially running a process that does this all the time in the future (as opposed to on a cron schedule), what language choice do you recommend? I was looking at python (I know it more or less), java (don't know it that well), sticking it out with php (know it quite well). Thanks for any suggestions. Josh

    Read the article

  • Browser Based Streaming Video/Audio (not progressive download)

    - by Josh
    Hello, I am trying to understand conceptually the best way to deliver real streaming audio and video content. I would want it to be consumed with a web browser, utilizing the least amount of proprietary technology. I wouldn't be serving static files and using progressive download, this would be real audio streams being captured live. How does one broadcast a stream that will be reasonably in sync with the source? What kind of protocol is suitable? Edit: In research I've found that there are a few protocols: RTSP, HTTP Streaming, RTMP, and RTP. HTTP streaming is somewhat unsuitable if you are streaming a live performance/communication of some kind because it relies on TCP (as its HTTP based) and you don't lose packets. In a low bandwidth situation, the client can get significantly behind in playback. ref RTMP is a proprietary technology, requiring flash media server. Crap on that. The reason I looked at flash is because they are extremely flexible as far as user experience goes. SoundManager2 provides an excellent javascript interface for playing media with flash. This is what I would look for in a client application. RTSP/RTP is what Microsoft switched to using, deprecating their MMS protocol. RTSP is the control protocol. Its similar to HTTP with a few distinct difference -- server can also talk to the client, and there are additional commands, like PAUSE. Its also a stateful protocol, which is maintained with a session id. RTP is the protocol for delivering the payload (encoded audio or video). There are a few open sourced projects, one of them being supported by apple here. It seems like this might do what I want it to, and it looks like quite a few players support it. It sounds like it would be suitable for a "live" broadcast from this page here. Thanks, Josh

    Read the article

  • Gems install fine but don't show as installed under rake gems

    - by Josh Pinter
    I'll show you my output here: rake gems (in /Users/jp/Sites/central/trunk) - [F] authlogic - [R] activesupport - [F] builder - [F] formtastic - [R] activesupport >= 2.3.0 - [R] actionpack >= 2.3.0 - [ ] fastercsv I = Installed F = Frozen R = Framework (loaded before rails starts) Making sure fastercsv is installed: gem which fastercsv /usr/local/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/fastercsv.rb After installing through a variety of methods but only one is shown here: sudo rake gems:install (in /Users/jp/central/trunk) gem install fastercsv Successfully installed fastercsv-1.5.3 1 gem installed Installing ri documentation for fastercsv-1.5.3... Installing RDoc documentation for fastercsv-1.5.3... And try it again. rake gems (in /Users/jp/Sites/central/trunk) - [F] authlogic - [R] activesupport - [F] builder - [F] formtastic - [R] activesupport >= 2.3.0 - [R] actionpack >= 2.3.0 - [ ] fastercsv I = Installed F = Frozen R = Framework (loaded before rails starts) One thing to know is that I tried unpacking the gems but if it doesn't think it's installed it can't unpack it. Another thing is that I really tried to figure this out. There's a bunch of people saying clean up local gems in your user account, always install with sudo, etc. But I've tried all that. What would you guys do to fix this? Thanks many times over, Josh

    Read the article

  • Ubiquity CmdUtils.setSelection won't replace HTML

    - by Josh Timmer
    I'm attempting to write a Ubiquity command that allows you to replace a selected link or URL pointing to an image with that image itself. However, the CmdUtils.setSelection() function (documented here) seems to do nothing if any html tags are present in the selection, making it useless for replacing any links. When selecting plain text, it functions exactly as intended, replacing the text with an <img src="text"/> tag. Is there something I'm missing, or will this function simply not allow me to replace html? If the latter is the case, is there a function or method that will allow me to do this? Any other advice is welcome as well! CmdUtils.CreateCommand({ name: "fetch-image", author: {name: "Josh Timmer"}, license: "GPL", description: "Replaces links or URLs pointing to images with the image itself", help: "Highlight text or a hyperlink and execute this command", takes: {"image URL": /.*/}, _getImgUrl: function(itemIq) { if (itemIq.html.indexOf("<a ",0) < 0) return itemIq.text; var refPos = itemIq.html.indexOf("href=\"",0); if (refPos < 0) return "Error, no URL found!"; var startPos = itemIq.html.indexOf("\"", refPos); var endPos = itemIq.html.indexOf("\"", startPos + 1); startPos += 1; var url = itemIq.html.substring(startPos, endPos); return url; }, preview: function(pblock, input) { pblock.innerHTML = "Image URL: " + this._getImgUrl(input) + "<br/><br/><img src='" + this._getImgUrl(input) + "'/>"; }, execute: function img_insert(input) { CmdUtils.setSelection("<img src='" + this._getImgUrl(input) + "'/>"); displayMessage("Executed: " + this._getImgUrl(input)); } });

    Read the article

  • (solved) jQuery click and drag/scroll window: jagged movement

    - by Josh
    Edit: derp, using pageX/Y instead of clientX/Y -- apparently scrollBy expects input with that offset rather than the other. Jaggy movement gone. I am getting jagged movement when doing small scroll increments using the following bindings. Can anyone point me in the right direction for how to smooth this out? FYI, its intermittent. It seems like, if I click and hold for a second, then drag at a decent speed there are no problems. Edit: What the hell? I get this output on debug... obvious jog backwards and forwards. This will happen in succession and seems to have no correlation with the mouse, other than the mouse is moving. x 398 : 403 y 374 : 377 x 403 : 399 y 377 : 374 x 399 : 404 y 374 : 377 Josh sococo.client.panMap = function(e){ e.preventDefault(); var movex = sococo.client.currX - e.pageX ; var movey = sococo.client.currY - e.pageY; console.log( sococo.client.currX +" : " + e.pageX ); window.scrollBy(movex,movey); sococo.client.currY = e.pageY; sococo.client.currX = e.pageX; } $(document).mousedown( function(e){ e.preventDefault(); sococo.client.currX = e.pageX; sococo.client.currY = e.pageY; $(document).bind( "mousemove", sococo.client.panMap ); }); $(document).mouseup( function(e){ e.preventDefault(); $(document).unbind( "mousemove", sococo.client.panMap ); });

    Read the article

  • Layering Cocoa WebView - Drawing on top?

    - by Josh
    http://stackoverflow.com/questions/1618498/webview-in-core-animation-layer The only other thread I can find is the above which doesn't necessarily fit my needs. Is there a reliable way to simply draw a view on top of a webview? I've tried to layer a regular NSView on top of WebView, and it draws right at first, but any movement in the webview (scrolling the page etc) appears to invalidate the view and produces visual artifacts. I've tried: [[[NSApp mainWindow] contentView] addSubview:view positioned:NSWindowAbove relativeTo:webView]; No luck there, same problems -- z-ordering doesn't seem to work unless I'm missing something. Is this just a limitation of webviews? I also tried implementing the view above as a window, which worked much better (just controlled the location of the window programmatically). However, the desired behavior is for the user to enter some text into this window, but for it not to steal "focus" -- ie the main window goes inactive (the x - + go gray) when the user clicks on the text field in the new window. Any way to avoid that? I've tried subclassing NSWindow and overriding canBecomeKey (return YES) and canBecomeMain (return NO) but the window still steals focus. Josh

    Read the article

  • Get notified when objective-c dom updates are ready initiated from webview

    - by Josh
    I am programmatically updating the DOM on a WebKit webview via DOMElement objects - for complex UI, there is usually a javascript component to any element that I add. This begs the need to be notified when the updates complete -- is there any such event? I know regular divs dont fire an onload or onready event, correct? The other assumption I had, which may be totally wrong, is that DOMElement updates aren't synchronous, so I can't do something like this and be confident it will meet with the label actually in the DOM: DOMElement *displayNameLabel = [document createElement:@"div"]; [displayNameLabel setAttribute:@"class" value:@"user-display-name"]; [displayNameLabel setTextContent:currentAvatar.avatarData.displayName]; [[document getElementById:@"user-card-content"] appendChild:displayNameLabel]; id win = [webView windowScriptObject]; [win evaluateWebScript:@"javascriptInstantiateLabel()"]; Is this true? I am using jquery within the body of the html already, so I don't mind subscribing to a particular classes set of events via "live." I thought I might be able to do something like: $(".some-class-to-be-added-later").live( "ready", function(){ // Instantiate some fantastic javascript here for .some-class }); but have experienced no joy so far. Is there any way on either side (objective-c since I don't programmatically firing javascript post load, or javascript) to be notified when the element is in the DOM? Thanks, Josh

    Read the article

  • Lucene (.NET) Document stucture and performance suggestions.

    - by Josh Handel
    Hello, I am indexing about 100M documents that consist of a few string identifiers and a hundred or so numaric terms.. I won't be doing range queries, so I haven't dugg too deep into Numaric Field but I'm not thinking its the right choose here. My problem is that the query performance degrades quickly when I start adding OR criteria to my query.. All my queries are on specific numaric terms.. So a document looks like StringField:[someString] and N DataField:[someNumber].. I then query it with something like DataField:((+1 +(2 3)) (+75 +(3 5 52)) (+99 +88 +(102 155 199))). Currently these queries take about 7 to 16 seconds to run on my laptop.. I would like to make sure thats really the best they can do.. I am open to suggestions on field structure and query structure :-). Thanks Josh PS: I have already read over all the other lucene performance discussions on here, and on the Lucene wiki and at lucid imiagination... I'm a bit further down the rabbit hole then that...

    Read the article

  • Assistance with Lua functions

    - by Josh
    As noted before, I'm relatively new to lua, but again, I learn quick. The last time I got help here, it helped me immensely, and I was able to write a better script. Now I've come to another question that I think will make my life a bit easier. I have no clue what I'm doing with functions, but I'm hoping there is a way to do what I want to do here. Below, you'll see an example of code I have to do to strip down some unneeded elements. Yeah, I realize it's not efficient in the least, so if anyone else has a better idea of how to make it much more efficient, I'm all ears. What I would like to do is create a function with it so that I can strip down whatever variable with a simple call of it (like stripdown(winds)). I appreciate any help that is offered, and any lessons given. Thanks! winds = string.gsub(winds,"%b<>","") winds = string.gsub(winds,"%c"," ") winds = string.gsub(winds," "," ") winds = string.gsub(winds," "," ") winds = string.gsub(winds,"^%s*(.-)%s*$", "%1)") winds = string.gsub(winds,"&nbsp;","") winds = string.gsub(winds,"/ ", "(") Josh

    Read the article

  • How do you move an admin menu item in Magento

    - by Josh Pennington
    I currently have an extension that I created and it currently sits inside of its own top level menu. I would like to move it so that the item would appear inside of the Customers menu. Does anyone know how to do this? It looks like this is handled inside the extensions config.xml file. The code that I have for it right now is as follows: <menu> <testimonials module="testimonials"> <title>Testimonials</title> <sort_order>71</sort_order> <children> <items module="testimonials"> <title>Manage Items</title> <sort_order>0</sort_order> <action>testimonials/adminhtml_testimonials</action> </items> </children> </testimonials> </menu> I tried changing the title element to Customers and it just created a duplicate Customers menu. Does anyone have any ideas? Thanks Josh Pennington

    Read the article

  • Android - Widget to Play Video (onclick trouble)

    - by Josh
    I am trying to make a simple widget that will play a movie from the sdcard when clicked on. This seems simple enough, and by following tutorials I've come up with the following code, but it seems the onclick is never setup. Manifest: <receiver android:name="WidgetProvider" android:label="DVD Cover"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_info_2x4"/> </receiver> Layout (widget.xml): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/holder" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ff777777" > <ImageView android:id="@+id/cover" android:layout_width="wrap_content" android:layout_height="fill_parent" android:textColor="#000000" /> </LinearLayout> appwidget.xml: <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="200dip" android:minHeight="300dip" android:updatePeriodMillis="180000" android:initialLayout="@layout/widget" > </appwidget-provider> WidgetProvider.java: public class WidgetProvider extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { String movieurl = Environment.getExternalStorageDirectory().getPath() + "/Movie.mp4"; Intent notificationIntent = new Intent(Intent.ACTION_VIEW); notificationIntent.setDataAndType(Uri.parse(movieurl), "video/*"); PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent,0); // Get the layout for the App Widget and attach an on-click listener // to the button RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget); views.setOnClickPendingIntent(R.id.holder, contentIntent); // Tell the AppWidgetManager to perform an update on the current app widget appWidgetManager.updateAppWidget(appWidgetIds, views); } } Any help would be greatly appreciated. Thanks, Josh

    Read the article

  • ASP.NET MVC Case Studies

    - by shiju
     The below are the some of the case studies of ASP.NET MVC Jwaala - Online Banking Solution Benefits after ASP.NET MVC Replaces Ruby on Rails, Linux http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?casestudyid=4000006675 Stack Overflow - Developers See Faster Web Coding, Better Performance with Model-View-Controller http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?casestudyid=4000006676 Kelley Blue Book - Pioneer Provider of Vehicle-Pricing Information Uses Technology to Expand Reach http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?casestudyid=4000006272 

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >