Daily Archives

Articles indexed Sunday May 23 2010

Page 19/78 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • php csv high load request

    - by msaif
    i have PHP serve and one csv file . i need to read csv file and send the data to the browser. if individual request = 10,000 or more (may be) then reading csv file from harddisk may be costly.how can i efficiently read csv file from PHP and send the data to the browser. there is no option to read data form relational db. only browser<-------------PHP(apache)<----------------CSV flow pattern.

    Read the article

  • Is it professional to have funny looking logging messages

    - by JCH
    Hi, Recently I have joined a new project team where in the java application logs have logged messages in a non-formal way[can't think of suitable word]. here how they look :-) <message> for info messages :-| <message> for warn :-( <message> for error besides there's also ASCII art drawing , different one for each log when that particular service starts up or is killed .And there many more styles for certain application events. iam not sure if it has any significant overhead on the application or not. I would like to ask you folks if you come across such unique styles of logging messages or do you also practice any styles.what is your opinion about it. BR /jon

    Read the article

  • In MVC framworks (such as Ruby on Rails), does usually Model spell as singular and controller and vi

    - by Jian Lin
    I usually see Ruby on Rails books using script/generate model Story name:string link:string which is a singular Story, while when it is controller script/generate controller Stories index then the Story now is Stories, which is plural. Is this a standard on Ruby on Rails? Is it true in other MVC frameworks too, like CakePHP, Symfony, Django, or TurboGears? I see that in the book Rails Space, the controller is also called User, which is the same as the model name, and it is the only exception I see. Update: also, when scaffold is done on Ruby on Rails, then automatically, the model is singular and the controller and view are both plural.

    Read the article

  • Rails: Overriding ActiveRecord association method

    - by seaneshbaugh
    Is there a way to override one of the methods provided by an ActiveRecord association? Say for example I have the following typical polymorphic has_many :through association: class Story < ActiveRecord::Base has_many :taggings, :as => :taggable has_many :tags, :through => :taggings, :order => :name end class Tag < ActiveRecord::Base has_many :taggings, :dependent => :destroy has_many :stories, :through => :taggings, :source => :taggable, :source_type => "Story" end As you probably know this adds a whole slew of associated methods to the Story model like tags, tags<<, tags=, tags.empty?, etc. How do I go about overriding one of these methods? Specifically the tags<< method. It's pretty easy to override a normal class methods but I can't seem to find any information on how to override association methods. Doing something like def tags<< *new_tags #do stuff end produces a syntax error when it's called so it's obviously not that simple.

    Read the article

  • yahoo doesn't accpet emails i send to it

    - by hd
    i am writing a sendmail module to email some things to my site users. for testing it i use my own email at yahoo to receive this email. but some thing woeful happend. about 1200 sent to my email address at yahoo at a moment and yahoo sent all of them to spam box. now i can't send any email to yahoo addresses and my server gives me this message in mailq: "delivery temporarily suspended: host g.mx.mail.yahoo.com[98.137.54.238] refused to talk to me..." how can i solve this problem?? many users of my site have yahoo email address. my server uses postfix. thanks for helping .

    Read the article

  • Downloading Eclipse's Source Code

    - by digiarnie
    I'm doing a study on large Java projects and would like to view the source code for Eclipse. I have gone to this url (http://wiki.eclipse.org/index.php/CVS_Howto) and figured that the most useful cvs repository for me to look at would be this one: :pserver:[email protected]:/cvsroot/eclipse (The Eclipse platform project) However, when looking at this repository, it has so many modules! Which modules should I be trying to check out? I don't necessarily want to build the IDE from source, however, I just want to get the core Eclipse code base to perform some analysis. Would I just check out any modules starting with "org.eclipse..."? Should I be checking out any of the others? Or is there an easier way to get the source? I read somewhere that you can get the source from the binary version of Eclipse but I am unsure where to find the source.

    Read the article

  • Are there any security issues to avoid when providing a either-email-or-username-can-act-as-username

    - by Tchalvak
    I am in the process of moving from a "username/password" system to one that uses email for login. I don't think that there's any horrible problem with allowing either email or username for login, and I remember seeing sites that I consider somewhat respectable doing it as well, but I'd like to be aware of any major security flaws that I may be introducing. More specifically, here is the pertinent function (the query_row function parameterizes the sql). function authenticate($p_user, $p_pass) { $user = (string)$p_user; $pass = (string)$p_pass; $returnValue = false; if ($user != '' && $pass != '') { // Allow login via username or email. $sql = "SELECT account_id, account_identity, uname, player_id FROM accounts join account_players on account_id=_account_id join players on player_id = _player_id WHERE lower(account_identity) = lower(:login) OR lower(uname) = lower(:login) AND phash = crypt(:pass, phash)"; $returnValue = query_row($sql, array(':login'=>$user, ':pass'=>$pass)); } return $returnValue; } Notably, I have added the WHERE lower(account_identity) = lower(:login) OR lower(uname) = lower(:login) ...etc section to allow graceful backwards compatibility for users who won't be used to using their email for the login procedure. I'm not completely sure that that OR is safe, though. Are there some ways that I should tighten the security of the php code above?

    Read the article

  • How to install Zend Framework on Windows

    - by sombe
    "installing Zend Framework is so easy!!!!" yeah right... Ok I'm working with a beginner's book and the ONE thing that is not excessively detailed is the most important part: Installing the darn thing. After browsing the quickstart guide for hours, all it said was: "download Zend [...] add the include directory (bla bla) and YOU'RE DONE!" right, i'm done using Zend. Ok, not really, not yet anyway. I beg of you people, I wanna go to bed, please tell me how (in simple 6th grade detail) to install the framework. I've got the unzipped folder in my htdocs directory, and I placed zf.bat+zf.php in the htdocs root. What's next? thank you so much. EDIT: Thanks guys for all the answers. Unfortunately I haven't been able to work with this or find a good enough resource to explain it to me in plain english. It seems that this framework adheres more so to programmers than to beginners. I've since yesterday read a little on CakePHP and found that it was incredibly easy to install and tune. As oppose to Zend Framework, where I had to dig in my "environment variables", configure "httpd.conf" and almost tie the knot between my computer driver cables to just get it running, CakePHP has already allowed me to put together a nice newbie application. In conclusion, I very much appreciate all of your help. I hope someone else venturing on ZF will be more successful with it. Thanks!

    Read the article

  • Basic iptables for a webserver: SSL Tomcat, postgres, ssh and that's it.

    - by Paperino
    This is probably as basic as it gets but I'm a developer and really have no experience with iptbles. The only connections I need opened are: eth0 (outward facing) ssh ping SSL to tomcat (forward port 443 to 8443) eth1(local subnet) connection to postgres server Everything else should be blocked. My current attempts seem to be leaving all other ports open. I wonder what gives. Thanks serverfault!

    Read the article

  • Gentoo Linux -> Ubuntu: Can I Preserve My LVM/RAID Devices, Or Do I Need To Reformat?

    - by Eddie Parker
    Hello: I've got a Gentoo box that I'm interested in switching over to an Ubuntu box. I currently have the partitions laid out using a mixture of RAID (mdadm) and LVM2, as specified in this document [1]. Ideally I'd like to just wipe out the non /home partition, as it's got data I'd like to keep. Is it possible to reuse the current setup, or do I need to restart? vgdisplay, vgchange -a y, etc don't yield any results from the Ubuntu LiveCD, and I'm wary to run any commands that might wipe my data. Your help would be appreciated. [1] http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

    Read the article

  • Ubuntu: Unsupported Sources

    - by Scott
    What kind of software is available in that source tree ? Also what is the best way to see what kind of software is available in a repository ? I have always reluctant to enable it because I didn't want to wind up with an unstable system.

    Read the article

  • Adding EXIF Lens data for old or manual lenses (e.g "Lens Baby")

    - by dbr
    I have a Lens Baby Composer, which is an entirely mechanical lens (no electronics in it), so the camera body cannot determine what lens is attached.. So obviously the metadata does not contain the lens info.. Is there any way to manually set this metadata, so the photos don't show up as "Unknown Lens" in Aperture/Lightroom/etc It's a Canon 5D Mark II (so the native files are .cr2)

    Read the article

  • Yahoo doesn't accept emails i send to it

    - by hd
    i am writing a sendmail module to email some things to my site users. for testing it i use my own email at yahoo to receive this email. but something woeful happened. about 1200 sent to my email address at yahoo at a moment and yahoo sent all of them to spam box. now i can't send any email to yahoo addresses and my server gives me this message in mailq: delivery temporarily suspended: host g.mx.mail.yahoo.com[98.137.54.238] refused to talk to me... how can i solve this problem?? many users of my site have yahoo email address. my server uses postfix. thanks for helping .

    Read the article

  • Are there such things as summer jobs for teenage programmers?

    - by Gbps
    I've taken programming as a hobby, studying it since I was 10 or so. 7 years to date, I've become progressivly good at C++, PHP, C#, Assembly, Lua, and the web languages such as HTML and CSS. Though I've never taken a class, I've been able to complete most, if not all of the questions from different "Programmer Interview Questions" articles and have participated in some small scale projects in the past. Summer starting yesterday for me, I've been thinking about how to keep busy while maybe earning some money along the way. Now, some kids mow lawns, others get fast food jobs, but what about programming jobs? Is there even such a thing?

    Read the article

  • Get available screen area in autohotkey

    - by Herms
    I'm trying to write a few simple AutoHotkey scripts for moving windows around, and I'm having trouble getting the correct screen size values. I'm trying to get the size of the usable area on the screen (generally the full screen resolution minus the taskbar, and maybe any other docked windows like the sidebar in Vista). Neither of the methods I've found for getting the screen width seems to work. None of the 3 methods I found to get the screen size are giving me the right values. Here's the test script I'm using (running on XP with the taskbar on the bottom at its default size): #7:: WinMove A,,0,0,A_ScreenWidth,A_ScreenHeight return #8:: ;SM_CXMAXIMIZED and SM_CYMAXIMIZED SysGet, ScreenWidth, 61 SysGet, ScreenHeight, 62 WinMove A,,0,0,ScreenWidth,ScreenHeight return #9:: ;SM_CXFULLSCREEN and SM_CYFULLSCREEN SysGet, ScreenWidth, 16 SysGet, ScreenHeight, 17 WinMove A,,0,0,ScreenWidth,ScreenHeight return #7 causes the window to take up the entire resolution, so it overlaps the taskbar. #8 causes the width to be larger than the resolution (I see the window's right edge show up on my secondary monitor) and the height is slightly too large, so the window partially overlaps the taskbar area. Looks like this is correct except for not taking into account the window decorations at the edges. #9 seems to have the correct width, but the height is too short. It looks like it's subtracting the taskbar's height from the resolution's height, but then subtracting another 30 pixels from it. I could just use what I have in #9 and add 30 to the height I get, but that feels too much like a hack that would break in other configurations. It seems like there has to be a way to get the available screen size properly, but I can't find it in AutoHotkey. For reference, this seems to give me what I need in Java: Toolkit.getDefaultToolkit().getScreenSize();

    Read the article

  • System.EnterpriseServices.Wrapper.dll error

    - by Elaine
    this has driven me crazy, Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load file or assembly 'System.EnterpriseServices.Wrapper.dll' or one of its dependencies. (Exception from HRESULT: 0x800700C1) Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="PMP.MvcApplication" Language="C#" % Yesterday, I shut up my WIN7, an windows update was pending there without any process for nearly one hour, then I shut my laptop . and when i re-opened my win7 and ran the PMP MVC application, this error occured. I finished that pending windows update. but no help. I googed to find that should re-install .net framework 1.1/2.1, i tried but nothing good happend, this error always here. I even spent 4 hrs to re-install vs2010, but still cannot solve this. If i need to re-install WIN7 for this , i will be crazy at all... How this happened? and how to overcome it? Thanks for your time..

    Read the article

  • Best practice to pass a value from pop up control on iPad.

    - by Tattat
    It is an iPad app based on SDK 3.2. I have a MainUIView, that is subclass from UIView, it have a UIButton and a UILabel. When user press the UIButton, the pop up control will be appeared with a table view. When the user select a cell from the table view, the UILabel changes content base on the user click, and the pop up table view will disappear. The question is, how can I pass the "selected cell" to the UILabel. I am thinking making a "middle man" object. When the user click the UIButton, and the "middle man" will pass to the table. When the cell is selected, the "middle man" will store the idx, and call the UILabel change content from the value of "middle man". But I think it is pretty complex to implement, is there any easier way to implement it? thz u.

    Read the article

  • SSL question java web application

    - by Nitesh Panchal
    Hello, I configure my web application to use SSL using my own self signed certificate. Everything is working fine but here my whole site is https now as i used :- <transport-guarantee>CONFIDENTIAL</transport-guarantee> However, i only want my login page to use SSL and not complete site. What changes do i need to make in my application? Thanks in advance :)

    Read the article

  • Could not load file or assembly System.EnterpriseServices

    - by Nifle
    I'm trying to read up on asp.net mvc, I have never used asp.net before but are familiar with regular c# development. Freshly installed, fully patched Windows XP Home. Freshly installed updated to SP1 Visual Studio 2008 Pro. Started a new project, selected "ASP.NET MVC Web Application", target framework is 3.5 I hit F5 and I get: "Could not load file or assembly System.EnterpriseServices" Exact wording in swedish: [FileNotFoundException: Det går inte att hitta filen. (Undantag från HRESULT: 0x80070002)] [FileNotFoundException: Det går inte att läsa in filen eller sammansättningen System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a eller ett av dess beroenden. Det går inte att hitta filen.] Adding a reference to System.EnterpriseServices in my project did not work. A quick google suggested I copy this file Microsoft.NET/Framework/v2.0.50727/System.EnterpriseServices.dll into %WINDOWS%/assembly but that did not work either. Any suggestions? Found the answer, I added it to the GAC with gacutil. C:\WINDOWS"C:\Program\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i Microsoft.NET/Framework/v2.0.50727/System.EnterpriseServices.dll

    Read the article

  • libtldl not found - chekc libtool installation!

    - by lowgain
    I'm on Fedora 8, trying to configure/make libmp3splt, and every time I try to compile I get libtldl not found - chekc libtool installation! I have libtool installed, and some places online said to try installing libltdl-dev, which does't seem to exist for me to install. Missing anything? Thanks!

    Read the article

  • Port Forwarding on 80 vs. 8080

    - by Chadworthington
    I am able to access this url (Don't bother clicking on it, it's just an example): http://my.url.com/ This web site works: http://localhost:8080/tfs/web/ I setup my router to forward port 80 to the PC hosting the web site. I also forward port 8080 to the same box. But when I try to access this url I get the eror "Page Cannot be displayed:" http://my.url.com:8080/tfs/web/ I fwded port 8080 the same way I fwded port 80. I also turned off Windows Firewall, in case it was blocking port 8080. Any theories why port 80 works but 8080 does not?

    Read the article

  • Writing code to be a better programmer

    - by wtfsven
    A while back I heard on a podcast about a site listing "10 applications to write that will make you a better programmer." I'm desperate to find where this is, or at the very least a decent list from someone here. The thing is, I've been writing code for about 8 years now, and it's my passion. Very few things make me happier than getting lost in some C# or Python. But I've spent the last 2 years in a job that doesn't allow me much time to do what I love. Now everyone knows that the best way to keep your coding sword sharp is to use it, and I've noticed recently that mine is getting dull. Does anyone have any suggestions on some simple programs to help flex my coding muscle? I'm one of those odd few who actually likes writing CRUD applications, so stuff like that would be nice, too.

    Read the article

  • conversion of assembly

    - by lego69
    hello, can somebody please explain is it possible to convert this snippet of the code to assembly of pdp11? movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rdi movq -8(%rbp), %r8 movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rcx movq -8(%rbp), %rsi movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rdx movq -8(%rbp), %rax movl (%rdx,%rax), %eax addl (%rcx,%rsi), %eax movl %eax, (%rdi,%r8) movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rdi movq -8(%rbp), %r8 movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rcx movq -8(%rbp), %rsi movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rdx movq -8(%rbp), %rax movl (%rdx,%rax), %edx movl (%rcx,%rsi), %eax subl %edx, %eax movl %eax, (%rdi,%r8) movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rdi movq -8(%rbp), %r8 movl -16(%rbp), %eax cltq leaq 0(,%rax,4), %rcx movq -8(%rbp), %rsi movl -12(%rbp), %eax cltq leaq 0(,%rax,4), %rdx movq -8(%rbp), %rax movl (%rdx,%rax), %edx movl (%rcx,%rsi), %eax subl %edx, %eax movl %eax, (%rdi,%r8) leave ret it is only small part of all code that I have...

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >