w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to add my program to add/remove programs? VB.NET
I found an indirect way to do it - via cmd. That's not the best way, but it may work. You can write the following text in the resources as name.cmd: 'sets the name of your app to display reg add "HKLMSoftwareMicrosoftWindowsCurrentVersionUninstallYourapp" /v "DisplayName" /d "Yourapp" /f 'sets your app version to display REG ADD "HKLMSoftwareMicrosoftWindowsCurrentVersionUninstallYourapp" /V "DisplayVersion" /D "1.0.0.0" 'sets your app icon to display location REG ADD "HKLMSoftwareMicrosoftWindowsCurrentVersionUninstallYourapp" /V "DisplayIcon" /D "%PROGRAMFILES%Yourappyourapp.ico" 'sets your name to display as publisher REG ADD "HKLMSoftwareMicrosoftWindowsCurrentVersionUninstallYourapp" /V "Publisher" /D "Yourname" 'sets the uninstall path REG ADD "HKLMSoftwareMicrosoftWindowsCurrentV

Categories : Vb.Net

Safely remove NSView that contains cocoa bindings
The problem is that there isn't a defined order between the inspector controller's response to the selection changing and the various inspector views updating themselves in response to the same thing. So, the "wrong" inspectors for the new array controller selection are still there for a brief time, at least, and trying to access non-existent properties of the element objects. One fix would be to not rely on key-value observing the array controller selection to switch the set of inspectors in and out. Rather, have a coordinating controller – whichever is controlling the "selected object" based on the user action – clear the set of inspectors before changing the selection and not switching in the new set of inspectors until after it has been changed.

Categories : Objective C

Bootstrapper and Setup in Add/Remove Programs
The documentation says this, have you set these Attributes (DisableModify & DisableRemove) in your bundle? If the "DisableModify" attribute is also "yes" or "button" then the bundle will not be displayed in Progams and Features and another mechanism (such as registering as a related bundle addon) must be used to ensure the bundle can be removed. DisableRemove YesNoType Determines whether the bundle can be removed via the Programs and Features (also known as Add/Remove Programs). If the value is "yes" then the "Uninstall" button will not be displayed. The default is "no" which ensures there is an "Uninstall" button to remove the bundle. If the "DisableModify" attribute is also "yes" or "button" then the bundle will not be displayed in Progams and Features and another me

Categories : Wix

How to (safely) remove unnecessary Maven dependencies in Eclipse?
I don't know that there are generally accepted best practices around this, given that anything from introspection to services could break at runtime. Unit tests could help you, but if you don't have good coverage, they could give you a false sense of security. You'd still have to check with function tests (hopefully automated) after you remove every package.

Categories : Java

How to remove first Bytes of QByteArray safely while adding new data continuously end of it?
Calling remove() is inefficient because all the data has to be moved in memory. It is better to have two buffers (arrays). one you write to and one you read from. When The read buffer is emptied, the buffers are swapped. I did something similar here audiocapdevice.h, audiocapdevice.cpp

Categories : Misc

Where does Add/Remove programs pull data for the "Installed On" column
After a lot of messing around I determined that the Windows Add/Remove programs gets the "Installed On" date from at least three potential locations: For MSI installed applications it gets the date from WIN32_Product (By far the most common way) For non-MSI applications it looks in for the InstallDate value in the corresponding registry Uninstall Key (Example: HKLMSOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstallGoogle Chrome) For non-MSI applications that do not have the InstallDate, Windows looks to see the last date that the Uninstall key was written to and uses that date for "Installed On". It was this last method that had me stumped for so long. This means that any time a non-MSI program that is missing the InstallDate value is updated, and the version number in the Unin

Categories : Windows

WIX detect uninstall or change click in Add/Remove programs
I think the way it works is that the bootstrapper puts the appropriate uninstall and repair commands in the in registry here: HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall<productCode> So for example, when I look at the WiX 3.7 entry in this location, it has a registry key called ModifyPath with the value "C:ProgramDataPackage Cache{963ac4b4-a882-4471-8db9-c4adc7b42dc4}WiX37.exe" /modify. Therefore you could parse the command line for the /modify switch for repairs and similarly the /uninstall switch for uninstalls.

Categories : Wix

Application icon is not getting dislayed in control panel add/remove programs
Control panel add/remove program reads all the programs list from registry. For XP it's HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall you can take backup of your registry, and remove your program name from this registry.

