Search Results

Search found 1878 results on 76 pages for 'tom kruse'.

Page 42/76 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Increasing your efficiency during programming

    - by Tom
    Yeah, yeah, I know, it is a little bit of offtopic, but let's try. So, I want to increase my efficiency during my programming as much as possible to programme as fast and sensibly as possiblle. What do you do before starting coding? Drink a lot of coffee, energy drinks? Do you listen to music during programming or you keep quite? Share your ideas.

    Read the article

  • What techniques can be used to detect so called "black holes" (a spider trap) when creating a web crawler?

    - by Tom
    When creating a web crawler, you have to design somekind of system that gathers links and add them to a queue. Some, if not most, of these links will be dynamic, which appear to be different, but do not add any value as they are specifically created to fool crawlers. An example: We tell our crawler to crawl the domain evil.com by entering an initial lookup URL. Lets assume we let it crawl the front page initially, evil.com/index The returned HTML will contain several "unique" links: evil.com/somePageOne evil.com/somePageTwo evil.com/somePageThree The crawler will add these to the buffer of uncrawled URLs. When somePageOne is being crawled, the crawler receives more URLs: evil.com/someSubPageOne evil.com/someSubPageTwo These appear to be unique, and so they are. They are unique in the sense that the returned content is different from previous pages and that the URL is new to the crawler, however it appears that this is only because the developer has made a "loop trap" or "black hole". The crawler will add this new sub page, and the sub page will have another sub page, which will also be added. This process can go on infinitely. The content of each page is unique, but totally useless (it is randomly generated text, or text pulled from a random source). Our crawler will keep finding new pages, which we actually are not interested in. These loop traps are very difficult to find, and if your crawler does not have anything to prevent them in place, it will get stuck on a certain domain for infinity. My question is, what techniques can be used to detect so called black holes? One of the most common answers I have heard is the introduction of a limit on the amount of pages to be crawled. However, I cannot see how this can be a reliable technique when you do not know what kind of site is to be crawled. A legit site, like Wikipedia, can have hundreds of thousands of pages. Such limit could return a false positive for these kind of sites. Any feedback is appreciated. Thanks.

    Read the article

  • No expires header

    - by Tom Gullen
    I have the report from YSlow: (no expires) http://static3.scirra.net/avatars/128/40cfdcbd1b1ec1842e199c97c4b85a4a.png (And a lot more similar). In my web.config though, I have: <system.webServer> <staticContent> <clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" /> </staticContent> <caching> <profiles> <add extension=".ashx" policy="CacheForTimePeriod" kernelCachePolicy="DontCache" duration="01:00:00" /> <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Any" /> </profiles> </caching> <rewrite> <rules> <rule name="Avatar"> <match url="avatars/([0-9]+)/(.*).png" /> <action type="Rewrite" url="gravatar.ashx?hash={R:2}&amp;size={R:1}" appendQueryString="false" /> </rule> </rules> </rewrite> Should this not be adding the expires header correctly? My objectives are: Gravatar.ashx fetches image from Gravatar server Server caches result for 1 hour (similar to SO) Expires header is added so client doesn't keep fetching it from my server

    Read the article

  • IE8 isn't resizing tbody or thead when a column is hidden in a table with table-layout:fixed

    - by tom
    IE 8 is doing something very strange when I hide a column in a table with table-layout:fixed. The column is hidden, the table element stays the same width, but the tbody and thead elements are not resized to fill the remaining width. It works in IE7 mode (and FF, Chrome, etc. of course). Has anyone seen this before or know of a workaround? Here is my test page - toggle the first column and use the dev console to check out the table, tbody and thead width: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>bug</title> <style type="text/css"> table { table-layout:fixed; width:100%; border-collapse:collapse; } td, th { border:1px solid #000; } </style> </head> <body> <table> <thead> <tr> <th id="target1">1</th> <th>2</th> <th>3</th> <th>4</th> </tr> </thead> <tbody> <tr> <td id="target2">1</td> <td>2</td> <td>3</td> <td>4</td> </tr> </tbody> </table> <a href="#" id="toggle">toggle first column</a> <script type="text/javascript"> function toggleFirstColumn() { if (document.getElementById('target1').style.display=='' || document.getElementById('target1').style.display=='table-cell') { document.getElementById('target1').style.display='none'; document.getElementById('target2').style.display='none'; } else { document.getElementById('target1').style.display='table-cell'; document.getElementById('target2').style.display='table-cell'; } } document.getElementById('toggle').onclick = function(){ toggleFirstColumn(); return false; }; </script> </body> </html>

    Read the article

  • Problem to focus JTextField

    - by Tom Brito
    I have used the approach of the ComponentListener to call focus in JTextField within a dialog, but for this case is just not working, I don't know why. It shows the focus in the text field and fast change to the button. Run and see: import java.awt.Component; import java.awt.GridLayout; import java.awt.event.ComponentEvent; import java.awt.event.ComponentListener; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; public class User { private String username = ""; private String password = ""; public User() { // default constructor } public User(String username, String password) { this.username = username; this.password = password; } /** Create a panel containing the componet and tha label. */ public JPanel createLabeledComponent(JLabel label, Component comp) { GridLayout layout = new GridLayout(2, 1); JPanel panel = new JPanel(layout); panel.add(label); panel.add(comp); label.setLabelFor(comp); return panel; } public void showEditDialog() { JLabel usernameLbl = new JLabel(username); final JTextField usernameField = new JTextField(); usernameField.setText(username); JPanel usernamePnl = createLabeledComponent(usernameLbl, usernameField); JLabel passwordLbl = new JLabel(password); JPasswordField passwordField = new JPasswordField(password); JPanel passwordPnl = createLabeledComponent(passwordLbl, passwordField); Object[] fields = { "User:", usernamePnl, "Password:", passwordPnl }; JOptionPane optionPane = new JOptionPane(fields, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, null); JDialog dialog = optionPane.createDialog("User Data"); dialog.addComponentListener(new ComponentListener() { public void componentShown(ComponentEvent e) { usernameField.requestFocusInWindow(); } public void componentResized(ComponentEvent e) {} public void componentMoved(ComponentEvent e) {} public void componentHidden(ComponentEvent e) {} }); dialog.setVisible(true); } public static void main(String[] args) { new User().showEditDialog(); } } Any idea how to solve this?

    Read the article

  • Is there a version of the .Net Redistributable bundled with all supported versions of Windows?

    - by Tom the Junglist
    Hi there, Is there a specific version of .Net that I can target that is bundled with all versions of Windows of XP SP2 and higher? We are trying to create a simple setup stub without having to resort to a low-level C/C++ app... currently something is cooked up in VB6, but there's a fair amount of low-level network code that I would much rather rewrite in .Net -- which would be trivial if only we could rely on the presence of a given version.

    Read the article

  • Best second language to learn for a native english speaking programmer?

    - by Tom Dignan
    I have always wanted to learn a foreign language, but I would like to pick one that can also help me the most in my career. I'm in the US, so it is not necessary for me to learn a second language to influence my career success, however I think knowing one and speaking it fluently could potentially put me in a more interesting career than if I did not. I would like to be able to travel the world, especially if I could have a reason to go one place or another. Which leads me to my question: What is the best second language to learn for a native English speaking programmer? (Especially from the US) Some ideas that come to mind for me are Mandarin, German, Japanese, French... I am looking for experienced opinions though! Thanks.

    Read the article

  • adjusting table content with javascript by enumerating rows

    - by Tom
    I have a table row with 4 columns on my ecommerce site and I want to replace the content of 1st column if total amount in last column (TD class "total") is over 10 EUR. How can I do this with javascript only, I guess somehow to enumerate through the table rows and look for a correct row (one with the last column class as total) and then access the content of 1st column on this row but how?

    Read the article

  • Scriptaculous Sortable.create - Can't hook the dragged element

    - by Tom
    When using Sortable.create I can't seem to get the element that is being dragged. Does Sciptaculous not fully implement all Draggable and Droppable features when you use sortable? Given: Sortable.create("sortArea", {scroll:window, onChange:orderLi}); function orderLi(){ console.log(this.draggables.each(function(e){if(e.dragging==true){return e};})); } My console always shows all the array of draggables. How do I only grab the one that is being dragged?

    Read the article

  • MySQL: Storage of multiple text fields for a record

    - by Tom
    An inexperienced question: I need to store about 10 unknown-length text fields per record into a MySQL table. I expect no more than 50K rows in total for this table but speed is important. The database actions will be solely SELECTs for all practical purposes. I'm using InnoDB. In other words: id | text1 | text2 | text3 | .... | text10 As I understand that MySQL will store the text elsewhere and use its own indicators on the table itself, I'm wondering whether there's any fundamental performance implications that I should be worrying about given the way the data is stored? (i.e. several "sub-fetches" from the table). Thank you.

    Read the article

  • Start multiple processes of a dll in delphi

    - by Tom
    I have a "ActiveX library" project created with Delphi 2007. The library interface return XML data based on input values. This is then used by a PHP script that displays the data on a web page. This works great! The problem is that i can only run one instance of the dll process on the server. However, for security reasons, each of my customer should be able to access their own process of the dll (because the dll is always connected to only one database). Also, because of the way the delphi code is built, it doesn't support multiple threads. (It's a 100 000+ lines project using lots of singleton classes) Is there a way of starting several instances of the same dll? Is there a better way of transferring XML data from delphi to PHP? Sorry for the longish question, any help is appreciated (ps. I know the delphi code should be refactored, but this would mean 6 months of "circular reference" -hell :)

    Read the article

  • Get entire text of document as a string using javascript

    - by Tom Dignan
    I am developing a firefox extension and ideally would be able to get the whole darn DOM as a string.. forget any data structure. I just want what I see in "view source" in a buffer. I have been checking out javascript references and HTMLDocument etc. with no avail. Ideally I would be able to write to this buffer as well (seems possible i.e. document.writeLn()) I wish there was a document.read()? Am I just a js noob?

    Read the article

  • What happened to the .NET version definition with v4.0?

    - by Tom Tresansky
    I'm building a C# class library, and using the beta 2 of Visual Web Developer/Visual C# 2010. I'm trying to save information about what version of .NET the library was built under. In the past, I was able to use this: // What version of .net was it built under? #if NET_1_0 public const string NETFrameworkVersion = ".NET 1.0"; #elif NET_1_1 public const string NETFrameworkVersion = ".NET 1.1"; #elif NET_2_0 public const string NETFrameworkVersion = ".NET 2.0"; #elif NET_3_5 public const string NETFrameworkVersion = ".NET 3.5"; #else public const string NETFrameworkVersion = ".NET version unknown"; #endif So I figured I could just add: #elif NET_4_0 public const string NETFrameworkVersion = ".NET 4.0"; Now, in Project-Properties, my target Framework is ".NET Framework 4". If I check: Assembly.GetExecutingAssembly().ImageRuntimeVersion I can see my runtime version is v4.0.21006 (so I know I have .NET 4.0 installed on my CPU). I naturally expect to see that my NETFrameworkVersion variable holds ".NET 4.0". It does not. It holds ".NET version unknown". So my question is, why is NET_4_0 not defined? Did the naming convention change? Is there some simple other way to determine .NET framework build version in versions 3.5?

    Read the article

  • Diagnosing IIS Shutdowns

    - by Tom Ritter
    Symptoms: I attach a debugger, I wait a little while, it automatically detaches I watch the event log during normal operation - after a single request comes in, it waits a little bit, the shuts down Disagnosing. I've followed the following steps for logging shutdowns in IIS: http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx I know these are working because... What I see in the Event Logs when I change the web.config: The description for Event ID 0 from source ASP.NET 2.0.50727.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: _shutdownMessage=IIS configuration change HostingEnvironment initiated shutdown CONFIG change CONFIG change HostingEnvironment caused shutdown _shutdownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdown() at System.Web.Hosting.PipelineRuntime.StopProcessing() the message resource is present but the message is not found in the string/message table But it doesn't help because the mysetery error doesn't tell me anything. I see the same thing as from before I added this extra logging: The description for Event ID 0 from source ASP.NET 2.0.50727.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: _shutdownMessage=HostingEnvironment initiated shutdown HostingEnvironment caused shutdown _shutdownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdown() at System.Web.Hosting.PipelineRuntime.StopProcessing() the message resource is present but the message is not found in the string/message table Anyone have any ideas for more debugging?

    Read the article

  • apache setup/directive question

    - by tom smith
    Hi. Trying to get my head around what I believe is a very basic question. Assume I want to have: http://www.cat.com, and http://www.dog.com and I want to have the cat.com, and dog.com come from "indexA.php", and "indexB.php" respectively... where indexA.php and indexB.php are in the same dir... thanks

    Read the article

  • Where are the java swing String for me to translate?

    - by Tom Brito
    The JFileChooser don't provide support for my language, I'd translate strings defined in the file http://www.rgagnon.com/javadetails/JavaUIDefaults.txt with the UIManager.put(), but I'm not finding the popup strings ("view", "refresh" and "new folder" options when you right-click). Does anyone know where can I find them to translate?

    Read the article

  • How to extract a specific input field value from external webpage using Javascript

    - by Tom
    Hi, i get the webpage content from an external website using ajax but now i want a function which extract a specific input field value which is already autofilled. the webpage content is like this: ......... <input name="fullname" id="fullname" size="20" value="David Smith" type="text"> <input name="age" id="age" size="2" value="32" type="text"> <input name="income" id="income" size="20" value="22000$" type="text"> ......... I only want to get the value of fullname, maybe with some javascript regex, or some jQuery dom parser, i know i can do it easily with php but i want it using Javascript or jQuery. Note: this inputs are not hosted in my page, they are just pulled from other website through Ajax. Thanks

    Read the article

  • Two column layout, navigation div on the right, solution from previous thread didn't seem to work

    - by Tom
    I tried the solution from this thread, but I must be missing something because it doesn't work: <div style="float:left;margin-right:200px"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> <div style="float:right;width:200px"> <p>navigation</p> </div> It works when the text in the content div (the left one) is short, but when it's long then the div takes up the whole width of the browser and the margin is there, but the right div is pushed below the first one nevertheless. What am I missing? Edit: The goal is to have a fix sized navigation column on the right of the browser window and the left div should get all the space left by the right navigation column (liquid layout).

    Read the article

  • Revoke client X509 certificate

    - by Tom
    Hi, I have ASP.NET web service on windows server 2003. I have own certificate authority. I use own client certificate on authentification in web service. I make client certificate. I call web service, everything is ok. Then I revoke this certificate in certification authority. Certificate is in Revoked certificate. I call web service with this certificate, but web service verify this certificate as good, but this certificate is between revoked. I don't know why? Anybody help me please? I use this method on verify certificate. X509Certificate2.Verify Method I don't get any exception, certificate is between revoked, but web service verify this certificate as good.

    Read the article

  • What is the proper way to assign a general udf to application.cfc?

    - by Tom Hubbard
    I simply want to define a function in application.cfc and expose it application wide to all requests. Preferably the "assignment" would only happen on application startup. Is the preferred method to do something along the lines of this: <CFCOMPONENT OUTPUT="FALSE"> <CFSET this.name = "Website"> <CFSET this.clientManagement = true> <CFSET this.SessionManagement = true> <CFFUNCTION NAME="GetProperty" OUTPUT="False"> <CFARGUMENT NAME="Property"> <CFRETURN this.Props[Property]> </CFFUNCTION> <CFFUNCTION NAME="OnApplicationStart" OUTPUT="FALSE"> <CFSET Application.GetProperty = GetProperty> . . . or is there something better?

    Read the article

  • Unit testing a SQL code generator

    - by Tom H.
    The team I'm on is currently writing code in TSQL to generate TSQL code that will be saved as scripts and later run. We're having a little difficulty in separating our unit tests between testing the code generator parts and testing the actual code that they generate. I've read through another similar question, but I was hoping to get some specific examples of what kind of unit test cases we might have. As an example, let's say that I have a bit of code that simply generates a DROP statement for a view, given the view schema and name. Do I just test that the generated code matches some expected outcome using string comparisons and then in a later integration or system test make sure that the drop actually drops the view if it exists, does nothing if the view doesn't exist, or raises an error if the view is one that we are marking as not allowing a drop? Thanks for any advice!

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >