小编Jai*_*ken的帖子

比较英特尔Galileo和英特尔爱迪生

我是物联网的新手.我检查了英特尔网站,并通过了其他一些链接.但我无法清楚地了解英特尔Galileo和英特尔爱迪生之间有什么区别?什么时候应该用?

有谁知道一个很好的参考资源?

embedded soc intel-galileo iot intel-edison

21
推荐指数
2
解决办法
3万
查看次数

以编程方式获取Wi-Fi协议(802.11a/b/g/n)

通过WifiManager,我的Android应用程序可以获得有关Wi-Fi的大量细节.但是我没有像a/b/g/n那样获得协议类型.我有客户要求这样做.

有谁知道如何实现这一目标?(我没有选择使用adb).它将以编程方式完成.我坚信设备和路由器在连接之前已经协商了协议.所以信息与设备有关.问题是,我们如何得到它?

android network-protocols wifimanager

18
推荐指数
1
解决办法
1万
查看次数

为什么这个 Cairo 程序将 2 的幂放入内存中?

我正在尝试解决“开罗如何运作”教程中的这个额外问题。我运行了以下函数,打开 Cairo 跟踪器,发现内存已满,且为 2 的幂。这是为什么呢?

func main():
    [fp + 1] = 2; ap++
    [fp] = 5201798304953761792; ap++
    jmp rel -1
end
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

cairo-lang starknet

9
推荐指数
1
解决办法
371
查看次数

GSSendEvent - 注入触摸事件iOS

我想在iPhone中注入触摸事件.我通过网络套接字获取触摸事件的坐标.GSSendEvent似乎是不错的选择.但是,它需要GSEventRecord作为输入之一.

有谁知道如何准备GSEventRecord?我根据一些例子准备了它,但是在GSSendEvent调用之后应用程序崩溃了.

感谢任何帮助.

-(void) handleMouseEventAtPoint:(CGPoint) point
{
static mach_port_t port_;

// structure of touch GSEvent
struct GSTouchEvent {
    GSEventRecord record;
    GSHandInfo    handInfo;
} ;

struct GSTouchEvent *touchEvent = (struct GSTouchEvent *) malloc(sizeof(struct GSTouchEvent));

bzero(touchEvent, sizeof(touchEvent));

// set up GSEvent
touchEvent->record.type = kGSEventHand;
touchEvent->record.windowLocation = point;
touchEvent->record.timestamp = GSCurrentEventTimestamp();
touchEvent->record.infoSize = sizeof(GSHandInfo) + sizeof(GSPathInfo);
touchEvent->handInfo.type = getHandInfoType(0, 1);
touchEvent->handInfo.pathInfosCount = 1;
bzero(&touchEvent->handInfo.pathInfos[0], sizeof(GSPathInfo));
touchEvent->handInfo.pathInfos[0].pathIndex     = 1;
touchEvent->handInfo.pathInfos[0].pathIdentity  = 2;
touchEvent->handInfo.pathInfos[0].pathProximity = 1 ? 0x03 : 0x00;
touchEvent->handInfo.pathInfos[0].pathLocation  = point;

port_ = …
Run Code Online (Sandbox Code Playgroud)

api private touch iphone-privateapi ios

8
推荐指数
1
解决办法
6137
查看次数

崩溃CGDataProviderCreateWithCopyOfData:vm_copy失败:状态1

我正面临崩溃并出现以下错误:

"CGDataProviderCreateWithCopyOfData:vm_copy失败:状态1."

我有很多问题,你可以提供帮助.

  1. vm_copy中状态1代表什么失败?

  2. 仅当我在数据副本的内部for循环中设置断点时才会发生此崩溃.然后恢复并删除断点.如果没有断点,则执行函数但是我得到一个空白图像.即使我没有设置断点,如何捕获此类崩溃并且应用程序停止执行,我如何确保?

  3. 执行CGBitmapContextCreateImage时会出现此错误.有谁知道如何解决这个问题?

-(UIImage *) convertBitmapRGBA8ToUIImage:(UInt8**)img 
                                    :(int) width
                                    :(int) height 
{

CGImageRef inImage = m_inFace.img.CGImage;

UInt8*piData = calloc( width*height*4,sizeof(UInt8));

int iStep,jStep;
for (int i = 0; i < height; i++) 
{
    iStep = i*width*4;
    for (int j = 0; j < width; j++) 
    {
        jStep = j*4;
        piData[iStep+jStep] =img[i][j];
        piData[iStep+jStep+1] =img[i][j];
        piData[iStep+jStep+2] = img[i][j];

    }
}

CGContextRef ctx = CGBitmapContextCreate(piData,
                                         CGImageGetWidth(inImage),  
                                         CGImageGetHeight(inImage),  
                                         CGImageGetBitsPerComponent(inImage),
                                         CGImageGetBytesPerRow(inImage),  
                                         CGImageGetColorSpace(inImage),  
                                         CGImageGetBitmapInfo(inImage) 
                                         ); 

CGImageRef imageRef = CGBitmapContextCreateImage(ctx);  
UIImage *finalImage = [UIImage imageWithCGImage:imageRef];
CGContextRelease(ctx); …
Run Code Online (Sandbox Code Playgroud)

crash image objective-c cgbitmapcontextcreate ios

7
推荐指数
1
解决办法
3289
查看次数

Android注入触摸事件

我知道这是一个有点重复的问题.我已经回顾了关于SO和其他几个网站的各种问题,但找不到满足我需求的单一答案.

需求

1)我有X,Y坐标,我想创建MotionEvent并将其发送到最顶层的活动/视图.

2)我必须在我自己的应用程序中注入它.因此不应该要求Inject_Events权限.

