Daily Archives

Articles indexed Tuesday March 9 2010

Page 12/49 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Drupal: View with exposed Taxonomy filter.. 3 questions

    - by Patrick
    Hi, I'm using Views module and an exposed taxonomy based filter, to allow users to select a subselection of articles. I need to further customize my filter: 1) I want the user able to order the tags alphabetically by clicking a checkbox (if this checkbox is unchecked the default order is reset. 2) I want all tags selected in the beginning to show my user all the articles. (Additional tags can be added by the user later, so I cannot just select all the tags in Views settings, because the new ones would be uncovered). thanks

    Read the article

  • Power Brick Decision

    - by itguy12v
    If I need 1.5 amps for an itx home theater system, will the 120ac/12dc power brick run cooler or last longer if I use the more expensive 10 amp power brick or the least expensive 5 amp power brick. Thanks

    Read the article

  • Useful extensions for MediaWiki

    - by Stan
    Can anyone suggestion some useful MediaWiki extension? I've installed PDF export, syntax lighlight, file link protocol, submit in toolbar, enforce strong password. But still eager to know any good/handy extensions. Thanks

    Read the article

  • Possible loss of precision; extracting char from string

    - by Troy
    I am getting a string from the user and then doing some checking to make sure it is valid, here is the code I have been using; char digit= userInput.charAt(0) - '0'; This had been working fine until I did some work on another method, I went to compile and have been receiving a 'possible loss of precision' error since then. What am I doing wrong?

    Read the article

  • .htaccess mod_rewrite is preventing certain files from being served

    - by Lucas
    i have a successful use of mod_rewrite to make a site display as i wish... however, i have migrated the 'mock-up' folder to the root directory and in implementing these rules for the site, some files are not being served in the ^pdfs folder: RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] (old directory) RewriteRule ^redesign_03012010/mock-up/([^/]+)/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1&section=$2 [PT] RewriteRule ^redesign_03012010/mock-up/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1 [PT,L] (new directory) RewriteRule ^([^/]+)/([^/]+)$ /index.php?test=1&page=$1&section=$2 [PT] RewriteRule ^([^/]+)$ /index.php?test=1&page=$1 [PT,L] ... ^pdfs (aka /pdfs/) is not serving the files... any suggestions?

    Read the article

  • Test Driven Development with C++: How to test a class which depends on other classes?

    - by Nikhil
    Suppose I have a class A which depends on 3 other classes X, Y and Z, either A uses these through a reference or a pointer or say A is templated to be instantiated with X, Y and Z doesn't matter, the key is that in order to test A, I need to have X, Y and Z. So I need to have fakes for A, B and C. Suppose I write them. Now, how do I swap real and fake objects easily? I can see that this works very easily in the case of templates. In order to make it work when A depends on X, Y and Z through a reference or a pointer, I would need to have a base class say X_Interface from which I can inherit X_Real and X_Fake. So basically, I would end up in having 3 times the number of classes for every class that would need to have a fake. I am most likely missing something. There has to be a simpler way to do this. Having a base class X_Interface is also quite expensive as I will be using more space and making virtual calls. I guess I could use CRTP as I know whether its a X_Real or X_Fake at compile time but still there must be a better way.

    Read the article

  • Why will IIS 6 not serve my custom 404 page when I set the URL in 'Custom Errors'?

    - by Glenn Slaven
    I've got an ASP.NET MVC site & I've got an Errors controller with a NotFound action which works great for 404 errors that pass though .NET, but for stuff that doesn't (like static files) I've set the Custom Errors value for 404 to URL with a value of /Errors/NotFound. But when I do this & hit a non-existant page the site just gives me this: The system cannot find the path specified. Is this because it's a dynamic url, can IIS not redirect 404 requests to dynamic urls or have I screwed up the config somewhere?

    Read the article

  • Is it a good idea to mock/stub in integration tests?

    - by ez
    Say there are multiple requests in a integration test, some of them are sphinx calls(locator for example). Should we just stub out the entire response of these sphinx call, or, since it is a integration test, we want to excise the entire test without stubbing. If that is the case, how do we still keep test independent in the situation when sphinx fails, no internet connection, or third party server non-responsive. Give reasons. Thanks

    Read the article

  • Object can not be resolved.

    - by Gabriel A. Zorrilla
    I have this code: public class Window extends JFrame { public Window(){ ... JButton button = new JButton("OK"); getContentPane().add(button); ButtonHandler handler = new ButtonHandler(); button.addActionListener(handler); ... } private class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent event){ if (event.getSource() == button){ // <--- "button can not be resolved" System.out.println("Hello"); } } } I'm getting that error in Eclipse. I just made a (simplified) example found in a book, dont know what can be wrong. Knowledge eye required! :)

    Read the article

  • Getting readline to block on a FIFO

    - by Dan
    I create a fifo: mkfifo tofetch I run this python code: fetchlistfile = file("tofetch", "r") while 1: nextfetch = fetchlistfile.readline() print nextfetch It stalls on readline, as I would hope. I run: echo "test" > tofetch And my program doesn't stall anymore. It reads the line, and then continues looping forever. Why won't it stall again when there's no new data? I also tried looking on "not fetchlistfile.closed", I wouldn't mind reopening it after every write, but Python thinks the fifo is still open.

    Read the article

  • MySQL query returns different set of results on two identical databases

    - by 1nsane
    I exported a live MySQL database (running mysql 5.0.45) to a local copy (running mysql 5.1.33) with no errors upon import. There is a view in the database, that when executed locally, returns a different set of data than when executed remotely. It's returning 32 results instead of 63. When I execute the raw sql, the same problem occurs. I've inspected the data in all tables being joined, and the counts are the same. The query is simple and has no where conditions - but about 10 joins. Aside from the differences in mysql versions... I can't find any reason that this query would return different results between databases... since they are effectively exact copies. Has anyone experienced a problem like this before?

    Read the article

  • Scrollbar with Sprite and Rectangle won't move text, just the Rectangle it's painted on.

    - by WebDevHobo
    Warning: school assignment. For those of you still with me, I am tasked with making some scrollable content in Flash. Load in a TextFile using LoadURL(), then display it. To get the text, we've written our own class TextFieldExtended, which is basically just there to give the textfile location to the constructor and then have the class do the various steps of getting it and loading it for you. So I needed to get a Scrollbar, which I got here: http://kirupa.com/forum/showthread.php?t=245468 (all files in a zip linked at the end of this text) The thing is, it works with Sprites. After trying to get it to accept TextFieldExtended, I bumped into a block, since the scrollbar relied heavily on a Sprite property that TextFieldExtended didn't have or could have. So I tried adding the TextFieldExtended instance to a Sprite instance using addchild. A problem occurs here that I do not know how to handle. It seems that a Rectangle is drawn and the Text is drawn on that. I say this because the scrollbar moves the Rectangle up and down a bit, but the text doesn't scroll, just the Rectangle it is positioned in and the text then moves along with it. My question: can this be fixed, or is does this implementation of scrollbars need a lot of adaptations before this is possible? If so, any scrollbars you can recommend, because it's too extended for me at this point. All files: http://www.mediafire.com/?q2ium22gmox This was made in Flash CS4 using ActionScript3. The Example class is the final implementation

    Read the article

  • How to send to view $data and $data2 at same time?

    - by artmania
    Hi friends, I use codeigniter and issue about how to send to view $data and $data_cat2 at same time? $data['records'] = $this->gallery_model->get_all(1); $data_cat2['records'] = $this->gallery_model->get_all(2); $this->load->view('gallery/index.php',$data); I tried to put an another load-view for $data_cat2. and it just repeated the all page :/ Thanks regards!!! appreciate helps! sorry for silly question, just sorted it! feel shame to ask that: $data['records'] = $this->gallery_model->get_all(1); $data['records_cat2'] = $this->gallery_model->get_all(2); and using the record_cat2 in view file.

    Read the article

  • How do I make a child control re-anchor to its parent Form when it has been cut off on a small resol

    - by Paul Fedory
    I have a Windows Form with a default size of 1100 x 400, and I have a DataGridView control on it anchored to Top, Left, Bottom, Right. Resizing the form on a screen with resolution higher than 1100 x 400 works fine, and the anchoring works well, resizing the DataGridView control as expected. When I launch the form on a screen with resolution 800x600, the form is cut off, and made to fit the 800 x 600. The DataGridView is cut off, and cannot be seen entirely - it bleeds off the form to the right, so it's not respecting the right anchor. Resizing the form in this situation doesn't respect the anchoring settings for some reason: the DataGridView control does not resize when the form is resized. Is there a way programmatically (on a resize event or something) to force the child DataGridView control to anchor to the sides of the form? I've already tried calling a PerformLayout and Refresh in the Form's resize event but it's rather redundant, isn't it?

    Read the article

  • div loading is not proper while using ajax

    - by sadesh
    i have to load a div with a list of check boxes using ajax. I have writen ajax code to fetch the string containing the list of check boxes.` document.getElementById("roleCheckBoxes").innerHTML=""; $('#roleCheckBoxes').append(xmlhttp.responseText.toString()); the data are fetching properly but the display alone not reflecting the string which i gave instead it displays a the list of check boxes with all checked... can you help me in it..

    Read the article

  • How to launch a file protocol URL with an anchor from Java?

    - by Jeff C
    From a Java program, I need to launch the default browser on a local HTML file, pointed to an anchor inside the file. In Java SE 6, the java.awt.Desktop.browse method will open the file, but will not honor the anchor, so something like the following opens the file at the top, but does not page the browser to the anchor: Desktop.getDesktop("file:///C:/foo/bar.html#anchor"); Sun says here http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6477862 that anchors are not supported in the file URI protocol. Does anyone have a better answer? I can use Java SE 6. I would be OK with a Windows only solution.

    Read the article

  • Forcing deallocation of large cache object in Java

    - by Jack
    I use a large (millions) entries hashmap to cache values needed by an algorithm, the key is a combination of two objects as a long. Since it grows continuously (because keys in the map changes, so old ones are not needed anymore) it would be nice to be able to force wiping all the data contained in it and start again during the execution, is there a way to do effectively in Java? I mean release the associated memory (about 1-1.5gb of hashmap) and restart from the empty hashmap..

    Read the article

  • How can you calculate the X/Y coordinate to zoom to

    - by Mark
    Im writing a WPF application that has a zoom and pan ability, but what I want to also implement is the ability to zoom and pan "automatically" (via a button click). I have the methods all defined to zoom and pan, but Im having trouble telling the app the desired X/Y coordinates for the panning. Basically, I know that I want the control to be centered at a desired zoom level (say zoomed in 6X times), but the panning destination point is NOT the center point of the control because after the zooming, its been scaled. Does anyone know a way of calculating the desired X/Y position to pan to, taking into account the zooming as well? Do I just scale the desired destination Point? It doesnt seem to work for me... Thanks a lot

    Read the article

  • Randomly getting a 500 error on my website

    - by randylahey
    I am randomly getting a 500 error on my websites, all of which are hosted on a shared server. It won't happen all the time, just randomly when I will refresh the page I will get a 500 error. It usually will come back after I refresh a few times. I've been reading about it and have heard that .htaccess files can cause this... I did recently start using an .htaccess file to tell my server to start using php 5. I got the code straight from the hosting company that I am with. This is what is in the .htaccess file: AddType x-mapp-php5 .php If anyone has any ideas as to what would be causing this, that would really help. Thanks!

    Read the article

  • VB.Net Dynamically Load DLL

    - by hermiod
    I am trying to write some code that will allow me to dynamically load DLLs into my application, depending on an application setting. The idea is that the database to be accessed is set in the application settings and then this loads the appropriate DLL and assigns it to an instance of an interface for my application to access. This is my code at the moment: Dim SQLDataSource As ICRDataLayer Dim ass As Assembly = Assembly. _ LoadFrom("M:\MyProgs\WebService\DynamicAssemblyLoading\SQLServer\bin\Debug\SQLServer.dll") Dim obj As Object = ass.CreateInstance(GetType(ICRDataLayer).ToString, True) SQLDataSource = DirectCast(obj, ICRDataLayer) MsgBox(SQLDataSource.ModuleName & vbNewLine & SQLDataSource.ModuleDescription) I have my interface (ICRDataLayer) and the SQLServer.dll contains an implementation of this interface. I just want to load the assembly and assign it to the SQLDataSource object. The above code just doesn't work. There are no exceptions thrown, even the Msgbox doesn't appear. I would've expected at least the messagebox appearing with nothing in it, but even this doesn't happen! Is there a way to determine if the loaded assembly implements a specific interface. I tried the below but this also doesn't seem to do anything! For Each loadedType As Type In ass.GetTypes If GetType(ICRDataLayer).IsAssignableFrom(loadedType) Then Dim obj1 As Object = ass.CreateInstance(GetType(ICRDataLayer).ToString, True) SQLDataSource = DirectCast(obj1, ICRDataLayer) End If Next EDIT: New code from Vlad's examples: Module CRDataLayerFactory Sub New() End Sub ' class name is a contract, ' should be the same for all plugins Private Function Create() As ICRDataLayer Return New SQLServer() End Function End Module Above is Module in each DLL, converted from Vlad's C# example. Below is my code to bring in the DLL: Dim SQLDataSource As ICRDataLayer Dim ass As Assembly = Assembly. _ LoadFrom("M:\MyProgs\WebService\DynamicAssemblyLoading\SQLServer\bin\Debug\SQLServer.dll") Dim factory As Object = ass.CreateInstance("CRDataLayerFactory", True) Dim t As Type = factory.GetType Dim method As MethodInfo = t.GetMethod("Create") Dim obj As Object = method.Invoke(factory, Nothing) SQLDataSource = DirectCast(obj, ICRDataLayer) EDIT: Implementation based on Paul Kohler's code Dim file As String For Each file In Directory.GetFiles(baseDir, searchPattern, SearchOption.TopDirectoryOnly) Dim assemblyType As System.Type For Each assemblyType In Assembly.LoadFrom(file).GetTypes Dim s As System.Type() = assemblyType.GetInterfaces For Each ty As System.Type In s If ty.Name.Contains("ICRDataLayer") Then MsgBox(ty.Name) plugin = DirectCast(Activator.CreateInstance(assemblyType), ICRDataLayer) MessageBox.Show(plugin.ModuleName) End If Next I get the following error with this code: Unable to cast object of type 'SQLServer.CRDataSource.SQLServer' to type 'DynamicAssemblyLoading.ICRDataLayer'. The actual DLL is in a different project called SQLServer in the same solution as my implementation code. CRDataSource is a namespace and SQLServer is the actual class name of the DLL. The SQLServer class implements ICRDataLayer, so I don't understand why it wouldn't be able to cast it. Is the naming significant here, I wouldn't have thought it would be.

    Read the article

  • After WCAG 2.0, Should we follow any guideline of WCAG 1.0?

    - by jitendra
    WCAG 2.0 is released should we follow only WCAG 2.0 guideline or we should combination of both no need to consider WCAG 1.0 now? or if I'm considering WCAG guideline then do i need to consider any other guideline along with WCAG like RNIB, DDA, Section 508 etc. or if I'm already considering WCAG guideline then no need to look at other region specific guideline/act etc.

    Read the article

  • Crystal Reports and Report Viewer runtime question

    - by Spooky2010
    Using vs2008 c#. Howdy, Ive got an application where im trying to decide if i should use the Crystal reports or the Report viewer that comes with the visual studio install. My issue is that while it will run fine on my development machine, a lot of the machines the application will be deployed to in remote locations WONT have the runtime for either crystal reports or the report viewer installed. therefore if i build an application using either of these, and prevent user access to the reports only on the machines that do NOT have the runtimes, can the application run ok, or should i expect crazy errors on install and such Any advice appreciated.

    Read the article

  • Randomly getting a 500 error on my website

    - by randylahey
    I am randomly getting a 500 error on my websites, all of which are hosted on a shared server. It won't happen all the time, just randomly when I will refresh the page I will get a 500 error. It usually will come back after I refresh a few times. I've been reading about it and have heard that .htaccess files can cause this... I did recently start using an .htaccess file to tell my server to start using php 5. I got the code straight from the hosting company that I am with. This is what is in the .htaccess file: AddType x-mapp-php5 .php If anyone has any ideas as to what would be causing this, that would really help. Thanks!

    Read the article

  • Recover Intel Matrix Raid Configuration

    - by Catalin DICU
    Hello, I had 2 HDDs in Intel Matrix Raid configuration on a motherboard with intel ICH9R. I had some RAID 0 partitions and one RAID 1 partition. Somehow when replacing my videocard I partially unpulugged the power connector from one of the HDD. I booted and only one disk was showing. So I turned off the PC and correctly plugged the power connector and how both HDDs are showing as "Non-Raid Disk" Is there a way to restore the raid configuration from before ? In fact I don't really remember how my partitions where configured, I had 2x100Gb + 1x296Gb in RAID 0 and one 50Gb in RAID 1 (using 2x320Gb HDDs) but I'm not sure how many volumes and how the partitions where allocated on the volumes. Is there a tool to find that ? Thanks

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >