我需要开发一个适用于英语和日语的应用程序.
我只需要对我的应用程序进行语言更改,所有其他手机应用程序应该使用默认语言.
请帮我一些在android 2.2中使用的代码片段/ apis
在 QApplication 中,如果我们调用 exec() 那么是否会启动一个新进程/线程?
我需要在我的程序之一中以以下格式显示日期:
day - month - year "HH:MM:SS". <microseconds>
Run Code Online (Sandbox Code Playgroud)
我正在使用 Perl 5.8,我尝试使用纪元秒并将时间转换为微秒,如下所示:
my $epoch = time();
my $time1 = ($epoch - int($epoch)) *1e6
Run Code Online (Sandbox Code Playgroud)
但我得到这个输出:
25-05-2016 18:20:20.<incorrect number>
Run Code Online (Sandbox Code Playgroud) 编写以下代码来播放.wav文件,但它似乎不起作用.我想知道我是否遗漏了一些东西.
码:
#include <gst/gst.h>
#include <glib.h>
int main(int argc , char *argv[])
{
GMainLoop *loop;
GstElement *source,*audioparser,*sink,*pipeline;
GstBus *bus;
gst_init(&argc,&argv);
// create a pipeline
loop = g_main_loop_new (NULL, FALSE);
pipeline = gst_pipeline_new ("wav-player");
source = gst_element_factory_make("filesrc","file-source");
audioparser = gst_element_factory_make("wavparse","wav-parser");
sink = gst_element_factory_make("alsasink","sink1");
g_object_set (G_OBJECT (source), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_NULL);
// set location to current sourceg_object_set(G_OBJECT(source),"location",argv[1],NULL);
// add elements to bin
gst_bin_add_many(GST_BIN(pipeline),source,audioparser,sink,NULL);
gst_element_link_many(source,audioparser,sink,NULL);
// create bus
bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
gst_bus_add_watch (bus, bus_call, loop);
gst_object_unref (bus);
gst_element_set_state(pipeline, GST_STATE_PLAYING);
g_main_loop_run (loop); …Run Code Online (Sandbox Code Playgroud)