Categories : C++

How can I remove the root node and make the first child the new root node with XSLT?
Add a rule to the identity transform that adds nothing to the result tree for your document element other than the processing of its children: <?xml version="1.0" encoding="US-ASCII"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/*"> <xsl:apply-templates select="*[1]"/> </xsl:template> <xsl:template match="@*|node()"><!--identity for all other nodes--> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> (edited to be agnostic to the name of the document element) (edited again to only preserve the first child element of the document element)

Categories : Xml

Latest built installer for a project doesn't show up in Add/Remove Programs
First, yes, you figured out the correct property name. Yes, ARPSYSTEMCOMPONENT is it which leads to an "unvisible" install under Add/Remove programs (ARP for insiders, although the name has changed post XP). And it is possible to set/change the resulting "SystemComponent" entry in registry later which is not the case for all properties. ARPNOREMOVE just controls if the uninstall in ARP is really possible to perform. I have looked into Visual Installer before really, because it is so limited for MSI experts, but after taking a quick look there is a .vdproj (project file) created with VS 2010, and not very surprisingly, all the MSI information is coded there. The visual setup editors you can see in the solution explorer are only a subset. Just look for "ARP" and you will find some propert

Categories : C#

Layout and Drawables for Nexus S and Galaxy Nexus
Nexus s is 233 ppi, so it will fit on hdpi http://developer.android.com/guide/practices/screens_support.html#overview

Categories : Android

How to Remove Root Element in C#/
The simplest way to do this is with LINQ to XML - something like this: XDocument input = XDocument.Load("input.xml"); XElement firstChild = input.Root.Elements().First(); XDocument output = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), firstChild); output.Save("output.xml"); Or if you don't need the XML declaration: XDocument input = XDocument.Load("input.xml"); XElement firstChild = input.Root.Elements().First(); firstChild.Save("output.xml");

Categories : C#

Can love2d programs be run as normal Lua programs?
You really need to run it with love.exe It is possible to build love as a shared library so you could, in principle, write an openlib wrapper over it. However, to get it to work in a reasonable fashion as a lua module would need a fair amount of work. I wouldn't want to put you off doing this if that's of interest to you but it's not really intended to work that way.

Categories : Lua

Remove htaccess rules from root to a subfolder
Use the following RewriteCond to stop a rule from matching /forum: RewriteCond %{REQUEST_URI} !^/forum/ See the documentation. It seems that %{REQUEST_URI} includes the first slash behind the hostname if I read the documentation.

Categories : Htaccess

How can I add or remove any files into and from initramfs root file system?
How is your kernel/initramfs build ? Is it Buildroot or ptxdist or similar tool ? You need to know what is done during the compilation/build phase, maybe there is a skeleton elsewhere and you need to add your flash dir into this skeleton.

Categories : File

How to remove root element of list when serializing with DataContracts
You'll probably need to define a custom MessageContract for this operation. Check out the following link, specifically the section on "Using Arrays Inside Message Contracts" and the MessageHeaderArrayAttribute. http://msdn.microsoft.com/en-us/library/ms730255.aspx

Categories : Dotnet

I want to remove the xmlns attribute from the root element of an XHTML document
Your DOM document in the iframe is clearly an XMLDocument, not an HTMLDocument. When you remove the xmlns attribute, you change the DOM document such that it is unserializable as XML. "outerHTML" is a serialization operation, so to write the DOM out as XML, it needs to be repaired first, which restores the attribute to the XML. You have two options. Implement your own serializer of the DOM that repairs the output in a different way, or remove the attribute from the XML after serialization as Mr Lister suggests in the comments.

Categories : Misc

How do I remove all occurrences of {root, leaf} from classes in Enterprise Architect?
In the Diagram Properties dialog, there is an option "Show Element Property String". You can switch this off for each diagram. Alternatively, you could export your model to XMI, open it in a text editor, do a search-and-replace to remove all occurrences of isroot="true" and isleaf="true", and then re-import the XMI.

Categories : Misc

Linux skip /root/.gvfs when executing df command with non-root user
I got the solution for my own question :) In df command you can pass the file system types which you would like to exclude, in this case it is 'fuse.gvfs-fuse-daemon'. So when I execute the below the command I no more get this message "df: `/root/.gvfs': Permission denied" df -x fuse.gvfs-fuse-daemon For more details one can look into df --help option.

Categories : Linux

Root immediate child nodes icons not visible when hiding root
JTree#setShowsRootHandles(boolean newValue) controls the state of the handles for root elements. Normally, this is false. Try changing to true

Categories : Java

Is sudo-ing tomcat's startup with a non-root user the same as running it as root?
Do be aware that the recommended solution to run tomcat on port 80 is to use mod-jk with the Apache web server, not to have tomcat listen on port 80 directly.

Categories : Unix

Reset MAMP Pro username and password to root/root
Assuming you still know the password, you can change the password back to root using /Applications/MAMP/Library/bin/mysqladmin -u root -p password root It'll prompt you to enter a password again, after which it'll be reset to root

Categories : Mysql

Read and Write root folder wihout root
You can use run-as on some devices to execute commands as a particular package. Google have fixed this on Jelly Bean so it no longer works: adb shell run-as app.package.name cp /data/data/package.name/file.txt /sdcard/ exit adb pull /sdcard/file.txt ~/ Here is a good article explaining file access in Android without root permissions, including a one-liner for the above script. It details how to use the new backup command: backup -f ~/data.ab -noapk app.package.name And how to extract the contents of the resulting .ab file: dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf - You will most likely need the android.permission.BACKUP permission.

Categories : Android

SVN (svnserve) virtual root --root= not recognized
svn+ssh handles the whole transaction including writing and reading the files so it ignores the --root parameter in svnserve. Here is how to fix it over at serverfault -- Basically you just make svnserve into a script that calls svnserve with the proper variables.

Categories : Svn

Document root element "hibernate-configuration", must match DOCTYPE root "hibernate-mapping"
DOCTYPE for <hibernate-configuration> should be: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

Categories : Hibernate

is there any method to draw a tree with a root , the root's previous nodes and successor nodes?
Couple of ideas you might find useful: You can use the tree layout to place the nodes in the canvas, create link objects pointing back and forth, then bind the link objects to a diagonal. http://www.durablejs.org/examples/flowchart/1/admin.html You can also use place the nodes using a pack layout, create the link objects pointing back and forth, and bind the links to a Bezier curve. http://www.durablejs.org/examples/statechart/1/admin.html You can find the code for the graphs above: https://github.com/jruizgit/durable/tree/master/lib/durabjevisual.js

Categories : D3 Js

Including from child theme root or else include from parent theme root
To answer your question directly based on your sample, i would not check to see if the file has been placed in the child theme. If a child-theme developer has customized the file, they can simply declare the function and include their own file (wherever they place it). There is no risk of code duplication because your sample function is simple enough. Even if you simplified your code for the purposes of placing it here....you can always keep includes wrapped in a very simple function that can be declared by a child theme. This will keep PHP running efficient and not having to check for files all the time.

Categories : Wordpress

So what can you use delayedInit for safely?
If you make the hierarchy out of traits and only the leaf type a class you will get the behavior you want: object LearnDelayedInit extends App { trait A extends DelayedInit { def delayedInit(x: => Unit) { x //call constructor code println("delayed init called") } } trait B extends A { println("Hello from B") } class C extends B { println("hello from C") } val c = new C } Only the initialization code for classes is wrapped and passed to delayedInit, traits have their initialization code run in the constructor as usual.

Categories : Scala

Is there any way to safely run SELECT INTO?
Unless you really don't know the fields and data types in advance, I'd recommend first creating the table, then adding the data with an Insert statement. In your link, David Moutray suggests the same thing, here's his example code verbatim: CREATE TABLE #TempTableY (ParticipantID INT NOT NULL); INSERT #TempTableY (ParticipantID) SELECT ParticipantID FROM TableX;

Categories : SQL

Accessing files in iOS safely
Api's that check for the existence of files typically return a true or false. False usually means that the file is in-accessable not that it doesn't exist. So for example if the file existed on a file share but you had no read permission it would return false. It maybe the same if another thread or user had the file open already for example. Obviously on iOS some of these reasons are unlikely but something similar could be occurring.

Categories : IOS

Safely Get Tail of Array
First of all, the warning doesn't have anything to do with the fact that you're using an unsafe method. If you restart the REPL with -feature you'll see the following: scala> arr tail <console>:9: warning: postfix operator tail should be enabled by making the implicit value language.postfixOps visible... And a pointer to the documentation for scala.language.postfixOps, which includes the following note: Postfix operators interact poorly with semicolon inference. Most programmers avoid them for this reason. This is good advice. Being able to write arr tail instead of arr.tail isn't worth the fuss. Now about the safety issue. The standard library doesn't provide a tailOption for collections, but you can get the same effect using headOption and map: scala> val arr = Arr

Categories : Scala

Safely upload gif images
Definitely not, as one could change page code on client side and submit whatever they want to your server. This applies to the file size too. You should validate the file server-side, checking against its MIME content-type. You could do that preferably with getimagesize() function. Improving your server-side code: if (isset($_REQUEST['upload'])) { list(,, $image_type) = @getimagesize($_FILES['file']['tmp_name']); if (filesize($_FILES['file']['tmp_name']) <= 65536 && $image_type === IMAGETYPE_GIF) { move_uploaded_file($_FILES['file']['tmp_name'], sprintf('../images/logos/%s.gif', str_replace(' ', '_', $name))); } } You can improve that even more splitting checks and raising error messages to the user. I'll leave that for you.

Categories : PHP

How can you safely tell that a TCP/IP packet was received at the other end?
The TCP connection isn't really down unless the socket closes on your side. It takes minutes for TCP to decide the connection is down and close the socket if it doesn't receive any response from the network after sending data.

Categories : C#

Could you safely say this code is "unsafe"
You code is badly broken. Your declaration of GetProcessIoCounters is wrong. You are passing the address of the process handle but you need to pass the process handle by value. What's more there is no need at all for unsafe code here. I suggest you stop using unsafe. Here's how you declare GetProcessIoCounters: [DllImport(@"kernel32.dll", SetLastError=true)] static extern bool GetProcessIoCounters( IntPtr hProcess, out IO_COUNTERS IoCounters ); Your declaration of IO_COUNTERS is fine. To call the function you simply do this: IO_COUNTERS IoCounters; if (!GetProcessIoCounters(Process.GetCurrentProcess().Handle, out IoCounters)) throw new Win32Exception();

Categories : C#

How can I safely add to a composer package?
As far as I'm aware, you cannot add to a Composer package as it is external and therefore out of your control. You should treat the packages as libraries only, and add all classes into your own project, ensuring that the packages you need are still set up in your .json file

Categories : PHP

how to use std::map in threaded application safely?
Without looking at code, I can only say that you use a ConcurrentHashMap for your needs. You may also want to read this : What's the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?

Categories : Misc

Is it SAFELY possible to use a str(BlobKey) as datastore id?
Seems like your question is asking whether you can create some kind of "virtual ancestor group" by specifying a parent that doesn't exist. This is legitimate, it's mentioned in the docs that the parent doesn't actually need to exist. https://developers.google.com/appengine/docs/python/datastore/entities#Python_Ancestor_paths Alternatively, if your list of BlobReferences will be limited, it would probably be easier and less expensive to just store a list of them inside one entity. You an make the Key of that container entity the same as the BlobKey. Then fetching that entity by key and modifying it will let you work without eventual consistency problems. It'll also be cheaper than querying and modifying indexed entities.

Categories : Google App Engine

Safely dispose within .net finalizer
I think you might've misunderstood IDispoable - the typical pattern on an IDisposable object is loosely: void Dispose() { Dispose(true); } void Dispose(bool disposing) { if (disposing) { // Free managed resources } // always free unmanaged resources } ~Finalizer() { Dispose (false); } Because the finalizer should always handle unmanaged resources, if you wait for it to run (which will be at some point in the future when memory constraints trigger the garbage collection, or it's triggered manually), you shouldn't leak. If you want to be deterministic about when those resources are freed, then you will have to expose IDispoable down your class hierarchy.

Categories : C#

Safely writing bytes to stream
The conversion from unsigned char to char and back is perfectly fine, and it's exactly what you should be doing. All three char types are layout compatible. You only have to be careful with any non-char integral types and convert them to uint8_t first before converting to char, etc., and similarly in the other direction.

Categories : C++

Safely move svn folders and files
Just copy the folder and its child folders recursively with your OS command. Then go look at it to see if everything moved and is still connected correctly to SVN. It should be but paranoia doesn't mean SVN isn't out to get you. Add a file and check it in. Delete it and see if all that works. Then go delete the old folder and children. Of course, this only works if there isn't a nested ct folder inside /oo/P/ct

Categories : Shell



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.