Search Results

Search found 171 results on 7 pages for 'allan lykke christensen'.

Page 4/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • How to add and relate a node within the parent nodes add form in Drupal.

    - by Espen Christensen
    Hi, I want to accomplish the following scenario in Drupal: You have 2 content-types. Lets say, an application-form for a lisence, and a content-type for persons. Then when you go to add a lisence in the "node/add" submission form in Drupal, i would like to add a relative number of persons that would be related to this lisence, and only this lisence. Say you would like to apply for a lisence, and relate 4 persons to this lisence, then insted of creating the lisence and then create the 4 persons and relate them to the lisence, i would like to do this "inline". So when i add a lisence, there would be a way to add 1 or more persons that would relate to the lisence node. Is this possible, and if so how? I have been looking at the node reference module, and that manages to reference a node to another, but not to add them inline with the other. With the web-development framework Django, there is a way to this with something called "inline-editing", where you get the content-type fields inside another content-type creation form. There you bind them togheter with a ForeignKey. Anybody know of something simular in Drupal, if not, is it another way to achive something simular, that would be as user-friendly?

    Read the article

  • Why subtract null pointer in offsetof()?

    - by Bruce Christensen
    Linux's stddef.h defines offsetof() as: #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) whereas the Wikipedia article on offsetof() (http://en.wikipedia.org/wiki/Offsetof) defines it as: #define offsetof(st, m) \ ((size_t) ( (char *)&((st *)(0))->m - (char *)0 )) Why subtract (char *)0 in the Wikipedia version? Is there any case where that would actually make a difference?

    Read the article

  • Formwizards for editing in Django

    - by Espen Christensen
    Hi, I am in the process of making a webapp, and this webapp needs to have a form wizard. The wizard consists of 3 ModelForms, and it works flawlessly. But I need the second form to be a "edit form". That is, i need it to be a form that is passed an instance. How can you do this with a form wizard? How do you pass in an instance of a model? I see that the FormWizard class has a get_form method, but isnt there a documented way to use the formwizard for editing/reviewing of data?

    Read the article

  • A smarter way to do this jQuery?

    - by Nicky Christensen
    I have a a map on my site, and clicking regions a class should be toggled, on both hover and click, I've made a jQuery solution to do this, however, I think it can be done a bit smarter than i've done it? my HTML output is this: <div class="mapdk"> <a data-class="nordjylland" class="nordjylland" href="#"><span>Nordjylland</span></a> <a data-class="midtjylland" class="midtjylland" href="#"><span>Midtjylland</span></a> <a data-class="syddanmark" class="syddanmark" href="#"><span>Syddanmark</span></a> <a data-class="sjaelland" class="sjalland" href="#"><span>Sjælland</span></a> <a data-class="hovedstaden" class="hovedstaden" href="#"><span>Hovedstaden</span></a> </div> And my jQuery looks like: if ($jq(".area .mapdk").length) { $jq(".mapdk a.nordjylland").hover(function () { $jq(".mapdk").toggleClass("nordjylland"); }).click(function () { $jq(".mapdk").toggleClass("nordjylland"); }); $jq(".mapdk a.midtjylland").hover(function () { $jq(".mapdk").toggleClass("midtjylland"); }).click(function () { $jq(".mapdk").toggleClass("midtjylland"); }); } The thing is, that with what i've done, i have to make a hover and click function for every link i've got - I was thinking I might could keep it in one hover,click function, and then use something like $jq(this) ? But not sure how ?

    Read the article

  • How to combine 2 or more querysets in a Django view?

    - by Espen Christensen
    Hi, I am trying to build the search for a Django site I am building, and in the search I am searching in 3 different models. And to get pagination on the search result list I would like to use a generic object_list view to display the results. But to do that i have to merge 3 querysets into one. How can i do that? Ive tried this: result_list = [] page_list = Page.objects.filter(Q(title__icontains=cleaned_search_term) | Q(body__icontains=cleaned_search_term)) article_list = Article.objects.filter(Q(title__icontains=cleaned_search_term) | Q(body__icontains=cleaned_search_term) | Q(tags__icontains=cleaned_search_term)) post_list = Post.objects.filter(Q(title__icontains=cleaned_search_term) | Q(body__icontains=cleaned_search_term) | Q(tags__icontains=cleaned_search_term)) for x in page_list: result_list.append(x) for x in article_list: result_list.append(x) for x in post_list: result_list.append(x) return object_list(request, queryset=result_list, template_object_name='result', paginate_by=10, extra_context={'search_term': search_term}, template_name="search/result_list.html") But this doesnt work I get an error when i try to use that list in the generic view. The list is missing the clone attribute. Anybody know how i can merge the three lists, page_list, article_list and post_list?

    Read the article

  • GridView will not update underlying data source

    - by John Christensen
    So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataSource, so I added a SqlDataSource and the same thing happens. The aspx is as follows (the code-behind page is empty): <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=devsql32;Initial Catalog=Steam;Persist Security Info=True;" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [LangID], [Code], [Name] FROM [Languages]" UpdateCommand="UPDATE [Languages] SET [Code]=@Code WHERE [LangID]=@LangId"> </asp:SqlDataSource> <asp:GridView ID="_languageGridView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="LangId" DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="LangId" HeaderText="Id" ReadOnly="True" /> <asp:BoundField DataField="Code" HeaderText="Code" /> <asp:BoundField DataField="Name" HeaderText="Name" /> </Columns> </asp:GridView> <asp:LinqDataSource ID="_languageDataSource" ContextTypeName="GeneseeSurvey.SteamDatabaseDataContext" runat="server" TableName="Languages" EnableInsert="True" EnableUpdate="true" EnableDelete="true"> </asp:LinqDataSource> What in the world am I missing here? This problem is driving me insane.

    Read the article

  • How to best convert Flash compatible mp4 files with FFMPEG

    - by Espen Christensen
    I am trying to convert different files to a flash compatible .mp4 file with ffmpeg, but i cant seem to succeed. Off cource the objective is to get the greatest quality with the smallest filesize. So far I have this, that works but it doesnt play in a flash player of some reason, and the result isnt that great, anybody got any tips on how to improve this conversion? ffmpeg -i input.file -f mp4 -vcodec mpeg4 -r 25 -b 560000 -s 610x340 -acodec aac -ac 2 -ab 64 -ar 44100 output.file Would be great the se other peoples experiences with this type of conversion.

    Read the article

  • Submit button on nested form submits the outer form in IE7

    - by Mike Christensen
    I have the following code on my Home.aspx page: <form id="frmJump" method="post" action="Views/ViewsHome.aspx"> <input name="JumpProject" /><input type="submit" value="Go" /> </form> However, when I click the "Go" button, the page posts back to Home.aspx rather than going to ViewsHome.aspx. I even tried adding some script to force the form to submit: <input name="JumpProject" onkeypress="if(event.keyCode == 13) { this.form.submit(); return false; }" /> But still even if I press ENTER, the Home.aspx page is reloaded. The only thing I can see that might be borking things is this form is actually a child form of the main POSTBACK form that ASP.NET injects into the page. I'm sure there's something stupid I'm missing and this post will get 800 downvotes instantly banishing me back into the n00b realm, but perhaps I haven't gotten enough sleep lately and I'm missing something stupid. This is on IE7 and an ASP.NET 4.0 backend. I also have jQuery libraries loaded on the page incase jQuery can improve this somehow. Thanks!

    Read the article

  • How can a web developer learn to develop for the iPhone?

    - by Jared Christensen
    I'm a web developer and I'm getting envious of all the cool iPhone apps. I know nothing about C or what ever language they use to make iPhone apps. I really have no idea where to start. What do I need to do? Should I take a class, buy a book? I have a pretty good grasp on programing, I do tons of HTML, CSS and Javascript development and some PHP and Action Scripting. I'm not very good with Object Oriented Programing but I think I could pick it up if I used it more. I love video tutorials like lynda.com or net.tutsplus.com. I learn best buy jumping in and getting my hands dirty.

    Read the article

  • I'm confused, how do I control cache so my clients can see website edits.

    - by Jared Christensen
    I host about 10 websites for clients. Every so often a client will ask for an update to their website. It may be a simple image change, new PDF or a simple text change. I make the change and then send them a link to the web page with the update. About an hour later I will get an email back from the client telling me they still see the old page. I will then explaining to them how to empty their browsers cache. What I'm trying to figure out is if there is a way I can tell their browser that I made an update to the website and that it should reload the page and update the cache. I thought about trying a meta tag but I read that they are not very reliable. Also I would still like the page to cache I just want to be able to clear it when I make an update. Is this possible? I'm an advanced front end web developer (HTML, CSS, Javascript) and know some PHP. Cache is just one of those things I don't really understand that well.

    Read the article

  • Is there a way to cut and paste or clone CSS from one element to another using JQuery?

    - by Jared Christensen
    I have a situation where I'm wrapping an image with a span and I want to remove all the CSS from the image and apply it to the span. Is there a way to do this with JQuery? JQuery: $(img).wrap('<span />'); Style Sheet: img { border: 5px solid red; padding: 10px; … } I would like do to do this with out editing the HTML or CSS. For example adding a class to the image would not work very well in my situation. I need a way to truly remove the CSS from one element and place it on another.

    Read the article

  • How to speed up a slow UPDATE query

    - by Mike Christensen
    I have the following UPDATE query: UPDATE Indexer.Pages SET LastError=NULL where LastError is not null; Right now, this query takes about 93 minutes to complete. I'd like to find ways to make this a bit faster. The Indexer.Pages table has around 506,000 rows, and about 490,000 of them contain a value for LastError, so I doubt I can take advantage of any indexes here. The table (when uncompressed) has about 46 gigs of data in it, however the majority of that data is in a text field called html. I believe simply loading and unloading that many pages is causing the slowdown. One idea would be to make a new table with just the Id and the html field, and keep Indexer.Pages as small as possible. However, testing this theory would be a decent amount of work since I actually don't have the hard disk space to create a copy of the table. I'd have to copy it over to another machine, drop the table, then copy the data back which would probably take all evening. Ideas? I'm using Postgres 9.0.0. UPDATE: Here's the schema: CREATE TABLE indexer.pages ( id uuid NOT NULL, url character varying(1024) NOT NULL, firstcrawled timestamp with time zone NOT NULL, lastcrawled timestamp with time zone NOT NULL, recipeid uuid, html text NOT NULL, lasterror character varying(1024), missingings smallint, CONSTRAINT pages_pkey PRIMARY KEY (id ), CONSTRAINT indexer_pages_uniqueurl UNIQUE (url ) ); I also have two indexes: CREATE INDEX idx_indexer_pages_missingings ON indexer.pages USING btree (missingings ) WHERE missingings > 0; and CREATE INDEX idx_indexer_pages_null ON indexer.pages USING btree (recipeid ) WHERE NULL::boolean; There are no triggers on this table, and there is one other table that has a FK constraint on Pages.PageId.

    Read the article

  • Does (size_t)((char *)0) ever not evaluate to 0?

    - by Bruce Christensen
    According to the responses in "Why subtract null pointer in offsetof()?" (and my reading of K&R), the C standard doesn't require that (size_t)((char *)0) == 0. Still, I've never seen a situation where casting a null pointer to an integer type evaluates to anything else. If there is a compiler or scenario where (size_t)((char *)0) != 0, what is it?

    Read the article

  • WCF service hosted in IIS7 with administrator rights?

    - by Allan Baker
    Hello, How do I grant administrator rights to a running WCF service hosted in IIS7? The problem is, my code works fine in a test console application runned as an administrator, but the same code used from WCF service in IIS7 fails. When I run the same console test application without admin rights, code fails. So, how do I grant admin rights to a WCF service hosted in IIS7? Do I grant admin rights to IIS7 service? Can I grant rights to a specific WCF service? How do I do 'Run as an administrator' on IIS7 or specific website? Thanks! (That's the question, here is a more detailed description of a situation: I am trying to capture frames from a webcam into a jpg file using Touchless library, and I can do that from a console application with admin rights. When I run that same console app without admin rights I cannot access a webcam in code. Same thing happens in a WCF service with the same code.)

    Read the article

  • Failover or load balancing configuration on Apple Xserve and Mac OS X Server Snow Leopard (10.6)

    - by Alasdair Allan
    I'm currently installing a number of Apple Xserve boxes running Mac OS X Server (10.6). After poking and prodding for a while I can't find any obvious way, or documentation telling me how, to set up the 2 ethernet ports in a failover or load-balancing configuration. There seems to be an obvious way to do link aggregation, but not failover or load-balancing? What's the default configuration if I enable both ports with the same (manually configured) IP address?

    Read the article

  • How can you make a Windows USB HDD Modify All for All Users

    - by David Allan Finch
    Hi, I use a USB HDD a lot between lots of different Windows Boxes. What I find after a while is that there get to be lots of different Permission on the files in some cases stopping me looking at files or removing them. They want Admin rights or even sometimes you need to put the disk back into the original machine with the original user. This is a right pain. Is there away of making the disk have Modify All for All Users and making this the default for all files on the disk. Thanks

    Read the article

  • Identifying and Resolving Oracle ITL Deadlock

    - by Allan
    I have an Oracle DB package that is routinely causing what I believe is an ITL (Interested Transaction List) deadlock. The relevant portion of a trace file is below. Deadlock graph: ---------Blocker(s)-------- ---------Waiter(s)--------- Resource Name process session holds waits process session holds waits TM-0000cb52-00000000 22 131 S 23 143 SS TM-0000ceec-00000000 23 143 SX 32 138 SX SSX TM-0000cb52-00000000 30 138 SX 22 131 S session 131: DID 0001-0016-00000D1C session 143: DID 0001-0017-000055D5 session 143: DID 0001-0017-000055D5 session 138: DID 0001-001E-000067A0 session 138: DID 0001-001E-000067A0 session 131: DID 0001-0016-00000D1C Rows waited on: Session 143: no row Session 138: no row Session 131: no row There are no bit-map indexes on this table, so that's not the cause. As far as I can tell, the lack of "Rows waited on" plus the "S" in the Waiter waits column likely indicates that this is an ITL deadlock. Also, the table is written to quite often (roughly 8 insert or updates concurrently, as often as 240 times a minute), so and ITL deadlock seems like a strong possibility. I've increased the INITRANS parameter of the table and it's indexes to 100 and increased the PCT_FREE on the table from 10 to 20 (then rebuilt the indexes), but the deadlocks are still occurring. The deadlock seems to happen most often during an update, but that could just be a coincidence, as I've only traced it a couple of times. My questions are two-fold: 1) Is this actually an ITL deadlock? 2) If it is an ITL deadlock, what else can be done to avoid it? Cross-posted from Stack Overflow. Deadlocks are normally a programming problem, but ITL deadlocks relate directly to how Oracle writes to disk, so this may be an area where DBAs have more experience.

    Read the article

  • How do I configure an ordinary TV remote control to work with lirc on Linux?

    - by Allan Lewis
    I am running MythTV on Ubuntu 9.10 and I would like to use a TV remote to control it. I know that lirc needs a configuration file for the remote, but none of my remotes is in the official database. If I point a remote at the receiver on my TV card (a Pinnacle PCTV "Solo", model 72e) and press a button, dmesg logs the code generated by the remote, so I assume I just have to make a config file with a list of commands assigned to these codes. I've read a few how-tos but I still don't understand exactly how to create the config file. Some of the guides I've read refer to IR receivers on TV cards working at a "higher level of abstraction", which I take to mean that they decode the signal and provide a code, like the ones I can see in dmesg, rather than just giving raw data, but none of them explain where to go from there! Any help would be greatly appreciated!

    Read the article

  • Exchange DiskShadow/Robocopy backup does not purge log files

    - by Robert Allan Hennigan Leahy
    I have a series of scripts setup to backup my Exchange. The following command is executed to start the process: diskshadow /s C:\Backup_Scripts\exchangeserverbackupscript1.dsh This is exchangeserverbackupscript1.dsh: #DiskShadow script file set verbose on #delete shadows all set context persistent writer verify {76fe1ac4-15f7-4bcd-987e-8e1acb462fb7} set metadata C:\Backup_Scripts\shadowmetadata.cab begin backup add volume C: alias SH1 create expose %SH1% P: exec C:\Backup_Scripts\exchangeserverbackupscript1.cmd end backup delete shadows exposed P: exit #End of script And this is exchangeserverbackupscript1.cmd: robocopy "P:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group" "\\leahyfs\J$\E-Mail Backups\Day 1" /MIR /R:0 /W:0 /COPY:DT /B This is not causing Exchange to purge its log files. The edb file is 4.7 gigabytes, but the First Storage Group folder itself is 50+ gigabytes due to many, many log files for each day going back to 2009. Is there any way -- I've Googled and haven't found anything -- to notify Exchange when I've completed a full backup, and have it purge its log files? According to this and this, end backup should cause Exchange to "flush the transaction logs for that storage group" but only "if a successful backup of a storage group occurred", which leaves my question as: What constitutes a "successful backup", and why is what I'm doing not it?

    Read the article

  • How to make local drive available in apache localhost

    - by Ronald Allan
    How can I make my "Drive D:" "Drive E" available in localhost. I'm running apache on my backtrack machine. My default is /var/www/. Every directory I created inside the /var/www/ is available and all working fine. Let's say I created /var/www/PENTEST/ the contents of that PENTEST directory can be accessed through: localhost/PENTEST/ How can I make this work: localhost/media/DATA/ The /media/DATA/ is my DRIVE D: I edited this: ServerAdmin webmaster@localhost DocumentRoot /media/DATA/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /media/DATA/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> Still not working. I'm getting 404. # # I figured it out. Thank for the post of "RiggsFolly" which can be found here: http://forum.wampserver.com/read.php?2,89163. I just have to change this: ServerAdmin webmaster@localhost DocumentRoot /media/DATA/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /media/DATA/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> Into this: ServerAdmin webmaster@localhost DocumentRoot D:/media/DATA/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory D:/media/DATA/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory>

    Read the article

  • Can a device (WAP or switch) be configured as an 802.1x supplicant?

    - by Allan Ross
    We are looking at implementing 802.1x on a wired/wireless network. What I am looking for is a device that can act as a supplicant and once authenticated on the network, is able to pass traffic from any downstream connected device. The point of doing this would be to allow a properly pre-configured device to be provided to a client user who could then connect any device on the downstream side of the device. We will be able to manage the aggregate traffic on the device without concern for what is connected on the far side. Am I dreaming; does every device out there support this and I just don't know it or is reality fall somewhere in the middle?

    Read the article

  • ipv6 auto configuration not working in ubuntu natty

    - by allan ruin
    In win7, my computer can automatically get a IPV6 global address and use ipv6 network, but in ubuntu natty, I can't find out how to let stateless configuration work. My network is a university campus network,so I don't need tunnels. I think if one thingg can silently and successfully complished in windows it shouldn't be impossible in linux. I did can manually edit /etc/network/interfaces and use a static ipv6 address, and I can use ipv6 this way, but I just want to use auto-configuration. I found this post: How to disable autoconfiguration on IPv6 in Linux? and try sudo sysctl -w net.ipv6.conf.all.autoconf=1 sudo sysctl -w net.ipv6.conf.all.accept_ra=1 but no luck

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >