Search Results

Search found 1637 results on 66 pages for 'dan kelly'.

Page 7/66 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to get physical partition name from iSCSI details on Windows?

    - by Barry Kelly
    I've got a piece of software that needs the name of a partition in \Device\Harddisk2\Partition1 style, as shown e.g. in WinObj. I want to get this partition name from details of the iSCSI connection that underlies the partition. The trouble is that disk order is not fixed - depending on what devices are connected and initialized in what order, it can move around. So suppose I have the portal name (DNS of the iSCSI target), target IQN, etc. I'd like to somehow discover which volumes in the system relate to it, in an automated fashion. I can write some PowerShell WMI queries that get somewhat close to the desired info: PS> get-wmiobject -class Win32_DiskPartition NumberOfBlocks : 204800 BootPartition : True Name : Disk #0, Partition #0 PrimaryPartition : True Size : 104857600 Index : 0 ... From the Name here, I think I can fabricate the corresponding name by adding 1 to the partition number: \Device\Harddisk0\Partition1 - Partition0 appears to be a fake partition mapping to the whole disk. But the above doesn't have enough information to map to the underlying physical device, unless I take a guess based on exact size matching. I can get some info on SCSI devices, but it's not helpful in joining things up (iSCSI target is Nexenta/Solaris COMSTAR): PS> get-wmiobject -class Win32_SCSIControllerDevice __GENUS : 2 __CLASS : Win32_SCSIControllerDevice ... Antecedent : \\COBRA\root\cimv2:Win32_SCSIController.DeviceID="ROOT\\ISCSIPRT\\0000" Dependent : \\COBRA\root\cimv2:Win32_PnPEntity.DeviceID="SCSI\\DISK&VEN_NEXENTA&PROD_COMSTAR... Similarly, I can run queries like these: PS> get-wmiobject -namespace ROOT\WMI -class MSiSCSIInitiator_TargetClass PS> get-wmiobject -namespace ROOT\WMI -class MSiSCSIInitiator_PersistentDevices These guys return information relating to my iSCSI target name and the GUID volume name respectively (a volume name like \\?\Volume{guid-goes-here}), but the GUID volume name is no good to me, and there doesn't appear to be a reliable correspondence between the target name and the volume that I can join on. I simply can't find an easy way of getting from an IQN (e.g. iqn.1992-01.com.example:storage:diskarrays-sn-a8675309) to physical partitions mapped from that target. The way I do it by hand? I start Disk Management, and look for a partition of the correct size, verify that its driver says NEXENTA COMSTAR, and look at the disk number. But even this is unreliable if I have multiple iSCSI volumes of the exact same size. Any suggestions?

    Read the article

  • How do I restore system default settings on Linux Mint KDE?

    - by Robert Kelly
    I did something weird and now my text size is like 3pt on every system window, but when I go in and change my window fonts to larger to something that looks normal, it makes my clock, bash, and other fonts absolutely gigantic. Is there any way I can just roll back my system and it's settings? It wouldn't be much bother as I installed the OS yesterday. I'd hate to have to reinstall entirely though, but I guess it's an option.

    Read the article

  • Misbehaving Network Printers - options?

    - by Dan Kelly
    We are having some issue with printers on our network. We have 3 floors, 2 printers per floor (A3 & A4) all connected to the same Print Server. The issue is that the same printer may not behave the same on two different, seemingly identical desktops. The commonest place this is seen on our bulk print script in AutoCAD - occasionally drawings may print Landscape on Portrait paper, despite drawings always being Landscape... Does any one have any suggestions on what we can check / try? The current line of attack is to setup a new Print Server, with the HP universal print driver rather than the device specific drivers, and replace printers using exactly the same method on all desktops. Sound good?

    Read the article

  • How to toggle wifi / bluetooth in Macbook Air with Windows 7 installed

    - by Barry Kelly
    I'm writing this on a MacBook Air 13" (the ones just released), but I have a problem. BootCamp provides no easy way of turning off the bluetooth or wifi radios, and nor are there any hotkey combinations on the keyboard, nor any hard or soft switches on the body to toggle these radios. As I'll be travelling a lot with this machine, what's the best way for me to comply with the cabin service crews' instructions and disable the radios before takeoff, and reenable them after landing?

    Read the article

  • In SSRS 2000 dynamically setting the datasource

    - by Christopher Kelly
    Is there a way in SSRS 2000 to set the datasource that a report is using via the webservice? I am currently generating reports using the SSRS2000_ReportService.ReportingService webservice and want to dynamically switch between a couple of shared data sources on demand. I am using C# but could adapt other languages if needed.

    Read the article

  • How can I configure myhostname to work with Postfix?

    - by John Kelly Ferguson
    I'm going through the process of setting up a Discourse forum on my server (Ubuntu 12.04 x64) and am getting stuck at the point where I have to configure mailers. I'm following Discourse's instructions and am stuck trying to configure postfix for Mandrill. It is says to check my fully-qualified domain name by typing hostname -f When I enter in hostname -f, I get localhost. As far as I know, entering in hostname -f should return mydomainname.com. When I just enter in hostname, I get mydomainname which is correct because that is what I set my hostname to in /etc/hostname. Looking at some of my other settings, my /etc/hosts file reads: 127.0.0.1 localhost mydomainname # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters And in my /etc/postfix/main.cf file, I have myhostname set like this: myhostname = mydomainname.mydomainname.com (Should this be myhostname = mail.mydomainname.com instead?) And mydestination is the following: mydestination = mydomainname.com, localhost, localhost.localdomain, localhost I'm not that familiar with configuring hostnames. I've been reading Postfix's instructions, but haven't been able to figure it out yet. Any help on how to get this to work would be greatly appreciated. Thanks.

    Read the article

  • 750Gig Hard Drive shows full with only 315Gigs used

    - by Chris Kelly
    I have a Win7 laptop with a 750Gig C: drive. It came partitioned with 714Gig usable from manufacturer. I installed programs, music files, etc up to 285 gigs. As of a few weeks ago it showed 285 Gigs. Two weeks of house guests later and it shows HD is full. I deleted some files but it still shows 652 Gigs on this drive while there are only 285 Gigs on drive. Relevant details: I am Administrator on laptop and have fair knowledge of what I am doing. I did not restore from backup, restore from mirror, upgrade HD's or anything else that would have touched the partition structure. Just daily use as imaging machine and web. I have checked partitions under disk administrator - no change, still partitioned with 714Gigs usable. Have looked through computer C drive by hand showing Hidden files and folders - no change. I have used JDisk Report to double check - it shows I have only 285 Gigs on C drive. I triple checked with TreeSize run as Administrator and it also shows 285 Gigs on C drive - yet Windows 7 still shows almost full. I used Windows 7 Utilities to Check for Disk Errors, and Defragged the drive. No errors shown and no change after Defrag.

    Read the article

  • windows 7, slow keyboard

    - by dwight kelly
    I am using Windows 7. the keyboard requires appoximately 1 second of hold down before it sends the letter. the pc wil click once at the 1/2 second then at 1 second the letter will show up. I thought the keyboard was bad and I purchased a new one (usb) and the same thing happened. I pulled out an old ps/2 keyboard, and the same thing. I booted the pc up and went into bios. the keyboard works fine there. I tried unninstalling and reinstalling the drivers, no change please advise

    Read the article

  • How to fix Windows 7 device removal notification loop

    - by Barry Kelly
    Bit of an odd one this. One of our PCs is getting caught in a loop some time after being turned on, usually after a USB storage device has been attached - sometimes an iPod, sometimes a GPS. Specifically, Windows Explorer starts showing a drive icon and letter (E:, as of right now) for the System partition (the small hidden one at the start of the boot drive). Then, the icon disappears. Then it reappears again. And disappears. It does this very quickly, at what looks like maybe 50 times a second. CPU usage in this loop is also very high; averages about 66%. This machine has an i7 920 CPU, which is quad core with hyperthreading; so this usage rate works out to about 5 100% busy threads, along with whatever normal idle load is (particularly Task Manager itself). Inspecting with Process Explorer shows that the device removal notification infrastructure has gone berserk. The threads in system service processes (i.e. apart from Windows Explorer) which are using all the CPU power relate to device notification. The Disk Management MMC snap-in also fails to run when the loop starts. The only way to break the loop, it seems, is to reboot the machine. Anyone seen anything similar to this, and know of a way to fix it? Machine details: Windows 7 x64, fully patched i7 920, 12GB RAM Intel SSD 80GB (X25-M, I believe; not G2) 2TB 5.2K disk for bulk storage AMD HD 5870 Further hardware details await. I'm going to go through and update all drivers I can find.

    Read the article

  • Cisco VPNClient from Mac won't connect using iPhone Tethering

    - by Dan Short
    I just set up iPhone tethering from my Snow Leopard Macbook Pro to my iPhone 3GS with the Datapro 4GB plan from AT&T. When attempting to connect to my corporate VPN from the MacBook Pro with Cisco VPNClient 4.9.01 (0100) I get the following log information: Cisco Systems VPN Client Version 4.9.01 (0100) Copyright (C) 1998-2006 Cisco Systems, Inc. All Rights Reserved. Client Type(s): Mac OS X Running on: Darwin 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 Config file directory: /etc/opt/cisco-vpnclient 1 13:02:50.791 02/22/2011 Sev=Info/4 CM/0x43100002 Begin connection process 2 13:02:50.791 02/22/2011 Sev=Warning/2 CVPND/0x83400011 Error -28 sending packet. Dst Addr: 0x0AD337FF, Src Addr: 0x0AD33702 (DRVIFACE:1158). 3 13:02:50.791 02/22/2011 Sev=Warning/2 CVPND/0x83400011 Error -28 sending packet. Dst Addr: 0x0A2581FF, Src Addr: 0x0A258102 (DRVIFACE:1158). 4 13:02:50.792 02/22/2011 Sev=Info/4 CM/0x43100004 Establish secure connection using Ethernet 5 13:02:50.792 02/22/2011 Sev=Info/4 CM/0x43100024 Attempt connection with server "209.235.253.115" 6 13:02:50.792 02/22/2011 Sev=Info/4 CVPND/0x43400019 Privilege Separation: binding to port: (500). 7 13:02:50.793 02/22/2011 Sev=Info/4 CVPND/0x43400019 Privilege Separation: binding to port: (4500). 8 13:02:50.793 02/22/2011 Sev=Info/6 IKE/0x4300003B Attempting to establish a connection with 209.235.253.115. 9 13:02:51.293 02/22/2011 Sev=Warning/2 CVPND/0x83400018 Output size mismatch. Actual: 0, Expected: 237. (DRVIFACE:1319) 10 13:02:51.894 02/22/2011 Sev=Warning/2 CVPND/0x83400018 Output size mismatch. Actual: 0, Expected: 237. (DRVIFACE:1319) 11 13:02:52.495 02/22/2011 Sev=Warning/2 CVPND/0x83400018 Output size mismatch. Actual: 0, Expected: 237. (DRVIFACE:1319) 12 13:02:53.096 02/22/2011 Sev=Warning/2 CVPND/0x83400018 Output size mismatch. Actual: 0, Expected: 237. (DRVIFACE:1319) 13 13:02:53.698 02/22/2011 Sev=Warning/2 CVPND/0x83400018 Output size mismatch. Actual: 0, Expected: 237. (DRVIFACE:1319) 14 13:02:54.299 02/22/2011 Sev=Warning/2 CVPND/0x83400018 Output size mismatch. Actual: 0, Expected: 237. (DRVIFACE:1319) 15 13:02:54.299 02/22/2011 Sev=Info/4 IKE/0x43000075 Unable to acquire local IP address after 5 attempts (over 5 seconds), probably due to network socket failure. 16 13:02:54.299 02/22/2011 Sev=Warning/2 IKE/0xC300009A Failed to set up connection data 17 13:02:54.299 02/22/2011 Sev=Info/4 CM/0x4310001C Unable to contact server "209.235.253.115" 18 13:02:54.299 02/22/2011 Sev=Info/5 CM/0x43100025 Initializing CVPNDrv 19 13:02:54.300 02/22/2011 Sev=Info/4 CVPND/0x4340001F Privilege Separation: restoring MTU on primary interface. 20 13:02:54.300 02/22/2011 Sev=Info/4 IKE/0x43000001 IKE received signal to terminate VPN connection 21 13:02:54.300 02/22/2011 Sev=Info/4 IPSEC/0x43700008 IPSec driver successfully started 22 13:02:54.300 02/22/2011 Sev=Info/4 IPSEC/0x43700014 Deleted all keys 23 13:02:54.300 02/22/2011 Sev=Info/4 IPSEC/0x4370000D Key(s) deleted by Interface (192.168.0.171) 24 13:02:54.300 02/22/2011 Sev=Info/4 IPSEC/0x43700014 Deleted all keys 25 13:02:54.300 02/22/2011 Sev=Info/4 IPSEC/0x43700014 Deleted all keys 26 13:02:54.300 02/22/2011 Sev=Info/4 IPSEC/0x43700014 Deleted all keys 27 13:02:54.300 02/22/2011 Sev=Info/4 IPSEC/0x4370000A IPSec driver successfully stopped The key line is 15: 15 13:02:54.299 02/22/2011 Sev=Info/4 IKE/0x43000075 Unable to acquire local IP address after 5 attempts (over 5 seconds), probably due to network socket failure. I can't find anything online about this. I found a single entry for the error message in Google, and it was a swedish (or some other nordic language site) that didn't have an answer to the question. I've tried connecting through both USB and Bluetooth tethering to the iPhone, and they both return the exact same results. I don't have direct control over the firewall, but if changes are necessary to make it work, I may be able to get the powers-that-be to make adjustments. A solution that doesn't require reconfiguring the firewall would be far better of course... Does anyone know what I can do to make this behave? Thanks, Dan

    Read the article

  • Using jQuery or javascript to render json into multi-column table

    - by Scott Yu - UX designer
    I am trying to render a JSON into a HTML table. But the difficulty is making it so it loops through JSON and renders multiple columns if necessary. For the example below, what I want is this: Result wanted Result Wanted <table> <tr><th>AppName</th><td>App 1</td><td>App 2</td></tr> <tr><th>Last Modified</th><td>10/1/2012</td><td></td></tr> <tr><th>App Logo</th><td>10/1/2012</td><td></td></tr> blahblah </table> <table> <tr><th>AppName</th><td>App 1</td></tr> blahblah </table> JSON Example "Records": [ { "AppName": "App 1", "LastModified": "10/1/2012, 9:30AM", "ShipTo_Name": "Dan North", "ShipTo_Address": "Dan North", "ShipTo_Terms": "Dan North", "ShipTo_DueDate": "Dan North", "Items 1": [ { "Item_Name": "Repairs", "Item_Description": "Repair Work" } ] }, { "AppName": "App 2", "AppLogo": "http://www.google.com/logo.png", "LastModified": "10/1/2012, 9:30AM", "BillTo_Name": "Steve North", "Items 1": [ { "Item_Name": "Repairs", "Item_Description": "Repair Work" } ] } ], "Records": [ { "AppName": "App 1", "LastModified": "10/1/2012, 9:30AM", "ShipTo_Name": "222", "ShipTo_Address": "333 ", "ShipTo_Terms": "444", "ShipTo_DueDate": "5555", "Items 1": [ { "Item_Name": "Repairs", "Item_Description": "Repair Work" } ] } ], Code I am using now function CreateComparisonTable (arr,level,k) { var dumped_text = ""; if(!level) level = 0; //The padding given at the beginning of the line. var level_padding = ""; for(var j=0;j<level+1;j++) level_padding = "--"; if(typeof(arr) == 'object') { //Array/Hashes/Objects for (var item in arr) { var value = arr[item]; if (typeof(value) == 'object') { //If it is an array, if(item !=0) { dumped_text += '<tr><td>' + item + '<br>'; dumped_text += CreateComparisonTable(value,level+1); dumped_text += '</td></tr>'; } else { dumped_text += CreateComparisonTable(value,level, value.length); } } else { dumped_text += '<tr><td>' + level_padding + item + '</td><td>' + value + '</td></tr>'; } } } return dumped_text; } Jsfiddle here

    Read the article

  • IE8 CSS selector selects, but does not apply the style.

    - by Dan
    This is making me want to kill myself. I have some really simple CSS to style my input objects: input, button { border: 1px solid #c66600; background-color: white; color: #7d212f; font-family: "Eras Light ITC", Tahoma, sans; } But I don't like the ugly border it puts around radio buttons, so I use a selector to kill the border: input[type=radio] { border: none; } You can probably guess what browsers this works in and which ONE it does not work in. What's funny is when I press F12 to launch the excellent developer tools in IE8 it actually tells me that the style of the radio buttons has been overridden to 'none' just like I asked it to do, but the border remains on the radio button objects. I have tried a variety of semantic things, like setting the border width to 0px or the color to something insane like lime green, but it remains the originally assigned color that it got from the first style. And finally, I have tried only styling 'text' objects, in which case no style is applied to anything. Again, the browser claims to fulfill the CSS selection, but it visually does not happen. Thoughts? By the way, this is a DotNetNuke installation with generated code where I can't explicitly set the style of the radio buttons. Thanks, Dan

    Read the article

  • Symfony / Doctrine - How to filter form field by property in related model

    - by Dan
    I have a UserForm class which has a select list populated from a related model (specified by a foreign relationship in the yml) like so: $this->setWidget('report_id', new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Report')))); I'd like to filter the Report objects that come from this relation by one of the Report fields, "active" such that only Reports with active=1 appear in the form. I have a method, ReportTable::GetActiveReports() that performs the appropriate query and returns the filtered reports. So one option is to populate the Widget with the results of that function. Any tips on the syntax to do that? It seems to me the cleaner way is to use the UserFormFilter class to filter the reports by active=1 there. Unfortunately I couldn't find any documentation on how to use form filters (or really what they are), so maybe this is not the right solution. Is a Form Filter the appropriate tool for this job? It seems I should use the Doctrine_Record_Filter_Standard class as defined here: http://www.doctrine-project.org/api/orm/1.2/doctrine/doctrine_record_filter_standard.html But it's not clear to me the appropriate usage. Any guidance would be helpful. Thanks! Dan

    Read the article

  • How do I get google protocol buffer messages over a socket connection without disconnecting the clie

    - by Dan
    Hi there, I'm attempting to send a .proto message from an iPhone application to a Java server via a socket connection. However so far I'm running into an issue when it comes to the server receiving the data; it only seems to process it after the client connection has been terminated. This points to me that the data is getting sent, but the server is keeping its inputstream open and waiting for more data. Would anyone know how I might go about solving this? The current code (or at least the relevant parts) is as follows: iPhone: Person *person = [[[[Person builder] setId:1] setName:@"Bob"] build]; RequestWrapper *request = [[[RequestWrapper builder] setPerson:person] build]; NSData *data = [request data]; AsyncSocket *socket = [[AsyncSocket alloc] initWithDelegate:self]; if (![socket connectToHost:@"192.168.0.6" onPort:6666 error:nil]){ [self updateLabel:@"Problem connecting to socket!"]; } else { [self updateLabel:@"Sending data to server..."]; [socket writeData:data withTimeout:-1 tag:0]; [self updateLabel:@"Data sent, disconnecting"]; //[socket disconnect]; } Java: try { RequestWrapper wrapper = RequestWrapper.parseFrom(socket.getInputStream()); Person person = wrapper.getPerson(); if (person != null) { System.out.println("Persons name is " + person.getName()); socket.close(); } On running this, it seems to hang on the line where the RequestWrapper is processing the inputStream. I did try replacing the socket writedata method with [request writeToOutputStream:[socket getCFWriteStream]]; Which I thought might work, however I get an error claiming that the "Protocol message contained an invalid tag (zero)". I'm fairly certain that it doesn't contain an invalid tag as the message works when sending it via the writedata method. Any help on the matter would be greatly appreciated! Cheers! Dan (EDIT: I should mention, I am using the metasyntactic gpb code; and the cocoaasyncsocket implementation)

    Read the article

  • Sharing sessions across applications using the ASP.NET Session State Service

    - by Dan
    I am trying to share sessions between two web applications, both hosted on the same server. One is a .net 2.0 web forms application the other is as .net 3.5 MVC2 application. Both apps have their session set up like this: <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" /> In the webform application I am posting the the session key to the MVC app: protected void LinkButton1_Click(object sender, EventArgs e) { Session["myvariable"] = "dan"; string sessionKey = HttpContext.Current.Session.SessionID; //Followed by some code that posts sessionKey to the other application } I then recieve it in the MVC application and try use the same session like this: [HttpPost] public void Recieve(string sessionKey ) { var manager = new SessionIDManager(); bool redirected; bool IsAdded; manager.SaveSessionID(HttpContext.ApplicationInstance.Context, Id, out redirected, out IsAdded); var sessionKey = Session["myvariable"]; } The key is being posted but the session does not seem to get loaded in the MVC app, i.e. sessionKey is null. Can what I am trying to do be done?

    Read the article

  • 500 error using lighttpd, fastcgi and PHP on file upload

    - by Dan
    I have a server running lighttpd with fastcgi, and it appears to be working correctly. However when I try to upload a file using a form, I get a 500 Internal server error, along with the following in the logs: 2012-03-23 18:25:09: (mod_fastcgi.c.2566) unexpected end-of-file (perhaps the fastcgi process died): pid: 2755 socket: unix:/tmp/php-fastcgi-1.socket-0 2012-03-23 18:25:09: (mod_fastcgi.c.3354) response not received, request sent: 50437 on socket: unix:/tmp/php-fastcgi-1.socket-0 for /index.php?url=brand/manager, closing connection I've been looking around for a long while now trying to find a solution to the issue, but nothing I'm trying is working. My current fastcgi conf looks as follows: server.modules += ( "mod_fastcgi" ) fastcgi.server = ( ".php" => (( "socket" => "/tmp/php-fastcgi-1.socket", "bin-path" => "/usr/bin/php-cgi", "allow-x-send-file" => "enable", "max-procs" => 1, "broken-scriptfilename" => "enable" )) ) If anyone could suggest if there is anything wrong in the configuration it would be greatly appreciated, or any suggestion as to what I might do? As I say, it is only happening when trying to upload a file (the file in question being only 45k). Thanks, Dan

    Read the article

  • Thumbnail Provider not working

    - by Dan
    I'm trying to write a Windows Explorer thumbnail handler for our custom file type. I've got this working fine for the preview pane, but am having trouble getting it to work for the thumbnails. Windows doesn't even seem to be trying to call the DllGetClassObject entry point. Before I continue, note that I'm using Windows 7 and unmanaged C++. I've registered the following values in the registry: HKCR\CLSID\<my guid> HKCR\CLSID\<my guid>\InprocServer32 (default value being path to my DLL) HKCR\CLSID\<my guid>\InprocServer32\ThreadingModel (value = "Apartment") HKCR\.<my ext>\shellex\{E357FCCD-A995-4576-B01F-234630154E96} (value = my guid) I've also tried using the Win SDK sample, and that doesn't work. And also the sample project in this article (http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/), and that doesn't work. I'm new to shell programming, so not really sure the best way of debugging this. I've tried attaching the debugger to explorer.exe, but that doesn't seem to work (breakpoints get disabled, and none of my OutputDebugStrings get displayed in the output window). Note that I tried setting the "DesktopProcess" in the registry as described in the WinSDK docs for debugging the shell, but I'm still only seeing one explorer.exe in the task manager - so that "may" be why I can't debug it?? Any help with this would be greatly appreciated! Regards, Dan.

    Read the article

  • Is it possible for onunload confirm to open a new url in the same window?

    - by Dan Peschio
    Hi - this is my first post and I'm a JS novice, so please forgive my ignorance... Heres my question, its in two parts: 1.) At onunload I want an alert that asks the user if they would like to go to a related URL. The code I'm using works, but it open the URL in a new window and this can be blocked by a pop-up blocker even though the user has opted-in. Is there a way to have it open in the same window and negate the pop-up blocker? 2.) is there a way to take the onunload function out of the body tag and put it the script? Heres the code I'm using: <script language=javascript> function confirmit() { var closeit= confirm("Before you go would you like to add your press kit to the Search Press Kits database?"); if (closeit == true) {window.open("http://NEWURLHERE.com");} else {window.close();} } </script> </head> <body onunload="confirmit();"> peace </body> Thanks in advance, Dan

    Read the article

  • Regular expressions - finding and comparing the first instance of a word

    - by Dan
    Hi there, I am currently trying to write a regular expression to pull links out of a page I have. The problem is the links need to be pulled out only if the links have 'stock' for example. This is an outline of what I have code wise: <td class="prd-details"> <a href="somepage"> ... <span class="collect unavailable"> </td> <td class="prd-details"> <a href="somepage"> ... <span class="collect available"> </td> What I would like to do is pull out the links only if 'collect available' is in the tag. I have tried to do this with the regular expression: (?s)prd-details[^=]+="([^"]+)" .+?collect{1}[^\s]+ available However on running it, it will find the first 'prd-details' class and keep going until it finds 'collect available', thereby taking the incorrect results. I thought by specifying the {1} after the word collect it would only use the first instance of the word it finds, but apparently I'm wrong. I've been trying to use different things such as positive and negative lookaheads but I cant seem to get anything to work. Might anyone be able to help me with this issue? Thanks, Dan

    Read the article

  • ASP.NET MVC2 and Browser Caching

    - by Dan
    Hi I have a web application that fetches a lot of content via ajax. For example when a user edits some data, the browser will send the changes using an ajax post and then do an ajax get to get fresh content and replace an existing div on the page with that content. This was working just find with MVC1, but in MVC2 I would get inconsistent results. I've found that MVC1 by default included an Expires item in the response headers set to the current time, but in MVC2 the Expires header is missing. This is a problem with some browsers (IE8) actually using the cached version of the ajax get instead of the fresh version. To deal with the problem I created a simple ActionFilterAttribute that sets the reponse cache to NoCache (see below), which works, but it seems kind of sillly to decorate every controller with this attribute. Is there a global way to set this for every controller? Is this a bug in MVC2 and it really should be setting the expires on every ActionResult/view/page? Don't most MVC programs deal with data entry where stale data is a very bad thing? Thanks Dan public class ResponseNoCachingAttribute : ActionFilterAttribute { public override void OnResultExecuted(ResultExecutedContext filterContext) { base.OnResultExecuted(filterContext); filterContext.HttpContext.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); } }

    Read the article

  • urlopen error [errno 111] connection refused

    - by Ui-Gyun Jeong
    I am doing python exercise with a book 'headfirst python' and making android app by using python and sl4a my code is import android import json import time from urllib import urlencode from urllib2 import urlopen hello_msg = "Welcome to Coach Kelly's Timing App" list_title = 'Here is your list of athletes:' quit_msg = "Quitting Coach Kelly's App." web_server = 'http://127.0.0.1:8080' get_names_cgi = '/cgi-bin/generate_name.py' def send_to_server(url, post_data=None): if post_data: page = urlopen(url, urlencode(post_data)) else: page = urlopen(url) return(page.read().decode("utf8")) app = android.Android() def status_update(msg, how_long=2): app.makeToast(msg) time.sleep(how_long) status_update(hello_msg) athlete_names = sorted(json.loads(send_to_server(web_server + get_names_cgi))) app.dialogCreateAlert(list_title) app.dialogSetSingleChoiceItems(athlete_names) app.dialogSetPositiveButtonText('Select') app.dialogSetNegativeButtonText('Quit') app.dialogShow() resp = app.dialogGetResponse().result status_update(quit_msg) this is my code and the result is what is the problem??? I can not figure out what the problem is...

    Read the article

  • launching a program from bash causes bash to go to new prompt

    - by Dan Dman
    When I run a program from the console, e.g. me@box:~$ firefox I expect the console to log error messages (I think this is std out or std err?) and other items from the program, firefox in this case. But today I notice that bash just opens the program and goes to a new prompt, e.g. me@box:~$ firefox me@box:~$ How do I launch a program from bash such that error messages will be written to the console? Why is it that some programs operate this way by default and others (firefox) do not?

    Read the article

  • Flash player not loading in Firefox or Chromium

    - by Dan Heyse
    I am brand new to Linux so can you (try) to keep answers as simple as possible. A few days ago I did a fresh install of Ubuntu 11.10 on an old computer (just under 500mb of RAM) and once I had completed the install. I installed the restricted extras thingy. I then tried to load up a Flash video in Firefox but it failed: all it would show is a blank box where the video should have been. At this point I tried various different video sites (iplayer, Youtube, etc) and I even tried opening up a downloaded flash game in Firefox but still I was just getting a blank box where the flash content should have been. Next I tried doing a fresh install of Ubuntu 12.04 32bit, installing the restricted extras thingy again but it still just showed up the blank box. Finally I tried various different methods for getting it to work including: Trying a different browser~ same issue Trying different websites~ same issue Reinstalling the Flash plugin via the software center~ same issue Reinstalling the Flash plugin via the Adobe website~ same issue Installing Flash-aid (a plugin designed to solve any issues with flash)~ same issue Disabling the flash plugin for Firefox~ Flash was no longer detected so the websites told me that I needed to install the flash plugin to play the content Not really sure what else to try???

    Read the article

  • How to train yourself to avoid writing “clever” code?

    - by Dan Abramov
    Do you know that feeling when you just need to show off that new trick with Expressions or generalize three different procedures? This does not have to be on Architecture Astronaut scale and in fact may be helpful but I can't help but notice someone else would implement the same class or package in a more clear, straightforward (and sometimes boring) manner. I noticed I often design programs by oversolving the problem, sometimes deliberately and sometimes out of boredom. In either case, I usually honestly believe my solution is crystal clear and elegant, until I see evidence to the contrary but it's usually too late. There is also a part of me that prefers undocumented assumptions to code duplication, and cleverness to simplicity. What can I do to resist the urge to write “cleverish” code and when should the bell ring that I am Doing It Wrong? The problem is getting even more pushing as I'm now working with a team of experienced developers, and sometimes my attempts at writing smart code seem foolish even to myself after time dispels the illusion of elegance.

    Read the article

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