dynamic

Linq to sql - dynamic order by with IN operator

hello, i have the following linq query: using (var db = new MyDataContext()) { int[] onlineUsers = GetOnline(); var users = (from u in db.Users orderby (onlineUsers.Contains(u.u_username) && u.u_hasvisible_photo) descending, u.u_lastlogin descending select u.u_username).Skip(startRowIndex).Take(maximumRows).ToList(); } ...

dynamically change jquery innerfade

I have a small form of transition settings next to some images I'm rotating using a jquery innerfade plugin. What I would like is when the user selects a new transition setting (ie, timeout) the innerfade dynamically updates the timeout setting so the user can preview what this change will look like. But I'm not sure the best way to do ...

ASP.NET Dynamic Data - Filters | how to default filter of users to current user

I am using Dynamic Data Web Entities Application website and need control of the dynamicfilters placed on the PageTemplates/list.aspx page. I have a table using the default PageTemplates/list.aspx view and this table has a foreign key to a table of users. The foreign key is showing up in the filters correctly but I want to default the f...

How do I dynamically generate columns in a WPF DataGrid?

I am attempting to display the results of a query in a WPF datagrid. The ItemsSource type I am binding to is IEnumerable<dynamic>. As the fields returned are not determined until runtime I don't know the type of the data until the query is evaluated. Each "row" is returned as an ExpandoObject with dynamic properties representing the fiel...

How does Javascript use effect 508 Compliance?

As background, I currently develop for a university, and we have problems with departments demanding "web 2.0 content" and accessibility requirements. How do really big sites that are JavaScript based deal with 508 Compliance? Some sites degrade, and others require enabling JavaScript. How much impact does one decision have versus the...

What is the difference between call and apply?

What is the difference between using call and apply to invoke a function? var func = function(){ alert('hello!'); }; func.apply(); vs func.call(); Are there performance differences between the two methods? When is it best to use call over apply and vice versa? ...

JQuery focus() on jQuery-applied anchors works in Chrome and IE, not Firefox

Update: This question has been solved, so the buggy Firefox behavior will no longer appear when loading my example webpage My webpage has very long passages of text, so I want to make each paragraph its own permalink. To do this, I use jQuery to add an anchor and link to each paragraph after the page loads. This worked perfectly in Chro...

How to turn static methods into non-static. Small explanation/examples related to java oop

Hello. I cant get how to use/create oop code without word static. I read Sun tutorials, have book and examples. I know there are constructors, then "pointer" this etc. I can create some easy non-static methods with return statement. The real problem is, I just don't understand how it works.I hope some communication gives me kick to move ...

Codeigniter validation

Based on the backend data i may have n number of items displayed along with the check box and textarea for selecting and give commnet on the page and there is also a option given to the user to remove the items based on the requirements. I need to set a validation like atlease one item is required. Since its number is based on the query...

How to load modules dynamically on package import?

Given the following example layout: test/ test.py formats/ __init__.py format_a.py format_b.py What I try to archive is, that whenever I import formats, the __init__.py looks for all available modules in the formats subdir, loads them and makes them available (right now simply through a variable, supported_formats). If...

Qt - Dynamic list stuff

I'm fairly new to Qt4.5, and I'm unsure of the approach I should take to the following problem. I'm trying to create a QListWidget style widget, that can dynamically expand to an arbitrary length, probably no more than 300 elements. I tried to use the QListWidget, but I need to store three QStrings per line, and QListWidget is fairly l...

How to debug dynamically defined functions in Python?

Is there a way to debug a function that is defined dynamically in run time? Or at least is there an easy way to find out where this function is produced? Update to give more detail: I used inspect module: ipdb> inspect.getmodule(im.get_thumbnail_url) Out[0]: <module 'django.utils.functional' from 'C:\java\python\Python25\Lib\site -p...

Hiding links based on db entry

I have some links on a page such as: < a id="Digg" runat="server">< img alt="Digg" id="imgDigg" runat="server" src="~/resources/images/icons/social/digg_32.png" border="0" />< /a> I have a database table that can "turn" them on or off, in my code behind I have the following: string[] SocialMedia = new string[] { "Twitter", "Facebook"...

Flash Custom Font with Dynamic Text Field

I am creating a textfield using this code: window_title = p.createTextField("border"+diepixWindow.NextBorderDepth, p.getNextHighestDepth(), wx1+TITLE_OFFSETX, wy1+TITLE_OFFSETY, ww, 64); var fformat:TextFormat = new TextFormat(); fformat.font = "TF2 Build"; fformat.size = 36; window_title.setTextFormat(fformat); window_titl...

Restructuring to not use Exceptions by Determining which Method is Implemented

So I'm developing something that works on dynamic variables using C# 4. And I'm in a situation where I have two variables a and b and I know that either a.Foo(b) or b.Foo(a) is defined. However I don't know which so at the moment I use something like this: dynamic a, b, result; ... try { result = a.Foo(b); } catch { result = b....

How to use iPhone Custom URL schemes

I've got an app that I want to be able to use Custom URL schemes for. I want users to be able to open Tweetie using the Custom URL protocol however I need to populate the tweet with dynamic website link which I get using currentItem.link. I found this code which launches Tweetie and populates a message with static information: NSString...

trying to add/remove controls to a form

plz keep in mind I'm very noobish... What I'm trying to do is add "blips" to my form. I have a calculation that determines where all these "blips" will be, which is plotted on a graph. the solution determines that the coordinates are "blipHours, blipAltitude" I want to somehow add small dots to my form at these locations. At first I wa...

i have one web site which was static and now i have moved it on dynamic and my all pages url have high page rank so what should i do ?

i have one web site which was static and now i have moved it on dynamic and my all pages url have high page rank so what should i do ? ...

Linq To Sql - Dynamic OrderBy - Case When

Hello, I'm using Linq to sql and Linq Dynamic OrderBy. I know linq dynamic can do simple sorting like - orderby("column_name"). But does it support something more complex like queries with "CASE WHEN" in them ? string orderbyQuery = "(CASE WHEN (username == 100) THEN 1 ELSE 0 END) DESC)"; here is my query : var u = from u in db.us...

removing dynamically created controls C#

I have a program that adds a series of "blips" to a graph. How do I have a button clear all of the "blips" that have been created with this code? PictureBox blip = new PictureBox(); blip.Location = new Point(blipHours, blipAltitude); blip.Size = new Size(6, 6); ...