问题标签 [promotions]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
519 浏览

promotions - 贵公司应该如何赞助编程认证

假设贵公司愿意赞助参加编程认证考试的费用。实现这一点的最佳方法是什么?

我会说如果程序员第一次通过考试,它应该得到全额赞助。

如果程序员没有通过第一次尝试,第二次考试应该得到 50% 的赞助。如果第三次失败,程序员应全额支付(包括前 2 次考试)。

我发现很难在自愿参加考试(对于自信的程序员)和管理层制定的强制性/政策之间取得平衡。

有人愿意分享您对此的经验/建议吗?

0 投票
6 回答
481 浏览

language-agnostic - How do I release/sell/promote a semi-commercial/open-source project?

I've got a framework for PHP that I've developed for about 3 weeks total, but it's quite ready to be released ... if I choose to do so. In this economy I cannot just take what I have done and release it for free and feel just (because I need the money it could garner), and yet I am torn by my appreciation for open source projects. I want to eat and I want to share as open source. I'm sure some understand my conundrum right off the bat.

As an example of the pros and cons of my project, here's a very quick comparison against CodeIgniter. My framework is 10x faster at the base speed (blank CI versus the basic demo of mine) and gets upto 20-30x faster elsewhere. Yet, my framework lacks many things that CI has like advanced routing (with regex, or named parameters) and ORM. If I was to compare it to a similar framework in another language, I'd call my work the Sinatra, or Ramaze, of PHP.

I need some extra income. This is a flat-out fact, and yet I don't want it to be a strictly commercial project.

I like open source, and I want to contribute my own work. Yes, I know frameworks for PHP are a dime a dozen, but I think I might have something here. So, I don't want to let my work go entirely.

So I remain torn. Licensing can help, but only when people are honest. I don't believe in putting "DRM" into my software. Yet, I don't have enough features to say, "If you donate/pay you'll get X other features!" and make a benefit to this.

How do I (can I) sell this? How do I promote it and release it as open-source for free uses? How do I license my work adequately for these purposes?

What is your general policy or tips for projects like this? Especially when you want a cut of the profit someone would get using your project commercially. What licenses, restrictions, etc, do you think would work in this model?

I appreciate any answers which might help me to figure out what to do.

Edit:

To clarify on what I'm thinking, let me add this: this is my pet project. It's something that I made because I felt its lack in the market of PHP frameworks, and have been maintaining it for my own works. But, unlike most my work, I would really like to make this public. I want people to see it, try it, use it, and work with it.

However, I've put in enough off-hours time into this for it to be just given away. I appreciate the open source model, but I don't see how I can just donate some 80+ hours of work for free for a speculative increase in my "reputation" within the software world. PHP frameworks are a dime a dozen and I think I've made a good one, but I'm sure there are just as many others who've done the same. Mine may be better, but it's got an equal or greater chance of being average to poor.

I'd love to release my pet project to the world under an open source license. But, I'd rather someone not take my work and make software that nets some $30k in profits, and not give me a small slice of it. I'm not being greedy--I wouldn't care if it were only $100 for a profit that large.

I am simply trying to figure out how, when, or if I even should, monetize the work that I've done for myself.

0 投票
3 回答
1938 浏览

new-operator - 如何推广新产品/服务?

对于单独开发产品或服务的开发人员来说,这通常是一个问题。他们如何宣传他们的产品?

我最近完成了我的一个项目,我正在努力传播它。

您认为推广您的新产品/服务的最佳方式是什么?

尽管这个问题与编程并不严格相关,但对于想要将他们的作品进行创作的程序员来说,这是一个很好的问题。

0 投票
3 回答
15532 浏览

c - C 函数调用中的默认参数提升

设置

我对在 C 中调用函数时的默认参数提升有几个问题。这是C99 标准 (pdf)中的第 6.5.2.2 节“函数调用”第 6、7 和 8 段(强调添加并分解为列表以便于阅读):

第 6 段

  1. 如果表示被调用函数的表达式具有不包含原型的类型,则对每个参数执行整数提升,并将具有类型的参数float提升为double。这些被称为默认参数提升
  2. 如果参数的数量不等于参数的数量,则行为未定义。
  3. 如果函数使用包含原型的类型定义,并且原型以省略号 ( , ...) 结尾,或者提升后的参数类型与参数类型不兼容,则行为未定义。
  4. 如果函数定义的类型不包含原型,并且提升后的参数类型与提升后的参数类型不兼容,则行为未定义,但以下情况除外:
    • 一种提升类型是有符号整数类型,另一种提升类型是对应的无符号整数类型,并且值可以在两种类型中表示;
    • 这两种类型都是指向字符类型或void.

第 7 段

  1. 如果表示被调用函数的表达式具有包含原型的类型,则参数将隐式转换为相应参数的类型,就像通过赋值一样,将每个参数的类型作为其声明的非限定版本类型。
  2. 函数原型声明器中的省略号会导致参数类型转换在最后一个声明的参数之后停止。默认参数提升是在尾随参数上执行的。

