Daily Archives

Articles indexed Wednesday December 29 2010

Page 4/33 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Web app implementation question.

    - by John Berryman
    I would like to create a web app similar to Stack Overflow in that the users will have different "point" levels and that their capabilities within the web app will be different based upon their point level. Question: How can this best be implemented? How can it be implemented in a way that is un-hackable (i.e. accessing capabilities that should not be available)? I figure there are two ways to do this: server-side and client-side. For the server-side solution, for each page request you check who the user is and have the CGI rewrite the page so that the client only gets a web page with the intended capabilities. For the client-side solution, the server gives the client the fully capable app and it is the client's job to check the point level and to handicap the app appropriately. It seems like the client-side solution would be easier on the server, (which is really important for my app), but more susceptible to someone hacking and using capabilities unwarranted by their point level.

    Read the article

  • Rails 3, changing a specific value in a row

    - by Elliot
    Hey Guys, This question seems ridiculously easy, but I seem to be stuck. Lets say we have a table "Books" Each Book, has a name, description, and a status. Lets say I want to create link in the show view, that when clicked, solely changes the status (to "read") for example. So far, I've tried adding a block in the controller, that says: def read @book = Book.find(params[:id]) @book.status = "Read" @book.update_attributes(params[:book]) respond_to do |format| format.html { redirect_to :back} format.xml { render :xml => @book } end end Then I've added a link to the view that is like: <%= link_to "Read", read_book_path(@book), :method = :put % This isn't working at all. I have added it to my routes, but it doesn't seem to matter. Any help would be great! Thanks! -Elliot EDIT: Forgot to add I'm getting a NoMethodError: undefined method `read_book_path'

    Read the article

  • RegEx to replace html entities

    - by DeltaFox
    Hi, all. I'm looking for a way to replace the bullet character in Greasemonkey. I assume a Regular Expression will do the trick, but I'm not as well-versed in it as many of you. For example, "SampleSite.com • Page Title" becoming "SampleSite.com Page Title". The issue is that the character has already been parsed by the time Greasemonkey has gotten to it, and I don't know how to make it recognize the symbol. I've tried these so far, but they haven't worked: newTitle = document.title.replace(/•/g, ""); newTitle = document.title.replace("•", ""); //just for grins, but didn't work anyway

    Read the article

  • Symfony: How to hide form fields from display and then set values for them in the action class

    - by Tom
    I am fairly new to symfony and I have 2 fields relating to my table "Pages"; created_by and updated_by. These are related to the users table (sfGuardUser) as foreign keys. I want these to be hidden from the edit/new forms so I have set up the generator.yml file to not display these fields: form: display: General: [name, template_id] Meta: [meta_title, meta_description, meta_keywords] Now I need to set the fields on the save. I have been searching for how to do this all day and tried a hundred methods. The method I have got working is this, in the actions class: protected function processForm(sfWebRequest $request, sfForm $form) { $form_params = $request->getParameter($form->getName()); $form_params['updated_by'] = $this->getUser()->getGuardUser()->getId(); if ($form->getObject()->isNew()) $form_params['created_by'] = $this->getUser()->getGuardUser()->getId(); $form->bind($form_params, $request->getFiles($form->getName())); So this works. But I get the feeling that ideally I shouldnt be modifying the web request, but instead modifying the form/object directly. However I havent had any success with things like: $form->getObject()->setUpdatedBy($this->getUser()->getGuardUser()); If anyone could offer any advice on the best ways about solving this type of problem I would be very grateful. Thanks, Tom

    Read the article

  • Bind jQuery UI autocomplete using .live()

    - by seth.vargo
    I've searched everywhere, but I can't seem to find any help... I have some textboxes that are created dynamically via JS, so I need to bind all of their classes to an autocomplete. As a result, I need to use the new .live() option. As an example, to bind all items with a class of .foo now and future created: $('.foo').live('click', function(){ alert('clicked'); }); It takes (and behaves) the same as .bind(). However, I want to bind an autocomplete... This doesn't work: $('.foo').live('autocomplete', function(event, ui){ source: 'url.php' // (surpressed other arguments) }); How can I use .live() to bind autocomplete? UPDATE Figured it out with Framer: $(function(){ $('.search').live('keyup.autocomplete', function(){ $(this).autocomplete({ source : 'url.php' }); }); });

    Read the article

  • Mac: How to see list of running network services?

    - by Jordan
    I am writing an application that needs to connect with a running network service on a Mac. Problem is, I have no idea what the service is called or even what port it uses. Is there a way to browse all running network services on my Mac? More info: I am connecting to a MIDI network session (found under 'Audio MIDI settings', present on all OSX installs). Am I correct in thinking this is a network service? I am planning to use NSNetServiceBrowser to locate all local computers running this service. (is this the best way to go about it?) Any help is much appreciated - thanks!

    Read the article

  • C++ destructor seems to be called 'early'

    - by suicideducky
    Please see the "edit" section for the updated information. Sorry for yet another C++ dtor question... However I can't seem to find one exactly like mine as all the others are assigning to STL containers (that will delete objects itself) whereas mine is to an array of pointers. So I have the following code fragment #include<iostream> class Block{ public: int x, y, z; int type; Block(){ x=1; y=2; z=3; type=-1; } }; template <class T> class Octree{ T* children[8]; public: ~Octree(){ for( int i=0; i<8; i++){ std::cout << "del:" << i << std::endl; delete children[i]; } } Octree(){ for( int i=0; i<8; i++ ) children[i] = new T; } // place newchild in array at [i] void set_child(int i, T* newchild){ children[i] = newchild; } // return child at [i] T* get_child(int i){ return children[i]; } // place newchild at [i] and return the old [i] T* swap_child(int i, T* newchild){ T* p = children[i]; children[i] = newchild; return p; } }; int main(){ Octree< Octree<Block> > here; std::cout << "nothing seems to have broken" << std::endl; } Looking through the output I notice that the destructor is being called many times before I think it should (as Octree is still in scope), the end of the output also shows: del:0 del:0 del:1 del:2 del:3 Process returned -1073741819 (0xC0000005) execution time : 1.685 s Press any key to continue. For some reason the destructor is going through the same point in the loop twice (0) and then dying. All of this occures before the "nothing seems to have gone wrong" line which I expected before any dtor was called. Thanks in advance :) EDIT The code I posted has some things removed that I thought were unnecessary but after copying and compiling the code I pasted I no longer get the error. What I removed was other integer attributes of the code. Here is the origional: #include<iostream> class Block{ public: int x, y, z; int type; Block(){ x=1; y=2; z=3; type=-1; } Block(int xx, int yy, int zz, int ty){ x=xx; y=yy; z=zz; type=ty; } Block(int xx, int yy, int zz){ x=xx; y=yy; z=zz; type=0; } }; template <class T> class Octree{ int x, y, z; int size; T* children[8]; public: ~Octree(){ for( int i=0; i<8; i++){ std::cout << "del:" << i << std::endl; delete children[i]; } } Octree(int xx, int yy, int zz, int size){ x=xx; y=yy; z=zz; size=size; for( int i=0; i<8; i++ ) children[i] = new T; } Octree(){ Octree(0, 0, 0, 10); } // place newchild in array at [i] void set_child(int i, T* newchild){ children[i] = newchild; } // return child at [i] T* get_child(int i){ return children[i]; } // place newchild at [i] and return the old [i] T* swap_child(int i, T* newchild){ T* p = children[i]; children[i] = newchild; return p; } }; int main(){ Octree< Octree<Block> > here; std::cout << "nothing seems to have broken" << std::endl; } Also, as for the problems with set_child, get_child and swap_child leading to possible memory leaks this will be solved as a wrapper class will either use get before set or use swap to get the old child and write this out to disk before freeing the memory itself. I am glad that it is not my memory management failing but rather another error. I have not made a copy and/or assignment operator yet as I was just testing the block tree out, I will almost certainly make them all private very soon. This version spits out -1073741819. Thank you all for your suggestions and I apologise for highjacking my own thread :$

    Read the article

  • How do I prevent a branch from being pushed to another branch in BZR?

    - by cabbey
    We use a dev-test-prod branching scheme with bzr 2. I'd like to setup a bzr hook on the prod branch that will reject a push from the test branch. Looking at the bzr docs, this looks doable, but I'm kinda surprised that my searches don't turn up any one having done it, at least not via any of the keywords I've thought to search by. I'm hoping someone has already gotten this working and can share their path to success. My current thought is to use the pre_change_branch_tip hook to check for the presence of a file on the test branch. If it's present, fail the commit. You may ask, why test for a file, why not just test the branch name? Because I actually need to handle the case where our developers have branched their devel branch, pulled in the shared test branch and are now (erroneously) pushing that test branch to production instead of pushing their feature branch to production. And it seems a billion times easier to look for a file in the new branch than to try to interrogate the sending branch's lineage. So has someone done this? seen it done? or do I get to venture out into the uncharted wasteland that is hook development with bzr? :)

    Read the article

  • localhost + staging + production environments?

    - by Kentor
    Hello, I have a website say www.livesite.com which is currently running. I have been developing a new version of the website on my local machine with http://localhost and then committing my changes with svn to www.testsite.com where I would test the site on the livesite.com server but under another domain (its the same environment as the live site but under a different domain). Now I am ready to release the new version to livesite.com. Doing it the first time is easy, I could just copy & paste everything from testsite.com to livesite.com (not sure its the best way to do it). I want to keep testsite.com as a testing site where I would push updates, test them and once satisfied move to livesite.com but I am not sure how to do that after the new site is launched.. I don't think copy pasting the whole directory is the right way of doing it and it will break the operations of current users on the livesite.com. I also want to keep my svn history on testsite.com. What is the correct way of doing this with SVN ? Thank you so much!

    Read the article

  • how can I convert String to SecretKey

    - by Alaa
    I want to convert String to secretKey public void generateCode(String keyStr){ KeyGenerator kgen = KeyGenerator.getInstance("AES"); kgen.init(128); // 192 and 256 bits may not be available // Generate the secret key specs. secretKey skey=keyStr; //How can I make the casting here //SecretKey skey = kgen.generateKey(); byte[] raw = skey.getEncoded(); } I try to use BASE64Decoder instead of secretKey, but I face a porblem which is I cannot specify key length. EDIT: I want to call this function from another place static public String encrypt(String message , String key , int keyLength) throws Exception { // Get the KeyGenerator KeyGenerator kgen = KeyGenerator.getInstance("AES"); kgen.init(keyLength); // 192 and 256 bits may not be available // Generate the secret key specs. //decode the BASE64 coded message SecretKey skey = key; //here is the error raw = skey.getEncoded(); SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); // Instantiate the cipher Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, skeySpec); System.out.println("msg is" + message + "\n raw is" + raw); byte[] encrypted = cipher.doFinal(message.getBytes()); String cryptedValue = new String(encrypted); System.out.println("encrypted string: " + cryptedValue); return cryptedValue; } Any one can help, i'll be very thankful.

    Read the article

  • [XNA] Forming bounding box only around visible sprites

    - by nadalian
    Hi, this site has been really amazing for helping me with game development however I'm unable to find an answer for the following question (nor am I able to solve it on my own). I am trying to do rectangle collision in my game. My idea is to 1) get the original collision bounding rectangle 2) Transform the texture (pos/rot/scale) 3) Factor changes of item into a matrix and then use this matrix to change the original collision bounds of the item. However, my textures contain a lot of transparency, transparency that affect the overall height/width of the texture (I do this to maintain power of two dimensions). My problem: How to create a rectangle that forms dimensions which ignore transparency around the object. A picture is provided below: http://img51.imageshack.us/img51/4772/boundingbox.png

    Read the article

  • how to handle multiple NSUrlResponses in iphone

    - by MaheshBabu
    hi folks, i am getting data from .net web services. I am sending two NSURlrequests to the same url, But i need to save those responses separately. for that my code is -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { if (theConnection_LOD ) { [webData_LOD appendData:data]; } if (theConnection_photo) { [webData_photo appendData:data]; } } But it does n't work how can i handle these responses. can any one pls help me. Thank u in advance.

    Read the article

  • PHP: parse $_FILES[] data in multidimesional array

    - by superUntitled
    Example form here: http://jsfiddle.net/superuntitled/uaTtx/1/ I have a form that allows for dynamic duplication of the form fields. The form allows for file uploads and text input, so the data is sent in both $_POST and $_FILES arrays. The the initial set of inputs look like this: <input type="text" name="question[1][text]" /> <input type="file" name="question[1][file]" /> <input type="text" class="a" name="answer[1][text][]" /> <input type="file" name="answer[1][file][]" /> When duplicated the fields are incremented, they look like this: <input type="text" name="question[2][text]" /> <input type="file" name="question[2][file]" /> <input type="text" class="a" name="answer[2][text][]" /> <input type="file" name="answer[2][file][]" /> To complicate matters, the "answer" form fields can also be duplicated (thus the [] at the end of the 'answer' name array. How can I parse the posted $_FILES array? I have tried something like this: foreach ($_FILES['question'] as $p_num) { echo $p_num['file']['name']; foreach ($_FILES['answer'] as $a_num) { echo $a_num['file']['name']; } } but I get an "Undefined index: file... " error. How can I parse out the posted values.

    Read the article

  • CKEditor and asp.net

    - by TheVillageIdiot
    I am using CKEditor on my page. It is working fine except when I post back. I am getting this error: A potentially dangerous Request.Form value was detected from the client (ctl00$MainContent$txtDesc="<p> &nbsp;</p> I am using this code to put CKEditor value into textbox on OnClientClick event of submit button: function getEditorValue(){ var editor=$("#<%= txtDesc.ClientID%>").ckeditorGet(); editor.updateElement(); return true; }

    Read the article

  • How to insert data in xml file using php?

    - by Nitesh
    <?xml version="1.0" encoding="UTF-8"?> <root></root> This is my xml file. I want to insert-update data using the dom method in between the tags. I am a beginner in php and Xml technologies. I successfully created and read from this file but not been able to enter data in it using php. The code for creating is as follows:- $doc = new DOMDocument('1.0', 'UTF-8'); $ele = $doc->createElement( 'root' ); $ele->nodeValue = $uvar; $doc->appendChild( $ele ); $test = $doc->save("$id.xml"); The code for reading is as follows:- $xdoc = new DOMDocument( ); $xdoc->Load("$gid.xml"); $candidate = $xdoc->getElementsByTagName('root')->item(0); $newElement = $xdoc ->createElement('root'); $txtNode = $xdoc ->createTextNode ($root); $newElement -> appendChild($txtNode); $candidate -> appendChild($newElement); $msg = $candidate->nodeValue; Can someone help out with inserting and updating. Thank You!

    Read the article

  • ASP.NET Podcast Show #144 - Windows Azure Part II - Worker Roles

    - by Wallym
    Original Url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2010/10/28/asp-net-podcast-show-144-windows-azure-part-ii-worker-roles.aspx This show is on Web & Worker Roles in Azure, Blob Storage, and the Visual Studio 2010 Azure tools. Subscribe to everything. Subscribe to WMV. Subscribe to M4V for iPhone/iPad. Subscribe to MP3. Download WMV. Download MOV. Download M4V for iPhone/iPad. Download MP3.

    Read the article

  • Get the "source network address" in Event ID 529 audit entries on Windows XP

    - by Make it useful Keep it simple
    In windows server 2003 when an Event 529 (logon failure) occures with a logon type of 10 (remote logon), the source network IP address is recorded in the event log. On a windows XP machine, this (and some other details) are omitted. If a bot is trying a brute force over RDP (some of my XP machines are (and need to be) exposed with a public IP address), i cannot see the originating IP address so i don't know what to block (with a script i run every few minutes). The DC does not log this detail either when the logon attempt is to the client xp machine and the DC is only asked to authenticate the credentials. Any help getting this detail in the log would be appreciated.

    Read the article

  • Partitioning & Linux

    - by Zac
    Every tutorial on Linux-based partitioning schemes (or, just partitioning in general) will tell you that a PC can have either 4 primary partitions, or 3 primaries and 1 extended. They will all also tell you that Linux (in my case, Ubuntu) can be installed on either. It's also come to my attention that it is not too atypical for FHS directories, such as usr/, tmp/, etc/, home/ or var/ to be mounted separately on other partitions. Several questions I am unable to find the answers to, purely for my own edification: (1) By "PC", are we really talking about common PC disk types, like IDE or SATA? I guess I'm wondering why PC uses are limited to 4 primaries or 3 primaries + 1 extended (2) I'm choking on some basic OS concepts: it is said that a partition can be mounted by a file system or an OS. So I assume this means I can somehow instruct Ubuntu to mount to 1 partition, and then any part of, say, ReiserFS, to be mounted to another partition? How? (3)(a) What about creating swap partitions? Is there too much of a good thing with swap partitioning? If I have 4GB RAM over 320GB disk, what should my swap partition size be, and why? (3)(b) Are swap files the only way to create swap partitions? Wouldn't a Linux partitioning utility allow me to define a partition as being for virtual memory only? (4) Why are partitions limited to being "mounted" by just OSes and file systems? Why couldn't I write a program to take up its own, say, 512 MB partition, and then have it invoked or uses by an OS installed on another partition? Thanks for shedding any light here... not critical that I know this stuff, but it's got me thinking incessantly. And when I think incessantly, I...can't......sleep....

    Read the article

  • Are there mapping utilities out there that will let me import geo position data (lat/long) and plot the points on a map?

    - by GregH
    I have a data file with a bunch of lat/long positions. Is there any mapping software out there (google maps, etc) that will allow me to import the positions from the file and plot them on a map? I would be this can be done through google maps but I'm not sure how to do it. I just want something that I can use quickly with a minimal amount of programming to do. I don't need to annotate anything. Just view where the points are on the map. I'm just wondering if there is something already available out there to import into google maps.

    Read the article

  • Visualising data a different way with Pivot collections

    - by Rob Farley
    Roger’s been doing a great job extending PivotViewer recently, and you can find the list of LobsterPot pivots at http://pivot.lobsterpot.com.au Many months back, the TED Talk that Gary Flake did about Pivot caught my imagination, and I did some research into it. At the time, most of what we did with Pivot was geared towards what we could do for clients, including making Pivot collections based on students at a school, and using it to browse PDF invoices by their various properties. We had actual commercial work based on Pivot collections back then, and it was all kinds of fun. Later, we made some collections for events that were happening, and even got featured in the TechEd Australia keynote. But I’m getting ahead of myself... let me explain the concept. A Pivot collection is an XML file (with .cxml extension) which lists Items, each linking to an image that’s stored in a Deep Zoom format (this means that it contains tiles like Bing Maps, so that the browser can request only the ones of interest according to the zoom level). This collection can be shown in a Silverlight application that uses the PivotViewer control, or in the Pivot Browser that’s available from getpivot.com. Filtering and sorting the items according to their facets (attributes, such as size, age, category, etc), the PivotViewer rearranges the way that these are shown in a very dynamic way. To quote Gary Flake, this lets us “see patterns which are otherwise hidden”. This browsing mechanism is very suited to a number of different methods, because it’s just that – browsing. It’s not searching, it’s more akin to window-shopping than doing an internet search. When we decided to put something together for the conferences such as TechEd Australia 2010 and the PASS Summit 2010, we did some screen-scraping to provide a different view of data that was already available online. Nick Hodge and Michael Kordahi from Microsoft liked the idea a lot, and after a bit of tweaking, we produced one that Michael used in the TechEd Australia keynote to show the variety of talks on offer. It’s interesting to see a pattern in this data: The Office track has the most sessions, but if the Interactive Sessions and Instructor-Led Labs are removed, it drops down to only the sixth most popular track, with Cloud Computing taking over. This is something which just isn’t obvious when you look an ordinary search tool. You get a much better feel for the data when moving around it like this. The more observant amongst you will have noticed some difference in the collection that Michael is demonstrating in the picture above with the screenshots I’ve shown. That’s because it’s been extended some more. At the SQLBits conference in the UK this year, I had some interesting discussions with the guys from Xpert360, particularly Phil Carter, who I’d met in 2009 at an earlier SQLBits conference. They had got around to producing a Pivot collection based on the SQLBits data, which we had been planning to do but ran out of time. We discussed some of ways that Pivot could be used, including the ways that my old friend Howard Dierking had extended it for the MSDN Magazine. I’m not suggesting I influenced Xpert360 at all, but they certainly inspired us with some of their posts on the matter So with LobsterPot guys David Gardiner and Roger Noble both having dabbled in Pivot collections (and Dave doing some for clients), I set Roger to work on extending it some more. He’s used various events and so on to be able to make an environment that allows us to do quick deployment of new collections, as well as showing the data in a grid view which behaves as if it were simply a third view of the data (the other two being the array of images and the ‘histogram’ view). I see PivotViewer as being a significant step in data visualisation – so much so that I feature it when I deliver talks on Spatial Data Visualisation methods. Any time when there is information that can be conveyed through an image, you have to ask yourself how best to show that image, and whether that image is the focal point. For Spatial data, the image is most often a map, and the map becomes the central mode for navigation. I show Pivot with postcode areas, since I can browse the postcodes based on their data, and many of the images are recognisable (to locals of South Australia). Naturally, the images could link through to the map itself, and so on, but generally people think of Spatial data in terms of navigating a map, which doesn’t always gel with the information you’re trying to extract. Roger’s even looking into ways to hook PivotViewer into the Bing Maps API, in a similar way to the Deep Earth project, displaying different levels of map detail according to how ‘zoomed in’ the images are. Some of the work that Dave did with one of the schools was generating the Deep Zoom tiles “on the fly”, based on images stored in a database, and Roger has produced a collection which uses images from flickr, that lets you move from one search term to another. Pulling the images down from flickr.com isn’t particularly ideal from a performance aspect, and flickr doesn’t store images in a small-enough format to really lend itself to this use, but you might agree that it’s an interesting concept which compares nicely to using Maps. I’m looking forward to future versions of the PivotViewer control, and hope they provide many more events that can be used, and even more hooks into it. Naturally, LobsterPot could help provide your business with a PivotViewer experience, but you can probably do a lot of it yourself too. There’s a thorough guide at getpivot.com, which is how we got into it. For some examples of what we’ve done, have a look at http://pivot.lobsterpot.com.au. I’d like to see PivotViewer really catch on a data visualisation tool.

    Read the article

  • Forked a project, where do my version numbers start?

    - by TheLQ
    I have forked a project and have changed lots of it. This fork isn't just a small feature change here and a buried bug fix there, its a pretty substantial change. Only most of the core code is shared. I forked this project at v2.5.0. For a while I've started versioning my fork at v3.0 . However I'm not sure if this is the right way, mainly because when that project hits v3.0, things get confusing. But I don't want to start over at v1.0 or v0.1 because that implies infancy, instability, and non-refindness of a project. This isn't true, as most of the core code is very refined and stable. I'm really lost on what to do, so I ask here: Whats the standard way to deal with this kind of situation? Do most forks start over again, bump up version numbers, or do something else that I'm not aware of.

    Read the article

  • Public Speaking in software development.

    - by mummey
    Greetings my fellow cubicle dwellers. I've found my role gradually change from "feature-maintainer" to "feature-developer". While much of the former would consist of fixing and/or updating an existing feature (and quietly grumbling about it's implementation with complete naiveté), in this new role I find: Have to communicate with immediate management to define the development requirements to turnaround the new feature Have to communicate with design to determine the user requirements of the new feature Have to communicate with QA to determine test sets for the new feature, as well as it's current state during development. Have to communicate with producers/project-managers to define remaining turnaround time as well as updates in development requirements. and finally, have to occasionally communicate with upper-management to defend the new feature and demonstrate it's minimized risk to the upcoming release. The last item is key here, and this took me a couple occasions to completely realize. In all, though, it becomes very apparent that communication skills ARE important, even or especially as such for developers who feel they 'own' the feature they're working on. All of this said, I recognize it's importance and would like to improve my skills in this area further. I enjoy one-on-one communication but find I tend to stutter a bit when speaking to any group larger than a few people I know well. Where can I find good resources to improve my own communication skills?

    Read the article

  • What is the default file system of /var/run, /var/lock

    - by Casey
    Trying to figure out if my /var/run is using disk or not. See the command output: $ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg0-root 40G 15G 26G 36% / none 3.9G 340K 3.9G 1% /dev none 3.9G 1.1M 3.9G 1% /dev/shm tmpfs 3.9G 600K 3.9G 1% /tmp none 3.9G 452K 3.9G 1% /var/run none 3.9G 0 3.9G 0% /var/lock none 3.9G 0 3.9G 0% /lib/init/rw /dev/md0 236M 59M 165M 27% /boot /dev/mapper/vg0-home 60G 58G 2.3G 97% /home

    Read the article

  • CGRect and utesting

    - by killdash10
    I am trying to add unit tests to my iPhone project in Xcode. Everything works, its great. Except when I am adding a class.m that uses CGRect (or other structs, CGPoint etc) to the unit test target (under "Compile Sources") - I am getting a compilation error: "'CGRect' undeclared (first use in this function)". I tried messing with my unit test target in various ways, but so far I haven't been able to get past this. What am I missing?

    Read the article

  • How do I achieve virtual attributes in CakePHP (using code, not SQL) as implemented in Ruby on Rails

    - by ash
    Source: http://asciicasts.com/episodes/16-virtual-attributes I'd like to achieve a similar setup as below, but in CakePHP and where the virtual attributes are created using code, not SQL (as documented at http://book.cakephp.org/view/1070/Additional-Methods-and-Properties#Using-virtualFields-1590). class User < ActiveRecord::Base # Getter def full_name [first_name, last_name].join(' ') end # Setter def full_name=(name) split = name.split(' ', 2) self.first_name = split.first self.last_name = split.last end end

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >