有没有人知道网上或书上的任何好资源哪里可以找到维特比解码器的解释或如何使用格子图解码接收的比特序列的教程?
谢谢!
我正在尝试为相机预览开发自定义小部件.我想用相机预览填充屏幕并在其上绘制一些按钮.
我试图通过以下方式创建自定义窗口小部件:
import java.io.IOException;
import android.content.Context;
import android.hardware.Camera;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
class CapturePreview extends SurfaceView implements SurfaceHolder.Callback {
SurfaceHolder mHolder;
Camera mCamera;
CapturePreview(Context context) {
super(context);
// Install a SurfaceHolder.Callback so we get notified when the
// underlying surface is created and destroyed.
mHolder = getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
public void surfaceCreated(SurfaceHolder holder) {
// The Surface has been created, acquire the camera and tell it where
// to draw.
mCamera = Camera.open();
try {
mCamera.setPreviewDisplay(holder);
} catch (IOException …Run Code Online (Sandbox Code Playgroud) 我想将预览框保存为jpeg图像.
我试过写下面的代码:
public void onPreviewFrame(byte[] _data, Camera _camera)
{
if(settings.isRecording())
{
Camera.Parameters params = _camera.getParameters();
params.setPictureFormat(PixelFormat.JPEG);
_camera.setParameters(params);
String path = "ImageDir" + frameCount;
fileRW.setPath(path);
fileRW.WriteToFile(_data);
frameCount++;
}
}
Run Code Online (Sandbox Code Playgroud)
但是无法将保存的文件作为jpeg图像打开.有谁知道如何将预览帧保存为jpeg图像?
谢谢
程序员通常不太关注用户界面,而是更多地关注功能,但用户首先要根据其外观来判断产品,因此有必要为Web,桌面和移动应用程序提供良好的用户界面.
就个人而言,我不喜欢花费太多时间进行用户界面设计,有时会尝试寻找一些示例然后修改现有设计.
有没有人知道任何优秀的网络资源与Web,桌面和移动设备的用户界面集合?
我试图从连接表中划分两列,但结果(列relative_duration的值)始终为0.查询如下:
SELECT t1.[user_1]
,t1.[user_2]
,t1.[total_duration]
,(t1.total_duration/t2.[total_events_duration]) AS relative_duration
FROM [CDRs].[dbo].[aggregate_monthly_events] AS t1 INNER JOIN [CDRs].[dbo].[user_events_monthly_stats] AS t2 ON t1.[user_1] = t2.[user_1]
Run Code Online (Sandbox Code Playgroud)
有谁知道在上面的查询中可能出现什么问题以及如何修复它以便将表t1中的total_duration列与表t2中的total_events_duration列分开?
顺便说一下,我试图用减法代替除法("/"用" - "代替),在这种情况下,列relative_duration不是0.
我正在Windows Mobile设备上创建一个视频捕获应用程序.在MainFrame中有菜单和状态窗口(自定义窗口).视频大小宽度:高度比为4:3,因此在屏幕上有一些其他元素的情况下,视频不会填满整个区域.
这是安排屏幕元素的功能:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
ToggleFullScreen(TRUE);
CScreenOrientation::SetScreenOrientation(270);
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
RECT r;
GetWindowRect(&r);
if (!m_wndStatus.Create(NULL, NULL, WS_CHILD | WS_VISIBLE,
CRect(0, 0, r.right, TOOLBAR_HEIGHT), this, AFX_IDW_PANE_FIRST + 1, NULL))
{
TRACE0("Failed to create status view\n");
return -1;
}
// Create a camera view
if (!m_wndCameraView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
{
TRACE0("Failed to create camera view\n");
return -1;
}
m_wndCameraView.SetLogDirectory(m_Settings.m_LogDirectory);
if (!m_wndCommandBar.Create(this) ||
!m_wndCommandBar.AddAdornments(dwAdornmentFlags) ||
!m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME))
{
TRACE0("Failed to create CommandBar\n");
return …Run Code Online (Sandbox Code Playgroud) 我创建了一个包含几个表的数据库,一些表名用方括号括起来:[table_name]
有谁知道为什么会这样,以及如何摆脱它?
我想在Simulink中使用自定义MATLAB函数.到目前为止,我已经通过放置一个嵌入式MATLAB功能块来完成它.但是,如果自定义函数包含另一个自定义函数,则编译过程将失败.
以下是我试图嵌入模拟的函数示例:
function [c, d, iterationsCount] = decodeLDPC(y, H, variance)
Lci = initializeLq(y, H, variance);
Lr = getLr(Lci);
[Lq, c] = getLq(Lci, H, Lr);
iterationsCount = 1;
while(sum(mod(c * H', 2)) ~= 0)
Lr = getLr(Lq);
[Lq, c] = getLq(Lq, H, Lr);
iterationsCount = iterationsCount + 1;
end;
G = getGeneratorMatrix(H);
d = c/G;
Run Code Online (Sandbox Code Playgroud)
其中initializeLq和getLr是自定义函数.
有没有一种方法可以在模拟中实现上述功能?
我尝试使用广度优先算法以下列方式检索所选用户所属的整个连接群集:
CREATE PROCEDURE Breadth_First (@StartNode varchar(50), @LinkStrength decimal(10,7) = 0.1, @EndNode varchar(50) = NULL)
AS
BEGIN
-- Automatically rollback the transaction if something goes wrong.
SET XACT_ABORT ON
BEGIN TRAN
-- Increase performance and do not intefere with the results.
SET NOCOUNT ON;
-- Create a temporary table for storing the discovered nodes as the algorithm runs
CREATE TABLE #Discovered
(
DiscoveredUser varchar(50) NOT NULL, -- The Node Id
Predecessor varchar(50) NULL, -- The node we came from to get …Run Code Online (Sandbox Code Playgroud)