Posts

ruby - Creating categories on Jekyll driven site -

i'm having hard time understanding how generate archive pages each category use on blog. i'd user able click on category , taken page lists out articles desired category assigned. the way can think of doing manually creating specific html file each category in root. i'm sure there must more dynamic way? i have site hosted on github - https://github.com/sirbrad/sirbrad.github.com thanks in advance! brad you can generate list of available categories using site.categories data, using first element of each category (which array) category name: {% cat in site.categories %} <li>{{ cat[0] }}</li> {% endfor %} and can generate list of posts in given category so: {% post in site.categories.category_name %} it doesn't seem possible generate individual html page each category hoping, perhaps compromise generate single page containing list of categories, each category contains posts in category. use simple javascript hide posts in each...

asp.net mvc 3 - unity mvc3 - configuring using database first approach -

Image
i´ve been checking microsot unity ioc , found examples using code first approach. on other hand cannot find tutorial or configuration in order include unity ioc edmx files using database first approach. glad in shed light on it. i tried using http://unitymvc3.codeplex.com/ , using unity 2.1 directly = http://unity.codeplex.com/ sorry cannot provide code i´m confused ioc patterns , not able generate demo solution. brgds. ioc turning of object inside out instead of containing internal hard references objects (dependencies), instead same objects passed outside. turning inside out inversion of control , , injecting of objects needs dependency injection , done container (unity). all ioc containers same, have way register or discover dependencies , way resolve reference. resolution involves asking reference of fooclass , getting object in return. don't ask concrete type fooclass , instead ask ifooclass decouple usage actual type gets passed in. so in case need r...

hyperlink - FQL: stream table does not return others links -

i'm attempting posts of company page through fql query. normal posts others returned ok (posts containing text). posts company contains links returned ok. but: posts others company itself, contains link not returned stream table. does have idea why? my simple fql query: select post_id, type, actor_id, message stream source_id = 123 , updated_time >= 123 order updated_time limit 50 offset 0 you'll need links using fql query. use link table instead.

ios - iPhone app converted to iPad app shows iPhone xib not iPad xib -

i in process of converting iphone app universal app. i've changed xcode settings , added new mainwindow-ipad.xib i've hooked interface builder references (e.g. mainwindow-ipad appropriate ipad class viewcontroller, window etc) i've added new ipad class opening view controller , declared in appdelegate.h file, , synthesized them in appdelegate.m file: uiwindow *window; uiwindow *windowipad; appviewcontroller *viewcontroller; appviewcontrolleripad *viewcontrolleripad; in app delegate check device running , load appropriate class: if (ui_user_interface_idiom() == uiuserinterfaceidiompad) { // override point customization after application launch. navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:viewcontrolleripad]; // add view controller's view window , display. [windowipad addsubview:navcontroller.view]; [windowipad makekeyandvisible]; [navcontroller setnavigationbarhidden:yes animated:no]; } else { ...

java - How do I make a GUI looking like this? -

i need make gui looks 1 below have @ java tutorial . in particular, swing tutorial . need use jlabel , jbutton , jspinner jpanel organize them. if need in layout, try use matisse builder in netbeans. there similar in eclipse too.

javascript - Convert date string to date -

i have string mar 7 2012 . how convert date object, can use mydate.getdate() , mydate.getmonth() , mydate.getfullyear() etc? well, pretty simple var d =new date("march 7 2012"); document.write(d.getmonth()); //use

objective c - capitalizedString doesn't capitalize correctly words starting with numbers? -

i'm using nsstring method [mystring capitalizedstring], capitalize words of string. however capitalization doesn't work words starting numbers. i.e. 2nd chance becomes 2nd chance even if n not first letter of word. thanks you have roll own solution problem. apple docs state may not specified behavior using function multi-word strings , strings special characters. here's pretty crude solution nsstring *text = @"2nd place nothing"; // break string words separating on spaces. nsarray *words = [text componentsseparatedbystring:@" "]; // create new array hold capitalized versions. nsmutablearray *newwords = [[nsmutablearray alloc]init]; // want ignore words starting numbers. // class helps determine if string number. nsnumberformatter *num = [[nsnumberformatter alloc]init]; (nsstring *item in words) { nsstring *word = item; // if first letter of word not number (numberfromstring returns nil) if ([num numberfromstri...