Posts

internationalization - Internationlization Java -

Is there any way to overwrite basic values ​​for internationalization? Example If I get a date in the EEEE format, then it will give me Sunday , but I need something like Saturday . "EEE, DD MMM, YYY" gives me Sunday, March 27, 2011 I "EEEE, MMM dd, yyyy" Give me the sun, the string used by DateFormat is defined by DateFormatSymbols an object of the object , which contains the setXXX methods, then you can try: dateformsmolds englishSomboles = dateformsimbols.getstation (locale.NGLISH) ; Date formatsmables MySmalls = (DateFormatSmumbles) EnglishSombols Clone (); String [] Days of the week = mySymbols.getWeekdays (); Work day [calendar] UNDA] = "Sunny"; MySymbols.setWeekdays (working days); Date Format F = New SimpleDormat ("EEEE, DD MMM, YYYY", MY SYMBOS); System.out.println (f.format (new date ())); This shows for me: Sun, March 27, 2011 .

Is it possible to roll your own syntax sugar (like do-notation, or arrow-notation) in Haskell? -

Well, the question is self-prudish. Suppose I want to implement some special syntax for fun. Is this possible? What equipment should I use? There is no such meta-syntax in the Haskell standard, but in GHC you can use GHC "semi-syntax" Quotes "features (which are different from the GHC's" Template Haskell "feature) and create almost any notation. This is quite low, and mainly for both Viki and Implementer, both of these points for original publication: People have used quasi-quotes to embed XML syntax, regular expressions, special string and text forms, and "JMacro is a library for programmatic generation of JavaScript code."

iphone - When to subclass UIViewController for custom subview? -

I have applied a custom code as the UIViewController subclass, but this could possibly be implemented As could be the UIView subclass. When should I subclass UIView instead of UIViewController for a subview? UIViewController ? There are any drawbacks for subclassing, when I need something to go on important logic, I In addition to this, if I am looking for some behavior that you get from the UIViewController , it is presented in the original or in the navigation controller, in addition to a UIViewController subclass. do. If you are doing something quite simple or light, then UIView subclasses is usually enough. I think that the custom buttons and table view cells make me the most often use is done. In my experience, I can see the UIViewController from UIView subclasses, but this may not be the best, it just happens to me straight-up Instead of using scene controllers, it feels a little more comfortable.

python omnicompletion in vim not working -

I'm trying to use vim on my dragon journey I think my The problem is the same but because he did not find any solution, which I am posting again. For some reason I can not get an integer to work in Python, with Python. I have set fabolous and made tag list. So I get an integer with R But not some observation for dragon: : echo & amp; Omnifunc print pythoncomplete # complete . the . There are r tags in the Vim / doc / tags> file, but there is no python (but the reason is that python is supported by default?) If I use import math I can auto-complete my .py file eg Ma to math But no method is found? So in conclusion I'm really surprised: - / - and if anybody can help ... It appears that the default objectification for the dragon ( pythoncomplete # Complete ) is not known about the build / keyword. When you type math on Ctrl-X Ctrl-O . (If you have imported "Math") you should see the available math. You need a plugin to do th...

python - Django IntegrityError -

I have a small project that I'm working on. I am writing a DJenga database to keep some data. I have a lot of people I am using my own manager and am adding ways for the committee. I have one that connects various tasks to the users in the list. These items can be assigned to many people and so on. When I do this, I am getting a Integrity error , what is the main reason? I'm getting the correct error ... items_id can not be tapped I appreciate the answer to fix it. There is an explanation about how this exception is thrown. I have been asked to catch it. But I do not dabble like those things until they should be there. Please thank you! What I need to do is clear my database to a python manage. Py sqlflush everything was fine right afterwards, then I added South to help with migration in the future. I will give careful advice because sqlflush will return your database back to the last sync_b status.

spring - j_spring_security_check not available. Please help with Spring3 login -

I'm trying to write something with safety in Spring 3. I'm trying to use the default login screen That's what everyone says that spring will be displayed for you. But two days after trying and receiving the error: / Spring-security-login was not found I left my code and changed it Given: & lt; Http auto-config = "true" & gt; & Lt; Intercept-url pattern = "/ friends / **" access = "ROLE_USER, ROLE_ADMIN" /> & Lt; Form-login login-page = "/ login.jsp" default-target-url = "/ friends / add.html" authentication-failure- url = "/ login.jsp? Authfailed = true" /> & Lt; / Http & gt; And I've added my code to login.jsp which I think I made right. I am getting this error now: HTTP status 404 - / MySpring / j_spring_security_check message / MySpring / j_spring_security_check Description The requested resource (/ MySpring / j_spring_security_check) is not available. ...

php - APACHE mod_rewrite change variable name in query string -

I am trying to change a variable name in a query string, so it is usable by my PHP code. The query gets a post from the external system, so I can not control that it is posting a variable name with one location in it. And it makes it impossible for me to use the PHP $ _ GET function. Change me from variable% 20name to ? New1 and I need to convert variable 2 to new 2 Many variables have been passed in the query, but only these two need to be changed . ? Variable% 20name = abc and variable2 = xyz need to end as ? New1 = abc and new2 = xyz In addition, they will not be in this order and can be more variable then? Variable% 20name = abc & blah = 123 & amp; Blah2 = 456 & amp; Variable 2 = xyz ? New1 = abc and new2 = xyz or ? May end as new1 = abc & blah = 123 & amp; Blah2 = 456 & amp; New2 = xyz Will be cured in any way! Please pars me the query mod_rewrite The string with mod_rewrite is a bit of a pain, it should be done...