Search Results

Search found 332 results on 14 pages for 'bryan denny'.

Page 11/14 | < Previous Page | 7 8 9 10 11 12 13 14  | Next Page >

  • Django: How can I identify the calling view from a template?

    - by bryan
    Short version: Is there a simple, built-in way to identify the calling view in a Django template, without passing extra context variables? Long (original) version: One of my Django apps has several different views, each with its own named URL pattern, that all render the same template. There's a very small amount of template code that needs to change depending on the called view, too small to be worth the overhead of setting up separate templates for each view, so ideally I need to find a way to identify the calling view in the template. I've tried setting up the views to pass in extra context variables (e.g. "view_name") to identify the calling view, and I've also tried using {% ifequal request.path "/some/path/" %} comparisons, but neither of these solutions seems particularly elegant. Is there a better way to identify the calling view from the template? Is there a way to access to the view's name, or the name of the URL pattern? Update 1: Regarding the comment that this is simply a case of me misunderstanding MVC, I understand MVC, but Django's not really an MVC framework. I believe the way my app is set up is consistent with Django's take on MVC: the views describe which data is presented, and the templates describe how the data is presented. It just happens that I have a number of views that prepare different data, but that all use the same template because the data is presented the same way for all the views. I'm just looking for a simple way to identify the calling view from the template, if this exists. Update 2: Thanks for all the answers. I think the question is being overthought -- as mentioned in my original question, I've already considered and tried all of the suggested solutions -- so I've distilled it down to a "short version" now at the top of the question. And right now it seems that if someone were to simply post "No", it'd be the most correct answer :) Update 3: Carl Meyer posted "No" :) Thanks again, everyone.

    Read the article

  • Accidentally created VB.NET project instead of C#

    - by Bryan M.
    This should seem simple enough, but can't figure it out. I was porting a project out of MonoDevelop and into VS2008, but I accidently created the project as VB.NET instead of C#. Now ReSharper and any syntax highlighting is throwing a fit because it's trying to validate it as VB. How do I tell it to treat it as a C# project without creating a whole new one?

    Read the article

  • How do I correctly use two Not Exists statements in a where clause using Access SQL VBA?

    - by Bryan
    I have 3 Tables: NotHeard,analyzed,analyzed2. In each of these tables I have two columns named UnitID and Address. What I'm trying to do right now is to select all of the records for the columns UnitID and Address from NotHeard that don't appear in either analyzed or analyzed2. The SQL statement I created was as follows: SELECT UnitID, Address INTO [NotHeardByEither] FROM [NotHeard] Where NOT EXISTS( Select analyzed.UnitID FROM analyzed WHERE [NotHeard].UnitID = analyzed.UnitID) or NOT EXISTS( Select analyzed2.UnitID FROM analyzed2 WHERE [NotHeard].UnitID = analyzed2.UnitID) Group BY UnitID, Address I thought this would work since I've used the single NOT EXISTS subquery line and it has worked just fine for me in the past. The above query however returns the same data that is in the NotHeard table whereas if I take out the or NOT EXISTS part it works correctly. Any ideas as to what I'm doing wrong or how to do what I'm wanting to do?

    Read the article

  • adding a div with data()

    - by Dizzy Bryan High
    Hi people am generating a list of flash swfs, the information comes from an ajax call which returns a json object which i loop through to create the rows of data using my makeAppRow function. makeAppRow = function(myData){ var myStr = '<div class="fileEntry">' myStr = myStr +'<div class="appDate">'+dateFormat(myData.date_swf, "dS mmmm, yyyy, h:MM TT")+'</div>' myStr = myStr +'<div class="appName">'+myData.name_swf+'</div>' myStr = myStr +'<div class="appOptions" data>' myStr = myStr +'<div class="gotoAppBtn" data-options="'+myData+'">Open App</div>' myStr = myStr +'</div>' myStr = myStr +'</div>' $('#appData').append(myStr); } I need the json data to be attached to the gotoAppBtn so that when its clicked i can read in the data from the attached json object and use it in my click function, as you can see ive been trying to embed the data using the html5 data but i cant get it to work. <div class="gotoAppBtn" data-options="'+myData+'">Open App</div> i have a function so that when the button is clicked it loads in an swf. $('.gotoAppBtn').live('click', function(){ //alert('button clicked') var myData = $(this).data("options") alert('../userfiles/'+myData.id_ugp+'/'+myData.id_swf+'/'+myData.launchfile_swf+'') console.log(myData); var flashvars = {}; var params = {}; params.menu = "false"; params.quality = "best"; params.scale = "noscale"; var attributes = {}; attributes.id = "flashAppDisplay"; attributes.name = "flashAppDisplay"; swfobject.embedSWF( '../userfiles/'+myData.id_ugp+'/'+myData.id_swf+'/'+myData.launchfile_swf+'', 'flashAppDisplay', myData.width_swf, myData.height_swf, myData.version_swf ,"../FAVideo/expressInstall.swf", flashvars, params, attributes) }); but the data does not seem to be there, any pointers on where i am going wrong, or a better way to achive this???

    Read the article

  • External project reference in android

    - by bryan costanich
    Hi all, I have an android application that utilizes another project as a project reference. i've gone into the application options, build path, and then selected the project in project references. everything builds and deploys fine, but when i try to run the application and instantiate a class in that project, i'm getting a java.lang.NoClassDefFoundError errrrrr. i'm no java project expert, so i assume i've cocked something simple up. any ideas?

    Read the article

  • Shapes-tool creating a vector mask every time, cannot seem to fix in CS3?

    - by Bryan
    Every time I create a shape using the shape tool, it places a vector mask on top of this. I don't know how I enabled this but it does not do it on my laptop version, only my desktop. I can seem to disable this problem I am having. Even reinstalling and restoring defaults I cannot seem to stop this. Very frustrating, anyone have a fix for this problem? Thanks in advance!

    Read the article

  • How to get multiple html() strings in jQuery

    - by Bryan
    I'm pretty new to jQuery... so far I'm impressed. But I encountered a situation today that is giving me trouble. I want to use .html() to get some raw text and use that in a selector, but that function only returns the first element. In the following structure, how can I get ALL of the "toggle_containerLG" divs to show when I click on the trigger "Some Header"? <h6 class="trigger active">Some Header</h6> <ul> <li><a href="#" class="trigger">Title One</a></li> <li><a href="#" class="trigger">Title Two</a></li> <li><a href="#" class="trigger">Title Three</a></li> </ul> <div class="toggle_containerLG" id='Title_One'></div> <!-- show these! --> <div class="toggle_containerLG" id='Title_Two'></div> <div class="toggle_containerLG" id='Title_Three'></div> <div class="toggle_containerLG" id='Title_Four'></div> <!-- not this one! --> I can't use $(".toggle_containerLG") because there are others I don't want to expand... I just want the ones listed under "Some Header". Seems like there should be an easy way to do it... and I'm just missing it because I don't know jQuery very well.

    Read the article

  • NoSQL vs. MySQL when scalability is irrelevant

    - by Bryan Ward
    Recently I have read a lot about different NoSQL databases and how they are being effectively deployed by some major websites out there. I'm starting a project in which I think the schema-free nature of a database such as MongoDB would be tremendously useful. Everything I have read though seems to indicate that the main advantage of a NoSQL database is scalability. Is choosing a NoSQL database for the schema-free design just as legitimate a design decision as that of scalability?

    Read the article

  • How to avoid hard-coded credentials in Sharepoint webpart?

    - by Bryan
    I am building a Sharepoint web part that will be used by all users, but can only be modified by admins. The web part connects to a web service which needs credentials. I hard coded credentials in the web part's code. query.Credentials = new System.Net.NetworkCredential("username", "password", "domain"); query is an instance of the web service class This may not be a good approach. In regard with security, the source code of the web apart is available to people who are not allowed to see the credentials. In normal ASP.net applications, credentials can be written into web.config and encrypted. A web part doesn't have a .config file associated. There is a application-level .config file for the whole sharepoint site, but I don't want to modify it for a single webpart. I wonder if there is a webpart-specific way to solve the credential problem? Say we provide a WebBrowsable property of that web part so that privileged users can modify credentials. If this is desirable, how should I make the property displayed in a password ("*") rather than in plain text? Thanks.

    Read the article

  • How can I programmatically construct the object reference?

    - by Bryan
    Lets just say that I have three textboxes: TextBox1, TextBox2, TextBox3. Normally if I wanted to change the text for example I would put TextBox1.Text = "Whatever" and so on. For what I'm doing right now I would like to something like (TextBox & "i").Text. That obviously isn't the syntax I need to use I'm just using it as an example for what I need to do. So how can I do something like this? The main reason I'm doing this is to reduce code with a loop. Please keep in mind that I'm not actually changing the text of the textboxes I'm simply using that as an example to get the point across.

    Read the article

  • How do you manage your time as a team leader?

    - by Bryan Slatner
    Where I work, my role has been evolving from a pure development role to team leadership. I find that this suits me, and I'm generally enjoying it. One aspect of the job that continually vexes me, though, is time management. My day used to be pure coding. Now, I still have a largely full plate of coding duties, but I'm expected to mentor other developers, work on requirements, make design decisions for other developers, evaluate bug reports from users, assign them to developers, and so on. I find that my day has become on interruption after another and the prolonged periods of sustained concentration needed to get any actual quality coding done are becoming rarer and rarer. Today, I finally grabbed my laptop and escaped to a coffee shop so I could get some actual work done. How do the team leads here manage their day -- or manage their workplace -- so they don't let their administrative tasks overwhelm them?

    Read the article

  • How to generate a report of IIS settings for easy perusal?

    - by Bryan
    Hello, I'm looking for a way to (hopefully) create a text file which lists all the settings in IIS for.. Virtual Directories Web sites Which framework is used on a certain website/directory directory of hosted files etc. Basically I want to do some investigation on some of our servers to figure out where certain projects are located, without digging through right clicking and looking for the directory name manually, etc, for every domain we host. The reasoning is that I often need to find access to files/projects I haven't worked on before, but historically, we don't have a strong naming scheme, so you can't just look where something "logically" would be - so, generating a list would be very helpful. Something like this would be awesome, but I'm looking for any tips at all Domainname1.com framework: ASP.NET 1.1 directory: c:\inetpub\wwwroot\domainname1.com Applications hosted at this domain: etc, etc. Plain text, XLS, XML.. anything other than right clicking through the whole list! Thanks!

    Read the article

  • How to change the css class="current" when using page jumping (single page website)?

    - by Bryan
    Morning, I must be asking google all the wrong questions, because I can't find anything similar. I have a standard navigation list, but I'm using page jumping because I wanted a single web page. <ul> <li><a href="#livestream">Livestream</a></li> <li><a href="#media">Media</a></li> <li><a href="#crew">Crew</a></li> <li><a href="#services">Services</a></li> <li><a href="#contact">Contact</a></li> </ul> But I can't for the life of me figure out how to make the class="current" when using page jumping. I've tried this bit of jquery because it appears to be what I'm looking for, but it did nothing. I don't think it'll work for #links. Any ideas?

    Read the article

  • How do I get phpMyAdmin to connect to a local mysql server?

    - by bryan
    Hi everyone, I have my config.inc.php file, and have set my host name to localhost. Unfortunately, I have no idea what my username/password should be. Is that something I need to configure on the MySql side? I tried creating an arbitrary username/password (admin/password), but when I try to log into phpMyAdmin with those credentials, I get an error: (#1045 - Access denied for user 'admin'@'localhost' (using password: YES)) Can anyone point me in the right direction? (Sorry for the dumb question; I just haven't had to install mysql before. I've always had a host name / username / password given to me.) Thanks!

    Read the article

  • How do you clear your mind after 8-10 hours per day of coding?

    - by Bryan
    Related Question- Ways to prepare your mind before coding?. I'm having a hard time taking my mind off of work projects in my personal time. It's not that I have a stressful job or tight deadlines; I love my job. I find that after spending the whole day writing code & trying to solve problems, I have an extremely hard time getting it out of my mind. I'm constantly thinking about the current project/problem/task all the time. It's keeping me from relaxing, and in the long run it just builds stress. Personal projects help to some extent, but mostly just to distract me. I still have source code bouncing around my head 16 hours a day. I'm still relatively new to the workforce. Have you struggled with this, perhaps as a young developer? How did you overcome it? Can anyone offer general advice on winding down after a long programming session?

    Read the article

  • SQL query to get field value distribution

    - by Bryan Lewis
    I have a table of over 1 million test score records that basically have a unique score_ID, a subject_ID and a score given by a person. The score range for most subjects is 0-3, but some have a range of 0-4. There are about 25 possible subjects. I need to produce a score distribution report which looks like: subject_ID 0 1 2 3 4 ---------- --- --- --- --- --- 1 967 576 856 234 2 576 947 847 987 324 . . So it groups the data by subject_ID, then shows how many times a specific score value was given within that subject. Any SQL pointers to generate this would be greatly appreciated.

    Read the article

  • C# & Session Variables to iFrames

    - by Bryan
    I am currently in C# and I have set Session variables on each page. The link to my Colorbox is in the MasterPage, and on click opens up in an iframe from a different page in a different folder i.e. /admin/deals.aspx <-- iframed page in colorbox which needs SESSION /default.aspx <-- page with set SESSION Is there a way I can pass this variable to the iframed page?

    Read the article

  • Does Table.InsertOnSubmit create a copy of the original table?

    - by Bryan
    Using InsertOnSubmit seems to have some memory overhead. I have a System.Data.Linq.Table<User> table. When I do table.InsertOnSubmit(user) and then int count = table.Count(), the memory usage of my application increases by roughly the size of the User table, but the count is the number of items before user was inserted. So I'm guess an enumeration after InsertOnSubmit will create a copy of the table. Is that true?

    Read the article

  • What does DataContext.GetTable<TEntry> do?

    - by Bryan
    Consider I have a DataContext db, and there is an Entity class User. So when System.Data.Linq.Table<User> table = db.GetTable<User>(); is called for the first time, does it pull the data from the database immediately, does it use deferred execution, or were the data already loaded from database when db was initialized?

    Read the article

  • How to remove an element without id

    - by Bryan
    I have the following code: <table> <tr width="100%"> <td width="130" /> <td id="BottomCell" width="100%" /> <tr> </table> <input type="button"/> I want the first td to be removed from tr when the button is clicked. How can I do this? Thanks.

    Read the article

  • Audio Player with Custom Buttons

    - by Bryan Wong
    I am developing a website but require help regarding a simple javascript audio player. Currently, I have four divs set up as the "buttons" : previous song; pause; play; and next song. Pretty much self explanatory, each button serves its obvious function, previous song, pause the song, play the song, and next song. With this in mind, I am also hoping to have the music start playing right after the page completes loading. I understand there are numerous javascript solutions that involve the use of third-party "applications" such as jplayer, however, I am not well learned in javascript and would like to request the aid of the general body in this matter. LOL. that was awkwardly formal. Um, but yes. I am looking for a way to use my four divs as the controllers of a multi-track audio player. Thanks,

    Read the article

  • Using `rack-rewrite` to Remove the Month and Date from a Permlink

    - by Bryan Veloso
    I've started the process of moving my blog to Octopress, but unfortunately, a limitation of Jekyll doesn't allow me to use abbreviated month names for my permalinks. Therefore I'm looking to just get rid of the month and day bits altogether. I'ved read in this article that you can use rack-rewrite to take care of the redirection, since I am using Heroku to host this. So how would I turn: This: example.com/journal/2012/jan/03/post-of-the-day/ Into this: example.com/journal/2012/post-of-the-day/ Extra points: If I had another rule that redirected /blog/ to /journal/, would that rule still adhere to the above one as well? So from: This: example.com/blog/2012/jan/03/post-of-the-day/ To this: example.com/journal/2012/jan/03/post-of-the-day/ And finally to: example.com/journal/2012/post-of-the-day/ Thanks for the assistance in advance. :)

    Read the article

  • MVC multi page form losing session

    - by Bryan
    I have a multi-page form that's used to collect leads. There are multiple versions of the same form that we call campaigns. Some campaigns are 3 page forms, others are 2 pages, some are 1 page. They all share the same lead model and campaign controller, etc. There is 1 action for controlling the flow of the campaigns, and a separate action for submitting all the lead information into the database. I cannot reproduce this locally, and there are checks in place to ensure users can't skip pages. Session mode is InProc. This runs after every POST action which stores the values in session: protected override void OnActionExecuted(ActionExecutedContext filterContext) { base.OnActionExecuted(filterContext); if (this.Request.RequestType == System.Net.WebRequestMethods.Http.Post && this._Lead != null) ParentStore.Lead = this._Lead; } This is the Lead property within the controller: private Lead _Lead; /// <summary> /// Gets the session stored Lead model. /// </summary> /// <value>The Lead model stored in session.</value> protected Lead Lead { get { if (this._Lead == null) this._Lead = ParentStore.Lead; return this._Lead; } } ParentStore class: public static class ParentStore { internal static Lead Lead { get { return SessionStore.Get<Lead>(Constants.Session.Lead, new Lead()); } set { SessionStore.Set(Constants.Session.Lead, value); } } Campaign POST action: [HttpPost] public virtual ActionResult Campaign(Lead lead, string campaign, int page) { if (this.Session.IsNewSession) return RedirectToAction("Campaign", new { campaign = campaign, page = 0 }); if (ModelState.IsValid == false) return View(GetCampaignView(campaign, page), this.Lead); TrackLead(this.Lead, campaign, page, LeadType.Shared); return RedirectToAction("Campaign", new { campaign = campaign, page = ++page }); } The problem is occuring between the above action, and before the following Submit action executes: [HttpPost] public virtual ActionResult Submit(Lead lead, string campaign, int page) { if (this.Session.IsNewSession || this.Lead.Submitted || !this.LeadExists) return RedirectToAction("Campaign", new { campaign = campaign, page = 0 }); lead.AddCustomQuestions(); MergeLead(campaign, lead, this.AdditionalQuestionsType, false); if (ModelState.IsValid == false) return View(GetCampaignView(campaign, page), this.Lead); var sharedLead = this.Lead.ToSharedLead(Request.Form.ToQueryString(false)); //Error occurs here and sends me an email with whatever values are in the form collection. EAUtility.ProcessLeadProxy.SubmitSharedLead(sharedLead); this.Lead.Submitted = true; VisitorTracker.DisplayConfirmationPixel = true; TrackLead(this.Lead, campaign, page, LeadType.Shared); return RedirectToAction(this.ConfirmationView); } Every visitor to our site gets a unique GUID visitorID. But when these error occurs there is a different visitorID between the Campaign POST and the Submit POST. Because we track each form submission via the TrackLead() method during campaign and submit actions I can see session is being lost between calls, despite the OnActionExecuted firing after every POST and storing the form in session. So when there are errors, we get half the form under one visitorID and the remainder of the form under a different visitorID. Luckily we use a third party service which sends an API call every time a form value changes which uses it's own ID. These IDs are consistent between the first half of the form, and the remainder of the form, and the only way I can save the leads from the lost session issues. I should also note that this works fine 99% of the time. EDIT: I've modified my code to explicitly store my lead object in TempData and used the TempData.Keep() method to persist the object between subsequent requests. I've only deployed this behavior to 1 of my 3 sites but so far so good. I had also tried storing my lead objects in Session directly in the controller action i.e., Session.Add("lead", this._Lead); which uses HTTPSessionStateBase, attempting to circumvent the wrapper class, instead of HttpContext.Current.Session which uses HTTPSessionState. This modification made no difference on the issue, as expected.

    Read the article

  • SQL query to get field value distribution (mode)

    - by Bryan Lewis
    I have a table of over 1 million test score records that basically have a unique score_ID, a subject_ID and a score given by a person. The score range for most subjects is 0-3, but some have a range of 0-4. There are about 25 possible subjects. I need to produce a score distribution report which looks like: subject_ID 0 1 2 3 4 ---------- --- --- --- --- --- 1 967 576 856 234 2 576 947 847 987 324 . . So it groups the data by subject_ID, then shows how many times a specific score value was given within that subject. Any SQL pointers to generate this would be greatly appreciated.

    Read the article

  • Does playing a Program from VS2005 cause a program to work any different than the .exe file?

    - by Bryan
    There is a program where I work that works fine when running the .exe file but works differently from expected when opened in VS2005 and played from there. I am therefore asking on here if anyone knows of anything that would work in the .exe file but not the debug from VS? I am not able to post the code for the buttons I'm talking about but I'll try to explain the best I can. There is a receiver hooked up to the computer. When the button is pressed on the program, it shows a message and waits for a signal to be received. After the signal is heard the first message box is supposed to close and another is supposed to open. When using the .exe file this happens just fine. However when playing from the program from VS2005 (the same one from which the .exe was made) the second message doesn't come up when it is supposed to and when I can make it come up, the first box doesn't close. There is also a timer involved if that helps. Also, is there a fundamental difference between how the two operate when executing the program? If I need to make anything more clear or give more details please let me know.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14  | Next Page >