我出了一份面试题,大家帮忙作作看,看看难度是否适中。

winner2050 2016-05-11 05:36:14

请勿直接在考卷上答题,请在草稿纸上答题
1. 一个人工作七天的佣金是一根金条,工资日结,在只能切两刀的情况下,请问如何切?




2. 事件委托是什么(Web前端题)




3. 不用.net自带的转换函数,如何把字符串”123456”转换为数值型?





4. String s = ””;和string s = String.Empty;哪一种方式更好?为什么?





5. 使用什么算法,能在int a[8] = {3,12,24,36,55,68,75,88}里查找24,为什么选用这个算法?





6. 请问一下代码会发生什么bug?
public void Log(string msg)
{
System.IO.File.AppendAllText (Server.MapPath ("~/log.txt"), msg);
}





7. 你能想到的Saas系统数据持久化方案有哪几种?(围绕MsSqlserver,Entity Framework)




8. 一百个账户各有100元,某个账户某天如有支出则添加一条新记录,记录其余额。一百天后,请输出每天所有账户的余额信息。
表结构:username varchar (50) NOT NULL , --用户名
outdate [datetime] NOT NULL , --日期
cash [float] NOT NULL --余额




9. 如果让你设计一个公司内的开发平台(框架),请简述需要注意的事项。





10. 以下代码属于什么设计模式?
public interface Salary
{
int Caculator();
}
public class ManagerSalary : Salary
{
public int Caculator()
{
return 1000;
}
}
public class EmployeeSalary : Salary
{
public int Caculator()
{
return 800;
}
}
public class Employee
{
public Salary Salary {get;set;}
public Employee(Salary salary)
{
Salary = salary;
}
public int GetSalary()
{
return Salary.Caculator();
}
}


顺便提一下,招程序员来给我码字,主要技能关键词EF、MVC、bootstrap、DDD;
还在招合租哈,10号线成寿寺附近的。138大房子,三室两厅两卫的格局,新装修,各种电器、各种设备都是新的。欢迎合租哈。无码高清大图看这里http://bj.58.com/hezu/25821103244852x.shtml
...全文
853 34 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
34 条回复
切换为时间正序
请发表友善的回复…
发表回复
nbspzs 2016-09-30
  • 打赏
  • 举报
回复
楼主还招人不
qq_35635037 2016-07-18
  • 打赏
  • 举报
