Wednesday, November 12, 2014

Thinking about multi reply table in oracle~!



In these days, people want to spend their more time with mobile than Pc.
Pc resolution is very high. so it is very readable in short time.
Mobile resolution size is smaller than PC. so paradigm of design is simple.
It seems that people like if something is so simple.
what I want to say is multi reply system is not many used in these days.

but I have to know how to think and make table for multi reply in board.

one way : 


column : id
subcolumn : parent id, title

Id is unique value
and parent id indicate Id
and more and more

this architecture can make limitless depth replies.

query can express by using oracle grammer connect by


In my opinion

advantage : formal and readable
disadvantage : many article, connect by spend much time to query



the other recommendable way : 

column : id
subcolumn : order_id, title, root_comment_id, depth


I want to show you ex)..

id                                   title,        depth  depth_order     root_comment_id
00000000001               root title            0     1                   00000000001  
00000000002                title                1       1                   00000000001  
00000000003                title               2        1                   00000000001
00000000004                title               2        2                   00000000001 
00000000005                root title         0        1                  00000000002 


select * from table order by root_comment_id desc, depth asc, depth_order desc


Anyway there are lots of way you can make.

what kind of way to choose is up to you~!


 

angular infinite $digest loop error solution

I used ui.router and someday i found out
error console show me this error

10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 32; oldVal: 31"],["fn: $locationWatch; newVal: 33; oldVal: 32"],["fn: $locationWatch; newVal: 34; oldVal: 33"],["fn: $locationWatch; newVal: 35; oldVal: 34"],["fn: $locationWatch; newVal: 36; oldVal: 35"]]

and I debug for whole day and gave up.

after debugging, I seached on internet and many people face with this problem.

and I finally fix the error

Before if I used location.href='#/xxxxxx'
and changed is $location.path(realpath);

Tuesday, November 11, 2014

mobile Html page box-sizing




if you want to muliline ellipsis effect


  1. overflow: hidden;
  2. text-overflow: ellipsis;
  3. display: -webkit-box;
  4. -webkit-line-clamp: 3;
  5. -webkit-box-orient: vertical;
  6. word-wrap: break-word;



this would be a solution for you

Thursday, November 6, 2014

Iscroll 4.2.5 in iput, textarea, select focus issue

I used I scroll and It was very good.

and I can't complete mobile web project because in Iscroll div I can't touch and input, textarea, select never clicked.

I find some article that somebody shared..

and all the things that I saw internet was not working.
and tried to find more and more

this is my solution

onBeforeScrollStart: function (e) {
var nodeType = e.explicitOriginalTarget ? e.explicitOriginalTarget.nodeName.toLowerCase():(e.target ? e.target.nodeName.toLowerCase():'');
if(nodeType !='select' && nodeType !='option' && nodeType !='input' && nodeType!='textarea') e.preventDefault();
},

Iscroll 4.2.5 scroll has some how issue during scrolling

Today I tried to using I Scroll 4.2.5 for pullup to morelist and pulldown to refresh
But I was in trouble because if you scroll when it is already scrolling
page will refresh and you can see the position of scroll will be strange..


anyway I had to fix it

What i Changed code is


_start : .....

if (x != that.x || y != that.y) {
/**
* hanwha 주석 2014-11-06 더블 스크롤시 화면이 튕기는 현상 제거
*
* david
*/
//if (that.options.useTransition) that._unbind(TRNEND_EV);
//else cancelFrame(that.aniTime);
// that.steps = [];
// that._pos(x, y);
if (that.options.onScrollEnd) that.options.onScrollEnd.call(that);
}

this source is called when you are willing to scroll during scrolling.
in other word. double scrolling..

I hope to remever these things so

If you guys are faced with this problem.
remove that source.

Thursday, October 23, 2014

this article is about ajax and and using proxy server with apache httpd

I wanted to try get ajax data from other site..
and Chorme and WebBrowser told me that cross domain security so I can't access
this url...
there is good solution when you develope different site and test it




changed apache conf.htttp ~!!!


LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off
<Proxy *>
            Order deny,allow
                Allow from all
                SetEnv force-proxy-request-1.0 1
                SetEnv proxy-nokeepalive 1
                SetEnv proxy-initial-not-pooled 1

</Proxy>

ProxyPass /neo http://192.168.123.171:8080/neo
ProxyPassReverse /neo http://192.168.123.171:8080/neo

Wednesday, October 22, 2014

Jquery extend function

This is somehow good when extend data and overwrite

var object1 = {
apple: 0,
banana: { weight: 52, price: 100 },
cherry: 97
};
var object2 = {
banana: { price: 200 },
durian: 100
};
// Merge object2 into object1
$.extend( object1, object2 ); object1 data {"apple":0,"banana":{"price":200},"cherry":97,"durian":100}