w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Best software installation kit for Mac OS X?
It might be rich, but it is not the OS X "style" - I have not seen any installer do that in ages. If you would like to do a tutorial or orientation, I would launch that after the installation business has been completed. BTW, full screen etc are also discouraged on Windows.

Categories : Osx

Development environment Sinatra & MySQL in 2 computers
I think there are many ways to solve this problem. So this is just on idea how to achieve this. Create a git repo on your server and write a small shell script which sync your db from somewhere. This script can you trigger by a git hook http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Client-Side-Hooks For your syncing script you may have a look at this -> https://github.com/xssnark/mysql-db-sync or I'm sure you find something.

Categories : Mysql

Batch scripting for installation of a software with some options
Batch doesn't have a built-in option parser like other languages, so you'll have to do it yourself, e.g. like this: @echo off setlocal :continue if "%1"=="" then goto finished if /i "%1"=="/l" then ( shift set "lang=%1" ) else if ... ( ... ) shift goto continue :finished REM option parsing ends here, regular code below Edit: If I understand the install4j documentation correctly, then you must use the options -q -dir "C:destinationfolder" for an unattended install, even if you provide a response file via -varfile "C:path oyour.varfile". The option -c would run the installer in console mode, which is different from unattended mode. I'd try creating a response file Installer.3-00-00.Windows.varfile in the same folder as Installer.3-00-00.Windows.exe and then run the installer l

Categories : Batch File

How to find if a list of computers on are a domain using Powershell?
You can use the code with -Computername parameter and provide explicit credentials in case the remote computer administrator credentials are different from what you are using. $cred = Get-Credential $servers = Get-Content C:scriptsServers.txt Foreach ($server in $servers) { if ((gwmi win32_computersystem -computername $server -Credential $cred).partofdomain -eq $true) { #Do something Here } else { #Do something Here }

Categories : List

Can I speed up this query to retrieve all computers on the domain?
One of the biggest issues here is all of the ToLower() calls. Strings are immutable, so each change of them (such as changing them to lowercase as seen in your code sample) creates a new object. Additionally, the logic involved in lowercasing a string is more expensive than you might think, because it has to account for things like the current culture settings. To mitigate the expense, try not altering the string references, instead comparing them with case insensitivity: var computers = (from DirectoryEntry domain in winDirEntries.Children where string.Equals(domain.Name, this.Domain, StringComparison.OrdinalIgnoreCase) from DirectoryEntry pc in domain.Children where pc.SchemaClassName.IndexOf(Computer, StringComparison.Ordi

Categories : C#

How to Test ASP Application on Domain when Development Environment isn't on Domain?
We did few large deployments of AD with asp.net applications with automatic account provisioning and 50k+ users and the idea was always to abstract the user backstore and have at least two or three implementations: inmemory repository injected into upper layer services for unit testing them database implementation convenient for developers as it is persistent, doesn't vanish on restarts actual ad implementation tested separately in two different testing environments but not directly by developers (devs use the database repository) Having the logic which relies on abstraction and is conveniently tested with the inmemory repository and then having the ad repository tested separately allows us to just compose these two on the production site.

Categories : Asp Net

Programmatically check if user has enough rights for software installation
I know this doesn't match with your "but not Win API?", but really, using P/Invoke and the Win32 API is the way to go. As process elevation is related to Windows only (so it doesn't make sense if you want to use your code with Mono for instance), relying on the Win32 API is OK. GetTokenInformation is the good function to use, just make sure you use IntPtr for platform-specific sizes (or even better: SafeHandle for process handle) so it'll work fine on both x86/x64 machines.

Categories : C#

Check For A Software Installation & Install Directory In Windows with C/C++
It is quite hard to answer this because you did not mention the scenarios in which the install directory would be changed. If you are able to change the install directory, why dont you try something like this C:Program Files (x86)your_folder_name? This way, your install directory wont be changed by other users.

Categories : C++

Minimum Software and Hardware requirements for SharePoint 2013 developer Environment
The software and hardware requirements for SharePoint development are the same as the software and hardware requirements for Visual Studio 2012. Microsoft says these are: 1.6 GHz or faster processor 1 GB of RAM (1.5 GB if running on a virtual machine) 10 GB (NTFS) of available hard disk space 5400 RPM hard drive DirectX 9-capable video card running at 1024 x 768 or higher display resolution Windows 7 SP1 or better However, if you want decent performance, you should probably have, at a minimum: 3.0 Ghz or faster quad core processor 4 GB of RAM 7200 RPM Hard Drive (preferably an SSD) This will satisfy VS requirements, as well as providing sufficient memory and horsepower to run SharePoint Server in a virtual machine. See Also http://blogs.msdn.com/b/timquin/archive/2013/01/22/se

Categories : Sharepoint

C# Programmatic Remote Folder / File Authentication In Non-Domain Windows Environment
Impersonation works with Peer/LAN network as well. I got your typical home network with some machines on default "Workgroup" and some on a named one if I remembered doing it on the install. Here is the code I use from my IIS server app to access files on my other computer (without having to have the same user and password on both machines involved, copied from somewhere and modified for my use): using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Security.Principal; using System.ComponentModel; /// <summary> /// Class to impersonate another user. Requires user, pass and domain/computername /// All code run after impersonationuser has been run will run as this user. /// Remember to Dispose() afterwards. /// </summ

Categories : C#

Serving identical double-sized images to retina display computers AND non-retina computers?
Ok folks, I went about answering it myself, and yes, if you use the width tag to half-size an img in HTML, the retina browser will display the full sized image. I displayed the 1300x200 image half-sized using width on the top, and the plain 650x100 image on the bottom. Zoomed in using Safari on iOS 6.

Categories : HTML

is there software for jar file copy protection, or licensing software
Copy protection can't prevent your file to be copied but you can make it fail when it is run on unlicensed machines. Selection of a copy protection mechanism is a matter of budget and time. There are many companies with many products. You can go with not yet cracked technologies like iLok etc. This is applicable for very high revenue cases. But if your target audience is less than 1000 people then a simple in-house solution might work. Consequence of a complex method is typically many calls to support line and unhappy customers. Things got a lot easier after clients are all connected to internet. You can make some simple parts to run on server which a cracker would never dive into for a replacement. Or the app might download the contents from server after installation. Latter is what I d

Categories : Misc

Finalizing a Cursor that has not been deactivated or closed or database not closed error
When you are done with the cursor, you need to call Cursor.close(). Leaving it not closed leads to memory leaks. E.g.: Cursor cursor = null; try { cursor = getContentResolver().query(myUri, MY_PROJECTION, null, null, null); if (cursor != null && cursor.moveToFirst()) { // moar code } } finally { if (cursor != null) { cursor.close(); } }

Categories : Android

Get software's information in WiX from software
The WiX.chm documents all the standard binder variables at the bottom of the topic titled Linker (light). It does not appear the those pieces of information are available. However, it might be something you could work with the WiX toolset community with to get the code added.

Categories : Wix

.htaccess domain directory does not resolve domain.com/domain properly
Replace your code with this code: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{DOCUMENT_ROOT}/$1 !-f RewriteCond %{DOCUMENT_ROOT}/$1 !-d RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+bar[?/s] [NC] RewriteRule ^(.*)$ - [L,R=404] RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^bar(/.*|)$ /bar/bar$1 [L] RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^(.*)$ /bar/$1 [L]

Categories : Apache

Application gets closed when terminal is closed, how to stop this?
Use nohup to prevent child processes from being killed when the terminal closes. spawn nohup /usr/bin/firefox https://www.google.com/ I assume there's more to the script, since there's no need to use Expect just to start firefox.

Categories : Python

WiX Toolset - check for all installation prerequisites at once (conditional installation)
The WiX Condition element when used under a Fragment or Product element represents an entry in the LaunchCondition Table and is processed by the LaunchConditions Action. The behavior you see is a limitation of that underlying feature. Here's a blog article I wrote about this 7 years ago: Short Comings of LaunchConditions Sadly, Microsoft has never taken my recommendations for improvement. So instead of using the Condition element you'll have to write your own custom table and custom action to do the processing. I have sample code for this in InstallScript and C# but I've never written it in C/C++. Here is a stripped down example in InstallScript. Read it as pseudocode for refactoring in C/C++. You'll need to also create the custom table used by the SQL query, define and schedule

Categories : Wix

convert java domain model from domain A to domain B
You may want to look at DOZER. The lib will allow wildcard transformation of fields (if they share the same name) and also permit custom converter.

Categories : Java

Gem installation error during MYSQL gem installation in ruby
You need to install mysql before installing mysql gem. Follow this link on how to install mysql on windows

Categories : Mysql

Copying a WF4 instance store database from production environment to development environment?
Jesús López gave me the answer at this MSDN thread, where I asked exactly the same question as in this StackOverflow’s thread. First, he asked: “Is the [IIS] path to the workflow service (the xalmx file) the same in production than in development? If the path is different because the virtual directory is different then is also different the WorkflowHostType column and that might cause problems.” After letting him know that IIS site names were actually different in production and in development environment, even though the rest of the paths to workflow services were the same, he replied: “Both [IIS sites] must have the same name. I've just tested it. I changed the site name in IIS and suddenly WorkflowHostType changed. So idle persisted workflows won't load any more.” Then he

Categories : Dotnet

How to draw closed spline 3D (closed curve 3d) through unordered list of points3D. How to arrange points3D?
It sounds like you're looking for the Concave Hull of the data set. Unfortunately, I don't know of any pre-canned algorithms, but the link references a paper that another developer was starting from, as well as some sample code, so maybe that'll help you in the right direction.

Categories : C#

Using MySQL on development environment and SQL server on the live environment
While on the development environment, I have installed the commercial system with the default MYSQL that comes with the product. Due to licenses & resource restrictions. Can't you use SQL Express? But yes, you can use Entity Framework with MySQL, and it should be possible to accomplish by just changing the connection string. Beware that the MySQL-EF connector seems not to support all possiblities of Linq to Entities.

Categories : Asp Net Mvc

Pointing domain at seperate sub-domain & domain
This comes down to the provider's definition of "web forwarding", which is a vague marketing term. It sounds like they're just doing a straight redirection unfortunately, which no amount of playing with .htaccess files can fix: you simply cannot make a website tell the browser to stick another domain name in its address bar. What I'd suggest is talking to them and see if they can do a CNAME for www.domain1.com to subdomain.domain2.com, or switch to it using the same IP address instead. You will then need to set up your Wordpress install to respond to "www.domain1.com" requests.

Categories : Wordpress

The underlying connection was closed: The connection was closed unexpectedly wcf service
The first thing i will do is, instead of returning the full list of candidates i will return an empty list. If that works fine, then it is very clear that the size of the data is a problem. To modify the size play with your binding parameters.

Categories : Wcf

Domain driven design: overriding virtual methods in Domain classes
Person.UpdateAddress should definitely be in your domain, not in your Repository. UpdateAddress is logic and you should try to avoid logic inside your repository. If you're working with Entity framework there is no need for 'data classes'.

Categories : Entity Framework

How to display sub domain posts in main domain home page on wordpress?
Try adding this to an appropriate place in your .htaccess file located in Root folder of your site : RewriteEngine On RewriteCond %{HTTP_HOST} ^(.+).domain.com$ [NC] RewriteRule ^ http://domain.com/ [L,R] To exclude www subdomain , www.domain.com, add this line before the RewriteRule: RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]

Categories : PHP

Cross domain error even when ajax called made from same domain
Have you tried setting alternate HTTP header values when your service returns data: Access-Control-Allow-Origin:* Access-Control-Allow-Headers:"Content-Type, X-Requested-With, X-Auth-Token" This worked for us when trying to make REST calls to services under different sub-domains. You don't have to make Access-Control-Allow-Origin: * you can probably be more restrictive. But we tried this just to check if it will work. Just to clarify - we still use json and not jsonp

Categories : Jquery

Redirect all traffic to from external domain to local domain homepage?
See this answer You must use modrewrite of apache: RewriteEngine On RewriteCond %{HTTP_REFERER} !^mydomain.co.uk$ [N]

Categories : Apache

Weird thing going on with domain. if Entered without www.domain.com, goes to wrong host
Contact your old nameserver provider and tell him to remove the domain from his parkings OR create an index.html on your old host like this: <meta http-equiv="Refresh" content="0; url=http://www.zipdaturl.com/">

Categories : PHP

.htaccess rule for domain.com to www.domain.com/index.php OR domain.com/index.php to www.domain.com/index.php
RewriteEngine on RewriteCond %{HTTP_HOST} !^www.domain.com RewriteCond %{HTTP_HOST} !^domain.com RewriteRule ^$ /index.php [QSA,L] RewriteRule ^file.php /file.php [L]

Categories : Htaccess

Node.js - Domain per Express request, inside another domain
Ok, solved - Express has a try/catch block, which is getting to my non-existent function call first. To have the domain catch it, it needs to be taken out of the current call stack, like... process.nextTick(function() { this_function_does_not_exist(); res.end('we will never get here'); }); THEN the domain will grab it.

Categories : Javascript

Powershell - Remove Domain.com/OU/ from Domain.com/OU/GivenName Surname
You can use the Split-Path cmdlet to get the name only: Split-Path 'Domain.com/OU/GivenName Surname' -Leaf I would also try to get the name by checking if Identity has a Name property: $obj.Identity.Name

Categories : Powershell

Ajax Cross domain request to non-controlled domain
See Ways to circumvent the same-origin policy. None of them will meet your requirements. Preventing Mallory's site from using Alice's site with Bob's credentials (such as his IP address) is the point of the Same Origin Policy. There is no way around this for a web application. Since it's an internal application If it is an internal application, then you could look at using a browser extension to access the data. They have less restrictive security policies as they have to be explicitly installed.

Categories : Javascript

Redirect any sub-domain to main domain by editing DNS Record
The CNAME is what you're looking for, although there is another alternative, you can create a .htaccess file that you'd put in the root of the subdomain containing : Redirect 301 / http://www.domain.com I don't know how this can work on IIS, I highly doubt it supports .htaccess files, but my guess is that you can do this with ISAPI filters.

Categories : Asp Net

How to get IP of computer on lan if you have the computers name, using c#
Dns.GetHostAddresses Method you can resolve Host name to IP as follows string hostName = "www.Google.com"; IPAddress[] addresslist = Dns.GetHostAddresses(hostName); foreach (IPAddress address in addresslist) { string ip = address.ToString(); }

Categories : C#

css not loading on some computers
Are you using your browser's developer tools? Right click in Firefox and go to "Inspect". Find the Web Console tab. There you will see if the reference to the css file is valid or if it returning a 404, not found. Also, your reference should be href="/css/mystyle.css", to keep a clean root directory of the site. Also, you might want to self close the tag: <link rel="stylesheet" type="text/css" href="/css/mystyle.css" /> And if that doesn't help, run your code through the w3c validator: http://validator.w3.org/

Categories : HTML

"The underlying connection was closed: The connection was closed unexpectedly"
The first request does not utilize a header that indicates the length of the result. It closes the connection when it finishes. The second request utilizes the length header, reads the designated number of bytes, then closes the connection gracefully. (under the client side control instead of server driven disconnection) -or- The url you sent caused an error on the server. Is there an error in the server log or event viewer?

Categories : C#

Session visible on other computers?
You're storing a single static reference to a single global ShoppingCart. This is a horrible idea. Whenever you write ShoppingCart.Instance, it always returns the original value ou set in the static constructor. You need to get rid of the singleton and always use session.

Categories : C#

What must two computers have in common to run the same executable?
If you compile an application on a 64-bit processor, it wouldn't by default run on a 32-bit processor. However, you can pass options to the compiler to have it compile code to run on a 32-bit processor. For example, if you're using GCC on a 64-bit machine, if you pass -m32, it will compile 32-bit code. 32-bit code by default can run on a 64-bit machine. Sources http://stackoverflow.com/a/3501880/193973

Categories : C++

Same github user two computers
Git will not allow you to push changes to a branch unless they can be resolved as a "fast-forward," which means that the tip commit you are trying to push is a direct descendant of the tip commit in the remote repository. Who made each set of changes is irrelevant -- you just can't do it.1 In that respect, you are safe from clobbering work pushed from somewhere else by you or someone else. You'll just get a harmless error message if you try. How you deal with that error message is up to you. Usually you will want to git fetch and then decide if you should merge or rebase. (How to make that decision is out of the scope of your question.) 1 You can override this check by supplying --force as an argument to the git push command, but you should not do this unless you understand exactl

Categories : GIT

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