Search Results

Search found 125 results on 5 pages for 'heaps'.

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

  • Disable comments / Spam protection

    - by SamIAm
    My client site is built in Silverstripe, there is a news page, and it allows people to leave comments. Unfortunately we've got loads of spam emails. I'm new to this, is there any way we can disable the comment field by default? How do I do it? Alternatively is there easy way for me to install a spam protection? Thanks heaps. Sam Update - Because this is someone else's code, I just realised that they have some sort of spam protection already, so we are trying to disable comments now. I have manage to set no comment as default by changing file BlogEntry.php static $defaults = array( "ProvideComments" => true, 'ShowInMenus' => false ); to static $defaults = array( "ProvideComments" => false, //changed 'ShowInMenus' => false ); Am I on the right track to disable comments by default? Also how can I stop on the news page showing xxx comments link? eg Test Posted by Admin on 21 June 2011 | 3 Comments Tags: P This is a test.... 3 comments | Read the full post Thanks. S:)

    Read the article

  • Java Spotlight Episode 98: Cliff Click on Benchmarkings

    - by Roger Brinkley
    Interview with Cliff Click of 0xdata on benchmarking. Recorded live at JFokus 2012. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link:  Java Spotlight Podcast in iTunes. Show Notes News Bean Validation 1.1 Java EE 7 Roadmap Java JRE Update 7u7 and 6u35 available. Change to Java SE 7 and Java SE 6 Update Release Numbers JCP 2012 Award Nominations Announced Griffon JavaFX Plugin Events Sep 3-6, Herbstcampus, Nuremberg, Germany Sep 10-15, IMTS 2012 Conference,  Chicago Sep 12,  The Coming M2M Revolution: Critical Issues for End-to-End Software and Systems Development,  Webinar Sep 30-Oct 4, JavaONE, San Francisco Oct 3-4, Java Embedded @ JavaONE, San Francisco Oct 15-17, JAX London Oct 30-Nov 1, Arm TechCon, Santa Clara Oct 22-23, Freescale Technology Forum - Japan, Tokyo Nov 2-3, JMagreb, Morocco Nov 13-17, Devoxx, Belgium Feature Interview Cliff Click is the CTO and Co-Founder of 0xdata, a firm dedicated to creating a new way to think about web-scale data storage and real-time analytics. I wrote my first compiler when I was 15 (Pascal to TRS Z-80!), although my most famous compiler is the HotSpot Server Compiler (the Sea of Nodes IR). I helped Azul Systems build an 864 core pure-Java mainframe that keeps GC pauses on 500Gb heaps to under 10ms, and worked on all aspects of that JVM. Before that I worked on HotSpot at Sun Microsystems, and am at least partially responsible for bringing Java into the mainstream. I am invited to speak regularly at industry and academic conferences and has published many papers about HotSpot technology. I hold a PhD in Computer Science from Rice University and about 15 patents. What’s Cool Shaun Smith’s Devoxx 2011 talk "JPA Multi-Tenancy & Extensibility" now freely available at Parleys.

    Read the article

  • Directx vs XNA - Which is better for me? [closed]

    - by tristo
    Recently I got Visual Studio 2012 from visual studio 2010, although did not expect Visual Studio to 2012 to designed the way it was. Anyway I am pleased with some of VS 2012 technology and have moved all of my projects to it. At this point of time since I got VS 2012 I have been into making windows applications and other non-game activities. ALTHOUGH have recently gotten into the spirit of game development and I am planning to make a 3d comical game, shader effects, not too complicated meshes, but it requires alot of lighting effects to emphasise certain parts of the game. When I was using VS 2010 I had a great time making 2d games with XNA, it uses a great language, and has a very awesome system. But I no longer have XNA with me, and the workarounds described in stackoverflow always gives me errors while using xna. Anyway it seems that microsoft have stuffed themselves up with xna anyway with the weirdness of Windows 8, and it being only avaliabe on pc and xbox. Due to these reasons I have decided to work with Directx and Direct3d to produce my new game, although the overflowing credits after each directx game gives me the shivers, and the low-level coding of directx also puts me on thin ice with my games, left in a confusional mess with what decision I should make. I don't know anything about directx or direct3d. I am an indie developer, but I am planning to take on alot of professional aspects of games. I don't have heaps of time(2-3 hours a day) I don't mind the complexity of how directx works, as long as I can learn how to make the fundementals of a game in a week. I am also unsure if directx is really for my situation, and keep with xna game development. Anyone can tell me the best technology for me would be great.

    Read the article

  • Implementing Linked Lists in C#

    - by nijhawan.saurabh
    Why? The question is why you need Linked Lists and why it is the foundation of any Abstract Data Structure. Take any of the Data Structures - Stacks, Queues, Heaps, Trees; there are two ways to go about implementing them - Using Arrays Using Linked Lists Now you use Arrays when you know about the size of the Nodes in the list at Compile time and Linked Lists are helpful where you are free to add as many Nodes to the List as required at Runtime.   How? Now, let's see how we go about implementing a Simple Linked List in C#. Note: We'd be dealing with singly linked list for time being, there's also another version of linked lists - the Doubly Linked List which maintains two pointers (NEXT and BEFORE).   Class Diagram Let's see the Class Diagram first:     Code     1 // -----------------------------------------------------------------------     2 // <copyright file="Node.cs" company="">     3 // TODO: Update copyright text.     4 // </copyright>     5 // -----------------------------------------------------------------------     6      7 namespace CSharpAlgorithmsAndDS     8 {     9     using System;    10     using System.Collections.Generic;    11     using System.Linq;    12     using System.Text;    13     14     /// <summary>    15     /// TODO: Update summary.    16     /// </summary>    17     public class Node    18     {    19         public Object data { get; set; }    20     21         public Node Next { get; set; }    22     }    23 }    24         1 // -----------------------------------------------------------------------     2 // <copyright file="LinkedList.cs" company="">     3 // TODO: Update copyright text.     4 // </copyright>     5 // -----------------------------------------------------------------------     6      7 namespace CSharpAlgorithmsAndDS     8 {     9     using System;    10     using System.Collections.Generic;    11     using System.Linq;    12     using System.Text;    13     14     /// <summary>    15     /// TODO: Update summary.    16     /// </summary>    17     public class LinkedList    18     {    19         private Node Head;    20     21         public void AddNode(Node n)    22         {    23             n.Next = this.Head;    24             this.Head = n;    25     26         }    27     28         public void printNodes()    29         {    30     31             while (Head!=null)    32             {    33                 Console.WriteLine(Head.data);    34                 Head = Head.Next;    35     36             }    37     38         }    39     }    40 }    41          1 using System;     2 using System.Collections.Generic;     3 using System.Linq;     4 using System.Text;     5      6 namespace CSharpAlgorithmsAndDS     7 {     8     class Program     9     {    10         static void Main(string[] args)    11         {    12             LinkedList ll = new LinkedList();    13             Node A = new Node();    14             A.data = "A";    15     16             Node B = new Node();    17             B.data = "B";    18     19             Node C = new Node();    20             C.data = "C";    21             ll.AddNode(A);    22             ll.AddNode(B);    23             ll.AddNode(C);    24     25             ll.printNodes();    26         }    27     }    28 }    29        Final Words This is just a start, I will add more posts on Linked List covering more operations like Delete etc. and will also explore Doubly Linked List / Implementing Stacks/ Heaps/ Trees / Queues and what not using Linked Lists.   Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    Read the article

  • Sharepoint 2010 Managed Metadata - unable to get Term from TermSet

    - by Blakomen
    Hi guys, Having a really aggravating problem using Managed Metadata in SP2010 where I can get a Taxonomy Session, Term Store and Term set fine, but when I try to retrieve a term from the term set, I get a TermStoreOperationException which says that it "failed to read from or write to database". Does anyone have any idea as to why I can get the Term Set but not the terms? I can't quite understand why when they all reside in the same database I can get the set but not the terms within it. The code I'm using is below: TaxonomySession txSession = new TaxonomySession(site, true); TermStore termStore = txSession.DefaultSiteCollectionTermStore; TermSet termSet = termStore.GetTermSet(txField.TermSetId); TermCollection termCollection = termSet.GetTerms(xnField.InnerText.Trim(), true); //exception thrown on this line. Any ideas or insight or solutions would be really appreciated. Thanks heaps!

    Read the article

  • get img src from an img loaded dynamically using jQuery

    - by Lee
    Hey Guys (and Ladies) I am looking at getting the image name from an image with a src loaded dynamically. Basically what I am doing is using the Google chat badge on a site to live chatting. And else where on the page, I have an image saying Live Chat:Online or Live Chat:Offline. And I want this to change depending on whether I am available to chat or not. Does this make sense? Anyway, the easiest way I figure to do this would be check the img url. If the img is offline.gif then obviously I am offline. An example of a dynamically loaded img would be something like <img src="http://www.google.com/talk/service/badge/Show?encrypted_acount_id_here" /> Once this image has loaded, it loads one of the following images "http://www.google.com/talk/service/resources/offlinef.gif" "http://www.google.com/talk/service/resources/idlef.gif" "http://www.google.com/talk/service/resources/onlinef.gif" Hopefully this make sense now. Thanks heaps

    Read the article

  • IE7 float/clear bug

    - by alex
    I am having the weirdest behavior in IE7 on this page. I have a clear: left on #moored that makes sure that #content-container will expand to the height of the float: left'd #content. Of course, Firefox and IE8 do it right. The weird thing though, is in IE7, it appears that #content-container is automatically expanding to contain the #secondary-content, which it shouldn't. Even weirder is when I view with IE8 with developer tools, the boundary boxes seem to show the that the #content-container is the expanding to the height of the #secondary-container, even though the background: #fff tells a different story. The background goes to where it should, and the void is now black. I've Googled a bit and came across heaps of similar float bugs, but I don't think I've found one which offers a fix yet for this circumstance. Can anyone please help me?

    Read the article

  • Ruby CMS/blog: Mephisto vs. Radiant

    - by Candidasa
    I'm looking for a blogging tool with some light CMS features in Ruby on Rails. I mainly want something simple, but configurable. I have no need for page snippets, etc. Just your basic main blog, very good (and easy) theme support, some nice sidebar stuff, a few static pages and MetaWeblog API support. I'm thinking of either using Mephisto or Radiant CMS (everything else seems half-baked or extremely lightweight at best): http://mephistoblog.com/ http://www.radiantcms.org/ Documentation for Mephisto seems very lacking and their site is a mess. I've also read some bad things about it's stability. Radiant seems more stable in comparison and has heaps of useful plug-ins. However, it isn't designed for blogging out of the box. That has to be added as almost an after thought. Creating a custom theme also seems more cumbersome with Radiant due to the sub-page/snippet feature. Which should I choose?

    Read the article

  • Setting a cell's format using Excel 2007 Interop and C#

    - by CVertex
    I'm using the office 2007 interop assemblies to create some excel spreadsheets. There are plenty of questions on here about getting started and MSDN contains heaps of articles, like this one. The API is funky, and sometimes a bit confusing. When I set a value of a cell, is there a way to set it's format? I'd like to mark particular fields as Date's so my customer can run excel macros on them. Also, numbers would be useful. Thanks!

    Read the article

  • counter variable not working?

    - by jaycode
    Just like many things in rails, sometimes it works, sometimes it doesn't... Showing app/views/admin/products/_variant.html.erb where line #8 raised: undefined local variable or method `variant_counter' for #<ActionView::Base:0x107f7ae10> I only want to display variant_counter from partial _variant. This was the render caller code: <%= render :partial => '/admin/products/variant', :collection => product.variants %> The funny thing is, I have been using partial counter heaps number of times, somehow now I encountered this issue. Could anybody point me out what are there to find out what may went wrong?

    Read the article

  • How can developers use a similar tracking link to Google's results page?

    - by Peter Jones
    I've read heaps of pages of people trying to implement some kind of tracking system similar to the way Google reroutes search link. Eg: Search "Facebook" in Google, open in a new window, and the link changes to something like: "http://www.google.com.au/url?sa=t&source=web&cd=1&ved=0CBkQFjAA&url=http%3A%2F%2Fwww.facebook.com%2F&rct=j&q=Facebook&ei=sksZTZexJobJccXnxZYK&usg=AFQjCNHTTNi-O4Qgrg6kvGVfKJuRqbuOKw&cad=rja" I'm guessing Google tracks that click and then redirects to the actual site by reading the url parameter. What I wanted to know is if there was a simple way that you can make this kind of functionality work using an onclick event - just change the link href after being clicked to redirect? There's a few threads, but from what I could find, nobody has actually succeeded without problems or limitations. Thanks in advance.

    Read the article

  • iPad/iPhone uiSearchbar transparent background

    - by Tom
    I know this questions was asked(and solved) before, but this wont work for me. as a matter of fact, I had it already solved, but this issue came back out of nowhere and struck me on the head. I am not able to set the background of my UISearchBar transparent. I was always using: searchBar.backgroundColor = [UIColor clearColor]; [[searchBar.subviews objectAtIndex:0] removeFromSuperview]; and it worked nicely... but suddenly it stopped. could be since I upgraded my xcode-version but I am not sure. I spent a couple of hours already investigating this.. Is somebody out there to do this? please point me in the right direction. thanks heaps!!! best regards T

    Read the article

  • edit opencart header.tpl

    - by user1693350
    I'm trying to edit the header.tpl of an opencart website that uses vqmod - I need to add some more info (text) to each menu link, so basically edit the header file. I've looked into the vqmod manager and files but I can't seem to get it right. Unfortunately, whenever I try to edit the header file, the site breaks -I've tried editing the cached vqmod files as well, no luck with that. Is there a way to reset the vqmod / disable it, then edit the header.tpl and enable vqmod again? Do I need to install a new theme and start from scratch ? Thanks heaps!

    Read the article

  • An existing connection was forcibly closed by the remote host

    - by peter
    I am working with a commercial application which is throwing a SocketException with the message, An existing connection was forcibly closed by the remote host This happens with a socket connection between client and server. The connection is alive and well, and heaps of data is being transferred, but it then becomes disconnected out of nowhere. Has anybody seen this before? What could the causes be? I can kind of guess a few causes, but also is there any way to add more into this code to work out what the cause could be? Any comments / ideas are welcome. Thanks.

    Read the article

  • ASP.Net: Finding the cause of OutOfMemoryExpcetions

    - by Keith Bloom
    I trying to track down the cause of an OutOfMemory for a website. This site has ~12,000 .aspx pages and the last time it crashed I captured a memory dump using adplus. After some investigation I found a lot of heap fragmentation, there are around 100MB of Free blocks which can't be assigned. Digging deeper one of the Large Object Heaps is fragmented and the causes seems to be String interning as described [here][1] Could this be caused by the number of pages in the site? As they are all compiled they sit in memory and by looking at the dump they are interned and PINNED which I think means they stick around for a while. I would find this odd as there are many sites with more pages, but dynamic compilation could account for the growth in memory. What other methods are there for finding the cause of the memory leak? I have tried to capture a dump using adplus in hang mode but this fails and the IIS worker process get recycled. [1]: • http://stackoverflow.com/questions/686950/large-object-heap-fragmentation

    Read the article

  • List of fundamental data structures - what am I missing?

    - by jboxer
    I've been studying my fundamental data structures a bunch recently, trying to make sure I've got them down cold. By "fundamental", I mean the real basic ones. Fancy ones like Red-Black Trees and Bloom Filters are clearly worth knowing, but they're usually either enhancements of fundamental ones (Red-Black Trees are binary search trees with special properties to keep them balanced) or they're only useful in very specific situations (Bloom Filters). So far, I'm "fluent" in the following data structures: Arrays Linked Lists Stacks/Queues Binary Search Trees Heaps/Priority Queues Hash Tables However, I feel like I'm missing something. Are there any fundamental ones that I'm forgetting about? EDIT: Added these after posting the question Strings (suggested by catchmeifyoutry) Sets (suggested by Peter) Graphs (suggested by Nick D and aJ) B-Trees (Suggested by tloach) I'm a little on-the-fence about whether these are too fancy or not, but I think they're different enough from the fundamental structures (and important enough) to be worth studying as fundamental.

    Read the article

  • Adding Colours (Colors) Together like Paint (Blue + Yellow = Green, etc)

    - by glenstorey
    I'm making an iOS game using cocos2d libraries. Lets say you have two objects that have two separate colours - defined in RGB as Blue: 0,0,255 Yellow: 255,255,0 I want to add blue and yellow to make green. To over complicate things, let's say that the Blue object is bigger than the Yellow object (for the sake of argument let's say that the ratio is 2:1), I'm adding twice as much blue as yellow - how to I calculate this new (light green) colour correctly. I understand LAB * Color Space is useful for this sort of 'natural colour' kind of thing, but I'm not sure how to use it - especially in the context of a cocos2d object which (AFAIK) is limited to using RGB in its colour schemes. I'd really appreciate practical help on how to implement this. Thanks heaps!

    Read the article

  • How can I determine img width/height of dynamically loaded images in IE?

    - by Jens
    My markup is a simple div element with id 'load'. Using jQuery I then load a list of image elements into this div: $('#load').load('images.html', { }, function() { $(this).onImagesLoad({ selectorCallback: function() { ....do something.... } }); }); where images.html is a list like this: <img src='1.jpg' caption='img 1'> <img src='2.jpg' caption='img 2'> ... To ensure that all images are loaded completely, I use the onImagesLoad plugin. This, so far, works just fine on all browsers. However, on IE8 (and I assume other versions of IE also) when I then iterate over the img elements, I am unable to determine the width/height of the images loaded. The image.context.naturalWidth and naturalHeight attributes don't seem to work. How do I get a hold of the images' dimension? Thanks heaps :)

    Read the article

  • P-invoke call fails if too much memory is assigned beforehand

    - by RandomEngy
    I've got a p-invoke call to an unmanaged DLL that was failing in my WPF app but not in a simple, starter WPF app. I tried to figure out what the problem was but eventually came to the conclusion that if I assign too much memory before making the call, the call fails. I had two separate blocks of code, both of which would succeed on their own, but that would cause failure if both were run. (They had nothing to do with what the p-invoke call is trying to do). What kind of issues in the unmanaged library would cause such an issue? I thought that the managed and unmanaged heaps were supposed to be automatically separated. The crash as far as I can tell is happening in a dynamically loaded secondary DLL from the one p-invoked into. Could that have something to do with it?

    Read the article

  • Basic javascript function

    - by McDan Garrett
    I have this function working <script type="text/javascript"> $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() - $(window).height()) { $('div#loadmoreajaxloader').show(); $.ajax({ url: "loadmore.php?wall=<?php echo $wall; ?>&lastid=" + $(".postitem:last").attr("id"), success: function(html) { if (html) { $("#postswrapper").append(html); $('div#loadmoreajaxloader').hide(); } else { $('div#loadmoreajaxloader').html('<center><font color="white">No more posts to show.</font></center>'); } } }); } }); </script> But I need to have the same stuff happening (on IOS Devices), but instead of it happening when the browser reaches the loadmoreajaxeloader div, I simply need it to happen on an onclick event on a link. Thanks heaps. Tried to add code but didn't format so here it is http://pastebin.com/p2VUqZff

    Read the article

  • Code won't exit foreach block

    - by Matt
    I've got the following C# code segment that takes a list, finds objects that are ready to update, then shoves them into a temp list, deletes from the main list, and then goes on its merry way. My issue is that the foreach block, which cycles through my main list, won't exit. TempLog.Clear(); //Ensure TempLog is empty foreach (CLogger ready in PlayerLog) { if (ready.UpdateReady == true) // Record is ready to be updated in database { TempLog.Add(ready); // Add record to templog PlayerLog.Remove(ready); // Remove from playerlog } } <---- Never reaches this point if (TempLog.Count > 0) // Just check that templog isn't empty { new Thread(Update).Start(); // Run update code } I've put heaps of debugging in, and I can watch PlayerLog start at 1, TempLog at 0, then it enters the foreach loop, picks up that the record UpdateReady flag is on, TempLog goes to 1, PlayerLog goes to 0, then it just stops.. No errors, just stops.. Thanks for the help :)

    Read the article

  • iphone/ipad with 2 side by side tables

    - by jesse001
    I want to create a view with 2 tables side by side, where selecting the row on 1 table effects the content of the other and vice versa (not parent child). My problem is how to send the request. I started with a utility app using core data, and added 2 table view controllers. I added these to the main view nib and moved the tables to the view. One table controls a list from Core Data, then on selecting a row I want it to move to the other table which is based on a mutable array. On didselectrow I want to tell the other table to update, however I can only find samples that are parent/child so involves initializing. Does anyone know of a way to do this for an active view? Thanks heaps for your help.

    Read the article

  • Javascript function programming — receiving elaborate parameters

    - by Barney
    I'm writing a Javascript function that would manipulate an array written on-the-fly and sent as a parameter. The function is written as follows: function returnJourney(animation,clean){ var properties = {}; // loads of other inane stuff for(i in animation[0]) properties[animation[0][i]] = animation[0].i; // heaps more inane stuff } The animation in question is a set of parameters for a jQuery animation. Typically it takes the format of ({key:value,key:value},speedAsInteger,modifierAsString). So to kick off initial debugging I call it with: returnJouney(({'foo':'bar'},3000),1); And straight off the bat things are way off. As far as I see it this would have returnJourney acknowledge clean === 1, and animation being an array with an object as its first child and the number 3000 as its second. Firebug tells me animation evaluates as the number 3000. What am I doing wrong?

    Read the article

  • Ordered Data Structure that allows to efficiently remove duplicate items

    - by devoured elysium
    I need a data structure that Must be ordered (adding elements a, b and c to an empty structure, will make them be at positions 0, 1 and 2). Allows to add repeated items. This is, I can have a list with a, b, c, a, b. Allows removing all ocurrences of a given item (if I do something like delete(1), it will delete all ocurrences of 1 in the structure). I can't really pick what the best data structure could be in here. I thought at first about something like a List(the problem is having an O(n) operation when removing items), but maybe I'm missing something? What about trees/heaps? Hashtables/maps? I'll have to assume I'll do as much adding as removing with this data structure. Thanks

    Read the article

  • is this code correct? [closed]

    - by davit-datuashvili
    hi i have poste this code from this title http://stackoverflow.com/questions/2896363/hi-i-have-question-here-is-pseudo-code-about-sift-up-and-sift-down-on-heaps i have following code of siftup on heap is it correct?i have put here because i have changed at old place my question and it became unreadable so i have posted here public class siftup{ public static void main(String[]args){ int p; int n=12; int a[]=new int[]{15,20,12,29,23,17,22,35,40,26,51,19}; int i=n-1; while (i!=0){ if (i==1) break; p=i/2; if (a[p]<=a[i]){ int t=a[p]; a[p]=a[i]; a[i]=t; } i=p; } for (int j=0;j<n;j++){ System.out.println(a[j]); } } } //result is this 15 20 19 29 23 12 22 35 40 26 51 17 is it correct?

    Read the article

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