小编ger*_*789的帖子

算法 - 多个研讨会和时间框架之间的理想分配

我正在寻找一种算法来解决以下问题:

假设我正在组织一个有300名与会者和6个研讨会的课程,分为3个时间框架.

每位与会者都必须在网站上注册,并选择他想参加的3个研讨会,以及2个预备选择.

研讨会在时间范围内随机分配,大多数研讨会在多个时间框架内进行.与会者在研讨会之后的时间框架无关紧要.

该算法需要在不同的时间范围内生成理想的参与者传播,以便他们尽可能地获得最喜欢的研讨会......

我可以使用哪种技术来产生这种传播?我可以使用ActionScript或PHP来完成吗?有没有人有一个很好的例子?

非常感谢你的帮助!

php algorithm math prolog actionscript-3

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

生成动态docx文档

我正在寻找一种使用PHP生成docx文件的方法.

我使用过PHPWord,但这对我的项目来说还不够.它没有足够的元素,模板引擎太基础了.

我的系统必须能够:

  • 嵌套表
  • 合并表格单元格
  • 循环模板
  • 组合/嵌套模板

有什么好的解决方案吗?有没有人有这方面的经验?

谢谢!

php templates docx

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

在iPhone 5上测试时加载图像时出错

我正在尝试在TableCell上设置图像.

这是我的代码:

public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
{
    UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
    Parking parking = (tableItems.ToArray () [indexPath.Row] as Parking);

    if (cell == null) {
        cell = new UITableViewCell(UITableViewCellStyle.Subtitle, cellIdentifier);
    }

    cell.TextLabel.Text = parking.Name;

    UIImage img = UIImage.FromBundle ("occupied");
    cell.ImageView.Image = img;

    cell.DetailTextLabel.Text = parking.GenerateSubtitle ();
    cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;

    return cell;
}
Run Code Online (Sandbox Code Playgroud)

这在模拟器上测试时工作得很好,但是当我尝试在iPhone 5上调试它时,我收到此错误:

System.InvalidCastException: Cannot cast from source type to destination type.
  at MonoTouch.UIKit.UIImage.FromBundle (System.String name) [0x0001e] in         /Developer/MonoTouch/Source/monotouch/src/UIKit/UIImage.g.cs:198
  at parko_iphone.MainTableSource.GetCell (MonoTouch.UIKit.UITableView tableView,     MonoTouch.Foundation.NSIndexPath indexPath) …
Run Code Online (Sandbox Code Playgroud)

c# ios xamarin

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

Xampp虚拟主机 - 访问被拒绝

我正在我的笔记本电脑上运行XAMPP服务器而我正在尝试设置虚拟主机.

我的hosts文件看起来像这样:

127.0.0.1      localhost
127.0.0.1      localhost.com
127.0.0.1      ehc.local
127.0.0.1      bal.local
Run Code Online (Sandbox Code Playgroud)

httpd-vhosts.conf文件如下所示:

NameVirtualHost *:80
<VirtualHost ehc.local:80>
   DocumentRoot "C:/wamp/EHC/src/main/php/www"
   ServerName ehc.local
   SetEnv APPLICATION_ENV "local"

   <Directory "C:/wamp/EHC/src/main/php/www">
      Options Indexes MultiViews FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
   ErrorLog "logs/ehc.dev-error_log"
   CustomLog "logs/ehc.dev-access_log" common
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

当我浏览到'ehc.local'时,我只得到默认的403错误页面.

我怎样才能解决这个问题?

谢谢!

apache xampp

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

标签 统计

php ×2

actionscript-3 ×1

algorithm ×1

apache ×1

c# ×1

docx ×1

ios ×1

math ×1

prolog ×1

templates ×1

xamarin ×1

xampp ×1