3)虽然我有坐标,我不知道,活动或视图在那个位置.所以Activity.dispatchTouchEvent对我不起作用..(view.dispatchTouchEvent可以工作,但我不知道视图).

4)仪器也无济于事,因为它们没有单一方法在x,y位置注入触摸事件.

5)InputManager有隐藏方法injectInputEvent但我不知道如何访问injectInputEvent并编译它?

任何帮助赞赏!

android touch motionevent

7
推荐指数
2
解决办法
3590
查看次数

android获取活动中所有窗口的视图层次结构

我正在为自动化制作SKD.所以我的需求与正常的应用程序开发略有不同.

要求:获取当前活动的ViewHierarchy. 问题:当Spinner未打开时,我认为它是正确的.旋转器打开时我没有得到旋转器的细节.

我使用以下代码来获取层次结构.问题是:Spinner是否在不同的窗口中托管,这就是为什么我没有得到它?得到它的方法是什么?

    //This is how I start recursion to get view hierarchy
    View view = getWindow().getDecorView().getRootView();
    if (view instanceof ViewGroup) {
        ViewGroup group = (ViewGroup) view;
        dumpViewHierarchyWithProperties( group, 0);
    }

//Functions to get hierarchy
private  void dumpViewHierarchyWithProperties(ViewGroup group,int level) {
    if (!dumpViewWithProperties(group, level)) {
        return;
    }

    final int count = group.getChildCount();
    for (int i = 0; i < count; i++) {
        final View view = group.getChildAt(i);
        if (view instanceof ViewGroup) {
            dumpViewHierarchyWithProperties((ViewGroup) view, level …
Run Code Online (Sandbox Code Playgroud)

android view-hierarchy

6
推荐指数
1
解决办法
1886
查看次数

iOS SpringBoardServices获得UIApplication

使用otool -tV SpringBoardServices命令,我能够在SpringBoardServices框架二进制中获得C函数.

我可以看到SBFrontmostApplicationDisplayIdentifier哪个会给我最重要的应用程序的ID.这个id可以用于获取UIApplication吗?最终,我想获得最顶级的视图,即消费触摸事件及其类型如UIButton等?

任何帮助赞赏.

iphone-privateapi ios

5
推荐指数
1
解决办法
656
查看次数

Crittercism Android - 并不总是将崩溃报告发布到服务器

我有一个Android应用程序,其中包含Crittercism SDK并根据标准文档进行初始化.

我故意在流程中放置一个漏洞,我可以通过操作服务器上的数据然后将其推送到设备来使应用程序崩溃.

最近很少有用户报告崩溃,但我没有在Crittercism网站上看到它.所以我模拟了崩溃.在3次崩溃中,我在Crittercism网站上获得了2次报告,其中一次被遗漏.

我等了一天.并且由于2次崩溃,我的应用程序中的sdk集成没有问题.(在解析期间,它不是NDK和崩溃类型格式错误的JSON)与Java运行时崩溃或其他低级别崩溃无关.

有没有人面临类似的问题?我们怎能避免这种情况?

提前致谢.

android crittercism

5
推荐指数
1
解决办法
323
查看次数

为所有达尔文通知挂接 CFNotificationCenter - iOS

我正在编写一个钩子来记录系统中的所有达尔文通知。我挂钩到以下功能:

CFNotificationCenterPostNotification
CFNotificationCenterPostNotificationWithOptions
NSNotificationCenter::postNotification
NSNotificationCenter::postNotificationName
Run Code Online (Sandbox Code Playgroud)

我看到很多日志。例如,当我解锁屏幕时,它会显示 SBDeviceLockStateChangedNotification。

但我期待诸如“com.apple.springboard.lockcomplete”之类的事件或类似此处的其他事件

不知道为什么我无法捕获类似达尔文的通知。任何帮助表示赞赏。这是审查的代码

#include <notify.h>
#include <substrate.h>
#include <sqlite3.h>
#include <string.h>
#import <CoreFoundation/CFNotificationCenter.h>
//#include "CPDistributedMessagingCenter.h"
#import <CoreFoundation/CoreFoundation.h>
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>
//#import <SpringBoard/SpringBoard.h>


// init CFNotificationCenterPostNotification hook
void (*orig_CFNotificationCenterPostNotification) (
                                                   CFNotificationCenterRef center,
                                                   CFStringRef name,
                                                   const void *object,
                                                   CFDictionaryRef userInfo,
                                                   Boolean deliverImmediately
                                                   );

void replaced_CFNotificationCenterPostNotification (
                                                    CFNotificationCenterRef center,
                                                    CFStringRef name,
                                                    const void *object,
                                                    CFDictionaryRef userInfo,
                                                    Boolean deliverImmediately
                                                    ){
    NSLog(@"CFNotificationCenterPostNotification: %@", name );

    orig_CFNotificationCenterPostNotification(center,name,object,userInfo,deliverImmediately);

}

void (*orig_CFNotificationCenterPostNotificationWithOptions) (
                                                      CFNotificationCenterRef center,
                                                      CFStringRef name,
                                                      const void …
Run Code Online (Sandbox Code Playgroud)

jailbreak iphone-privateapi ios

3
推荐指数
1
解决办法
5337
查看次数

android InputManager injectInputEvent

我读过这个.我无法编译coredump给出的答案.我可以清楚地看到InputManager.java中的injectInputEvent(Android源代码).它也是公开的.但是我无法编译它.可能是它的私人api,有一种方法可以访问它..

android input

3
推荐指数
1
解决办法
4564
查看次数

即使应用程序在后台运行,如何在越狱ios设备上收听所有触摸事件

我想知道即使应用程序在后台运行,我怎样才能在越狱ios设备上收听所有触摸事件.此功能是在名为AutoTouch的应用中实现的.任何想法或建议?

events device jailbreak iphone-privateapi ios

2
推荐指数
1
解决办法
530
查看次数

iphone 4s - UIImage CGImage图像尺寸

我的崩溃只发生在4S(而不是3GS)上.我怀疑是因为@ 2x.基本上我得到原始字节的图像和操作.这是我的问题.

我加载了下面示例代码中提到的图像.最后,uiWidth应为2000,cgwidth应为2000.正确吗?(如果从相机胶卷加载图像,它仍然是真的吗?或者它的自动缩放和uiWidth将是4000?)

//test.jpg is 2000x 1500 pixels.
NSString *fileName = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"jpg"];
UIImage *image = [UIImage imageWithContentsOfFile:fileName];

int uiWidth = image.size.width;

CGImageRef cgimg = image.CGImage;

int cgWidth = CGImageGetWidth(cgimg);
Run Code Online (Sandbox Code Playgroud)

谢谢您的帮助.

size uiimage cgimage ios

1
推荐指数
1
解决办法
6336
查看次数