Search Results

Search found 1063 results on 43 pages for 'alternate'.

Page 27/43 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • SRAM Cell Diagram - Can someone explain this a bit more clearly? ( From COMP1917 @ UNSW: Lecture 2 o

    - by Kristina
    I've begun watching a series of first year lectures from the University of New South Wales (UNSW) in Australia, and I'm a bit perplexed by the instructors explanation of how an SRAM gate works. I realize this isn't exactly "programming-related" but since it comes from a series of lectures relating to computing and programming, I thought StackOverflow may be able to help (reddit failed me entirely). In this lecture beginning at around 32:12, Richard (the lecturer) tries to explain how a "latch gate" works within SRAM. Although his students seem to keep up, I feel I'm missing something crucial which is preventing the concept from really "clicking" in my brain. For convenience, I've added the image from the video below: Thanks in advance for any help you can provide, but if this question doesn't fit your view of "programming-related" could you please provide an alternate forum for this in a comment when you cast your close vote? Thanks!

    Read the article

  • Conditional Required Attribute for validation

    - by jeriley
    We're trying to get a conditional attribute to work, case in point, there's a boolean (checkbox) that if checked, its related text is required. So, ideally we'd have something like ... public bool Provision { get; set; } [ConditionalRequirement(IsNeededWhenTrue = Provision)] public string ProvisionText { get; set; } Is this even possible? Alternate idea (not as elegant?) public bool Provision2 { get; set; } [PropertyRequired(RequiredBooleanPropertyName = "Provision2")] public string Provision2Text { get; set; } I'd hate to use the magic string method ... but any other ideas?

    Read the article

  • Enumerating all hamiltonian paths from start to end vertex in grid graph

    - by Eric
    Hello, I'm trying to count the number of Hamiltonian paths from a specified start vertex that end at another specified vertex in a grid graph. Right now I have a solution that uses backtracking recursion but is incredibly slow in practice (e.g. O(n!) / 3 hours for 7x7). I've tried a couple of speedup techniques such as maintaining a list of reachable nodes, making sure the end node is still reachable, and checking for isolated nodes, but all of these slowed my solution down. I know that the problem is NP-complete, but it seems like some reasonable speedups should be achievable in the grid structure. Since I'm trying to count all the paths, I'm sure that the search must be exhaustive, but I'm having trouble figuring out how to prune out paths that aren't promising. Does anyone have some suggestions for speeding the search up? Or an alternate search algorithm?

    Read the article

  • Are tags considered requirements? [closed]

    - by krunk
    I'm new to stack overflow, made a few responses. I responded to a question that was something like: "I need to do X, I found a sed one liner that almost does it, but not quite" And was tagged 'sed'. I assumed the user just wanted a solution and tagged it with sed because it was a possible answer. So I suggested an alternate way using another tool that was more concise and didn't involve regex (another one-liner). I received a down vote for not meeting the requirement of the user. Since I'd like to make sure I conform to good forum etiquette, my question is: Are tags considered hard requirements that should limit the scope of responses? (within reason of course, a .NET question with a .NET tag obviously shouldn't receive a ruby answer).

    Read the article

  • Single SQL Server Result Set from Query

    - by JamesC
    Hi Please advise on how to merge two results in to one using SQL Server 2005. I have the situation where an Account can have up to two Settlement Instructions and this have been modeled like so: The slim-ed down schema: Account --------------------- Id AccountName PrimarySettlementId (nullable) AlternateSettlementId (nullable) SettlementInstruction ---------------------- Id Name The output I want is a single result set with a select statement something along the lines of this which will allow me to construct some java objects in my Spring row mapper: select Account.Id as accountId, Account.AccountName as accountName, s1.Id as primarySettlementId, s1.Name as primarySettlementName, s2.Id as alternateSettlementId, s2.Name as alternateSettlementName I've tried various things but cannot find a way to get the result set merged in to one where the primary and alternate FK's are not null. Finally I have searched the forum, but nothing quite seems to fit with what I need.

    Read the article

  • Windows Mobile 6.5 flick (scrolling with inertia) not working

    - by GRR
    After upgrading to windows mobile 6.5, my ListView control does not work properly with custom items (rows with alternate colors) and the new gesture mechanism... On a mobile device, if the user initiates a flick or pan, after scrolling the first few items, the last items are not shown on the screen, but will show up if the user explicitly taps on them -- so basically the last screen is just white. The WM_DRAWITEM message is sent to all children though, but they just don't show up on the screen. Scrolling with a bar works fine. Any ideas? I have seen some reports of similar behavior from other users, but not sure if this is a bug in the listview control itself or if there is something else that needs to/can be implemented to support flick and pan actions. The application code currently doesn't handle WM_GESTURE messages, so the flick action is done with Microsoft's own code to support legacy applications. Thanks!

    Read the article

  • extracting the post parameters from a form using javascript/jQuery before submission

    - by Bunny Rabbit
    how can i get the parameters of any form being submitted with method=post before it's submitted using javascript(preferably jQuery). What i am trying to do is get the post parameters and submit it to an alternate loacation. i was using $('form').submit(function(){ alert('action= '+$(this).attr("action")); alert('serialized string'+ $(this).serialize()); return false; }); but it works only with get request i want to extract the parameters from the post requests too .

    Read the article

  • How does one record audio from a Javascript based webapp?

    - by username
    I'm trying to write a web-app that records WAV files (eg: from the user's microphone). I know Javascript alone can not do this, but I'm interested in the least proprietary method to augment my Javascript with. My targeted browsers are Firefox for PC and Mac (so no ActiveX). Please share your experiences with this. I gather it can be done with Flash (but not as a WAV formated file). I gather it can be done with Java (but not without code-signing). Are these the only options? @dominic-mazzoni I'd like to record the file as a WAV because because the purpose of the webapp will be to assemble a library of good quality short soundbites. I estimate upload will be 50 MB, which is well worth it for the quality. The app will only be used on our intranet. UPDATE: There's now an alternate solution thanks to JetPack's upcoming Audio API: See https://wiki.mozilla.org/Labs/Jetpack/JEP/18

    Read the article

  • Scripting vim to Run Perltidy on a Buffer

    - by rjray
    At my current job, we have coding-style standards that are different from the ones I normally follow. Fortunately, we have a canned RC file for perltidy that I can apply to reformat files before I submit them to our review process. I have code for emacs that I use to run a command over a buffer and replace the buffer with the output, which I have adapted for this. But I sometimes alternate between emacs and vim, and would like to have the same capabilities there. I'm sure that this or something similar is simple and had been done and re-done many times over. But I've not had much luck finding any examples of vim-script that seem to do what I need. Which is, in essence, to be able to hit a key combo (like Ctrl-F6, what I use in emacs) and have the buffer be reformatted in-place by perltidy. While I'm a comfortable vim-user, I'm completely clueless at writing this sort of thing for vim.

    Read the article

  • How to set this if isset function

    - by Danny Florian
    I have the following code that sets a background if user has uploaded to database. If user has NOT uploaded an image then the result is a blank img src='' I need to set this as an if isset function so I can plug in an alternate image if user has not uploaded anything. Here is the current code: <div id="background"><?php echo isset($background_image) && file_exists(ROOT.$background_image)?"<img src='$background_image' alt='' />":'';?></div>

    Read the article

  • Random numbers from binomial distribution

    - by Sarah
    I need to generate quickly lots of random numbers from binomial distributions for dramatically different trial sizes (most, however, will be small). I was hoping not to have to code an algorithm by hand (see, e.g., this related discussion from November), because I'm a novice programmer and don't like reinventing wheels. It appears Boost does not supply a generator for binomially distributed variates, but TR1 and GSL do. Is there a good reason to choose one over the other, or is it better that I write something customized to my situation? I don't know if this makes sense, but I'll alternate between generating numbers from uniform distributions and binomial distributions throughout the program, and I'd like for them to share the same seed and to minimize overhead. I'd love some advice or examples for what I should be considering.

    Read the article

  • jQuery: manipulating through children to check the checkbox in a table row

    - by gsquare567
    $("tr.clickable").each(function() {$(this).click(function() { $(this).children("td:first > input").is(":checked") ? $(this).children("td:first > input").removeAttr("checked") : $(this).children("td:first > input").attr("checked","checked"); })}); this only checks the first row in my table (no matter which row i click on). how can i apply it so that it checks the input on the specific row i click on? thanks! HTML: <tr id="row0" class="alternate clickable"> <td><img width="11" height="11" title="This email failed to send." alt="Failed" src="images/error_warning.png"><br> <input type="checkbox" value="6751" name="emailCheck[]" class="emailCheck"> </td>...

    Read the article

  • How do I post a link to the feed of a page via the Graph API *as* the page?

    - by jsdalton
    I'm working on a plugin for a Wordpress blog that posts a link to every article published to a Facebook Page associated with the blog. I'm using the Graph API and I have authenticated myself, for the time being, via OAuth. I can successfully post a message to the page using curl via a POST request to https://graph.facebook.com/{mypageid}/feed` with e.g. message = "This is a test" and it published the message. The problem is that the message is "from" my user account. I'm an admin on this test page, and when I go to Facebook and post an update from the web, the link comes "from" my page. Is there a way to authenticate myself as a page? Or is there an alternate way to POST to a page feed that doesn't end up being interpreted as a comment from a user? Thanks for any thoughts or suggestions.

    Read the article

  • css3 nth child question

    - by JCHASE11
    Hello. I am designing a 960px wide layout with an unordered list. Each list item is 240px wide, so 4 list items fit horizontally in a row. I have about 20 rows on the page.... I want every other list item to have a background of #ececec, so my css would be: ul li:nth-child(2n+2){ background-color:#ececec; } This works. The only problem is because there are 4 items in a row (an even #), the next row would be identical, thus rendering background colors on every 1st and 3rd list items in a row. This is not the effect I am looking to achieve. I want the background colors to alternate, creating a grid-like effect. What is the correct css to do so (think a checker board). Thanks!

    Read the article

  • Software to cd (change directories) into .jar/.ear files?

    - by Segphault
    Is there any software/script that will allow me to cd (change directories) into .jar/.ear/.zip files and edit the contents of the files it contains? I'm working on a large EJB project (yuck), and I frequently find myself in situations like the following: something.ear/ |-- something.jar/ | `-- fileINeedToEdit.xml I work primarily via the command line (Mac/Linux), so I find myself decompressing the files with jar -xvf, editing the file I need to edit, and then recompressing with jar -cvf. Obviously, this becomes a major headache after the first few times. I'd like to be able to treat the compressed files as directories, and simply cd (or some alternate command) to the file I want to edit. Does anyone know how I can accomplish this?

    Read the article

  • grailsApplication not getting injected in a service , Grails 2.1.0

    - by vijay tyagi
    I have service in which i am accessing few configuration properties from grailsApplication I am injecting it like this class MyWebService{ def grailsApplication WebService webService = new WebService() def getProxy(url, flag){ return webService.getClient(url) } def getResponse(){ def proxy = getProxy(grailsApplication.config.grails.wsdlURL, true) def response = proxy.getItem(ItemType) return response } } When i call getProxy() method, i see this in tomcat logs No signature of method: org.example.MyWebService.getProxy() is applicable for argument types: (groovy.util.ConfigObject, java.lang.Boolean) values: [[:], true] Possible solutions: getProxy(), getProxy(java.lang.String, boolean), setProxy(java.lang.Object) which means grailsApplication is not getting injected into the service, is there any alternate way to access configuration object ? according to burtbeckwith's post configurationholder has been deprecated, can't think of anything else. Interestingly the very same service works fine in my local IDE(GGTS 3.1.0), that means locally grailsApplication is getting injected, but when i create a war to deploy to a standalone tomcat, it stops getting injected.

    Read the article

  • Return an opaque object to the caller without violating type-safety

    - by JS Bangs
    I have a method which should return a snapshot of the current state, and another method which restores that state. public class MachineModel { public Snapshot CurrentSnapshot { get; } public void RestoreSnapshot (Snapshot saved) { /* etc */ }; } The state Snapshot class should be completely opaque to the caller--no visible methods or properties--but its properties have to be visible within the MachineModel class. I could obviously do this by downcasting, i.e. have CurrentSnapshot return an object, and have RestoreSnapshot accept an object argument which it casts back to a Snapshot. But forced casting like that makes me feel dirty. What's the best alternate design that allows me to be both type-safe and opaque?

    Read the article

  • HTML block nested in PHP if statement - is this considered bad practice?

    - by JYelton
    Consider the following example: <table> <tr> <td>Row One</td> </tr> <?php if ($rowtwo) { ?> <tr> <td>Row Two</td> </tr> <?php } ?> </table> If $rowtwo is true, the second row is output, otherwise it is skipped. The code works as desired, however I am evaluating Netbeans (7 beta) as a PHP IDE (instead of just using a text editor). Netbeans flags the code with an error: Misplaced non-space characters insided [sic] a table. Should I consider an alternate way of writing this code, or is Netbeans incapable of understanding this flow control wrapper for HTML output?

    Read the article

  • Is it possible to implement a lightweight database using Blackberry Persistance options?

    - by Tobias
    First I would like to explain why I want to use alternate Blackberry Persistance options rather than a Blackberry database itself, say SQLite. The reason is that the application i'm designing, I want it to be used in all the previous versions of Blackberry rather than just the ones having OS 5.0 or greater. Now, coming back to the actual question, I have got a database that I want to replicate to be used in the Blackberry application. The database has 8 tables and each table has approximately 12 different columns. One of the table has 1000 rows. Now if I was to implement this DB for a Blackberry application , keeping in mind that it will work on all the versions of Blackberry, what would be the best way to implement it?

    Read the article

  • Pass structured data from C++ app to ASP.NET web service.

    - by Odrade
    I have Visual C++ application that needs to communicate with a ASP.NET web service. Specifically, the app needs to pass structured data (e.g. objects that contain lists of structures, etc) as a parameter to one of the service methods. The C++ application is already generating an xml document that contains this data. The document is generating using an xml library, so it should always well-formed. What is a good method for passing this data to the web service? I'm thinking about passing the document to the web service as a string parameter, then deserializing to a .NET object based on an xsd. But, I hear that passing an xml doc as a string parameter is not recommended. So, my questions: What are the pitfalls associated with sending the document as a string parameter, assuming that the document itself is always well-formed? Assuming the above is a bad idea, what are some good alternate approaches?

    Read the article

  • Offsite data storage for simple app, or a similar supported persistence mechanism?

    - by jdk
    Question Is there a usable facebook entry point to the Data Storage API that facebook lists on their app admin page for developers, or should I consider an alternate mechanism? What alternative mechanisms exist to simply persist my information offsite (away from my server app) without stuffing it into a cookie that's prone to expire? ... Background The facebook Data Store Admin tool is made available in a facebook App's Settings as seen here: (continue reading below) However when I visit the DataStoreAdmin link nothing works (i.e. clicking the buttons to define the data store types and objects does nothing - I have tried different browsers). The Wiki page for Data Store API hasn't been updated recently and the second last update says the beta Data Store was taken offline. It seems odd the link would be readily available and highly visible at the top of the App configuration area if indeed it's defunct. I was hoping some kind of key/value pair solution to remove the data calls from my own server.

    Read the article

  • Am i using too much jquery? When i'm crossing the line?

    - by Andrea
    Lately i find myself using jquery and javascript a lot, often to do the same things that i did before using css. For example, i alternate table rows color or create buttons and links hover effects using javascript/jquery. Is this acceptable? Or should i keep using css for these kind of things? So the real question is: When i'm using too much jquery? How can i understand when i'm crossing the line? Thanks.

    Read the article

  • Multiple LIKE, OR MySql Queries Match

    - by Codex73
    Search for: 'chemist' Problem: query which will match a string like 'onechemist' but not 'chemist'. SELECT id,name FROM `records` WHERE name LIKE '%". mysql_real_escape_string($q) ."%' This alternate try won't work: SELECT id,name FROM `records` WHERE name LIKE '%". mysql_real_escape_string($q) ."%' OR name LIKE '". mysql_real_escape_string($q) ."%' OR name LIKE '%". mysql_real_escape_string($q) ."' How could I compile the above into one single query that will match any field which has the string or optimize the query into a better expression?

    Read the article

  • facelet - nested <ui:insert>

    - by user321350
    I have multiple templates which differs with each other only by few containers. The most complex one contains superset of all containers used in all other one thus to avoid creating multiple templates I created the most complex one in following format some layout stuff (div and all) defining nested insert for each container and content. Now in client template based on what is needed I turn off container which is not needed as else if container is needed, just define content as doSomething Please let me know if you guys see any issues with this approach, any potential problem or alternate approach for similar scenario. thanks a lot. Maddy

    Read the article

  • Configure WCF Service Behavior using database

    - by Achhar
    We use database to centralize our configuration. As part of it, I want to store the standard service behaviors configuration like expose service metatdata, service debug, service throttling for a service inside database rather than in web/app.config. I was planing to store the configuration for a behavior in database as XML. For e.g. <serviceDebug includeExceptionDetailsinFault=true / What I am struggling with is once I read this XML from database how do I create ServiceDebugBehavior instance from it and apply it to my service host? I have tried using XML Serializer but didn't had success. Any thoughts on how this could be achieved or any alternate solutions?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >