Search Results

Search found 7104 results on 285 pages for 'dynamic usercontrols'.

Page 88/285 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • LINQ To SQL Dynamic Select

    - by mcass20
    Can someone show me how to indicate which columns I would like returned at run-time from a LINQ To SQL statement? I am allowing the user to select items in a checkboxlist representing the columns they would like displayed in a gridview that is bound to the results of a L2S query. I am able to dynamically generate the WHERE clause but am unable to do the same with the SELECT piece. Here is a sample: var query = from log in context.Logs select log; query = query.Where(Log => Log.Timestamp > CustomReport.ReportDateStart); query = query.Where(Log => Log.Timestamp < CustomReport.ReportDateEnd); query = query.Where(Log => Log.ProcessName == CustomReport.ProcessName); foreach (Pair filter in CustomReport.ExtColsToFilter) { sExtFilters = "<key>" + filter.First + "</key><value>" + filter.Second + "</value>"; query = query.Where(Log => Log.FormattedMessage.Contains(sExtFilters)); }

    Read the article

  • lightbox dynamic image retrieval

    - by GSTAR
    I am constructing a lighbox gallery, currently experimenting with FancyBox (http://fancybox.net) and ColorBox (http://colorpowered.com/colorbox). By default you have to include a link to the large version of the image so that the Lightbox can display it. However, I am wanting to have the image link URLs pointing to a script rather than directly to the image file. So for example, instead of: <a href="mysite/images/myimage.jpg"> I want to do: <a href="mysite/photos/view/abc123"> The above URL points to a function: public function actionPhotos($view) { $photo=Photo::model()->find('name=:name', array(':name'=>$view)); if(!empty($photo)) { $user=$photo->user; $this->renderPartial('_photo', array('user'=>$user, 'photo'=>$photo, true)); } } At some point in the future the function will also update the view count of the image. Now this approach is working to an extent - most images load up but some do not load up (the lightbox gets displayed in a malformed state). I think the reason for this is because it is not processing the function quick enough. For example when I click the "next" button it needs to go to the URL, process the function and retreive/output the response. Does anybody know how I can get this working properly?

    Read the article

  • Find and Replace using Perl for a dynamic url based on wordpress post

    - by user1068544
    How do you find the following div using perl. The url and image location will consistently change based on the post url, so i need to use a wild card. I must use a regular expression because I am limited in what i can use due to the software i am using. http://community.autoblogged.com/entries/344640-common-search-and-replace-patterns <div class="tweetmeme_button" style="float: right; margin-left: 10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjumpinblack.com%2F2011%2F11%2F25%2Fdrake-and-rick-ross-you-only-live-once-ep-mixtape-2011-download%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjumpinblack.com%2F2011%2F11%2F25%2Fdrake-and-rick-ross-you-only-live-once-ep-mixtape-2011-download%2F&amp;source=jumpinblack1&amp;style=compact&amp;b=2" height="61" width="50" /><br /> </a> </div> I tried using <div class="tweetmeme_button" style="float: right; margin-left: 10px;">.*<\/div>

    Read the article

  • Jquery dynamic dropdown event not firing

    - by kevin
    Hi i am trying to create dropdownlists dynamically and populating the contents via an ajax call, this sort of works in the sense that the drop down is created and populated as required but its 'change' event does not fire. I am posting the code below, if anyone can spot something obvious, can you please let me know regards $(document).ready(function () { $("#positions select").change(function (e) { alert("in"); var id = $("#category_id").val(); $.getJSON("/Category/GetSubCategories/" + id, function (data) { if (data.length > 0) { alert(data.length); var position = document.getElementById('positions'); var tr = position.insertRow(7); var td1 = tr.insertCell(-1); var td = tr.insertCell(-1); var sel = document.createElement("select"); sel.name = 'sel'; sel.id = 'sel'; sel.setAttribute('class', 'category'); td.appendChild(sel); $.each(data, function (GetSubCatergories, category) { $('#sel').append($("<option></option>"). attr("value", category.category_id). text(category.name)); }); } }); }); });

    Read the article

  • dynamic detail section using user date range

    - by user1437828
    I have a particular report that I need help with. I have an assignment where we are looking for missing data for a particular date - the situation is that users are required to enter a begin and an end note for their shift and their shift is either a day shift or a night shift. So within a 24 hour period there should be a day begin note, day end note, evening begin note and an evening end note I have the command written to generate the required data for ONE DAY ONLY using a BeginDate parameter supplied by the user What I need is to allow the user to enter a date range (add another parameter EndDate), then evaluate the data entry (command) for each day. The parameter being passed in using the user's input is a date and in the Group Expert the user input is not an available field Any help or suggestions would be most appreciated!

    Read the article

  • priority_queue with dynamic priorities

    - by Layne
    Hey, I have a server application which accepts incomming queries and executes them. If there are too many queries they should be queued and if some of the other queries got executed the queued queries should be executed as well. Since I want to pass queries with different priorities I think using a priority_queue would be the best choice. e.g. The amout of the axcepting queries (a) hit the limt and new queries will be stored in the queue. All queries have a priority of 1 (lowest) if some of the queries from (a) get executed the programm will pick the query with the highest priority out of the queue and execute it. Still no problem. Now someone is sending a query with a priority of 5 which gets added to the queue. Since this is the query with the highest priority the application will execute this query as soon as the running queries no longer hit the limit. There might be the worst case that 500 queries with a priority of 1 are queued but wont be executed since someone is always sending queries with a priority of 5 hence these 500 queries will be queued for a looooong time. In order to prevent that I want to increase the prioritiy of all queries which have a lower priority than the query with the higher priority, in this example which have a priority lower than 5. So if the query with a priority of 5 gets pulled out of the queue all other queries with a priority < 5 should be increased by 0.2. This way queries with a low priority wont be queued for ever even if there might be 100 queries with a higher priority. I really hope can help me to solve the problem with the priorities: Since my queries consist of an object I thought something like this might work: class Query { public: Query( std::string p_stQuery ) : stQuery( p_stQuery ) {}; std::string getQuery() const {return stQuery;}; void increasePriority( const float fIncrease ) {fPriority += fIncrease;}; friend bool operator < ( const Query& PriorityFirst, const Query& PriorityNext ) { if( PriorityFirst.fPriority < PriorityNext.fPriority ) { if( PriorityFirst.fStartPriority < PriorityNext.fStartPriority ) { Query qTemp = PriorityFirst; qTemp.increasePriority( INCREASE_RATE ); } return true; } else { return false; } }; private: static const float INCREASE_RATE = 0.2; float fPriority; // current priority float fStartPriority; // initialised priority std::string stQuery; };

    Read the article

  • Dynamic menu items (change text on click)

    - by Mathijs Delva
    Hello, i need some help with a menu. See the following menu: menu The code for this menu: <div id="menu"> <ul> <li class="home"><a href="#home" class="panel">home / <span class="go">you are here</span></a></li> <li class="about"><a href="#about" class="panel">about / <span class="go">go here</span></a></li> <li class="cases"><a href="#cases" class="panel">cases / <span class="go">go there</span></a></li> <li class="photos"><a href="#photos" class="panel">photos / <span class="go">maybe here</span></a></li> <li class="contact"><a href="#contact" class="panel">contact / <span class="go">or even here<span></span></a></li> </ul> </div> What i want to do: onclick a menu item: 1. change the red text to yellow 'you are here' 2. change the previous menu item back to its original state (eg red and "go here"). The 4 values "go here", "go there", "maybe here", "or even here" are the 4 values that should be assigned to the other menu items (like the example). This is the code i already have: $('#menu ul li.home').addClass('active') $('#menu ul li.active a .go').html("you are here"); $("#menu ul li").click(function () { $('#menu ul li.active').removeClass('active'); $(this).addClass('active'); $('#menu ul li.active a .go').html("you are here"); }); var arr = [ "go here", "go there", "maybe here", "or even here" ]; var obj = { item1: "go here", item2: "go there" ,item3: "maybe here", item4: "or even here"}; $('#menu ul li').click(function () { var str = $('#menu ul li.active a .go').text(); $('#menu ul li.active a .go').html(str); }); As you see, it's incomplete. I don't how to get the values from the array and assign them too a menu item. The replace text works, but not the change-back-to-original-state. Also, right now, for some reason i can't click ONTO the list item itself in order to activate the jquery code. I need to click just a few pixels under it. But i guess that's a css issue. If anyone can help, i'd be super thankful! Regards, Mathijs

    Read the article

  • Dynamic proxies to auto-save models

    - by atomman
    I'm trying to make some auto-magic happen in java using proxies to track objects and saving them when a set* method is called. I started of using java's built in Proxy, and everything works just fine, but from what I can understand I need a interface for every model, which is something that I'm trying to avoid. This is where CGLIB comes in, it allows me to create proxies of my models without the use of interfaces. BUT, how can I now retrieve the original object, the one I am trying to save? The optimal solution to be would be something like the EntityManager interface used by hibernate, where you keep your original object, but it is still tracked.

    Read the article

  • Create dynamic script - IE doesn't work

    - by poru
    I'm creating a script with javascript which works in every browser except IE. <script type="text/javascript"> (function() { var sc = document.createElement('script'); sc.type = 'text/javascript'; sc.src = 'http://domain.com/script.js'; (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(sc); })(); </script> How could I get this working in IE (tested IE6, IE7, IE8)?

    Read the article

  • Dynamic reference to resource files in C#

    - by Joda
    I have an application on which I am implementing localization. I now need to dynamically reference a name in the resouce file. assume I have a resource file called Login.resx, an a number of strings: foo="hello", bar="cruel" and baz="world" normally, I will refer as: String result =Login.foo; and result=="hello"; my problem is, that at code time, I do not know if I want to refer to foo, bar or baz - I have a string that contains either "foo", "bar" or "baz". I need something like: Login["foo"]; Does anyone know if there is any way to dynamically reference a string in a resource file?

    Read the article

  • IQueryable<> dynamic ordering/filtering with GetValue fails

    - by MyNameIsJob
    I'm attempting to filter results from a database using Entity Framework CTP5. Here is my current method. IQueryable<Form> Forms = DataContext.CreateFormContext().Forms; foreach(string header in Headers) { Forms = Forms.Where(f => f.GetType() .GetProperty(header) .GetValue(f, null) .ToString() .IndexOf(filter, StringComparison.InvariantCultureIgnoreCase) >= 0); } However, I found that GetValue doesn't work using Entity Framework. It does when the type if IEnumerable< but not IQueryable< Is there an alternative I can use to produce the same effect?

    Read the article

  • Adding dynamic content with events in jquerymobile

    - by Christian Waidner
    Currently I'm stuck with a problem in jquerymobile: I'm adding items to a list dynamically and use enhanceWithin() in the end (so styling is correct). After this I like to add click-events for each list item but the problem is, that enhanceWithin runs asynchronous and so I always get the error message "cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh'" When I delay the event-adding-code it works perfectly. Does anyone have an idea if there is a enhanceWithin.done event or anything else I can use? HTML: ... <div id="shoppinglist">Loading list...</div> ... Javascript: function updateList() { var result = ""; $.each(shoppinglistItems, function (index, item) { result += '<label><input type="checkbox" ' + item.checked + ' id="item_' + item.id + '">' + item.name + '</label>\n'; }); $('#shoppinglist').html(result).enhanceWithin(); // Change-Events an die Checkboxen knoten $('input[id*=item_]').unbind('change').bind('change', function (event) { var itemid = $(this).attr('id'); itemid = (itemid.split('_'))[1]; // Nur die Zahl extrahieren // Passendes Item aus der Liste der Items suchen und checken $.each(shoppinglistItems, function (index, item) { if (item.id == itemid) { item.checked = "checked"; item.timestamp = moment().format("YYYYMMDDHHmmss"); } }); updateList(); }); }

    Read the article

  • dynamic SQL not working as expected

    - by christine33990
    create or replace procedure createtables Authid current_user as begin execute immediate 'create table newcustomer as select * from customer'; end; create or replace procedure e is begin createtables; select * from newcustomer; end; I got two procedures above. first one will create a new tables called newcustomer, second procedure will call the first procedure and query to the newcustomer table. when I try to compile this code, it says the table is not yet created, I don't really get it as I have called createtables procedure so I assume I have created the table. Any help will be appreciated. Thanks

    Read the article

  • Generating a zend form with dynamic data?

    - by meder
    I need to access my session and based on the session property I need to grab stuff from the database to use as options in my dropdown. $_SESSION is: [sess_name] => Array( [properties] => Array( 1=> Hotel A, 2=> Hotel B ), [selected] => 1 ) I need to grab Hotel A from selected, and then access all accounts under Hotel A from the database: id title hotel_id ------------------------------ 1 Hotel A Twitter Account 1 2 Hotel B Facebook Account 2 3 Hotel A Facebook Account 1 I need ids 1 and 3 because my hotel_id is 1 in the context of: $this->addElement( 'select', 'account', array( 'multioptions' => $NEED_IT_HERE )); Here's my query / session grabbing code: $cs = new Zend_Session_Namespace( SESS_NAME ); $model = new Model_DbTable_Social; $s = " SELECT social_accounts.* FROM social_accounts LEFT JOIN social_media_outlets ON social_media_outlets.id = social_accounts.property WHERE social_accounts.property=".(int)$cs->selectedclient; I have this code in my form page, but I need to move it into my model now.

    Read the article

  • LINQ Expression - Dynamic From & Where Clause

    - by chillydk147
    I have the following list of integers that I need to extract varying lists of integers containing numbers from say 2-4 numbers in count. The code below will extract lists with only 2 numbers. var numList = new List<int> { 5, 20, 1, 7, 19, 3, 15, 60, 3, 21, 57, 9 }; var selectedNums = (from n1 in numList from n2 in numList where (n1 > 10) && (n2 > 10) select new { n1, n2 }).ToList(); Is there any way to build up this Linq expression dynamically so that if I wanted lists of 3 numbers it would be compiled as below, this would save me having to package the similar expression inside a different method. var selectedNums = (from n1 in numList from n2 in numList from n3 in numList where (n1 > 10) && (n2 > 10) && (n3 > 10) select new { n1, n2, n3 }).ToList();

    Read the article

  • jquery dynamic jcarsoul make it as autorun

    - by Bharanikumar
    Hi , Am using this jquery plugin]1 How to change the click mode to automatically run mode , Present scenario , When u click NEXt it show the next three image, When u click BACK It shows the previous three images , I want to change this scenario to Whe loads , the plugin should start running(image) , Also i need the NEXT and BCK button , When user click the back button , then it show show previous three image and run image toward back, Is it possible in this ? Thanks

    Read the article

  • Rails: How to have dynamic association

    - by Aaron Dufall
    I'll use an example to explain what behaviour I would like to achieve. If you had a project management app and you added a task, but not all the contributors are users of the app. So when you adding contributors to the task you can enter a user name or email address. Here is the part that I'm finding a little tricky. The task model has many contributors which are linked through the user model, but from this point on I want to achieve 2 things. Store the non members email(this would obviously be quite simple) If that email address was to create an account it would then link that user to the task and remove the temporally saved email. This way, when that user creates an account all the related tasks will already be associated with their email. Is this something that i could achieve with a polymorphic association? or is there something else I should be looking at?

    Read the article

  • Help doing a dynamic sort?

    - by Kevin
    I have a notifications table which contains different types of notifications for different events. Inside the table is a notifications_type:string column that contains the type of notification, i.e. "foo" or "bar" or "oof" I want the user to be able to select what notifications they want to display, so there are checkboxes below the result that correspond to prefs_display_foo:boolean, prefs_display_bar:boolean in the User model. What is an elegant way for me to set the :conditions in the find to properly display the sorted results? Also, currently I have it as a method in the user, but how would I do it as a has_many :notifications, :conditions = .....

    Read the article

  • Silverlight ~ MVVM ~ Dynamic setting of Style property based on model value

    - by eponymous23
    I have a class called Question that represents a question and it's answer. I have an application that renders an ObservableCollection of Question objects. Each Question is rendered as a StackPanel that contains a TextBlock for the question verbiage, and a TextBox for the user to enter in an answer. The questions are rendered using an ItemsControl, and I have initially set the Style of the Questions's StackPanel using a StaticResource key called 'IncorrectQuestion' (defined in UserControl.Resources section of the page). In the UserControl.Resources section, I've also defined a key calld 'CorrectQuestion' which I need to somehow apply to the Question's StackPanel when the user correctly answers the question. My problem is I'm not sure how to dynamically change the Style of the StackPanel, specifically within the constraints of a ViewModel class (i.e. I don't want to put any style selection code in the View's code-behind). My Question class has an IsCorrect property which is accurately being set when the correction is answered. I'd like to somehow reflect the IsCorrect value in the form of a Style selection. How do I do that?

    Read the article

  • JQuery/AJAX: Loading external DIVs using dynamic content

    - by ticallian
    I need to create a page that will load divs from an external page using Jquery and AJAX. I have come across a few good tutorials, but they are all based on static content, my links and content are generated by PHP. The main tutorial I am basing my code on is from: http://yensdesign.com/2008/12/how-to-load-content-via-ajax-in-jquery/ The exact function i need is as follows: Main page contains a permanent div listing some links containing a parameter. Upon click, link passes parameter to external page. External page filters recordset against parameter and populates div with results. The new div contains a new set of links with new parameters. The external div is loaded underneath the main pages first div. Process can then be repeated creating a chain of divs under each other. The last div in the chain will then direct to a new page collating all the previously used querystrings. I can handle all of the PHP work with populating the divs on the main and external pages. It's the JQuery and AJAX part i'm struggling with. $(document).ready(function(){ var sections = $('a[id^=link_]'); // Link that passes parameter to external page var content = $('div[id^=content_]'); // Where external div is loaded to sections.click(function(){ //load selected section switch(this.id){ case "div01": content.load("external.php?param=1 #section_div01"); break; case "div02": content.load("external.php?param=2 #section_div02"); break; } }); The problem I am having is getting JQuery to pass the dynamically generated parameters to the external page and then retrieve the new div. I can currently only do this with static links (As above).

    Read the article

  • How to get and set dynamic or runtime input in XStream

    - by RSR
    i am getting xml tags as input in java web services. i need that to parsed to java objects i had tried everything like XStream,XMLEncoder, JaxB Concepts also. But I don't know what is the problem. i am having pojo class for that input but it is not working. example for xml tags : 1034|Chromepet|Chennai|117.97.24.32 first to extract data : i need only data from .... and then Using Xstream or XmlEncoder i have to parse it like i want only devsrlno:101 signalstrength : 30 devicedatetime:01/24/2010 10:10:23 AM gprsdatetime:01/24/2010 10:10:23 AM debug:yes autoip :1034|Chromepet|Chennai|117.97.24.32. please tell me how to do it

    Read the article

  • Handling dynamic number of columns

    - by Whistle
    I'm developing a CMS of sorts, and I want to give my users the possibility of customizing the display. More precisely, I want to give them the ability to choose to display or hide the left column, the right column and/or the top div. The middle column cannot be hidden since this is where the actual content will show, whereas the other columns are for navigation or side menus. I've been looking for a way to make this as smart and flexible as possible. For now I'm using a MasterPage, but that seems to be too constraining. For instance, with MasterPage you need to add a ContentPlaceHolder control in every of your ASPX pages. What are the best practices in this area? I guess a simpler way of saying this would be "I want to create a template system over which I have complete control".

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >