Search Results

Search found 8 results on 1 pages for 'ludicco'.

Page 1/1 | 1 

  • Git - post-receive hook with git pull "Failed to find a valid git directory"

    - by ludicco
    It's very weird but when setting a git repository and creating a post-receive hook with: echo "--initializing hook--" cd ~/websites/testing echo "--prepare update--" git pull echo "--update completed--" the hook runs indeed, but it never manage to run git pull properly: 6bfa32c..71c3d2a master -> master --initializing hook-- --prepare update-- fatal: Not a git repository: '.' Failed to find a valid git directory. --update completed-- so I'm asking myself now, how it's possible to make the hook update the clone with post-receive? in this case the user running the processes is the same, and its everything inside the user folder so I really don't understand...because if if I go manually into cd ~/websites/testing git pull it works without any problem... any help on that would be pretty much appreciated Thanks a lot

    Read the article

  • actionscript - testing actionscript via command line

    - by ludicco
    Hello, I would like to know if is there any easy way to test actionscript by using some kind of application like ruby's irb or javasctip spidermonkey where you can just open up your terminal and type the code straight away. This would be a good time saver when speaking of actionscript, since to test some syntaxes, classes, etc. you would need to compile it via fsch. but still not a good option just for quick testing, etc... Cheers

    Read the article

  • ASP.net MVC - Update Model on complex models

    - by ludicco
    Hi there, I'm struggling myself trying to get the contents of a form which is a complex model and then update the model with that complex model. My account model has many individuals [AcceptVerbs(HttpVerbs.Post)] public ActionResult OpenAnAccount(string area,[Bind(Exclude = "Id")]Account account, [Bind(Prefix="Account.Individuals")] EntitySet<Individual> individuals){ var db = new DB(); account.individuals = invdividuals; db.Accounts.InsertOnSubmit(account); db.SubmitChanges(); } So it works nicely for adding new Records, but not for update them like: [AcceptVerbs(HttpVerbs.Post)] public ActionResult OpenAnAccount(string area,[Bind(Exclude = "Id")]Account account, [Bind(Prefix="Account.Individuals")] EntitySet<Individual> individuals){ var db = new DB(); var record = db.Accounts.Single(a => a.Reference == area); account.individuals = invdividuals; try{ UpdateModel(record, account); // I can't convert account ToValueProvider() db.SubmitChanges(); } catch{ return ... //Error Message } } My problem is being how to use UpdateModel with the account model since it's not a FormCollection. How can I convert it? How can I use ToValueProvider with a complex model? I hope I was clear enough Thanks a lot :)

    Read the article

  • javascript - catch SyntaxError and run alternate function

    - by ludicco
    Hello there, I'm trying to build something on javascript that I can have an input that can be everything like string, xml, javascript and (non-javascript string without quotes) as follows: //strings eval("'hello I am a string'"); /* note the following proper quote marks */ //xml eval(<p>Hello I am a XML doc</p>); //javascript eval("var hello = 2+2;"); So this first 3 are working well since they are simple javascript native formats but when I try use this inside javascript //plain-text without quotes eval("hello I am a plain text without quotes"); //--SyntaxError: missing ; before statement:--// Obviously javascript interprets this as syntax error because it thinks its javascript throwing a SyntaxError. So what I would like to do it to catch this error and perform the adjustment method if this occurs. I've already tried with try catch but it doesn't work since it keeps returning the Syntax error as soon as it tries to execute the code. Any help would be much appreciated Cheers :) Additional Information: Imagine an external file that javascript would read, using spidermonkey, so it's a non-browser stuff(I can't use HttpRequest, DOM, etc...)..not sure if this matters, but there it is. :)

    Read the article

  • ASP.net MVC - OneToOne relationship with pluralized nomenclature

    - by ludicco
    Hi, I have an OneToOne relationship between my models Account and Company the table names are Accounts and Companies respectively. Here is a brief screenshot of the structure: http://cl.ly/1AEU Everything works well, but mysteriously when I use the OneToOne associations I have accessors like: var db = new DB(); var account = db.Accounts.First(); var company = account.Companies; // note the plural not the singular accessor So, what's happing is that even if using OneToOne association, I still get the plural accessor with "companies" and not "company", if it this is a pure object representation and not an EntitySet generated in case when it s an oneToMany relationship. Is there a way to get this nomenclature to be applied properly? Thanks a lot

    Read the article

  • Accessing object property as string and setting its value

    - by ludicco
    Hello there, I have an object in csharp from the class Account each account have a owner, reference, etc. One way I can access an accounts properties is through accessors like account.Reference; but I would like to be able to access it using dynamic string selectors like: account["PropertyName"]; just like in javascript. so I would have account["Reference"] which would return the value...but I also would like to be able to sign a new value after that like: account["Reference"] = "124ds4EE2s"; I've noticed I can use DataBinder.Eval(account,"Reference") to get a property based on a string, but using this I can't sign a value to the property. Any idea on how I could do that? Thanks a lot

    Read the article

  • Really cool way to create custom UITabBar for iPhone app?

    - by ludicco
    Hi, I am doing a lot of researching lately about how to get a different looking with nice effects UITabBar on my iPhone app, but unfortunately I am only finding things on how to replace background color etc. Well, I've checked out this app called Momento which is pretty cool and presents a very slick tabBar: So there are a couple of elements here I would like to ask you guys if you could help me by giving me the right directions on how to get a similar effect :) Arrow above items: as you can see this app has this animated arrow that runs above the selected item with a very smooth animation. Selected Stated of the item's image is not that blue-ish default one neither the default state which displays in a different shade of brown and gray version. nice Items separators with beveled vertical lines. diferrent background image for the tabBar different height for the tabBar At this point after some research I am able to set the height and background image by subclassing UITabBarController but I'm still not sure on how to accomplish the other items specially the first one related to the nice arrow effect. If someone knows about a very good tutorial on how to do this it would be great for clarifying what can or can't be done by subclassing the UITabBarController and specially if can be done in Interface Builder :) I am just starting on this world off app development for iOS so if you could help me on that it would be really appreciated Thanks a lot in advance

    Read the article

  • PHP - print content from file after manipulation

    - by ludicco
    Hello there, I'm struggling trying to read a php file inside a php and do some manipulation..after that have the content as a string, but when I try to output that with echo or print all the php tags are literally included on the file. so here is my code: function compilePage($page,$path){ $contents = array(); $menu = getMenuFor($page); $file = file_get_contents($path); array_push($contents,$menu); array_push($contents,$file); return implode("\n",$contents); } and this will return a string like <div id="content> <h2>Here is my title</h2> <p><? echo "my body text"; ?></p> </div> but this will print exactly the content above not compiling the php on it. So, how can I render this "compilePage" making sure it returns a compiled php result and not just a plain text? Thanks in advance

    Read the article

1