在剥离了美邦(Smith Barney)后,花旗集团(Citigroup Inc.)的管理层目前正在考虑如何处置另一项重要的业务。
据知情人士透露,如果花旗集团的财务状况继续恶化,该公司的管理人士将不得不考虑出售旗下墨西哥银行业务Grupo Financiero Banamex的可能性。
该人士称,花旗集团并未正式考虑出售该业务,并坚持认为,在公司削减规模后,Banamex将拥有光明的前景。但由于花旗集团在过去五个季度中出现了285.5亿美元的亏损,加上美国政府也敦促其继续削减规模,花旗集团正在考虑在必要时可以通过剥离哪项业务来获得现金。
投资银行家预计,通过出售Banamex,花旗集团至少能获得约90亿美元。Banamex曾为花旗集团2007年36亿美元的总利润贡献了约一半。
潜在买家已与花旗集团接洽,并表达了收购意愿,但花旗集团拒绝了这些买家的提议。
花旗集团发言人Jon Diat表示,花旗集团无意出售Banamex,因为该银行是未来核心业务的重点。
还没有发现类似文章
最近作了一个程序,跑在jboss上的,发现日志文件动不动就上百兆,于是找到jboss-log4j.xml,修改这部分,加上红色部分: <root> <priority value=”INFO” /> <appender-ref ref=”CONSOLE”/> <appender-ref ref=”FILE”/> </root> 日志文件一下清静了
你可能还会对这些文章感兴趣
jboss seam 自动生成代码之后,在查询界面上输入中文,查询之后中文变成乱码,查询的内容也不符。解决该问题的办法:在{jboss home} /server/default/deploy/jboss-web.deployer/ 中找到server.xml修改其中的connecter,加上红色的部分:<Connector port=”7777″ address=”${jboss.bind.address}” maxThreads=”250″ maxHttpHeaderSize=”8192″ emptySessionPath=”true” protocol=”HTTP/1.1″ enableLookups=”false” redirectPort=”8443″ acceptCount=”100″ connectionTimeout=”20000″ disableUploadTimeout=”true” URIEncoding=”UTF-8″ /> 问题解决!
你可能还会对这些文章感兴趣
red5的安装费尽周折,red5在windows上安装是没有问题的,但是在linux上安装总是出问题,因为我是在官方下载的源文件,发现还是不能用。后来才发现必须用svn下载源码才行(从目前看来,svn已经完全取代cvs了,看来开源项目转向商业化还是挺难的)。ffmpeg安装还算顺利,一天就搞定了。然后测试了几个视频,发现网速还是不够,总是会卡。怎么办?做或是不做?
你可能还会对这些文章感兴趣
总体框架使用jboss seam ,正常的在界面上输入中文,oracle存储是正常的,但是用程序写了一个批量导入,发现问题就出来了,不管数据文件格式用ASCII或者UTF8,导入到数据库里的都是乱码。怎么回事?
贴导入数据的代码:
package com.baida.beans;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.core.FacesMessages;
import org.jboss.seam.log.Log;
@Name(”categoryImportor”)
public class CategoryImportor {
@In(create=true) CategoryHome categoryHome;
@In FacesMessages facesMessages;
@Logger Log log;
private byte[] data;
public byte[] getData() {
return data;
}
public void setData(byte[] data) {
this.data = data;
}
public void importFromFile()throws IOException{
if(data == null){
facesMessages.add(”upload file has no content”);
log.debug(”upload file has no content”);
return;
}
ByteArrayInputStream in = new ByteArrayInputStream(data);
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line = reader.readLine();
while(line != null){
parse(line);
line = reader.readLine();
}
}
private void parse(String line){
String[] ss = line.split(”,”);
String categoryNo = ss[0].trim();
String categoryName = ss[1].trim();
log.info(”begin to parse category:”+categoryNo +”-”+categoryName);
Category parent = getParent(categoryNo);
Category category = new Category();
category.setCategory(parent);
category.setCategoryNo(categoryNo);
category.setCategoryName(categoryName);
categoryHome.setInstance(category);
categoryHome.persist();
}
private Category getParent(String categoryNo){
int index = categoryNo.lastIndexOf(”.”);
Category parent = null;
if(index > 0){
String parentNo = categoryNo.substring(0,index);
log.info(”try to find parent no:”+parentNo);
parent = categoryHome.getCategoryByNo(parentNo);
if(parent == null){
}
}
return parent;
}
}
在日志 中可以看到:
log.info(”begin to parse category:”+categoryNo +”-”+categoryName);
如果用ASCII格式的文本文件上传,日志里是正常的中文字符,UTf-8格式的文本就不行
终于找到关键了:
BufferedReader reader = new BufferedReader(new InputStreamReader(in,”GBK”));
我的想法是:我的界面都是utf-8编码,传到服务器端,seam认为所有的都是UTF-8编码的,于是把文件内的内容也按照UTF-8编码来处理,所以出现了乱码。我告诉java这个文件是”GBK”的,所以就不会出现乱码了。
非常感谢!!!
你可能还会对这些文章感兴趣
根据在地图上标注的经度和纬度计算两个人的距离,然后我就可以找离我20公里的范围内,有哪些人在,有兴趣可以去看看:
你可能还会对这些文章感兴趣
==========================
Frequently Asked Questions
==========================
.. contents::
.. sectnum::
—–
About Flumotion
===============
What is Flumotion ?
——————-
Flumotion is a streaming media server written in Python and based on GStreamer and Twisted.
It focuses on providing an end-to-end solution, ease of use, and easy customisation.
What does it run on ?
———————
Flumotion runs on any Unix-like platform that has the necessary requirements installed. These include:
- python 2.3
- Twisted 1.3.0 or later
- GStreamer and GStreamer Python Bindings (0.10 or later is preferred, though support for 0.8 is still available)
- GTK+ and PyGTK (for the GUI admin client)
What distribution do you recommend ?
————————————
Our hackers use Ubuntu, Fedora Core 4 and Gentoo. Using either of these will probably make it easy on you. Other distributions will work fine too, once the requirements are satisfied.
Running Flumotion
=================
When starting flumotion-manager, I get an error about a missing .pem file
————————————————————————-
::
ERROR: .pem file /etc/flumotion/default.pem does not exist
When using SSL as the communication protocol, a .pem file needs to be generated and placed in the given location.
See [http://www.flumotion.net/doc/flumotion/manual/html/chapter-security.html] for more explanation.
See [http://www.flumotion.net/doc/flumotion/manual/html/chapter-security.html#section-certificate] for how to generate it.
When starting flumotion-manager, I get an error about an unknown component type
——————————————————————————-
If the error looks like:
::
ERROR: unknown component in configuration file
‘/home/thomas/flu/svn/flumotion-template/conf/template.xml’:
unknown component type: template
This means that the manager cannot find a description of the given component type in its registry.
- Run flumotion-inspect in the same environment - this will give you a list of components that Flumotion can find. Is the component type listed ?
- If the component is a component from an add-on project, is it installed in the same location as Flumotion ? If not, did you set the FLU_PROJECT_PATH environment variable ? Correct this and verify with flumotion-inspect
Configuring Flows
=================
Can I stream and record at the same time ?
——————————————
Yes. The default scenario allows you to choose this by choosing to save to disk in the production steps. This will generate a configuration where both a disker and a streamer feed from the muxer.
Can I stream and record at different bitrates ?
———————————————–
Yes. In this case however you will have to manually adapt the configuration and create two different encoders and muxers using different bitrates. Note that this means you will use a lot more CPU since you are doing two video encodings at the same time. You may consider distributing the encoding tasks across two machines.
Can I stream and record at different resolutions/framerates ?
————————————————————-
It is possible, but there is no dedicated component (yet) for scaling down the video. You can however achieve the same effect using a pipeline-converter component with a partial GSteamer pipeline doing the scaling for you. The configuration part for this component looks like this:
.. code-block:: xml
<!– create a scaled down copy of the overlayed video for streaming –>
<component name=”overlay-video-small” project=”flumotion” type=”pipeline-converter” version=”0.4.1″ worker=”localhost”>
<source>overlay-video</source>
<property name=”pipeline”>videoscale ! video/x-raw-yuv,width=160,height=120</property>
</component>
To change the framerate of the video, you can do something similar with the videorate element. Set the pipeline property to
“videorate ! video/x-raw-yuv,framerate=25/2″ to go to 12.5 frames per second.
:trac:`browser:flumotion/trunk/conf/examples/twores.xml#latest The full configuration for this example flow` is included in the release.
Can I serve on-demand streams over HTTP ?
—————————————–
Flumotion includes a basic component called ‘http-server’ that can serve files in a path on your worker.
:trac:`browser:flumotion/trunk/conf/examples/ondemand.xml#latest The configuration for an example flow` is included in the release.
Can Flumotion stream MP3 ?
————————–
Yes it can, but not with a specific encoder component. You can use a pipeline-converter component.
.. code-block:: xml
<!– encode to MP3 –>
<component name=”mp3-encoder” project=”flumotion” type=”pipeline-converter” worker=”localhost”>
<source>audio-producer</source>
<property name=”pipeline”>lame bitrate=128</property>
</component>
Be aware that, depending on your version of gst-plugins-ugly and the settings you choose in the pipeline for lame, the sample rate may be adjusted automatically for you.
Also be aware that, if you want to stream MP3 to a Flash player, you need to make sure that it encodes to a samplerate of 11.025, 22.05 or 44.1 kHz.
Can Flumotion stream a live stream from a file ?
————————————————
It can from Ogg/Vorbis/Theora files at this point. To do this you can use a loop-producer component. This will endlessly loop the file from start to finish, creating a live stream.
Here is an example configuration:
.. code-block:: xml
<component name=”loop-producer-high” type=”loop-producer” worker=”demo1-looper”>
<property name=”framerate”>25/2</property>
<property name=”height”>284</property>
<property name=”width”>352</property>
<property name=”location”>/srv/flumotion/moto.ogg</property>
</component>
What players does Flumotion support ?
————————————-
See :trac:`wiki:Players` for more information on player support for streams served by Flumotion.
Known Problems
==============
Firewire flows not working ?
—————————-
With GStreamer release 0.10.13 and later, the firewire flow on versions of flumotion <= 0.4.2 will not work.
Debugging Flumotion
===================
Can I change Flumotion debug level on a running Flumotion process ?
——————————————————————-
Not yet; there is a ticket open for this.
Can I change GStreamer debug level on a running component ?
———————————————————–
Since 0.4.2, you can invoke a remote method to set a GStreamer debug level:
::
flumotion-command -m user:test@localhost:7531 invoke /default/ogg-muxer setGstDebug s 5
There is a bug that prevents you from setting categories, which should be fixed in 0.4.3
Hacking Flumotion
=================
I want to create an add-on project for Flumotion with my own components
———————————————————————–
Excellent ! We’ve created a flumotion-template project just for you ! Download the source releases of it from http://www.flumotion.net/src/flumotion-template/ or browse our svn: https://core.fluendo.com/flumotion/trac/browser/flumotion-template
About Cortado
=============
When I put Cortado on my web server, my log files show 404s for AudioSystem.class
———————————————————————————
Cortado tries to see if the browser’s java VM has javax. This is not a problem and can safely be ignored.
The debug log shows a line reading “javax.sound.sampled.LineUnavailableException: no Clip available”
—————————————————————————————————-
This can happen if you’re using a java binary with classpath. If we understand correctly, Classpath doesn’t actually provide a javax.sound.sampled provider for its implementation, hence cannot play back sound. See [http://www.mail-archive.com/bug-classpath@gnu.org/msg02572.html].
The debug log shows an exception containing “java.security.AccessControlException: access denied”
————————————————————————————————-
By default, unsigned applets are not allowed to open a resource (in this case, the stream or file it’s trying to play) that is located on a different hostname than the applet’s code. This is due to Java’s security model.
There are two things you can do. The easiest is to make sure that your <applet> tag refers to the cortado applet using the same domain name as your stream. The second is to sign the applet (which we have not tried ourselves).
What is the difference between the different Cortado binary jar files available in the download area?
—————————————————————————————————–
The binary packages of the recent, 0.2.x, releases are divided into a number of flavors, depending on the codecs included in the jar file:
* cortado-ov-* - include only Ogg demuxer and Vorbis decoder,
* cortado-ovt-* - include Ogg demuxer and Theora and Vorbis decoders,
* cortado-mmjs-* - include multipart demuxer, JPEG, Smoke and mulaw decoders.
The flavors are additionally divided into packages containing full debugging info (filenames containing “-debug”) and production packages with the debugging info stripped (filenames containing “-stripped”).
About Fluendo
=============
What is Fluendo ?
—————–
Fluendo is a company sponsoring and developing both GStreamer and Flumotion. Fluendo is *not* the name of the streaming server.
Unanswered Questions
====================
If you feel bold and giddy today, you can send us a question by mail if you think it should be in the FAQ. Better yet - provide us with the answer as well and we’ll review and place it in the FAQ ! How’s that for collaboration ?
你可能还会对这些文章感兴趣
安装red5的时候发现关键在于端口没有开放。。。。
永久性的修改iptables:
#vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 8443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 8088 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 1935 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 9035 -j ACCEPT
以上几个端口是red5使用的,放开他们,red5测试成功。
你可能还会对这些文章感兴趣
想在服务器上装red5,始终无法装上,后来发现一篇suse的安装文档,还是比较有用,解决了不少问题,关键就是要把编译好的文件重新拷贝到/opt/red5/文件夹中:
Installing Red5 on SUSE Linux 10.2
This howto was provided by Jake Hilton. If you see any errors please let him know so that they can be corrected. This was recently updated to reflect the new version of opensuse which is 10.2. These instructions are generic enough to work on many different linux operating systems.
The following are steps used to get Red5 running on SUSE Linux 10.2. This is the development version of red5.
Before beginning this make sure you are running these commands as root.
-
You can create a red5 user to run this under if you don’t plan on using any ports below 1000. If you need red5 to bind to ports below 1000 you need to run it as root. With the red5 user disallow login access and make the red5 user part of the root group.
-
Make sure you have downloaded and installed the latest JDK from java.sun.com
-
For this tutorial just download the .bin file. All you need to do is change the permissions of that bin file to 755 with
chmod 755 jdk-1_6_0
and then execute it.
./jdk-1_6_0
or something similar. Then once it’s done you just copy the contents of the folder it made and put them in /usr/java/jdk1.6.0
-
Then set your JAVA_HOME variable. It may have to be set two different ways. First way:
JAVA_HOME=/usr/java/jdk1.6.0
and the second way.
export JAVA_HOME=’/usr/java/jdk1.6.0′
-
-
Install Apache Ant 1.7. You may have to download that as well. Install the binary for it.
-
Download and unzip the file. Then copy the contents to a directory, something like /usr/ant. Then set your ANT_HOME variable. If it doesn’t work then don’t worry about it. We will not be using that pointer in this tutorial.
-
-
Once java and ant are all set up you simply pull the latest trunk for red5 to your box.
svn co http://svn1.cvsdude.com/osflash/red5/java/server/trunk red5-trunk
That will create a folder in your current directory called red5-trunk.
-
Navigate to the red5-trunk directory and run
/usr/ant/bin/ant
That will build the project on your machine.
-
At this point you will need to create a red5 directory in the opt directory.
mkdir /opt/red5 -
Then you will want to copy the contents of the dist(distribution) folder to /opt/red5 like so
cp -R red5-trunk/dist/* /opt/red5/
-
We need to fix the permissions on the /opt/red5 directory like so:
chown -R red5 /opt/red5
-
In addition we need need to fix the permissions on the red5.sh file like so:
chmod 755 red5.sh -
To run the server you have a few options using the red5.sh file. Navigate to /opt/red5 to make sure you are in the proper location. Then run the server by either running
sh red5.sh &or
./red5.sh &. This will start the red5 service manually. For a start and stop script look at the “Extra info” below.
-
Run
netstat -ant
and verify the correct ports are being bound to. You may need to edit the red5.properties file in the /opt/red5/conf directory if you can’t connect to your server from an external location. Try to connect to the server before you modify the properties file because you may be able to connect to it with no problems.
-
Extra info: The version compiled from source does not come with a start/stop script. I have put together one that will work with this how-to. If you run red5 as a different user this script will have to be tweaked. To put this script on your system do the following logged in as root:
cd /etc/init.d/ touch red5 chmod 755 red5 vi red5
then when you are in the red5 file push “i” to start inserting into that file and then put this code in by copying it and then pasting it with a right click of the mouse:
#! /bin/sh # # Author: Jake Hilton <red5@jakehilton.com> # /etc/init.d/red5 # # Check for missing file RED5_DIR=/opt/red5 test -x $RED5_DIR/red5.sh || exit 5 case “$1″ in start) echo -n “Starting Red5 Service” echo -n ” ” cd $RED5_DIR su -s /bin/bash -c “$RED5_DIR/red5.sh &” red5 sleep 2 ;; stop) echo -n “Shutting down red5” echo -n ” ” su -s /bin/bash -c “killall -q -u red5 java” red5 sleep 2 ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start ;; esac
Then you can simply start, stop, and restart red5 from that script by typing:
/etc/init.d/red5 start /etc/init.d/red5 stop /etc/init.d/red5 restart
按照上面的作,解决了不少问题,但是新问题又出来了:
[DEBUG] [main] org.red5.webapps.admin.UserDatabase - Shutdown Admin db
[DEBUG] [main] org.red5.webapps.admin.UserDatabase - Error in db shutdown
java.sql.SQLNonTransientConnectionException: Database ‘Admin’ shutdown.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
上面的说法大概是说red5会用derby的数据库,在关闭Admin数据库的时候出错了。
继续找解决方法。。。。



