Daily Archives

Articles indexed Thursday March 25 2010

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

  • How to shrink Windows 7 XP Mode VHD files?

    - by A_M
    I'm trying to shrink a Windows 7 XP Mode VHD file with VhdResizer with little success. When I select my VHD file, it says "VhdExpand only supports fixed and dynamic VHD files". My XP Mode VHDs are dynamic files. Does anyone have any idea why it is failing? Failing that, does anyone have a process that I can use to shrink my XP mode VHD files on Windows 7 (64 bit)?

    Read the article

  • DNS responding only to nslookup in Windows 7

    - by DeeJay1
    Hello. I have an interesting DNS issue in AD (2008R2) which I can't find a way to debug. Mainly if from commandline I try ping <machinename> then I get the reply that the hostr isn't found. But when I do nslookup <machinename> I get the correct response from my DNS with proper AAAA and A records. Anyone has an idea what could cause this? The client machines run Windows 7 Enterprise.

    Read the article

  • LAMP/TURNKEY LINUX/VIRTUAL BOX: Manipulating Files on a Virtual Machine

    - by aeid
    Hi, I am running Ubuntu 9.10 and I want to install turnkey linux's LAMP server on my machine to test out my code. I installed Turnkey LAMP via VirtualBox and it seems to be working because I can access the http://localhost. My question is: How do I manipulate files via VirtualBox? For example, if I had installed LAMP on my machine (not on a virtual machine), I could easily add/edit/delete files in the var/WWW folder. Where is the equivalent of "WWW" folder on Virtualbox and how can I interface with it? Thanks,

    Read the article

  • LINQ Guid toString()

    - by Sevki
    Hi this seems like it should work, from something in collectionofsomestuff select new SelectListItem(){Text = Name, Value = SomeGuid.ToString(), Selected = false}; When I try to do this it doesn't work give me error LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression. Is there a workaround?

    Read the article

  • Win32: What is the status of chunked encoding support in WinHttpReadData?

    - by Cheeso
    The documentation for WinHttpReadData says, regarding HTTP's chunked transfer coding: Starting in Windows Vista and Windows Server 2008, WinHttp enables applications to perform chunked transfer encoding on data sent to the server. When the Transfer-Encoding header is present on the WinHttp response, WinHttpReadData strips the chunking information before giving the data to the application. Can anyone decipher this? Q1 First, this text is on the page for WinHttpReadData, which is used to ... read data within an HTTP client application, specifically the response data. So what does it mean when it says Starting in Windows Vista and Windows Server 2008, WinHttp enables applications to perform chunked transfer encoding on data sent to the server. The WinHttpReadData function isn't used with data being sent to the server. It is used when reading data from the server. Consulting the doc for the WinHttpWriteData function, which is used to send data to the server as part of an HTTP request, there is no mention of the chunked transfer capability. Q2 Supposing that I figure out just what the newish chunked transfer support amounts to, how do I get that support? It says that it is new on Vista and WS2008. What happens if I write an app that runs on WS2003, and uses WinHttpReadData and it encounters a chunked response, or WinHttpWriteData, and it wants to send a chunked request? Between the lines, is this documentation saying that I need to link against the Vista-era Windows SDK, or later, in order to get the capability to do chunked encoding? Or is it really impossible on WS2003?, in other words it is the case that the app doing chunked transfer using this library must run on the OS specified? This might read like a rant, but it's not. I truly want to know.

    Read the article

  • Common way to compare timestamp in oracle, postgres and SQL Server

    - by Pratik
    I am writing a sql query which involves finding if timestamp falls in particular range of days. I have written that in the postgres but it doesn't works in Oracle and SQL Server: AND creation_date < (CURRENT_TIMESTAMP - interval '5 days') AND creation_date >= (CURRENT_TIMESTAMP - interval '15 days') Is there are common way to compare the timestamp across different databases?

    Read the article

  • A control that contains multiple duplicate properties causing deadlock issues on IIS

    - by heads5150
    I am trying to work out if the above case is true for our site. I've been told by my hosting provider that this fix (http://support.microsoft.com/kb/974165) has to applied to our server due to performance issues. It basically describes an issues where UI code like: <asp:gridview id="GridView1" runat="server" ... PageSize="100" PagerSettings-Mode="Numeric" PagerStyle-BorderStyle="None" PagerStyle-BorderColor="Navy" PagerStyle-HorizontalAlign="Right" PagerSettings-PageButtonCount="2" PagerSettings-Position="Bottom"> <PagerStyle HorizontalAlign="Left" BorderColor="Navy" BorderStyle="None"></PagerStyle> ... <PagerSettings PageButtonCount="2"></PagerSettings> ... </asp:gridview> causing the following warning on the server "ISAPI 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'." Does anybody know of a way that I can detect this issue in the build process or the debugger? Any help would be much appreciate.

    Read the article

  • FancyURLOpener failing since moving to python 3.1.2

    - by Andrew Shepherd
    I had an application that was downloading a .CSV file from a password-protected website then processing it futher. I was using FancyURLOpener, and simply hardcoding the username and password. (Obviously, security is not a high priority in this particular instance). Since downloading Python 3.1.2, this code has stopped working. Does anyone know of the changes that have happened to the implementation? Here is a cut down version of the code: import urllib.request; class TracOpener (urllib.request.FancyURLopener) : def prompt_user_passwd(self, host, realm) : return ('andrew_ee', '_my_unenctryped_password') csvUrl='http://mysite/report/19?format=csv@USER=fred_nukre' opener = TracOpener(); f = opener.open(csvUrl); s = f.read(); f.close(); s; For the sake of completeness, here's the entire call stack: Traceback (most recent call last): File "C:\reporting\download_csv_file.py", line 12, in <module> f = opener.open(csvUrl); File "C:\Program Files\Python31\lib\urllib\request.py", line 1454, in open return getattr(self, name)(url) File "C:\Program Files\Python31\lib\urllib\request.py", line 1628, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "C:\Program Files\Python31\lib\urllib\request.py", line 1624, in _open_generic_http response.status, response.reason, response.msg, data) File "C:\Program Files\Python31\lib\urllib\request.py", line 1640, in http_error result = method(url, fp, errcode, errmsg, headers) File "C:\Program Files\Python31\lib\urllib\request.py", line 1878, in http_error_401 return getattr(self,name)(url, realm) File "C:\Program Files\Python31\lib\urllib\request.py", line 1950, in retry_http_basic_auth return self.open(newurl) File "C:\Program Files\Python31\lib\urllib\request.py", line 1454, in open return getattr(self, name)(url) File "C:\Program Files\Python31\lib\urllib\request.py", line 1628, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "C:\Program Files\Python31\lib\urllib\request.py", line 1590, in _open_generic_http auth = base64.b64encode(user_passwd).strip() File "C:\Program Files\Python31\lib\base64.py", line 56, in b64encode raise TypeError("expected bytes, not %s" % s.__class__.__name__) TypeError: expected bytes, not str

    Read the article

  • Using GKPeerPickerController within a selector from a Cocos2D CCMenuItem

    - by Mark Hazlett
    Hey everyone, So i'm trying to use GameKit along with Cocos2D so that when a user clicks on the multiplayer menu item it will display the GKPeerPickerController. I'm however, running into some snags. It doesn't seem to want to compile. However, it doesn't give me an error inside of the code that's in my selector. Anyways here's the code... @implementation GameOverLayer - (id) init { self = [super init]; if (self != nil) { [CCMenuItemFont setFontSize:20]; [CCMenuItemFont setFontName:@"Helvetica"]; CCMenuItem *start = [CCMenuItemFont itemFromString:@"Play Again!" target:self selector:@selector(startGame:)]; CCMenuItem *connect = [CCMenuItemFont itemFromString:@"Multiplayer" target:self selector:@selector(connect:)]; CCMenu *menu = [CCMenu menuWithItems:start,connect, nil]; [menu alignItemsVertically]; [self addChild:menu]; } return self; } -(void)startGame: (id)sender { [[CCDirector sharedDirector] replaceScene: [HelloWorld scene]]; } -(void)connect: (id)sender { GKPeerPickerController *peerPicker; peerPicker = [[GKPeerPickerController alloc] init]; peerPicker.delegate = self; peerPicker.connectionTypesMask = GKPeerPickerConnectionTypeOnline | GKPeerPickerConnectionTypeNearby; [peerPicker show]; } @end The error message i'm getting is... ".obj_class_name_GKPeerPickerController", referenced from: Literal-Pointer@_OBJC@_cls_refs@GKPeerPickerController in GameOverScene.o Symbol(s) not found Collect2: id returned 1 exit status Any ideas?

    Read the article

  • How to send reminder emails based on users input time and day (based on their time zone)

    - by evgelen
    I need to send emails based on users input time and day (based on their time zone)? Kind of a reminder. For Example: User input 2:00pm Eastern Time on my server I have different time zone, how to calculate the time and send the email at users time-zone. Its a web application. What is the best way to accomplish it using asp.net c#? If somebody already done it in the past I will be glad to take a look at source code. Thank you for useful suggestions.

    Read the article

  • FORTRAN function returning an array causes a segfault (calling from C++)

    - by Dane Larsen
    Basically, here's my problem. I'm calling someone else's FORTRAN functions from my C++ code, and it's giving me headaches. Some code: function c_error_message() character(len = 255) :: c_error_message errmsg(1:9) = 'ERROR MSG' return end That's the FORTRAN function. My first question is: Is there anything in there that would cause a segfault? If not, then second: What does that return? A pointer? I'm trying to call it with the following C statement: char *e = c_error_message_(); That causes a segfault. c_error_message(); That too causes a segfault. I declared c_error_message_() earlier on with the following code: extern"C" { char* c_error_message_(); } Would declaring a function with a different return type than the actual return type cause a segfault? I'm at a loss. Thanks for any replies.

    Read the article

  • C++ Ambiguous call to Overloaded Function (const variety)

    - by Joe
    After researching this online, I've only found solutions that don't apply to my problem, so please bear with me. Code snippet: typedef my_map_t<int const *, float> _test; my_map_t::const_iterator not_found = my_map_t::end(); if (_test.find(&iKeyValue) == not_found) { _test[iKeyValue] = 4 + 5; // not the actual code, but here for simplicity } The compiler complains that there's an ambiguous call to my_map_t::end(). This makes sense, because the only difference is the return type. Output: error C2668: 'std::_Tree<_Traits>::end' : ambiguous call to overloaded function Normally you can disambiguate the call by casting the parameters, but end() has no parameters. Any ideas?

    Read the article

  • Error compiling Win32 API GUI code with MinGW

    - by Eric Larsen
    Hey guys, this is my first post. I'm just getting started with win32 API programming in C++ and I'm having trouble compiling the winnie tutorial (http://www.relisoft.com/win32/winnie.html) with MinGW. My input and output: C:\Users\Eric\Projects g++ winnie.cpp -o winnie.exe /mingw/lib/libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to 'WinMain@16' collect2: ld returned 1 exit status Any help would be very much appreciated.

    Read the article

  • dateByAddingComponents problem and getting difference of dates with NSDateComponents problem!

    - by Rob
    I am having problems with adding values to dates and also getting differences between dates. The dates and components calculated are incorrect. So for adding, if I add 1.5 months, I only get 1 month, however if I add any whole number ie (1 or 2 or 3 and etc) it calculates correctly. Float32 addAmount = 1.5; NSDateComponents *components = [[[NSDateComponents alloc] init] autorelease]; [components setMonth:addAmount]; NSCalendar *gregorian = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease]; [gregorian setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; NSDate *newDate2 = [gregorian dateByAddingComponents:components toDate:Date1 options:0]; Now for difference, if I have a date that has been added with exactly one year (almost same code as above), it adds correctly, but when the difference is calculated, I get 0 years, 11 months and 30 days. NSDate *startDate = Date1; NSDate *endDate = Date2; NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; [gregorian setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; NSUInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit; NSDateComponents *components = [gregorian components:unitFlags fromDate:startDate toDate:endDate options:0]; NSInteger years = [components year]; NSInteger months = [components month]; NSInteger days = [components day]; What am I doing wrong? Also I have added the kCFCalendarComponentsWrap constanct in the options for both adding and difference functions but with no difference. Thanks

    Read the article

  • How to create an array of User Objects in Powerbuilder?

    - by TomatoSandwich
    The application has many different windows. One is a single 'row' window, which relates to a single row of data in a table, say 'Order'. Another is a 'multiple row' datawindow, where each row in the datawindow relates to a row in 'Order', used for spreadsheet-like data entry Functionality extentions have create a detail table, say 'Suppliers', where an order may require multiple suppliers to fill the order. Normally, suppliers are not required, because they are already in the warehouse (0), or there may need to be an order to a supplier to complete an order (1), or multiple suppliers may need to be contacted (more than one). As a single order is entered, once the items are entered, a User Object is populated depending on the status of the items in the warehouse. If required, this creates a 1-to-many relationship between the order and the "backorder". In the PB side, there is a single object uo_backorder which is created on the window, and is referenced by the window depending on the command (button popup, save, etc) I have been tasked to create the 'backorder' functionality on the spreadsheet-line window. Previously the default options for backorders were used when orders were created from the multiple-row window. A workaround already exists where unconfirmed orders could be opened in the single-row window, and the backorder information manipulated there. However, the userbase wants this functionality on the one window. Since the functionality of uo_backorder already exists, I assumed I could just copy the code from the single-order window, but create an array of uo_backorder objects to cope with multiple rows. I tried the following: forward .. type uo_backorder from popupdwpb within w_order_conv end type end forward global type w_order_conv from singleform .. uo_backorder uo_backorder end type type variables .. uo_backorder iuo_backorders[] end variables .. public function boolean iuo_backorders(); .. long ll_count ll_count = UpperBound(iuo_backorders[]) iuo_backorders[ll_count+1] = uo_backorder //THIS ISN'T RIGHT lb_ok = iuo_backorders[ll_count+1].init('w_backorder_popup', '', '', '', 'd_backorder_popup', sqlca, useTransObj()) return lb_ok end function .. <utility functions> .. type uo_backorder from popupdwpb within w_order_conv integer x = 28 integer y = 28 integer width ... end type on uo_backorder.destroy call popupdwpb::destroy end on The issue I face now is that the code commented "THIS ISN'T RIGHT" isn't correct. It is associating the visual object placed on the face of the main window to each array cell, so anytime I reference the array cell object it's actually referencing the one original object, not the new instances that I (thought) I was creating. If I change the code iuo_backorders[ll_count+1] = create uo_backorder the code doesn't run, saying that it failed to initalize the popup window. I think this is related to the class being called the same thing as the instance. What I want to end up with is an array of uo_backorder objects that I can associate to each row of my datawindow (first row = first cell, etc). I think the issue lays in the fact it's a visual object, and I can't seem to get the window to run without adding a dummy object on the face of the window (functionality from the original single-row window). Since it's a VISUAL object, does the object indeed need to be embedded on the windowface for the window to know what object I'm talking about? If so, how does one create multiple windowface objects (one to many, depending on when a row is added)? Don't hesitate to inquire regarding any more information this issue may require from myself. I have no idea what is 'standard' or 'default' in PB, or what is custom and needs more explaining.

    Read the article

  • How can I set PivotField.Calculation in Excel/VSTO?

    - by Kang Su
    I'm trying to set the Calculation property on an OLAP PivotField with VSTO 3.0. For example: pivotField.Calculation = XlPivotFieldCalculation.PercentOf; If I do the above, the value I assign does not stay (Excel appears to revert the change). I suspect the reason is that the BaseField property of the PivotField also needs to be populated (as PercentOf needs a BaseField). But it appears to me that you can't set the BaseField property until you've set the Calculation property (otherwise you get a COMException). I've tried to set ManualUpdate on the PivotTable to true, but with VSTO this rarely works, as this gets reverted immediately back to false. Note, that this seems to work fine in VBA as you can assign multiple values in a single statement, like this: With ActiveSheet.PivotTables("PivotTable1").PivotFields("[Measures].[Reseller Sales Amount]") .Calculation = xlPercentOf .BaseField = "[Geography].[Geography].[Country]" .BaseItem = "[Geography].[Geography].[Country].&[France]" .NumberFormat = "0.00%" End With But with C#/VSTO there's no construct like this (that I know of) and I'm stuck not able to do something like the above. Further note, Calculation values that don't require a BaseField, e.g., XlPivotFieldCalculation.xlPercentOfTotal, get set just fine. Any help on this would be greatly appreciated!

    Read the article

  • How to get the PrintDocumentImageableArea for a given PrintQueue without going through PrintDialog?

    - by Patrick Klug
    From MSDN (link): The type PrintDocumentImageableArea has no public constructor. Hence, the variable documentImageableArea must be declared and assigned to Nothing and only then passed to the method. This method displays a PrintDialog requiring input from the user. After the user has selected a printer, paper size, and orientation and closed the dialog, documentImageableArea points to an actual object and its properties are initialized. I have my custom print dialog and need to get the PrintDocumentImageableArea of a given PrintQueue and PrintTicket! (I need the margin's I need to apply) From what I can gather it is quite common for anything but the most basic applications to use their own custom print dialog. There must be a way to get to this information!? Any input appreciated!

    Read the article

  • Positioning Layers and text gradients with css

    - by Kenji Crosland
    I'm a CSS newbie trying to get some text gradients going on. I tried this code here but it didn't work for me, most likely because the h1 object is nested within a #header div. I imagine there's something to do with layers that I don't know about. Either I get a gradent block that is in front of everything or it's not appearing at all. In this particular instance this code makes a big gradient bar appear in front of everything: #header { clear:both; float:left; -moz-background-inline-policy:continuous; -moz-background-origin:padding; background:#080E73 url(../images/header-background.png) repeat-x left 0px; width:100%; max-height: 175px; color: #080E73; } #header h1 { margin-bottom: 0; color: #000; position: relative; } #header h1 span { background:url(../images/headline-text.png) repeat-x; display: block; width: 100%; height: 100%; position: absolute; } Here is the HTML (I'm using ruby on rails hence the notation) <div id="header"> <% unless flash[:notice].blank? %> <div id="notice"><%= flash[:notice] %></div> <% end %> <%= image_tag ("header-image.png") %> <h1><span></span>Headline</h1> <strong>Byline</strong> ... #navbar html... </div> I tried playing with z-index but I couldn't come up with any good results. Any ideas?

    Read the article

  • I am unable to find login page for phpmyadmin

    - by Awan
    I was using phpmyadmin(in Wamp) without a password for root. I thought to set a password for root and goto Privileges page and set a password for root. Now whenever I go to localhost/phpmyadmin page it gives me the following error. MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server. I don't know that what is the problem. It is not showing me a login type page to enter a username and password. Any idea that what is the problem ? Thanks

    Read the article

  • Installing Silverstripe on 000webhost.com (free web host)

    - by benwad
    Hi I'm trying to learn how to work Silverstripe so I extracted the tar file to my free hosting account. I then went on install.php and edited the permissions to meet the requirements set out in install.php but I still get two warnings from the 'webserver configuration' section: I can't tell what webserver you are running. Without Apache I can't tell if mod_rewrite is enabled. I can't tell whether mod_rewrite is running. You may need to configure a rewriting rule yourself. I looked in phpinfo() and mod_rewrite appears to be installed. I contacted the web host and they said it was to do with virtual directory paths, and I should add 'RewriteBase /' to the top of my .htaccess file in the public_html directory. However I did this and still had the same problem. The install.php script says that I can install it even with these warnings but when I press 'install' it just refreshes the install.php page. It doesn't even overwrite the .htaccess file. 000webhost.com says they have successfully installed Silverstripe on their user accounts without much configuration but I can't seem to find out how. EDIT: I managed to get to the next page but now there is another warning which is stopping it installing: Friendly URLs are not working. This is most likely because mod_rewrite isn't configuredcorrectly on your site. Please check the following things in your Apache configuration; you may need to get your web host or server administrator to do this for you: * mod_rewrite is enabled * AllowOverride All is set for your directory I also get this error message from the server: Warning: unlink(mysite/_config.php) [function.unlink]: Permission denied in /home/a2716553/public_html/install.php on line 701

    Read the article

  • export shared services from MOSS

    - by vittocia
    Hello, using the stsadm command I have been able to export a MOSS website and restore it on a different server which works fine. I tried the same for the shared services, it gave no errors, but it does not have all the import connections when I check around. Is there a better way to export and restore shared services, or a way to synch the import connections and user list?

    Read the article

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