-
求符合条件的正则
2016-04-28 18:58String s = "\"1\"[2][3]\"4\""; Pattern pattern = Pattern.compile("\"(.*?)\"|\\[(.*?)\\]"); Matcher matcher = pattern.matcher(s); while(matcher.find()) { System.out.println(matcher.group(1)); System.out.println(matcher.group(2)); } 1 null null 2 null 3 4 null
学长只能帮你到这了
-
请教:缓存业务具体是如何实现的?
2016-04-22 10:14@crick77 那就先只考虑微博 + 用户信息,不考虑评论数。。。
@participants 我修改下描述,我表达能力不行,不要介意,= =
-
谈谈事件驱动模型
2016-03-24 19:50PluginManager#load() | 插件管理加载事件驱动模型 | EventManager#fireEventSynchronously(Event event) | Fire the specified event synchronously. | SynchronizedEventQueue#fireEvent(Event event) | Fires the specified event. | AbstractEventQueue#notifyListeners(Event event) | Notifies all listeners of this event queue to perform action. If this event queue object has | changed, as indicated by the hasChanged method, then notify all of its listeners and then call | the clearChanged method to indicate that this object has no longer changed. | AbstractEventListener#performAction(AbstractEventQueue eventQueue, Event event) | Performs the listener action method with the specified event queue and event. | abstract AbstractEventListener#action(Event event) 在响应的Listener中实现AbstractEventListener#action(Event event) --------------------------------------------------------------------------------------------- 1. 发出事件(是不是叫"驱动事件"专业点?) 在业务逻辑中通过EventManager#fireEventAsynchronously(Event event)发出一条事件,并通过event.type指定事件类型。 2. 监听器的实现 通过实现AbstractEventListener#getEventType()决定调用对应的Listener#action(Event)。
-
如何实现论坛的站内搜索?
2016-01-22 10:31