Search Results

Search found 259 results on 11 pages for 'israel chen'.

Page 8/11 | < Previous Page | 4 5 6 7 8 9 10 11  | Next Page >

  • return Queryable<T> or List<T> in a Repository<T>

    - by Danny Chen
    Currently I'm building an windows application using sqlite. In the data base there is a table say User, and in my code there is a Repository<User> and a UserManager. I think it's a very common design. In the repository there is a List method: //Repository<User> class public List<User> List(where, orderby, topN parameters and etc) { //query and return } This brings a problem, if I want to do something complex in UserManager.cs: //UserManager.cs public List<User> ListUsersWithBankAccounts() { var userRep = new UserRepository(); var bankRep = new BankAccountRepository(); var result = //do something complex, say "I want the users live in NY //and have at least two bank accounts in the system } You can see, returning List<User> brings performance issue, becuase the query is executed earlier than expected. Now I need to change it to something like a IQueryable<T>: //Repository<User> class public TableQuery<User> List(where, orderby, topN parameters and etc) { //query and return } TableQuery<T> is part of the sqlite driver, which is almost equals to IQueryable<T> in EF, which provides a query and won't execute it immediately. But now the problem is: in UserManager.cs, it doesn't know what is a TableQuery<T>, I need to add new reference and import namespaces like using SQLite.Query in the business layer project. It really brings bad code feeling. Why should my business layer know the details of the database? why should the business layer know what's SQLite? What's the correct design then?

    Read the article

  • www disappear when using Name-based virtual host.

    - by Tianzhou Chen
    Below is my config file NameVirtualHost 12.34.56.78:80 ServerAdmin [email protected] ServerName domain1.com ServerAlias www.domain1.com DocumentRoot /srv/www/domain1.com/public_html1/ ErrorLog /srv/www/domain1.com/logs/error.log CustomLog /srv/www/domain1.com/logs/access.log combined ServerAdmin [email protected] ServerName domain2.com ServerAlias www.domain2.com DocumentRoot /srv/www/domain2.com/public_html1/ ErrorLog /srv/www/domain2.com/logs/error.log CustomLog /srv/www/domain2.com/logs/access.log combined The thing is when I put www.domain1.com into browser, it will be automatically changed to domain1.com. However, if I put www.domain2.com, the address remains the same. I don't know why this happens. BTW, I haven't put .htaccess file under their document root. Thanks for your advice! Tianzhou

    Read the article

  • How to dump STDIN to a file, using C++ STL?

    - by Jimm Chen
    HHello all, this is a straight forward question, but not a straight forward answer can be found by just Googling today. Hope someone can show me a concise answer before I dig into those thick C++ books and finally find the solution out. Thank you. I'm writing this program so to make a workaround in this issue: Why do I get 'Bad file descriptor' when trying sys.stdin.read() in subversion pre-revprop-change py script? Note: Content from STDIN may be arbitrary binary data. Please use C++ STL functions, iostream, ifstream etc . If the file creation/writing failed, I'd like to catch the exception to know the case.

    Read the article

  • Manage dirty rect efficiently

    - by Tianzhou Chen
    Hi all, I am implementing a view system and I want to keep track of all the dirty rects. It seems my dirty rect management is a bottleneck for the whole system. On one hand, invalidating the bounding box of the dirty region seems to be an easy approach. But in the situation like this: Say I have a client area of 100x100; I have a dirty rect with (0, 0, 1, 1) and another dirty rect with (99, 99, 1, 1). Invalidating the bounding box which turns out to be 100x100 is not efficient at all. So I want to ask if someone can give any hint or give me a link of the related literatures. Thanks in advance!

    Read the article

  • action script dynamic type?

    - by Bin Chen
    I am curious about code in my action script project: public var _p:Object ... in a function: public function WObject(pp:MovieClip) { _p = pp; _p.Play(); } The Play() function is in MovieClip but not Object, can action script allow such syntax?

    Read the article

  • What are the suggested alternatives for Class<T>.isAssignableFrom(Class<?> cls)?

    - by Wing C. Chen
    Currently I am doing the profiling to a piece of code. During the profiling, I discovered that this very method call, Class<T>.isAssignableFrom(Class<?> cls) takes up to quite amount of the entire time. Because this is a method from reflection, it takes a lot of time compared to normal keywords or method calls. I am wondering if there are some good alternatives for this method calls?

    Read the article

  • UIImageView and UIScrollView load lot of pictures

    - by Allan.Chen
    In my app, i use UIImageView and UIScrollView to show lot of pictures(Every time there are about 20 pictures and every pictures about 600px*500px and size is about 600KB ), i use for this code to do this function. Here is code: //Here is pictures Data; self.klpArry = self.pictureData; CGSize size = self.klpScrollView1.frame.size; for (int i=0; i < [klpArr count]; i++) { UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake((size.width * i)+300, 20, 546, 546)]; NSString *filePath = [[NSBundle mainBundle] pathForResource:[klpArr objectAtIndex:i] ofType:@"jpg"]; UIImage *imageData = [[UIImage alloc]initWithData:[NSData dataWithContentsOfFile:filePath]]; [iv setImage:imageData]; iv.backgroundColor = [UIColor grayColor]; [self.klpScrollView1 addSubview:iv]; imageData = nil; iv = nil; iv.image = nil; filePath = nil; [imageData release]; [filePath release]; [iv release]; } // show the picture in scrollview; [self.klpScrollView1 setContentSize:CGSizeMake(size.width * numImage, size.height)]; self.klpScrollView1.pagingEnabled = YES; self.klpScrollView1.showsHorizontalScrollIndicator = NO; self.klpScrollView1.backgroundColor = [UIColor grayColor]; But everytime i init this function, the memory will increase about 5MB, Actually i release UIImageView, UIimage and UIScrollView (vi.image=nil,[vi release]) but i doesn't work, it can't release the memory. BTW, i use my friend code first vi.image=nil then vi=nil; but the pictures not to show on scrollview. any one can help me ?? Thx ~~

    Read the article

  • How I can ask a specify Name Server to have the IP of a domain

    - by Yuan Chen
    For example, I have a domain name example.com hosted at some host free, and now I want to know where is the IP of the host. so I can't configure the registrar control panel to point to that IP. So is there any way to know that IP, without configure the name server to point to it. and I know the Name Server of the hosting. for example ns1.hosting.com can I ask the specify ns1.hosting.com to get the IP of example.com Thanks

    Read the article

  • Makefile automatic link dependency ?

    - by Kuang Chen
    It's easy to let program figure out the dependency at compile time, (with gcc -MM). Nevertheless, link dependency (deciding which libraries should be linked to) seems to be difficult to figure out. This issue become emergent when multiple targets with individual libraries to link to are needed. For instance, three dynamic library targets t1.so, t2.so and t3.so needs to be built. t1.so needs math library (-lm), while t2 and t3 don't. It would be tedious to write separate rules. A single rule requiring the three targets linked with math library saves the trouble. However, it causes inflation of target size since math library is unused for t2.so and t3.so. Any ideas?

    Read the article

  • Selecting the 2nd row in sql

    - by Alex Chen
    I want to select the second row only from the table. From the ClientUserName column. SELECT ClientUserName, DestHost, count(DestHost) counts FROM #ProxyLog_record WHERE ClientUserName = (Select top 1 ClientUserName from #ProxyLog_count_2) GROUP BY ClientUserName, DestHost ORDER BY counts DESC The (Select top 1 ClientUserName from #ProxyLog_count_2) shows top 1 only but I need to get the 2nd data from that table. How can I do this?

    Read the article

  • AS3: why is this happening?

    - by Bin Chen
    Hi, I just encounter a strange problem: var a:ClassA = new ClassA; var b:ClassA = a; The program keeps running sometime, the a = null, b = null. The program is a complex one, I am sure that no part will touch a, and b. My question is, will the runtime(garbage collector) to collect the memory of "a" and then assign a and b to null? I am confused, thanks!

    Read the article

  • How can I ask Hibernate to create an index on a foreign key (JoinColumn)?

    - by Kent Chen
    Hi, This is my model. class User{ @CollectionOfElements @JoinTable(name = "user_type", joinColumns = @JoinColumn(name = "user_id")) @Column(name = "type", nullable = false) private List<String> types = new ArrayList<String>(); } You can imagin there would be a table called "user_type", which has two columns, one is "user_id", the other is "type". And when I use hbm2ddl to generate the ddls, I can have this table, along with the foreign key constraint on "user_id". However, there is no index of this for this column. And I need this index. How can I let hibernate to generate this index for me? Thank you!

    Read the article

  • What are alternatives to Win32 PulseEvent() function?

    - by Bill
    The documentation for the Win32 API PulseEvent() function (kernel32.dll) states that this function is “… unreliable and should not be used by new applications. Instead, use condition variables”. However, condition variables cannot be used across process boundaries like (named) events can. I have a scenario that is cross-process, cross-runtime (native and managed code) in which a single producer occasionally has something interesting to make known to zero or more consumers. Right now, a well-known named event is used (and set to signaled state) by the producer using this PulseEvent function when it needs to make something known. Zero or more consumers wait on that event (WaitForSingleObject()) and perform an action in response. There is no need for two-way communication in my scenario, and the producer does not need to know if the event has any listeners, nor does it need to know if the event was successfully acted upon. On the other hand, I do not want any consumers to ever miss any events. In other words, the system needs to be perfectly reliable – but the producer does not need to know if that is the case or not. The scenario can be thought of as a “clock ticker” – i.e., the producer provides a semi-regular signal for zero or more consumers to count. And all consumers must have the correct count over any given period of time. No polling by consumers is allowed (performance reasons). The ticker is just a few milliseconds (20 or so, but not perfectly regular). Raymen Chen (The Old New Thing) has a blog post pointing out the “fundamentally flawed” nature of the PulseEvent() function, but I do not see an alternative for my scenario from Chen or the posted comments. Can anyone please suggest one? Please keep in mind that the IPC signal must cross process boundries on the machine, not simply threads. And the solution needs to have high performance in that consumers must be able to act within 10ms of each event.

    Read the article

  • Outlook: Displaying email sender's job title in message list

    - by RexE
    Is there a way to display the sender's job title in the Outlook email list pane? I would like to see something like: From | Title | Subject | Received Joe Smith | President | Re: Proposal | 5:34 Bob Chen | Engineer | Fw: Request | 5:30 I am using Outlook 2010. All my mail comes through an Exchange 2010 server.

    Read the article

  • How can I switch my display language to English in Windows 7?

    - by Alon
    Hi, I live in Israel and I bought Windows 7 Professional in Hebrew. I'd like to switch the language to English. In Control Panel - Region and Language I don't have any options to switch the display language to English because only Hebrew is installed. In Windows Update, there are no language updates. I have waited three days, and still no language update. Any Ideas? Thank you.

    Read the article

  • Can't sync time between domain controller and another servers/computers (windows 2003)

    - by Anatoly
    Good morning, We have domain controller on windows server 2003 and another windows 2003 servers with terminal server and DB and regular workstations. Today in Israel we returned back to winter time (one hour back), domain controller now shows current time but all another machines in network show different time they went two hour back and there's difference in one hour between domain controller and another machines. I have tried to perform W32tm /resync /update but without success, where can be problem? Thank you.

    Read the article

  • Quels mythes sur le métier de développeur se révèlent être vrais ? Un enseignant passe en revue quelques « non-mythes »

    Quels mythes sur le métier de développeur se révèlent être vrais ? Un enseignant passe en revue quelques « non-mythes » Dans une démarche peu habituelle, Mordechai Ben-Arin, professeur au département d'enseignement des sciences à l'institut Weizmann en Israël, s'est attaqué à ce qu'il qualifie de « non-mythes » sur le métier de développeur. Ce sont, d'après lui, les mythes que les enseignants réfutent généralement pour encourager les étudiants à suivre des études de génie logiciel... alors qu'ils ne sont pas forcément faux. Dans un document de 7 pages, Mordechai Ben-Arin (alias Moti) s'attache ainsi à démontrer la véracité de plusieurs lieu commun. Co...

    Read the article

  • Architectural requirements Q&amp;A

    A few days ago I was contacted by Lianping Chen a doctoral researcher from the Irish Software Engineering Research Centre. Lianping is doing research on how to elicit architectural significant requirements and he asked me a few questions, which I though, might be interesting to a wider audience. 1. Do you agree that architecture design and requirements elicitation are usually in parallel or have a big time overlap? In other words, Architectural...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How do I compare the md5sum of a file with the md5 file (that was available to download with the file)?

    - by user91583
    Images are available for a distro on http://livedistro.org/gnulinux/israel-remix-team-mint-12. I want to use the 32-bit version. I have downloaded the ISO file for the 32-bit version (customdist.iso). I have downloaded the md5 file for the ISO file (customdist.iso.md5). I want to calculate the md5sum of the ISO file and compare it to the md5 file. I can use the md5sum command to display within the terminal the calculated md5 for the ISO file. I have searched the web and can't find a way to compare the calculated md5 for the ISO file with the downloaded md5 file. So far, the closest I have come is the command md5sum -c customdist.iso.md5 from within the folder containing both the files, but this command gives the result: md5sum: customdist.iso.md5: no properly formatted MD5 checksum lines found Any ideas?

    Read the article

  • Upgrade Workshop in Wellington - Recap

    - by Mike Dietrich
    Wow! Wellington is really a wonderful city - except for the weather situation But it was the first time that Roy and me did arrive to a workshop with a ferry boat. We flew in on Friday to Christchurch (btw, this was the longest customs and border control I've ever went through - and I traveled to Israel by Bus via Allenby Bridge from the West Bank some years ago - it took us two hours to go through immigration and customs in the night from Friday to Saturday) and drove up the Southern Island. Very nice Great landscapes, great wines and great people! I'f you'd like to download the slides please download them from the Slides Download section to your right. And next time you'll have to ask more questions Don't be this shy - Roy and me (usually) don't bite -Mike

    Read the article

  • Google I/O 2012 - It's a Startup World

    Google I/O 2012 - It's a Startup World Erik Hersman, Eden Shochat, Jon Bradford, Jeffery Paine, Jehan Ara Tech innovators and entrepreneurs across the world are building technologies that delight users, solve problems, and result in scaled local and global businesses. The web is a global platform, and as a developer or entrepreneur your audience is tool. Hear the unique perspectives from a panel of entrepreneurs and VCs around the world who have succeeded in creating, launching, and scaling unique endeavors from Israel, the UK, Kenya, Singapore to Pakistan. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 54 2 ratings Time: 59:54 More in Science & Technology

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11  | Next Page >