小编Rad*_*lav的帖子

如何从目标c中的代码中删除按钮中的图像

我有一个按钮,并为它设置图像.如果需要,我以后如何删除该图像?这种代码的和平对我不起作用:

[sender setImage:nil forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud)

objective-c ios5

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

如何从谷歌+流中获取帖子

我需要从流中获取谷歌+帖子并在我的网站上发布.我知道谷歌没有api这样做.但是像suck http://www.friendsplus.me/这样的服务可以做到这一点.有人知道吗?

google-plus

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

通过一个进程锁定文件

我有一个应用程序,它同时运行多个进程来读取和写入文件.

private Process PrepareProcess(string workingDirName, string scriptPath, string[] args) {
        var process = new Process {
            StartInfo = {
                WorkingDirectory = workingDirName,
                FileName = scriptPath,
                Arguments = string.Format(string.Join(" ", args))
            }
        };
        return process;
    }
Run Code Online (Sandbox Code Playgroud)

我需要确保文件只能由一个进程同时修改.怎么做?

该进程将运行外部脚本,该脚本将修改文件.我无法管理如何打开文件.我需要管理运行过程.

谢谢!

.net c# process file-locking

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

Outlook中的图像宽度太宽

我正在尝试发送包含图像的HTML电子邮件.所有电子邮件客户端的图像看起来都不错,但在展望中它们太宽了.如何修复图像的最大宽度?

    <table id="cg-cmgxsgg" class="widget widget-image " width="580" data-widget-code="email-image">
   <tbody>
      <tr>
         <td align="center">
            <div><img src="http://vcap.me//file/get/ce2c1e66-2129-41e8-903c-a40300e7bbd0" width="580" alt="" style="float: none; margin-left: auto; margin-right: auto;"></div>
         </td>
      </tr>
   </tbody>
</table>
Run Code Online (Sandbox Code Playgroud)

html css html-email

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

如何从导航栏中删除后退按钮

我有那个代码.它可以添加编辑按钮到导航栏,但后退按钮仍然存在,但它变得不负责任.

UIBarButtonItem *editButton = [[UIBarButtonItem alloc] 
                               initWithTitle:@"Edit"                                            
                               style:UIBarButtonItemStyleBordered 
                               target:nil 
                               action:nil];
[[self.navigationController.navigationBar.items objectAtIndex:1] setRightBarButtonItem:editButton];

[[self.navigationController.navigationBar.items objectAtIndex:1]setHidesBackButton:YES];
Run Code Online (Sandbox Code Playgroud)

xcode objective-c ios

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

在ios restkit中格式化proglem的日期时间

我有一个.NET REST服务,它以JSON格式返回数据.一个字段是UTC的日期时间,如下所示:

"Synced":"2012-07-11T13:28:42.967"
Run Code Online (Sandbox Code Playgroud)

我想在我的iOS应用程序中获取此日期,但每次尝试我都会得到null:

NSDateFormatter *dateFormatter = [NSDateFormatter new];
[dateFormatter  setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
dateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];
NSArray *dateFormatters = [[NSArray alloc]initWithObjects:dateFormatter, nil];
[RKObjectMapping setDefaultDateFormatters:dateFormatters];
Run Code Online (Sandbox Code Playgroud)

我做错了什么?谢谢!

rest objective-c ios restkit

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

如何将MemoryStream数据写入文件

我有这个代码:

private void SaveStreamToFile(string fileFullPath, Stream stream)
    {
        if (stream.Length == 0) return;

        // Create a FileStream object to write a stream to a file
        using (FileStream fileStream = System.IO.File.Create(fileFullPath, (int)stream.Length))
        {
            // Fill the bytes[] array with the stream data
            byte[] bytesInStream = new byte[stream.Length];
            stream.Read(bytesInStream, 0, (int)bytesInStream.Length);

            // Use FileStream object to write to the specified file
            fileStream.Write(bytesInStream, 0, bytesInStream.Length);
        }
    }
Run Code Online (Sandbox Code Playgroud)

我把这个方法叫做SaveStreamToFile(@"f:\ Test.txt",memoryStream);

我收到错误:不允许文件操作.访问路径'f:\ Test.txt'被拒绝.

.net streaming c#-4.0

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

标签 统计

objective-c ×3

.net ×2

ios ×2

c# ×1

c#-4.0 ×1

css ×1

file-locking ×1

google-plus ×1

html ×1

html-email ×1

ios5 ×1

process ×1

rest ×1

restkit ×1

streaming ×1

xcode ×1