Daily Archives

Articles indexed Friday March 26 2010

Page 5/121 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Zend Framework, what $this->_forward is doing

    - by RageZ
    Hello everyone, I would like someone to explain me what _forward is exactly doing, I cannot see if _forward is also rendering the attached view to the action or just executing the action. Also is it possible to pass argument to $this-action in a view script ? More generally my problem is how to code a confirmation page, let's say the user input some stuff and you want to show him confirmation, is forward is mean for that case ? Thanks

    Read the article

  • What Happens to Commit Logs on a Branch After Merging?

    - by Levi Hackwith
    Scenario: Programmer creates a branch for project 'foo' called 'my_foo' at revision 5 Programmer makes multiple changes to multiple files as he works on the 'my_foo' feature. At the end of each major step, say adding several new functions to class, the programmer does an svn commit on the appropriate files therefore committing them to the branch After several weeks and many commits later (each commit having a commit log describing what he did), the programmer merges the branch back into the trunk: #Assume the following is being done from inside a working copy of the trunk: svn merge -r 5:15 file:///path/to/repo/branches/my_foo Hazzah! he's merged all his changes back into trunk! There's much rejoicing and drinking of Mountain Dew. Now let's say another programmer comes along a week later and updates their working copy from revision 5 to revision 15. "Wow", they say. "I wonder what's changed since revision 5". The programmer then does an svn status on their working copy and they get something like this: ------------------------------------------------------------------------ r15 | programmer1 | 2010-03-20 21:27:04 -0400 (Sat, 20 Mar 2010) | 1 line Merging Version 2.0 Changes into trunk ------------------------------------------------------------------------ r5 | programmer2 | 2010-02-15 10:59:55 -0500 (Mon, 15 Feb 2010) | 1 line Added assets/images/tumblr_icon.png to trunk What the heck happened to all the notes that the other programmer put in with all of his commits in his branch? Do those not get pulled over during a merge? Am I crazy or just forgetting something?

    Read the article

  • Development environment to use/learn VTK with C++

    - by jv2010
    Hi, I am a newbie with VTK and C++ (but am well versed in the concepts/Java etc). I will eventually need to use both QT and VTK for my project. (1) I would like to know if there is a "development environment"/"editor" for VTK (using C++) ? (2) Something similar to VTK Designer (http://www.vcreatelogic.com/products/vtkd/) ? With VTK Designer, I am very disappointed that there is no feature to convert the VTK output into C++ code. Thanks in advance

    Read the article

  • backup sql databases, folders; 7ZIP and copy to ftp

    - by laurens
    Hi all, We are quite stuck with which solution to choose for this backup issue: What should happen: First, there should be an interface were to choose several sql databases (sort of checkboxes or whatsoever), also a few folders should be backed up - this could be part of the program or could be seperate, I think about an interface were to select folders, but a txt file (or xml) with paths-to-folders is as good. Next, everything should be 7Zipped, SQL-DB and files seperate. Eventually everything should be copied to a local network drive after which copied via FTP. Also important; it could be programmed or (partly) bought but I can't be one of those expensive backup tools $1000+ etc. I already found this fairly priced tool that does already most of the tasks 7ZIP and copy to ftp sqlbackupandftp.com For your information: we had a kind of self-made tool created by a collegue (some time ago) but it became very untrustworthy and as the databases grew it couldn't handle it anymore... moving on Please come up with suggestions. Thanks in advance!

    Read the article

  • What is lighttpd's version of "mod_substitute"?

    - by Dennis
    Recently I read that Apache 2.2 has a new mod to patch outputs on the fly. mod_substitute provides a mechanism to perform both regular expression and fixed string substitutions on response bodies. The feature is useful when I setup testing/development environment. I can replace hostname without touching the content/code. How can I do similar configuration in lighttpd?

    Read the article

  • Excel 2007 Constantly Creating Custom Cell Styles

    - by Nick
    Hello, I've been using Office 2007 for a few months now and have noticed that it was creating duplicate custom cell styles on its own, like Normal 2, Normal 3, etc. It didn't really bother me at first, but now Excel will lag when I open the cell styles menu as it gathers well over a hundred of these duplicates (I have seen Normal 54 and Normal 5 2 2 so I'm unsure as to how many there actually are). I have also just checked a fresh Excel sheet, and it only has the defaults, but one I created earlier today from scratch has the Normal 54 listed. My questions are: Why is this happening? Can I delete a temp or custom settings file somewhere to clear this? Any help on this is appreciated.

    Read the article

  • Nvidia driver for Dell xps M1330 in XP

    - by Recursion
    I need to run xp, and cannot find a driver that works for this laptop in windows xp. I have tried quite a few of them, from my google searches, but none work, they all come up and say no proper driver can be found for your hardware. I have tried to replace the inf files on driver installs but I still get nothing, same error. Any ideas will be appreciated, thank you.

    Read the article

  • Creating a "netbeans property" style dialog box

    - by pikco
    Hi I've been trying to create a GUI using netbeans, that includes a dialog similar to Netbean's own "property dialog" that appears when designing. ie. a dialog that contains a table that can be expanded by tree nodes. Something like the dialog on this page, http://platform.netbeans.org/tutorials/nbm-property-editors.html As far as I can understand, the page I linked to describes a custom editor I can set up for use within netbeans while designing - I'm just looking for a way to doing something similar for my actual application I'm writing. Is there an easy way to do this? I came across this and have tried it but it doesn't quite work in the same way as the standard Netbeans dialog. weblogs.java.net/blog/timboudreau/archive/2008/06/egads_an_actual.html Any tips greatly appreciated.

    Read the article

  • Webbrowser control: auto fill, only works one time, why?

    - by Khou
    The following code loads a page and auto fills in the values. private void button1_Click(object sender, EventArgs e) { //Load page and autofill webBrowser1.Navigate("http://exampledomain.com"); webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(autoFillDetails); // etc...etc.. } private void autoFillDetails(object sender, WebBrowserDocumentCompletedEventArgs e) { // do auto fill values ((WebBrowser)sender).Document.GetElementById("MY_NAME").SetAttribute("value", "theMynamevalue"); // etc...etc... } Autofill only work one time! After the form has been submitted, and you navigate back to the page previous form page (even when you click the button again), it will no longer auto fill the form values! Note: The the "autoFillDetails" code is executed a second time, 3rd time etc, it still would not auto fill the values. why does it only work one time? what am i doing wrong?

    Read the article

  • PHP security question?

    - by pHp
    I just wanted to know what are some basic PHP security techniques I should use when creating a web page that accepts articles? I'm fairly new to PHP and was wondering what will hold the fort down until I'm a security expert?

    Read the article

  • C# datastructure

    - by Bi
    Hi Whats the best data structure for a 2D array of size unknown x 2. Which means one dimension is dynamic (list of grocery items) and the other is fixed (price and quantity). Thanks

    Read the article

  • sizer.replace() paints "over" old sizercontent

    - by elbenfreund
    hi. I am rather new to wx/python so please excuse if this is stupid or ill described. I am substituting a nested sizer with a new one as shown in the snippet below. after some tinkering everything seems to work out but the re-drawing of the parent-sizer. the content of the old nested sizer remains and gets "painted" over with the new sizer content despite my sizer.Layout() system setup: - python 2.5.5.2 and 2.6.4 - wxpython 2.8 -- coding: utf8 -- import wx class Frame(wx.Frame): def init(self): wx.Frame.init(self, None, wx.ID_ANY, title='test') class Test(wx.App): def OnInit(self): frame = Frame() self.panel = wx.Panel(frame) self.panel.SetBackgroundColour('red') self.sizer = wx.BoxSizer(wx.VERTICAL) button = wx.Button(self.panel, wx.ID_ANY, 'TEST') self.hsizer = wx.BoxSizer(wx.HORIZONTAL) self.hsizer.Add(wx.StaticText(self.panel, wx.ID_ANY, 'nacknack')) self.sizer.Add(button) self.Bind(wx.EVT_BUTTON, self.on_test_button, button) self.text = wx.StaticText(self.panel, wx.ID_ANY, 'FOOO') self.sizer.Add(self.text) self.sizer.Add(self.hsizer) self.panel.SetSizer(self.sizer) frame.Show() return True def on_test_button(self, evt): tmpsizer = wx.BoxSizer(wx.VERTICAL) tmpsizer.Add(self.makesizer()) tmpitem = tmpsizer.GetChildren()[0] self.sizer.Replace(2, tmpitem) self.sizer.Layout() def makesizer(self): testsizer = wx.BoxSizer(wx.HORIZONTAL) testsizer.Add(wx.StaticText(self.panel, wx.ID_ANY, 'testsizer')) return testsizer if __name__ == '__main__': app = Test() app.MainLoop()

    Read the article

  • Why do my Sax Parser produce no results after using InputStream Read?

    - by Andy Barlow
    Hello, I have this piece of code which I'm hoping will be able to tell me how much data I have downloaded (and soon put it in a progress bar), and then parse the results through my Sax Parser. If I comment out basically everything above the //xr.parse(new InputSource(request.getInputStream())); line and swap the xr.parse's over, it works fine. But at the moment, my Sax parser tells me I have nothing. Is it something to do with is.read (buffer) section? Also, just as a note, request is a HttpURLConnection with various signatures. /*Input stream to read from our connection*/ InputStream is = request.getInputStream(); /*we make a 2 Kb buffer to accelerate the download, instead of reading the file a byte at once*/ byte [ ] buffer = new byte [ 2048 ] ; /*How many bytes do we have already downloaded*/ int totBytes,bytes,sumBytes = 0; totBytes = request.getContentLength () ; while ( true ) { /*How many bytes we got*/ bytes = is.read (buffer); /*If no more byte, we're done with the download*/ if ( bytes <= 0 ) break; sumBytes+= bytes; Log.v("XML", sumBytes + " of " + totBytes + " " + ( ( float ) sumBytes/ ( float ) totBytes ) *100 + "% done" ); } /* Parse the xml-data from our URL. */ // OLD, and works if comment all the above //xr.parse(new InputSource(request.getInputStream())); xr.parse(new InputSource(is)) /* Parsing has finished. */; Can anyone help me at all?? Kind regards, Andy

    Read the article

  • Application that depends heavily on stored procedures

    - by PieterG
    We currently have an application that depends largely on stored procedures. There is a heavy use of temp tables. It's an extremely large application. Facing this situation, I would like to use Entity Framework or Linq2Sql for a rewrite. I might consider using Fluent Hibernate or Subsonic, as i've used them quite extensively in the past. I've had problems with Linq2Sql generating the return types for the stored procedures because of the usage of the temp tables, and I think it's cumbersome to go and change all the stored procedures from temp tables to in-memory tables. Considering the 2 choices that I want to make, which one of the 2 is the best route to go and why? If my choices are extremely idiotic, please provide alternatives. Edit: The reason for the question and the change is that the data access layer is non-existent and was built 10 years ago. We currently still run into a lot of issues with it. I don't want to divulge too much, but if you saw it, your eyes would start bleeding :)

    Read the article

  • .NET 4.0 Implementing OutputCacheProvider

    - by azamsharp
    I am checking out the OutputCacheProvider in ASP.NET 4.0 and using it to store my output cache into the MongoDb database. I am not able to understand the purpose of Add method which is one of the override methods for OutputCacheProvider. The Add method is invoked when you have VaryByParam set to something. So, if I have VaryByParam = "id" then the Add method will be invoked. But after the Add the Set is also invoked and I can insert into the MongoDb database inside the Set method. public override void Set(string key, object entry, DateTime utcExpiry) { // if there is something in the query and use the path and query to generate the key var url = HttpContext.Current.Request.Url; if (!String.IsNullOrEmpty(url.Query)) { key = url.PathAndQuery; } Debug.WriteLine("Set(" + key + "," + entry + "," + utcExpiry + ")"); _service.Set(new CacheItem() { Key = MD5(key), Item = entry, Expires = utcExpiry }); } Inside the Set method I use the PathAndQuery to get the params of the QueryString and then do a MD5 on the key and save it into the MongoDb database. It seems like the Add method will be useful if I am doing something like VaryByParam = "custom" or something. Can anyone shed some light on the Add method of OutputCacheProvider?

    Read the article

  • Enumerate Class Properties in C#

    - by user275561
    I have a class Similar to this public class Model { public TimeSpan Time1 {get; set;} public TimeSpan Time2 { get; set; } public TimeSpan Time3 { get; set; } public TimeSpan Time4 { get; set; } } Now Let's Imagine I have to populate the times during runtime and then Figure out the time remaining between Time 1 and Time 2, then when that passes Find the time remaining between Time2 and Time3 and so on. However, I need to take into account what the time is right now. For Example: Now it is 1:00 PM Time1=5:00 AM Time 2 = 12:00 PM Time 3= 4:00 PM Time 4 = 6:00 PM So since the time is 1:00PM, I need to find the difference between Time 2 and Time 3 Now is there a smarter way other than reflection to determine this? Should i add something in my class

    Read the article

  • Editing a table like iPhone Mail

    - by user217572
    The iPhone Mail application has an edit button in the navigation bar. Tapping that button shows a delete button in the toolbar and shows checkbox controls in the table cells. Tapping one or more checkboxes then tapping the delete button causes the checked messages to be deleted. How can I add similar functionality to my own code? Here's a screenshot of the effect I'm looking for:

    Read the article

  • Mysql: Disk is full writing

    - by elma
    Hi there, I'm having some problems with my mysql server lately, so I've decided to check the error logs: [root@LSN-D1179 log]# tail -10 mysqld.log 100325 19:30:03 [ERROR] /usr/libexec/mysqld: Table './lfe/actions' is marked as crashed and should be repaired 100325 19:30:03 [ERROR] /usr/libexec/mysqld: Table './lfe/actions' is marked as crashed and should be repaired 100325 19:30:18 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_task_logs.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs 100325 19:34:34 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_profile_portal_views.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs 100325 19:39:46 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_posts.TMD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs 100325 19:40:18 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_task_logs.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs 100325 19:44:34 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_profile_portal_views.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs 100325 19:49:46 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_posts.TMD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs 100325 19:50:18 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_task_logs.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs 100325 19:54:34 [ERROR] /usr/libexec/mysqld: Disk is full writing './omuz/ibf_profile_portal_views.MYD' (Errcode: 122). Waiting for someone to free space... Retry in 60 secs And here's is my df -h output [root@LSN-D1179 log]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 143G 6.2G 129G 5% / /dev/sda1 99M 12M 83M 13% /boot tmpfs 490M 0 490M 0% /dev/shm As you can see, I have plenty of free space; so I couldn't figure out these "Disk is full" errors in mysqld.log. Does anyone know what should I do to fix this? Ugur

    Read the article

  • My computer's dying :(

    - by j-t-s
    Hi All I have a sweet computer and have never had any real problems with it until now. I recently formatted my computer and all was well. But now my monitor randomly flickers. The monitor will just go black for about a second or two, then it'll return back to its normal state with all the stuff still on the screen. This is getting progressively worse. Another problem that has started is my computer randomly restarts. (I've managed to prevent it from restarting by removing the check in Automatically Restart from the Startup and Recovery Dialog. But I know this doesn't solve the problem). It also completely freezes up on me. One last thing, this morning I got a big blue screen. I can't remember what it said, but if it happens again I will take note of it and repost. Or if I can find some kind of a log file containing that bluescreen error I will post. I have checked all cords, and they're all fine. Nothing's loose. My computer isn't overheating either. I've taken the case off for 3 whole days and haven't used the computer for those 3 days, which has had no effect. I've checked the connections inside and nothing's loose there either. I know there's nothing wrong with my monitor because my friend has 2 computers and it works perfectly on those computers. I don't understand how my computer could suddenly become so unstable. I'm almost certain that I have no viruses; I full-scan my pc everyday for nastys, and have strict firewall settings. Anyway, I don't see how it could be a virus anyway simply due to the fact that I had these problems right after I formatted, and before I even had the chance to install or copy anything or even connect to the internet. I know it has nothing to do with the way I formatted the computer too, I've been fixing computers for years. Sorry for rambling on, just making sure I don't leave anything out. Has anybody else had this problem? Can somebody please try to help me with this? Thank you :)

    Read the article

  • Calling AddEventListener in a loop with a variable element name

    - by user302209
    Hi, I'm trying to do the following: I have a set of images and select (dropdown) HTML elements, 30 of each one. I'm trying to use AddEventListener on a loop from 1 to 30 so that when I change the value of the select, the image src is updated (and the image changes). The AddEventListener function is this one: function AddEventListener(element, eventType, handler, capture) { if (element.addEventListener) element.addEventListener(eventType, handler, capture); else if (element.attachEvent) element.attachEvent("on" + eventType, handler); } I tried this and it worked: var urlfolderanimalimages = "http://localhost/animalimages/"; var testselect = "sel15"; var testimg = "i15"; AddEventListener(document.getElementById(testselect), "change", function(e) { document.getElementById(testimg).src = urlfolderanimalimages + document.getElementById(testselect).value; document.getElementById(testimg).style.display = 'inline'; if (e.preventDefault) e.preventDefault(); else e.returnResult = false; if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; }, false); But then I tried to call it in a loop and it doesn't work. The event is added, but when I change any select, it will update the last one (the image with id i30). var urlfolderanimalimages = "http://localhost/animalimages/"; for (k=1;k<=30;k++) { var idselect = "sel" + k; var idimage = "i" + k; AddEventListener(document.getElementById(idselect), "change", function(e) { document.getElementById(idimage).src = urlfolderanimalimages + document.getElementById(idselect).value; document.getElementById(idimage).style.display = 'inline'; if (e.preventDefault) e.preventDefault(); else e.returnResult = false; if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; }, false); } What am I doing wrong? I'm new to JavaScript (and programming in general), so sorry for the vomit-inducing code :(

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >