Search Results

Search found 118 results on 5 pages for 'dexterous stranger'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Wipe, Delete, and Securely Destroy Your Hard Drive’s Data the Easy Way

    - by The Geek
    Giving a computer to somebody else? Maybe you’re putting it out on Craigslist to sell to a stranger—either way, you’ll want to make sure that your drive is completely wiped, scrubbed, and clean of any personal data. Here’s the easy way to do it. If you only have access to an Ubuntu Live CD or thumb drive, you can actually use that instead if you prefer, and we’ve got you covered with a full guide to securely wiping your PC’s hard drive. Otherwise, keep reading. Wipe the Drive with DBAN Darik’s Boot and Nuke CD is the easiest way to permanently and totally destroy every bit of personal information on that drive—nobody is going to recover a thing once this is done. The first thing you’ll need to do is download a copy of the ISO image, and then burn it to a blank CD with something really useful like Imgburn. Just choose Burn image to Disc at the start screen, select the little file icon, grab the downloaded ISO, and then go. If you need a little more help, we’ve got you covered with a beginner’s guide to burning an ISO image. Once you’re done, stick the disc into the drive, start the PC up, and then once you boot to the DBAN prompt you’ll see a menu. You can pretty much ignore everything on here, and just type… autonuke And there you are, your disk is now being securely wiped. Once it’s all done, you can remove the CD, and then either pack the PC up to sell, or re-install Windows on there if you feel like it. More Advanced Method If you’re really paranoid, want to run a different type of wipe, or just like fiddling with the options, you can choose F3 or hit Enter at the prompt to head to the advanced selection screen. Here you can choose exactly which drive to wipe, or hit the M key to change the method. You’ll be able to choose between a bunch of different wipe options. The Quick Erase is all you really need though.   So there you are, easy PC wiping in one package. What about you? Do you make sure to wipe your old PCs before giving them away? Personally I’ve always just yanked out the hard drives before I got rid of an old PC, but that’s just me. Download DBAN from dban.org Similar Articles Productive Geek Tips Use an Ubuntu Live CD to Securely Wipe Your PC’s Hard DriveHow to Dispose of Old Computers ResponsiblyHow To Delete a VHD in Windows 7Speed up External USB Hard Drives in Windows VistaSpeed Up SATA Hard Drives in Windows Vista TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Follow Finder Finds You Twitter Users To Follow Combine MP3 Files Easily QuicklyCode Provides Cheatsheets & Other Programming Stuff Download Free MP3s from Amazon Awe inspiring, inter-galactic theme (Win 7) Case Study – How to Optimize Popular Wordpress Sites

    Read the article

  • How to future-proof my touch-enabled web application?

    - by Rice Flour Cookies
    I recently went out and purchased a touch-screen monitor with the intention of learning how to program touch-enabled web applications. I had reviewed the MDN documentation about touch events, as well as the W3C specification. To get started, I wrote a very short test page with two event handlers: one for the mousedown event and one for the touchstart event. I fired up the web page in IE and touched the document and found that only the mousedown event fired. I saw the same behavior with Firefox, only to find out later that Firefox can be set to enable the touchstart event using about:config. When touch events are enabled, the touchstart event fires, but not mousedown. Chrome was even stranger: it fired both events when I touched the document: touchstart and mousedown, in that order. Only on my Android phone does it appear to be the case that only the touchstart event fires when I touch the document. I did a a Google search and ended up on two interesting pages. First, I found the page on CanIUse for touch events: http://caniuse.com/#feat=touch Can I Use clearly indicates that IE does not support touch events as of this writing, and Firefox only supports touch events if they are manually enabled. Furthermore, all four browsers I mentioned treat the touch in a completely different way. It boils down to this: IE: simulated mouse click Firefox with touch disabled: simulated mouse click Firefox with touch enabled: touch event Chrome: touch event and simulated mouse click Android: touch event What is more frustrating is that Google also found a Microsoft page called RethinkIE. RethinkIE brags about touch support in IE; as a matter of fact, one of their slogans is "Touch the Web". It links to a number of touch-based application. I followed some of these links, and as best I can tell, it's just like CanIUse described; no proper touch support; just simulated mouse clicks. The MDN (https://developer.mozilla.org/en-US/docs/Web/API/Touch) and W3C (http://www.w3.org/TR/touch-events/) documentation describe a far richer interface; an interface that doesn't just simulate mouse clicks, but keeps track of multiple touches at once, the contact area, rotation, and force of each touch, and unique identifiers for each touch so that they can be tracked individually. I don't see how simulated mouse clicks can ever touch the above described functionality, which, once again, is part of the W3C specification, although it is listed as "non-normative", meaning that a browser can claim to be standards-compliant without implementing it. (Why bother making it part of the standard, then?) What motivated my research is that I've written an HTML5 application that doesn't work on Android because Android doesn't fire mouse events. I'm now afraid to try to implement touch for my application because the browsers all behave so differently. I imagine that at some time in the future, the browsers might start handling touch similarly, but how can I tell how they might be handled in the future short of writing code to handle the behavior of each individual browser? Is it possible to write code today that will work with touch-enabled browsers for years to come? If so, how?

    Read the article

  • C# WebBrowser.ShowPrintDialog() not showing

    - by jeah_wicer
    I have this peculiar problem while wanting to print a html-report. The file itself is a normal local html file, located on my hard drive. To do this, I have tried the following: public static void PrintReport(string path) { WebBrowser wb = new WebBrowser(); wb.Navigate(path); wb.ShowPrintDialog() } And I have this form with a button with the click event: private void button1_Click(object sender, EventArgs e) { string path = @"D:\MyReport.html"; PrintReport(path); } This does absolutely nothing. Which is kind of strange... but things get stranger... When editing the print function to do the following: public static void PrintReport(string path) { WebBrowser wb = new WebBrowser(); wb.Navigate(path); MessageBox.Show("TEST"); wb.ShowPrintDialog() } It works. Yes, only adding a MessageBox. The MessageBox is showing and after it comes the print dialog. I have also tried with Thread.Sleep(1000) instead, which doesn't work. Can anyone explain to me what's going on here? Why would a messagebox make any difference? Can it be some kind of permission problem? I've reproduced this on both Windows 7 and 8, same thing. I made this small application with only the above code to isolate the problem. I am quite sure it works on windows XP though, since an older version of the application I'm working on runs on it. When trying to do this directly with the mshtml-dll instead I also get problems. Any input or clarification is greatly appreciated!

    Read the article

  • Null Reference getting REMOTE_ADDR

    - by Josh
    I have an ASMX web service running under IIS7 in classic mode. This service has the following code: try { env.ExternalIP = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } catch (Exception ex) { LogWriter.WriteError(ex); env.ExternalIP="000.000.000.000"; } This results in the following stack trace. I only modified the names of usercode call stack here to protect the innocent: Message: An Exception of type: NullReferenceException occured in method: GetAdditionalServerVar ExceptionMsg: Object reference not set to an instance of an object. ===Stack Trace=== at System.Web.Hosting.ISAPIWorkerRequestInProc.GetAdditionalServerVar(Int32 index) at System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) at System.Web.HttpRequest.AddServerVariableToCollection(String name) at System.Web.HttpRequest.FillInServerVariablesCollection() at System.Web.HttpServerVarsCollection.Populate() at System.Web.HttpServerVarsCollection.Get(String name) at System.Collections.Specialized.NameValueCollection.get_Item(String name) at MyService.MyMethod() I'm at a loss here as this is very basic plain vanilla code. EDIT This gets even stranger. I have added some basic code just wondering what server variables I can get at this point. This fails with the same exception when I try and get all the keys: System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.Hosting.ISAPIWorkerRequestInProc.GetAdditionalServerVar(Int32 index) at System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) at System.Web.HttpRequest.AddServerVariableToCollection(String name) at System.Web.HttpRequest.FillInServerVariablesCollection() at System.Web.HttpServerVarsCollection.Populate() at System.Web.HttpServerVarsCollection.get_AllKeys() at MyService.MyHelper() When I was looking at the framework code looks like this could happen when the array which caches the server variables isn't populated and it looks like this occurs when there a null pointer to some Context...which seems like a fairly core piece of the framework code. I suppose it's time to burn up one of our support tickets with Microsoft.

    Read the article

  • Can get coordinates from iPhone simulator, but can't get coordinates from iPhone device

    - by iPhoneARguy
    Hi everyone, I've run into something of a mysterious bug (to me). I have some code to pick out the user's current location on the iPhone SDK. It works fine on the iPhone simulator, but when I try to run it on the actual device, I get a weird error. Here is the code (I am using ASIFormDataRequest to create a POST request): ASIFormDataRequest * request = [ASIFormDataRequest requestWithURL:url]; [request setPostValue:@"testauthor" forKey:@"author"]; [request setPostValue:[[NSNumber numberWithDouble:datum.location.coordinate.latitude] stringValue] forKey:@"latitude"]; NSLog(@"%f", datum.location.coordinate.latitude); NSLog(@"%f", datum.location.coordinate.longitude); [request setPostValue:[[NSNumber numberWithDouble:datum.location.coordinate.longitude] stringValue] forKey:@"longitude"]; [request setPostValue:datum.comment forKey:@"comment"]; On the simulator, NSLog does log both the latitude and longitude, but on the iPhone, it does not. Even stranger, when I go through with the debugger on the device, I try "po datum.location", I get <+###, -###> +/- 223.10m (speed 0.00 mps / course -1.00) @ 2010-05-02 22:18:37 -0400 (### replaced by my location) but when I do "(gdb) po datum.location.coordinate" I get: There is no member named coordinate. Do you guys have any idea why this might happen? Thanks in advance for your help!

    Read the article

  • Did I find a bug in WriteableBitmap when using string literals

    - by liserdarts
    For performance reasons I'm converting a large list of images into a single image. This code does exactly what I want. Private Function FlattenControl(Control As UIElement) As Image Control.Measure(New Size(1000, 1000)) Control.Arrange(New Rect(0, 0, 1000, 1000)) Dim ImgSource As New Imaging.WriteableBitmap(1000, 1000) ImgSource.Render(Control, New TranslateTransform) ImgSource.Invalidate Dim Img As New Image Img.Source = ImgSource Return Img End Function I can add all the images into a canvas pass the canvas to this function and I get back one image. My code to load all the images looks like this. Public Function BuildTextures(Layer As GLEED2D.Layer) As FrameworkElement Dim Container As New Canvas For Each Item In Layer.Items If TypeOf Item Is GLEED2D.TextureItem Then Dim Texture = CType(Item, GLEED2D.TextureItem) Dim Url As New Uri(Texture.texture_filename, UriKind.Relative) Dim Img As New Image Img.Source = New Imaging.BitmapImage(Url) Container.Children.Add(Img) End If Next Return FlattenControl(Container) End Function The GLEED2D.Layer and GLEED2D.TextureItem classes are from the free level editor GLEED2D (http://www.gleed2d.de/). The texture_filename on every TextureItem is "Images/tree_clipart_pine_tree.png" This works just fine, but it's just a proof of concept. What I really need to do (among other things) is have the path to the image hard coded. If I replace Texture.texture_filename in the code above with the string literal "Images/tree_clipart_pine_tree.png" the images do not appear in the final merged image. I can add a breakpoint and see that the WriteableBitmap has all of it's pixels as 0 after the call to Invalidate. I have no idea how this could cause any sort of difference, but it gets stranger. If I remove the call to FlattenControl and just return the Canvas instead, the images are visible. It's only when I use the string literal with the WriableBitmap that the images do not appear. I promise you that the value in the texture_filename property is exactly "Images/tree_clipart_pine_tree.png". I'm using Silverlight 3 and I've also reproduced this in Silverlight 4. Any ideas?

    Read the article

  • How to import data to SAP

    - by Mehmet AVSAR
    Hi, As a complete stranger in town of SAP, I want to transfer my own application's (mobile salesforce automation) data to SAP. My application has records of customers, stocks, inventory, invoices (and waybills), cheques, payments, collections, stock transfer data etc. I have an additional database which holds matchings of records. ie. A customer with ID 345 in my application has key 120-035-0223 in SAP. Every record, for sure, has to know it's counterpart, including parameters. After searching Google and SAP help site for a day, I covered that it's going to be a bit more pain than I expected. Especially SAP site does not give even a clue on it. Say I couldn't find. We transferred our data to some other ERP systems, some of which wanted XML files, some other exposed their APIs. My point is, is Sql Server's SSIS an option for me? I hope it is, so I can fight on my own territory. Since client requests would vary a lot, I count flexibility as most important criteria. Also, I want to transfer as much data as I could. Any help is appreciated. Regards,

    Read the article

  • Amazon S3 and swfaddress

    - by justinbach
    I recently migrated a large AS3 site (lots of swfs, lots of flvs) to Amazon S3. Pretty much everything but HTML and JS files is being stored/served from Amazon, and it's working well. The only problem I'm having is that I built the site using SWFaddress (actually, via the Gaia framework which uses SWFaddress), and for some reason, SWFaddress is no longer updating the address bar correctly as users navigate from page to page. In other words, the URL persistently remains http://www.mysite.com, not http://www.mysite.com/#/section as would be the case were SWFaddress functioning correctly (and as it was functioning prior to the migration). Stranger yet, if I go to (e.g.) http://www.mysite.com/#/section directly, the deeplinking functions as you'd expect--I arrive directly at the correct section. However, navigating away from that section doesn't have any effect on the address bar, despite the fact that it should be dynamically updated. I've got a crossdomain.xml file set up on the site that allows access from all domains, so that's not the issue, and I don't know what else might be. Any ideas would be greatly appreciated! P.S. I integrated S3 by putting pretty much the entire site in an S3 bucket and then just changing the initial swfobject embed to point to the S3 instance of main.swf, passing in the S3 path as the "base" param to the embedded swf so that all dynamically loaded assets and swfs would also be sourced from s3. Dunno if that's related to the troubles I'm having.

    Read the article

  • Asp.net Login Status Question: It Aint Working

    - by contactmatt
    I'm starting to use Role Management in my website, and I'm current following along on the tutorial from http://www.asp.net/Learn/Security/tutorial-02-vb.aspx . I'm having a problem with the asp:LoginStatus control. It is not telling me that I am currently logged in after a successful login. This can't be true because after successfully logging in, my LoggedInTemplate is shown. The username and passwords are simply stored in a array. Heres the Login.aspx page code. Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) _ Handles btnLogin.Click ' Three valid username/password pairs: Scott/password, Jisun/password, and Sam/password. Dim users() As String = {"Scott", "Jisun", "Sam"} Dim passwords() As String = {"password", "password", "password"} For i As Integer = 0 To users.Length - 1 Dim validUsername As Boolean = (String.Compare(txtUserName.Text, users(i), True) = 0) Dim validPassword As Boolean = (String.Compare(txtPassword.Text, passwords(i), False) = 0) If validUsername AndAlso validPassword Then FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, chkRemember.Checked) End If Next ' If we reach here, the user's credentials were invalid lblInvalid.Visible = True End Sub Here is the content place holder on the master page specifically designed to hold Login Information. On successfull login, the page is redirected to '/Default.aspx', and the LoggedIn Template below is shown...but the status says Log In. <asp:ContentPlaceHolder Id="LoginContent" runat="server"> <asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> Welcome back, <asp:LoginName ID="LoginName1" runat="server" />. </LoggedInTemplate> <AnonymousTemplate> Hello, stranger. </AnonymousTemplate> </asp:LoginView> <br /> <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/Logout.aspx" /> </asp:ContentPlaceHolder> Forms authentication is enabled. I'm not sure what to do about this :o.

    Read the article

  • How do I pass a callback function to sqlite3_exec on iOS 5.1?

    - by John Doh
    I am new to both xcode/iOS/Objective-C and sqlite. I am trying to teach myself the basics - and I would like to use the sqlite3 wrapper "sqlite3_exec" for a select query. For some reason, I can't find a simple example anywhere of someone doing this. Basically, the method has a parameter (the third one) for a callback function: int sqlite3_exec( sqlite3*, /* An open database */ const char *sql, /* SQL to be evaluated */ int (*callback)(void*,int,char**,char**), /* Callback function */ void *, /* 1st argument to callback */ char **errmsg /* Error msg written here */ ); That's fine. I'm no stranger to callbacks. However, I just can't seem to get the syntax down right. I took over one of the view controllers in my iPad (iOS 5.1) xcode (4.3) project, and made the changes shown below: #import "SecondViewController.h" #import "sqlite3.h" #import "AppState.h" @interface SecondViewController () @end @implementation SecondViewController - (int)myCallback:(void *)a_parm argc:(int)argc argv:(char **)argv column:(char **)column { return 0; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //grab questionnaire names char *sql = "select * from QST2Main order by [Name]"; char *err = nil; sqlite3 *db = [[AppState sharedManager] getgCn]; sqlite3_exec(db, sql, myCallback, nil, &err); } Essentially, I want to run a query when this view first loads, to store some data for later use. But, XCode doesn't like the "myCallback" usage at the bottom there. It says: Undeclared Use of Identifier 'myCallback.' That method is declared in the header file, and I've even tried making it static. Nothing seems to make this error go away. I know I must be doing something fundamentally wrong here, but for the life of me I can't figure out what - I can't even find other code samples in this area that could help me figure out what I'm missing. Many thanks!

    Read the article

  • Application doesn't exit with 0 threads

    - by Bryce Wagner
    We have a WinForms desktop application, which is heavily multithreaded. 3 threads run with Application.Run and a bunch of other background worker threads. Getting all the threads to shut down properly was kind of tricky, but I thought I finally got it right. But when we actually deployed the application, users started experiencing the application not exiting. There's a System.Threading.Mutex to prevent them from running the app multiple times, so they have to go into task manager and kill the old one before they can run it again. Every thread gets a Thread.Join before the main thread exits, and I added logging to each thread I spawn. According to the log, every single thread that starts also exits, and the main thread also exits. Even stranger, running SysInternals ProcessExplorer show all the threads disappear when the application exits. As in, there are 0 threads (managed or unmanaged), but the process is still running. I can't reproduce this on any developers computers or our test environment, and so far I've only seen it happen on Windows XP (not Vista or Windows 7 or any Windows Server). How can a process keep running with 0 threads?

    Read the article

  • Word 2007 COM - Can't directly access a page when word is set to invisible

    - by Robbie
    I'm using Word 2007 via COM from PHP 5.2 Apache 2.0 on a windows machine. The goal is to programmatically render jpeg thumbnails from each page in a Word document. The following code works correctly if you set $word-Visible to 1: try { $word = new COM('word.application'); $word->Visible = 0; $word->Documents->Open("C:\\test.doc"); echo "Number of pages: " . $word->ActiveDocument->ActiveWindow->ActivePane->Pages->Count() . "</br>"; $i = 1; foreach ($word->ActiveDocument->ActiveWindow->ActivePane->Pages as $page) { echo "Page number: $i </br>"; $i++; } //get the EMF image of the page $data = $word->ActiveDocument->ActiveWindow->ActivePane->Pages->Item(3)->EnhMetaFileBits; $word->ActiveDocument->Close(); $word->Quit(); } catch (Exception $e) { echo "Exception: " .$e->getMessage(); } The test document I'm using contains 35 pages. The code will display the correct number of pages but the for each loop only loops over 1 page. I can only directly access page 1 and 2 in the Pages-Item() collection. If I try to access another page I get the exception: "The requested member of the collection does not exist." If I set the $word-Visible property to 1 I do get all the pages in the foreach loop and I can access any page directly. Everything is working as expected if Word is set to be visible. Even stranger is the fact that if I set Word to be invisible and I don't have the foreach loop I can only access page 1 instead of page 1 and 2 if I do the for each loop. Any pointers on how I can access all the pages in the document and keeping word invisible?

    Read the article

  • Seam:token tag not being respected

    - by JBristow
    When I click a command button, and then hit the browser back button to the form and click it again, it submits a second time without throwing the proper exception... Even stranger, the form id itself is DIFFERENT when I come back, which implies it has regenerated a "valid" form id at some point. Here's the relevant code: Any ideas? <h:form id="accountActivationForm"> <s:token/> <a4j:commandButton id="cancelActivateAccountButton" action="#{controller[cancelAction]}" image="/images/button-Cancel-gray.gif" reRender="#{reRenderList}" oncomplete="#{onCancelComplete}" /> &#160; <a4j:commandButton id="activateAccountButton" action="#{controller[agreeAction]}" image="/images/button-i-agree-continue.gif" styleClass="activate-account-button" reRender="#{reRenderList}" oncomplete="#{onActivationComplete}"/> </h:form> Clarifications: I inherited this, so I'm trying to change it as little as possible. (It's used in a couple places.) Each action returns a view, not null. I have confirmed this by stepping through line-by-line. The reRenderList is empty in my current test-case. onActivationComplete is also empty. I'm going to be going template-by-template to see if someone made it with nested forms, because my coworkers have had unrelated problems due to that, so it couldn't hurt to eliminate that as a possible problem.

    Read the article

  • Why is OpenSubKey() returning null on my Win 7 64 bit system?

    - by BrMcMullin
    Has anyone seen OpenSubKey() and other Microsoft.Win32 registry functions return null on 64 bit systems when 32 bit registry keys are under Wow6432node in the registry? I'm working on a unit testing framework that makes a call to OpenSubKey() from the .net library. My dev system is a Win 7 64 bit environment with VS 2008 SP1 and the Win 7 SDK installed. The application we're unit testing is a 32 bit application, so the registry is virtualized under HKLM\Software\Wow6432node. When we call: Registry.LocalMachine.OpenSubKey( @"Software\MyCompany\MyApp\" ); Null is returned, however explicitly stating to look here works: Registry.LocalMachine.OpenSubKey( @"Software\Wow6432node\MyCompany\MyApp\" ); From what I understand this function should be agnostic to 32 bit or 64 bit environments and should know to jump to the virtual node. Even stranger is the fact that the exact same call inside a compiled and installed version of our application is running just fine on the same system and is getting the registry keys necessary to run; which are also being placed in HKLM\Software\Wow6432node. Any suggestions? Thanks in advance!

    Read the article

  • Grouping Collection seperating numeric 5 from String "5"

    - by invertedSpear
    BackGround: I have an advanced data grid. The data provider for this ADG is an ArrayCollection. There is a grouping collection on an ID field of this AC. Example of a couple items within this AC the AC var name is "arcTemplates": (mx.collections::ArrayCollection)#0 filterFunction = (null) length = 69 list = (mx.collections::ArrayList)#1 length = 69 source = (Array)#2 [0] (Object)#3 abbreviation = "sore-throat" insertDate = "11/16/2009" name = "sore throat" templateID = 234 templateType = "New Problem" templateTypeID = 1 [32] (Object)#35 abbreviation = 123 insertDate = "03/08/2010" name = 123 templateID = 297 templateType = "New Problem" templateTypeID = 1 [55] (Object)#58 abbreviation = 1234 insertDate = "11/16/2009" name = 1234 templateID = 227 templateType = "Exam" templateTypeID = 5 [56] (Object)#59 abbreviation = "breast only" insertDate = "03/15/2005" name = "breast exam" templateID = 195 templateType = "Exam" templateTypeID = 5 Example of Flex code leading to the Grouping: <mx:AdvancedDataGrid displayItemsExpanded="true" id="gridTemplates"> <mx:dataProvider> <mx:GroupingCollection id="gc" source="{arcTemplates}"> <mx:Grouping > <mx:GroupingField name="templateTypeID" compareFunction="gcSort"> GC sort function: public function gcSort(a:Object, b:Object):int{ return ObjectUtil.stringCompare(String(a.templateTypeID + a.name).toLowerCase(), String(b.templateTypeID + b.name).toLowerCase()); } Problem: In my AC example there are a few items, items 0, 32 and 56 properly sort and group to their templateTypeID, but item 55 does something weird. It seems to sort/group on the numeric 5 instead of the string "5". Gets stranger. If I change the name property to contain text (so 1234x) it then correctly sorts/groups to the string "5" Question: What is going on here and how do I fix it?

    Read the article

  • Reading a .dat file as "rb" read binary

    - by donpal
    I have a web-accessible php script that accesses a folder above the webroot (not web accessible) called \folder\. This is done via setting the path to \folder\ in .htaccess the usual way so that \folder\ becomes part of the project. \folder\ contains a .php script (communicates with the web-accessible script inside the webroot) some .inc files (used by the .php in the same folder, above the webroot) a dat file (used by the .inc in the same folder, above the webroot) All files are accessible to each other as needed: the web-accessible php inside the webroot can communicate with the php above the webroot the php above the webroot can communicate with the inc in the same folder But the inc above the webroot can't communicate with the dat in the same folder, and I have no idea why that's the case The inc myinc.inc is supposed to open the dat mydat.dat in the same folder like this fopen('mydat.dat', "rb"); but I get an error that no file called mydat.dat exists inside \folder\myinc.inc. Of course it does not, the .dat is sibling to .inc and is not supposed to be inside it. Why is php expecting to find the .dat file inside the .inc. The stranger thing is that if I move the .dat in the web-accessible folder, it becomes readable now. Any ideas why php is trying to find the .dat inside the .inc?

    Read the article

  • JUnit test failing - complaining of missing data that was just inserted

    - by Collin Peters
    I have an extremely odd problem in my JUnit tests that I just can't seem to nail down. I have a multi-module java webapp project with a fairly standard structure (DAO's, service clasess, etc...). Within this project I have a 'core' project which contains some abstracted setup code which inserts a test user along with the necessary items for a user (in this case an 'enterprise', so a user must belong to an enterprise and this is enforced at the database level) Fairly simple so far... but here is where the strangeness begins some tests fail to run and throw a database exception where it complains that a user cannot be inserted because an enterprise does not exist. But it just created the enterprise in the preceding line of code! And there was no errors in the insertion of the enterprise. Stranger yet, if this test class is run by itself everything works fine. It is only when the test is run as part of the project that it fails! And the exact same abstracted code was run by 10+ tests before the one that fails! f I have been banging my head against a wall with this for days and haven't really made any progress. I'm not even sure what information to offer up to help diagnose this. Using JUnit 4.4, Spring 2.5.6, iBatis 2.3.0, Postgresql 8.3 Switching to org.springframework.jdbc.datasource.DriverManagerDataSource from org.apache.commons.dbcp.BasicDataSource changed the problem. Using DriverManagerDataSource the tests work for the first time, but now all of a sudden a lot of data isn't rolled back in the database! It leaves everything behind. All with no errors Tests fail when run via Eclipse & Maven Please ask for any info which may help me solve my problem!

    Read the article

  • Check for child duplicates

    - by ebb
    My console app will loop through each User to get their Websites, so that it can take new screenshots of them. However, to prevent taking screenshot of the same website twice I have to check whether there already has been taken screenshot of the website, while looping through another users websites. My current solution is: Database: User |--> ID: 1 |--> FirstName: Joe |--> ID: 2 |--> FirstName: Stranger Websites |--> ID: 1 |--> UserID: 1 |--> URL: http://site.com |--> ID: 2 |--> UserID: 2 |--> URL: http://site.com Console app: static void RenewWebsiteThumbNails() { Console.WriteLine("Starting renewal process..."); using (_repository) { var websitesUpdated = new List<string>(); foreach (var user in _repository.GetAll()) { foreach (var website in user.Websites.Where(website => !websitesUpdated.Contains(website.URL))) { _repository.TakeScreenDumpAndSave(website.URL); websitesUpdated.Add(website.URL); Console.WriteLine(new string('-', 50)); Console.WriteLine("{0} has successfully been renewed", website.URL); } } } } However, it seems wrong to declare a List for such a scenario, just to check whether a specific URL already has been added... any suggestions for an alternative way?

    Read the article

  • Chrome renders button links completely screwed up when placed inside a paragraph

    - by Ferdy
    I am fairly proficient in CSS but now I am running into a very strange rendering issue in Google Chrome 9. I am trying to create some fancy looking link buttons (basically heavily styled anchors). Here is some example markup: <a href="" class="button"> <figure class="sprite icon icon_back"></figure> Link button with icon</a> This markup may look a litte strange to you, there's a few things you should know: I am using HTML5's figure class to include an icon as part of the button. I have the proper reset CSS applied and Chrome can render this tag for sure. Instead of actually pointing to an image I am applying CSS classes to the figure element. Within the CSS I am using the spriting technique to show the correct portion of a single large sprite image. All of this is working fine in Firefox, and actually also in Chrome. The correct rendering can be seen in the following image: It renders like that in both Firefox and Chrome. Here comes the problem, if I place such a button within paragraph tags <p></p> this is what happens in Chrome only: Notice how the button is ripped apart? Only in Chrome and only when placed inside a paragraph. It gets even stranger: this only happens for the first button inside the paragraph, if I would place three buttons inside a paragraph, only the 1st one is screwed up. Your first question would probably be about the CSS. It is rather verbose so hereby a temporary link to the page in question: Edit: link to live page removed, was only temporary for problem inspection.

    Read the article

  • Weird characters at the beginning of a LPTSTR? C++

    - by extintor
    I am using this code to get the windows version: define BUFSIZE 256 bool config::GetOS(LPTSTR OSv) { OSVERSIONINFOEX osve; BOOL bOsVersionInfoEx; ZeroMemory(&osve, sizeof(OSVERSIONINFOEX)); osve.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osve)) ) return false; TCHAR buf[BUFSIZE]; StringCchPrintf(buf, BUFSIZE, TEXT("%u.%u.%u.%u"), osve.dwPlatformId, osve.dwMajorVersion, osve.dwMinorVersion, osve.dwBuildNumber); StringCchCat(OSv, BUFSIZE, buf); return true; } And I am testing it with: LPTSTR OSv= new TCHAR[BUFSIZE]; config c; c.GetOS(OSv); MessageBox(OSv, 0, 0); And in the msgbox I get something like this äì5.1.20 (where 5.1.20 is = to OSv) but the first 2 or 3 chars are some weird characters that I don't know when they came from. Even stranger, if I call that second piece again it shows it ok, it only show the weird characters the first time I execute it. Does someone has an idea what's going on here?

    Read the article

  • Named Range Breaks Code

    - by Daniel
    I have one workbook with several sheets. I populate the listboxes (pulling static data from cells) on the 2nd sheet, click a button and it runs fine. When I populate the listboxes with a named range, the listbox populates the way I want, but I get an error because the code thinks that I didn't select anything in the listbox, even though I did. So it passes through "" instead of "title". Is this a common issue? The named range isn't a problem because it passes through the data to the listbox and I know it's selecting data because as soon as the listbox loses focus, it spits out the contents of the cell into cell A1. What's even stranger is that I have the contents of the listbox set to Msg1. So A1 gets populated with Msg1 (what I actually selected in the listbox). But when I try and use Msg1 in the code, it tells me that Msg1 is "". Again, this only happens when I use the dynamic named range, not with static data in cells K1:K9. Private Function strEndSQL1 As String Dim strSQL As String strSQL = "" 'Create SQL statement strSQL = "FROM (SELECT * FROM dbo.Filter WHERE ID = " & TextBox1.Text & " And Source IN (" & Msg1 & ")) a FULL OUTER JOIN " strSQL = strSQL & "(SELECT * FROM dbo.Filters WHERE ID = " & TextBox2.Text & " And Source IN (" & Msg1 & ")) b " strSQL = strSQL & "ON a.Group = b.Group strEndSQL = strSQL End Function

    Read the article

  • Unknown Argument Error "-p" when deploying to heroku.

    - by user3312278
    We are deploying a rails app to Heroku. The app should be making a youtube api call, using the Trollop Gem as a command line parser. We keep getting this error back. 2014-07-30T23:17:57.526014+00:00 app[web.1]: Error: unknown argument '-p'. 2014-07-30T23:17:57.526020+00:00 app[web.1]: Try --help for help. 2014-07-30T23:17:57.526541+00:00 app[web.1]: Completed 500 Internal Server Error in 7466ms This is what our Trollop code looks like. def self.youtube_search(query) p ENV["YOUTUBE_DEVELOPER_KEY"] p query p "point of no return" p "*"*25 youtube_service_api_name = "youtube" youtube_api_version = "v3" # opts = HTTParty.get("https://www.youtube.com/results?search_query=russia") opts = Trollop::options do opt :q, 'Search term', :source => String, :default => query opt :maxResults, 'Max results', :source => :int, :default => 25 end What's much stranger is that it was working an hour ago and now it's not. Does anyone have any ideas? This doesn't seem to be documented anywhere.

    Read the article

  • Absence of property syntax in Java

    - by Vojislav Stojkovic
    C# has syntax for declaring and using properties. For example, one can declare a simple property, like this: public int Size { get; set; } One can also put a bit of logic into the property, like this: public string SizeHex { get { return String.Format("{0:X}", Size); } set { Size = int.Parse(value, NumberStyles.HexNumber); } } Regardless of whether it has logic or not, a property is used in the same way as a field: int fileSize = myFile.Size; I'm no stranger to either Java or C# -- I've used both quite a lot and I've always missed having property syntax in Java. I've read in this question that "it's highly unlikely that property support will be added in Java 7 or perhaps ever", but frankly I find it too much work to dig around in discussions, forums, blogs, comments and JSRs to find out why. So my question is: can anyone sum up why Java isn't likely to get property syntax? Is it because it's not deemed important enough when compared to other possible improvements? Are there technical (e.g. JVM-related) limitations? Is it a matter of politics? (e.g. "I've been coding in Java for 50 years now and I say we don't need no steenkin' properties!") Is it a case of bikeshedding?

    Read the article

  • APC UPS replace battery light and apcupsd reporting "replace battery"

    - by mgjk
    We have an APC Smart UPS 1500. The "Replace Battery" light is on, and apcupsd reports: Emergency! Batteries have failed on UPS xxxx. Change them NOW However, from this article, http://sturgeon.apcc.com/kbasewb2.nsf/for+external/f39c4312fcaf7b948525679a005ebb78?OpenDocument it seems that it's not so clear that the UPS battery needs to be replaced. Stranger, according to the information on the UPS, an 11 minute runtime at 42.9% load running at 27.7V isn't so bad. Any thoughts about what to try next? We're a non-profit, money is an object. It would be a shame to replace a battery with a year or so left in it. # apcaccess status APC : 001,041,1017 DATE : Thu Mar 29 13:01:41 EDT 2012 HOSTNAME : oreilly2 VERSION : 3.14.6 (16 May 2009) debian UPSNAME : xxxx CABLE : Custom Cable Smart MODEL : Smart-UPS 1500 UPSMODE : Stand Alone STARTTIME: Thu Mar 29 12:57:30 EDT 2012 STATUS : ONLINE LINEV : 112.3 Volts LOADPCT : 42.9 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 11.0 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds OUTPUTV : 112.3 Volts SENSE : High DWAKE : -01 Seconds DSHUTD : 090 Seconds LOTRANS : 106.0 Volts HITRANS : 127.0 Volts RETPCT : 000.0 Percent ITEMP : 23.8 C Internal ALARMDEL : Always BATTV : 27.7 Volts LINEFREQ : 60.0 Hz LASTXFER : No transfers since turnon NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A SELFTEST : NO STATFLAG : 0x07000008 Status Flag SERIALNO : AS0603298896 BATTDATE : 2006-01-14 NOMOUTV : 120 Volts NOMBATTV : 24.0 Volts FIRMWARE : 601.3.D USB FW:1.5 APCMODEL : Smart-UPS 1500 END APC : Thu Mar 29 13:02:12 EDT 2012 Error when running upstest You are using a SMART cable type, so I'm entering SMART test mode mode.type = USB_UPS Setting up the port ... Hello, this is the apcupsd Cable Test program. This part of apctest is for testing Smart UPSes. Please select the function you want to perform. 1) Query the UPS for all known values 2) Perform a Battery Runtime Calibration 3) Abort Battery Calibration 4) Monitor Battery Calibration progress 5) Program EEPROM 6) Enter TTY mode communicating with UPS 7) Quit Select function number: 2 First ensure that we have a good link and that the UPS is functionning normally. Simulating UPSlinkCheck ... YWrote: Y Got: getline failed. Apparently the link is not up. Giving up.

    Read the article

  • Issue with Netgear GS108T Managed Switch and Jumbo Frames

    - by Richie086
    I recently purchased a Netgear GS108T managed switch and I am trying to configure jumbo packets between my NAS (Thecus N4100Pro), PC and managed switch. I should mention the fact that I was able to use jumbo frames between my PC and NAS before I purchased the switch without issue. My Desktop has a wired gigabit NIC (Intel 82579V Gigabit) and has the ability to configure jumbo frames (see pic) that are either 9014 bytes or 4088 bytes. I choose 9014 bytes for the jumbo frame size My NAS supports jumbo frames as well, and is configured to use 9014 as the frame size. When I go into my Netgear managed switch and set the frame size to 9014 on the ports I am using for my PC and NAS. See image As soon as I hit apply in the web interface, I loose my connection to the SMB shares on my NAS and I can no longer connect to the web admin interface for my NAS. The really strange thing is I can ping my NAS via the ping command, but when I try to connect to the web interface on port 80 or port 443 the page never loads. I did a scan from my PC to my NAS using nmap and I can see the following ports open PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 111/tcp open rpcbind 139/tcp open netbios-ssn 443/tcp open https 445/tcp open microsoft-ds 631/tcp open ipp 2000/tcp open cisco-sccp 2049/tcp open nfs 3260/tcp open iscsi 49152/tcp open unknown MAC Address: 00:14:FD:15:00:44 (Thecus Technology) Read data files from: C:\Program Files (x86)\Nmap Nmap done: 1 IP address (1 host up) scanned in 211.97 seconds Raw packets sent: 1 (28B) | Rcvd: 1 (28B) Anyone have any idea what is going on here? Why is nmap able to detect the ports are open and listening for http, https and file sharing but I cant connect when all devices have jumbo packets enabled? Stranger still - I did a packet capture using wireshark while the nmap scan was running and filtered so I only saw converstations between my PC and my NAS. Here are the packet details from my scan Only 4 packets over 5k bytes? What is going on here? Do I not need to configure jumbo frame sizes on the switch? I have an internet connection from my pc to the switch to my router - I just cannot connect to my NAS. I just checked on my iPhone and I am able to open my NAS web admin interface without issue on my iPhone! WTF!!!!!! Let me know if you need more details..

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >