$ rails g model User
belongs_to
has_one
| #!/usr/bin/env ruby | |
| # encoding: UTF-8 | |
| # RUN this line on mysql before run this script | |
| # select id, name from countries INTO OUTFILE '/tmp/countries.txt'; | |
| @f = File.new('/tmp/countries.txt', 'r') | |
| @f.each do |line| | |
| splitted = line.split("\t") | |
| id = splitted[0] | |
| name_tr = splitted[1] |
| def create_domain(domain) | |
| #check availability return boolean value | |
| if check_availability(domain) | |
| domain_data = { | |
| "Years"=> 1, | |
| "RegistrantFirstName"=> "Hasan", | |
| "RegistrantLastName"=> "Calik", | |
| "RegistrantAddress1"=> "cankaya", | |
| "RegistrantCity"=> "izmir", | |
| "RegistrantStateProvince"=> "izmir", |
| => #<HTTParty::Response:0x7f33684623f8 parsed_response={"ApiResponse"=>{"Errors"=>{"Error"=>{"__content__"=>"TLD is Invalid.", "Number"=>"2011280"}}, "Warnings"=>nil, "RequestedCommand"=>"namecheap.domains.create", "CommandResponse"=>{"DomainCreateResult"=>{"Domain"=>"", "ChargedAmount"=>"0", "DomainID"=>"0", "OrderID"=>"0", "TransactionID"=>"0", "WhoisguardEnable"=>"false", "FreePositiveSSL"=>"false", "NonRealTimeDomain"=>"false"}, "Type"=>"namecheap.domains.create"}, "Server"=>"PHX01SBAPI01", "GMTTimeDifference"=>"--4:00", "ExecutionTime"=>"0.023", "Status"=>"ERROR"}}, @response=#<Net::HTTPOK 200 OK readbody=true>, @headers={"cache-control"=>["private"], "content-type"=>["text/xml; charset=utf-8"], "vary"=>["Accept-Encoding"], "server"=>["Microsoft-IIS/8.5"], "x-aspnet-version"=>["4.0.30319"], "x-powered-by"=>["ASP.NET"], "date"=>["Fri, 10 Apr 2015 08:30:48 GMT"], "connection"=>["close"], "content-length"=>["516"]}> |
| tcKimlikNoDogrula.result=true | |
| javax.mail.FolderClosedException: Lost folder connection to server | |
| at com.sun.mail.imap.IMAPFolder.checkOpened(IMAPFolder.java:457) | |
| at com.sun.mail.imap.IMAPFolder.search(IMAPFolder.java:2121) | |
| at com.kodgemisi.mailfetcher.MailFetcherImpl.fetchMails(MailFetcherImpl.java:74) | |
| at com.kodgemisi.webapps.kampci.service.MailServiceImpl.checkIfUserPassQuiz(MailServiceImpl.java:36) | |
| at com.kodgemisi.webapps.kampci.controller.TrelloController.apply(TrelloController.java:53) | |
| at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) | |
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
| at java.lang.reflect.Method.invoke(Method.java:497) |
| HTTP Status 500 - Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'org.thymeleaf.standard.processor.attr.StandardEachAttrProcessor' (userListWithItems) | |
| type Exception report | |
| message Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'org.thymeleaf.standard.processor.attr.StandardEachAttrProcessor' (userListWithItems) | |
| description The server encountered an internal error that prevented it from fulfilling this request. | |
| exception |
| package com.boot; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.boot.SpringApplication; | |
| //make sure spring boot doesn't attempt 2.1 config | |
| @SpringBootApplication(exclude={org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration.class} ) | |
| public class AppApplication { | |
| public static void main(String[] args) { | |
| SpringApplication.run(AppSecurityApplication.class, args); | |
| } | |
| } |
| # Create the JIRA user: | |
| /opt/PostgreSQL/8.4/bin/createuser -S -d -r -P -E jirauser | |
| # Create the JIRA database: | |
| /opt/PostgreSQL/8.4/bin/createdb --owner jirauser --encoding utf8 jira |
So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.
Database in a browser, a spec (Stepan Parunashvili)
What problem are we trying to solve with a sync system?
The web of tomorrow (Nikita Prokopov)