回复
楼主还记得当年你做的音乐播放器不 为什么我码上去好多错误 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace MP3File { public partial class frmMain : Form { private void btn_Open_Click(object sender, EventArgs e) { if (this.oFDlog_Info.ShowDialog() == DialogResult.OK) { this.lV_Info.Items.Clear(); string[] FileNames = this.oFDlog_Info.FileNames; foreach (string FileName in FileNames) { FileInfo FileInfo = new FileInfo(FileName); float FileSize = (float)FileInfo.Length / (1024 * 1024); this.axMP_Info.FileName = FileName; string Author = this.axMP_Info.GetMediaInfoString(MediaPlayer.MPMediaInfoType.mpClipAuthor); string ShortFileName = FileName.Substring(FileName.LastIndexOf("\\") + 1); ShortFileName = ShortFileName.Substring(0, ShortFileName.Length - 4); string[] SubItem ={ ShortFileName, Author, FileSize.ToString().Substring(0, 4) + "M", FileName }; ListViewItem Item = new ListViewItem(SubItem); this.lV_Info.Items.Add(Item); this.lV_Info.Items[0].Selected = true; } } } } private void btn_Play_Click(object sender, EventArgs e) { if (this.lV_Info.Items.Count > 0) { if (this.lV_Info.SelectedItems.Count > 0) { int iPos = this.lV_Info.SelectedItems[0].Index; string FileName = this.lV_Info.Items[iPos].SubItems[3].Text.ToString(); this.axMP_Info.FileName = FileName; this.axMP_Info.Play(); } } else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } private void btn_Pase_Click(object sender, EventArgs e) { if (this.axMP_Info.FileName.Length > 0) this.axMP_Info.Pause(); else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } private void btn_Pre_Click(object sender, EventArgs e) { if (this.lV_Info.Items.Count > 0) { if (this.lV_Info.SelectedItems.Count > 0) { int iPos = this.lV_Info.SelectedItems[0].Index; if (iPos > 0) { this.lV_Info.Items[iPos - 1].Selected = true; string FileName = this.lV_Info.Items[iPos - 1].SubItems[3].Text.ToString(); this.axMP_Info.FileName = FileName; this.axMP_Info.Play(); } else { MessageBox.Show("已经是第一首歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } private void btn_Next_Click(object sender, EventArgs e) { if (this.lV_Info.Items.Count > 0) { if (this.lV_Info.SelectedItems.Count > 0) { int iPos = this.lV_Info.SelectedItems[0].Index; if (iPos < this.lV_Info.Items.Count - 1) { this.lV_Info.Items[iPos + 1].Selected = true; string FileName = this.lV_Info.Items[iPos + 1].SubItems[3].Text.ToString(); this.axMP_Info.FileName = FileName; this.axMP_Info.Play(); } else { MessageBox.Show("已经是最后一首歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } private void btn_Stop_Click(object sender, EventArgs e) { if (this.axMP_Info.FileName.Length > 0) this.axMP_Info.Stop(); else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
qq_35081876 2016-05-25
  • 打赏
  • 举报
回复
看你们评论好搞笑,好像当初被这种题搞过,现在一副义愤填膺的样子挖苦LZ
「已注销」 2016-05-13
  • 打赏
  • 举报
回复
突然想起了一个 ++i i++ while(i) 的故事 ... ...
十三- 2016-05-13
  • 打赏
  • 举报
回复
我表示过不了! 题目难了点,,跟你公司要做的项目不搭边,都会做也没什么卵用
jhdxhj 2016-05-13
  • 打赏
  • 举报
回复
引用 18 楼 winner2050 的回复:
两种测试用例
namespace WindowsFormsApplication1
{

class Program
{
private const int Count = int.MaxValue;

static void Main(string[] args)
{
for (int i = 0; i < 10; i++)
{
TestStringEmpty();
TestEmpty();
}
Console.ReadKey();
}

private static void TestStringEmpty()
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
string temp= string.Empty;;
for (int i = 0; i < Count; i++)
{
temp += string.Empty;
}
stopWatch.Stop();
Console.WriteLine("string.empty : " + stopWatch.ElapsedMilliseconds);
}

private static void TestEmpty()
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
string temp= "";;
for (int i = 0; i < Count; i++)
{
temp += "";
}
stopWatch.Stop();
Console.WriteLine("\"\" : " + stopWatch.ElapsedMilliseconds);
}
}
}


namespace WindowsFormsApplication1
{

class Program
{
private const int Count = int.MaxValue;

static void Main(string[] args)
{
for (int i = 0; i < 10; i++)
{
TestStringEmpty();
TestEmpty();
}
Console.ReadKey();
}

private static void TestStringEmpty()
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
for (int i = 0; i < Count; i++)
{
string temp = string.Empty;
}
stopWatch.Stop();
Console.WriteLine("string.empty : " + stopWatch.ElapsedMilliseconds);
}

private static void TestEmpty()
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
for (int i = 0; i < Count; i++)
{
string temp = "";
}
stopWatch.Stop();
Console.WriteLine("\"\" : " + stopWatch.ElapsedMilliseconds);
}
}
}


差别极小,不过string.Empty还是胜出。





software_artisan 2016-05-13
  • 打赏
  • 举报
回复
我肯定面不过了。。。。不过第一题我知道其实不是怎么切准确的问题,而是怎么结算工资的问题。
mlxwl2013 2016-05-13
  • 打赏
  • 举报
回复
引用 29 楼 jhdxhj 的回复:
[quote=引用 28 楼 gentle_wolf 的回复:] [quote=引用 16 楼 winner2050 的回复:] [quote=引用 3 楼 jhdxhj 的回复:] String s = ””;和string s = String.Empty;哪一种方式更好?为什么? 这个楼主你真的知道哪种好?你测试过?
string 是引用类型,每次赋值都是一个新对象。 不停生成对象肯定比不实例化新对象的慢。[/quote] 你懂什么叫字符串留用吗?你以为c#编译器很傻吗?[/quote] 估计不懂编译原理,目测是某鸟培训出来的[/quote] 赞同,lz的这种面试题,既没用“标准答案”还有错误。
刘欣的博客 2016-05-13
  • 打赏
  • 举报
回复
9. 如果让你设计一个公司内的开发平台(框架),请简述需要注意的事项。 CS方式就用WINFORM + HP-SOCKET BS方式就用ASP.NET + FINEUI DB就用SQLserver ORM就用EF6
月影 2016-05-13
  • 打赏
  • 举报
回复
引用 16 楼 winner2050 的回复:
[quote=引用 3 楼 jhdxhj 的回复:] String s = ””;和string s = String.Empty;哪一种方式更好?为什么? 这个楼主你真的知道哪种好?你测试过?
string 是引用类型,每次赋值都是一个新对象。 不停生成对象肯定比不实例化新对象的慢。[/quote] 你懂什么叫字符串留用吗?你以为c#编译器很傻吗?
jhdxhj 2016-05-13
  • 打赏
  • 举报
回复
引用 28 楼 gentle_wolf 的回复:
[quote=引用 16 楼 winner2050 的回复:] [quote=引用 3 楼 jhdxhj 的回复:] String s = ””;和string s = String.Empty;哪一种方式更好?为什么? 这个楼主你真的知道哪种好?你测试过?
string 是引用类型,每次赋值都是一个新对象。 不停生成对象肯定比不实例化新对象的慢。[/quote] 你懂什么叫字符串留用吗?你以为c#编译器很傻吗?[/quote] 估计不懂编译原理,目测是某鸟培训出来的
兵工厂三剑客 2016-05-13
  • 打赏
  • 举报
回复
引用 19 楼 jhdxhj 的回复:
[quote=引用 16 楼 winner2050 的回复:] [quote=引用 3 楼 jhdxhj 的回复:] String s = ””;和string s = String.Empty;哪一种方式更好?为什么? 这个楼主你真的知道哪种好?你测试过?
string 是引用类型,每次赋值都是一个新对象。 不停生成对象肯定比不实例化新对象的慢。[/quote] 这种所谓的慢,在现在计算机硬件的配置下,完全可以忽略,我猜楼主所在的公司肯定不是北京的知名的互联网公司,很可能是那种传统软件公司,给客户做项目的那种,招聘要求程序猿同时精通前端,网页美工,产品设计,产品开发,架构设计,编码 这样的全才,这种人根本就不可能存在,多了解北京使用.net技术的知名互联网公司怎么开发产品的吧,那种给客户做项目的那种公司,目前时代就是呵呵了[/quote] 哈哈。跟我前年刚毕业想从事硬件开发时,入职的一个小公司一模一样。要要求会画电路板,会建模型,会仿真,会FPGA,会写代码,焊接还要牛逼,还要会调试。 招聘时说的是不加班。结果不加班的基本都被辞退了。
  • 打赏
  • 举报
回复
LZ给我30k,我保证不会的也会很快学会,git我几天就学会了,相信我的学习能力吧
mlxwl2013 2016-05-12
  • 打赏
  • 举报
回复
String s = ””;和string s = String.Empty;哪一种方式更好? 主要是可读性性上,某些情况下后者可能好一些,跟什么不同平台的没有半毛钱关系,不信可以反编译String.Empty的代码,就简单的设为""而已:
public static readonly string Empty = "";
jhdxhj 2016-05-12
  • 打赏
  • 举报
回复
引用 15 楼 winner2050 的回复:
好多人要二十几K、甚至三十几k,面了面也没多牛。 在好多技能不会的情况下,勉为其难花了二十k招进来,没一个能转正。 不会的技能,也不在家偷偷学习,遇到不会就马上问,公司都变成高薪带薪进修班了。进来两个多月连git都用不熟的情况都有。 带队好心累,在平时几乎不需要加班的情况下,安排周六日他自己在家加班,周一马上要用,结果各种借口..... 面试题可以考核思路,而且3月份发生过简历造假混进来什么任务都完不成的事情也不会再发生。
带队累,说明你带队的方式有问题,一个团队,所有人擅长的技术方向不可能都一样,只有充分发挥和利用好每个人的长处,事情才能办好,必须以产品为导向,一位的追求所谓的新技术,一位的要求每个人什么都会,那样不累才怪
jhdxhj 2016-05-12
  • 打赏
  • 举报
回复
引用 16 楼 winner2050 的回复:
[quote=引用 3 楼 jhdxhj 的回复:] String s = ””;和string s = String.Empty;哪一种方式更好?为什么? 这个楼主你真的知道哪种好?你测试过?
string 是引用类型,每次赋值都是一个新对象。 不停生成对象肯定比不实例化新对象的慢。[/quote] 这种所谓的慢,在现在计算机硬件的配置下,完全可以忽略,我猜楼主所在的公司肯定不是北京的知名的互联网公司,很可能是那种传统软件公司,给客户做项目的那种,招聘要求程序猿同时精通前端,网页美工,产品设计,产品开发,架构设计,编码 这样的全才,这种人根本就不可能存在,多了解北京使用.net技术的知名互联网公司怎么开发产品的吧,那种给客户做项目的那种公司,目前时代就是呵呵了
winner2050 2016-05-12
  • 打赏
  • 举报
回复
两种测试用例
namespace WindowsFormsApplication1
{

    class Program
    {
        private const int Count = int.MaxValue;

        static void Main(string[] args)
        {
            for (int i = 0; i < 10; i++)
            {
                TestStringEmpty();
                TestEmpty();
            }
            Console.ReadKey();
        }

        private static void TestStringEmpty()
        {
            Stopwatch stopWatch = new Stopwatch();
            stopWatch.Start();
            string temp= string.Empty;;
            for (int i = 0; i < Count; i++)
            {
                temp += string.Empty;
            }
            stopWatch.Stop();
            Console.WriteLine("string.empty : " + stopWatch.ElapsedMilliseconds);
        }

        private static void TestEmpty()
        {
            Stopwatch stopWatch = new Stopwatch();
            stopWatch.Start();
            string temp= "";;
            for (int i = 0; i < Count; i++)
            {
                temp += "";
            }
            stopWatch.Stop();
            Console.WriteLine("\"\" : " + stopWatch.ElapsedMilliseconds);
        }
    }
}
namespace WindowsFormsApplication1
{

    class Program
    {
        private const int Count = int.MaxValue;

        static void Main(string[] args)
        {
            for (int i = 0; i < 10; i++)
            {
                TestStringEmpty();
                TestEmpty();
            }
            Console.ReadKey();
        }

        private static void TestStringEmpty()
        {
            Stopwatch stopWatch = new Stopwatch();
            stopWatch.Start();
            for (int i = 0; i < Count; i++)
            {
                string temp = string.Empty;
            }
            stopWatch.Stop();
            Console.WriteLine("string.empty : " + stopWatch.ElapsedMilliseconds);
        }

        private static void TestEmpty()
        {
            Stopwatch stopWatch = new Stopwatch();
            stopWatch.Start();
            for (int i = 0; i < Count; i++)
            {
                string temp = "";
            }
            stopWatch.Stop();
            Console.WriteLine("\"\" : " + stopWatch.ElapsedMilliseconds);
        }
    }
}
差别极小,不过string.Empty还是胜出。
jhdxhj 2016-05-12
  • 打赏
  • 举报
回复
引用 15 楼 winner2050 的回复:
好多人要二十几K、甚至三十几k,面了面也没多牛。 在好多技能不会的情况下,勉为其难花了二十k招进来,没一个能转正。 不会的技能,也不在家偷偷学习,遇到不会就马上问,公司都变成高薪带薪进修班了。进来两个多月连git都用不熟的情况都有。 带队好心累,在平时几乎不需要加班的情况下,安排周六日他自己在家加班,周一马上要用,结果各种借口..... 面试题可以考核思路,而且3月份发生过简历造假混进来什么任务都完不成的事情也不会再发生。
北京的.net程序猿这么值钱了?能否告诉是哪个公司呢?
winner2050 2016-05-12
  • 打赏
  • 举报
回复
引用 3 楼 jhdxhj 的回复:
String s = ””;和string s = String.Empty;哪一种方式更好?为什么? 这个楼主你真的知道哪种好?你测试过?
string 是引用类型,每次赋值都是一个新对象。 不停生成对象肯定比不实例化新对象的慢。
winner2050 2016-05-12
  • 打赏
  • 举报
回复
好多人要二十几K、甚至三十几k,面了面也没多牛。 在好多技能不会的情况下,勉为其难花了二十k招进来,没一个能转正。 不会的技能,也不在家偷偷学习,遇到不会就马上问,公司都变成高薪带薪进修班了。进来两个多月连git都用不熟的情况都有。 带队好心累,在平时几乎不需要加班的情况下,安排周六日他自己在家加班,周一马上要用,结果各种借口..... 面试题可以考核思路,而且3月份发生过简历造假混进来什么任务都完不成的事情也不会再发生。
加载更多回复(14)

7,774

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