第 8 段

  1. 没有隐式执行其他转换;特别是,参数的数量和类型不会与不包含函数原型声明符的函数定义中的参数的数量和类型进行比较。

我知道的

  • 默认参数提升是charand shortto int/ unsigned intand floattodouble
  • 可变参数函数的可选参数(如printf)受默认参数提升的约束

作为记录,我对函数原型的理解是这样的:

问题

我很难理解这一切。以下是我的一些问题:

  • 原型化函数和非原型化函数的行为真的有很大不同吗,例如在默认提升和隐式转换方面?
  • 默认参数提升何时发生?总是这样吗?或者只是在特殊情况下(比如可变参数函数)?它是否取决于函数是否原型化?
0 投票
5 回答
8743 浏览

python - 使用python生成促销代码

通过使用 python 语言,什么是生成促销代码的聪明/有效的方法。喜欢用于生成折扣券的特殊号码。喜欢:1027828-1

谢谢

0 投票
1 回答
2775 浏览

java - Java GC:提升的顶级对象类(按大小)?

请让我知道在每次年轻 GC 事件之后确定提升到老年代的年轻代内存组成的最佳方法是什么?

理想情况下,我想知道负责的类名,例如,对于每个“年轻一代->老一代”提升块中 80% 的堆;

例子:我有600M年轻一代,每个任期提升6M;我想知道这个 6M 是由哪些物体组成的。

谢谢你。

0 投票
3 回答
8310 浏览

iphone - 应用内购买缺少促销代码的解决方法

Apple 不为应用内购买提供促销代码。在遵守 Apple 开发者指南的同时,让用户免费试用通过应用内购买解锁的功能或内容的最佳方式是什么?

这个想法是允许一组特殊的用户(评论者、主要粉丝等)无需付费即可访问作为应用内购买提供的内容或功能。

解决此限制的应用程序示例将不胜感激。

0 投票
2 回答
158 浏览

sql - 需要帮助编写 SQL 以在结帐时将促销应用到购物篮

不要笑,但我是一名尝试使用 SQL 的 Lotus Notes(非关系数据库!)开发人员,虽然我已经掌握了基本概念,但我仍然坚持我认为是“高级”的东西。

想象一下,一个用户在他们的购物篮中添加了一组产品后到达在线结账处。我需要对购物篮应用促销活动。

这些促销会查看购物篮中的商品,并为匹配预定义“捆绑包”的任何组合添加“点数”。促销活动还需要能够针对特定国家/地区的用户(在注册时获得的信息)和其他个人详细信息。

促销活动由站点管理团队输入和维护,并且需要尽可能灵活。因此,他们可以奖励诸如“购买 Y 型 X 产品并获得 50% 额外积分”或“3 个或更多 XE-123 并获得 500 积分”等奖励。

现在我正在寻找大方向。我应该如何将与购物篮中的项目匹配的条件存储到任何正在运行的促销活动中?一个大的存储过程会做还是应该构建购物篮的 C# 代码遍历所有促销活动并查看哪个合适?

现在我什至没有表模式。只是知道它应该如何工作并且不知道从哪里开始。

杰克

0 投票
4 回答
1146 浏览

c - 发生了哪些类型转换?

我希望答案是-4567。我得到“z = 17278”。为什么提升这些数字会导致 17278?

我在Code Pad中执行了这个。

0 投票
7 回答
45244 浏览

c - printf 的 h 和 hh 修饰符的目的是什么?

除了%hnand %hhn(其中horhh指定了指向对象的大小),格式说明符的handhh修饰符的意义是什么?printf

由于标准要求将默认提升应用于可变参数函数,因此不可能将类型charshort(或其任何有符号/无符号变体)的参数传递给printf.

根据 7.19.6.1(7),h修改器:

指定后面的 d、i、o、u、x 或 X 转换说明符适用于 short int 或 unsigned short int 参数(该参数将根据整数提升进行提升,但其值应转换为 short int或 unsigned short int 打印前);或者后面的 n 转换说明符适用于指向短 int 参数的指针。

如果参数实际上是shortor类型unsigned short,则提升 toint后跟转换回shortorunsigned short将产生与提升 to相同的int,而没有任何转换回。因此,对于shortor类型的参数unsigned short%d,%u等应该给出与 , 等相同的结果%hd%hu对于char类型 and也是如此hh)。

据我所知,horhh修饰符可能有用的唯一情况是当参数传递给它时int超出shortor的范围unsigned short,例如

但我的理解是,像这样传递错误的类型无论如何都会导致未定义的行为,所以你不能指望它打印 0。

我见过的一个真实案例是这样的代码:

作者希望它在哪里打印f0尽管实现具有已char签名的普通类型(在这种情况下,printf("%x", c)将打印fffffff0或类似)但这种期望是否合理?

(注意:发生的事情是原始类型是char,它被提升int并转换回unsigned char而不是char,从而更改了打印的值。但是标准是否指定了这种行为,或者它是损坏的软件可能的实现细节依赖?)