w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Is a multi process Java program a single process in the context of the actual machine underneath the JVM it is running on?
You're confused between processes and processors. A JVM counts as a single process on your machine, yes. When you start the JVM it runs as a program and it executes Java byte code. A JVM can address all the processors on you machine. When you start a Thread in Java it executes on an available processor.

Categories : Java

machine key in web.config for SSO without using of membership
You can use the "machine key solution" without Membership providers if you create your own authentication cookie. Using the same domain on both sites and the same machine key will make the cookie readable by both applications. If you do not use an existing provider or Forms Authentication, you will have to do all that by yourself, of course.

Categories : C#

Machine.config alternative in Azure
I would seriously consider using the cloud service configuration file (assuming this is a PaaS solution). It not only allows you to separate the application deployment package from the configuration settings (like you're doing), but also gives you the ability to adjust those changes "on the fly" to accommodate things like failover. If you take the extra step of creating your own configuration provider, it also gives you some simple ways to support both models.

Categories : C#

hibernate - process scoped identity
Actually, what you implemented is supported out of the box is supported by Hibernate, in a given Hibernate session. Having a unique instance shared between several sessions (and thus transactions) doesn't make any sense because that would ruin the ACID features provided by transactions, and make it completely useless unless only one user accesses the database. For example, your transient fields, stored in memory, would be completely incorrect is the data is modified in the database without going through this unique in-memory instance. And if some constraint is broken and causes a rollback of the transaction, you're left with incorrect values inside your unique instance, which are completely disconnected from the reality of the data stored in the database.

Categories : Java

Get current process identity and authentication information
It would be easiest if you could leverage the built-in authentication of IIS or WCF. If you really need a TCP socket, I think you have to implement the authentication yourself. It's not conceptually difficult if you understand how Kerberos works, but it will take a while to work out the details of all the functions to call. MSDN has a decent overview here. In addition, I'm not aware of any C# wrappers for these, so you would probably need to p-invoke them all; consider writing that part in managed C++.

Categories : C#

can encrypt ConnectionString in web.config on development machine and deploy on server?
If you use aspnet_regiis.exe tool, then you will need to do it on each server separately, because the encryption is married to the server where the encryption key was generated. So the short answer is, if you do this method, no your DEV encryption key will not work when you deploy to other environments. However, if you want to be able to encrypt on one server and deploy it to other servers re-using the same key, then you need to Encrypt Configuration Sections in ASP.NET 2.0 Using RSA. This works, because you can export RSA keys. This technique is especially useful in web farm scenarios (i.e. multiple front-end web servers).

Categories : C#

Config.xml ignored in creation process
This is not a real answer, but I opened two tickets in Cordova's JIRA regarding this problem here and here. Currently Cordova client does not support this features in the config.xml. You will need to modify the icons and splashscreens manually at this time as well the content tag in every platform project. Notice that you only have to do this once as Cordova maintain the config.xml changes and other resources as images. Likely, a next version will include these features. More info: https://issues.apache.org/jira/browse/CB-2606 UPDATE: It seems that this issue has been solved in this pull request. It will available in the next release of Cordova.

Categories : Cordova

Powershell Start-Process msiexec on a remote machine not working
You could try executing Start-Process with Passthru to see if an error is being returned: (Start-Process -FilePath msiexec.exe -ArgumentList $msiArgumentList -Wait -Passthru).ExitCode The other thing that may help is increasing your logging to /l*v Update 1 Can you try the following, just to check remote commands for msi are working, it should result in 1619. (Start-Process -FilePath msiexec.exe -ArgumentList "/i no.msi /quiet /qb!" -Wait -Passthru).ExitCode

Categories : Powershell

Sending Input to process created using createprocess() in C on a windows machine
**EDIT I have found the solution to this problem. The second input field in the createprocess() function call can be a string that is passed to the created processes argv[] in the main function. Example: CreateProcess("M:ProjectsForceAndrewforceforce.exe", "PASSME",NULL,NULL,FALSE, CREATE_NEW_CONSOLE,NULL,NULL,&StartupInfo[i],&ProcessInfo[i]); This will send "PASSME" as an input argument to the main function of the process that is being spawned

Categories : C

How to start a remote machine process that requires Command Line Arguments with WMI component
According to the documentation for Win32_Process.Create, the command line argument includes both the path to the executable and the arguments: Create(""%SYSTEMROOT%\system32\cmd.exe" /K "echo multiple spaces here"", null, null, null);

Categories : C#

Camel- Split List and process each java object - XML Config
Found the answer after some more reading .. The following tag tokenized List properly : ${body} Thanks to Camel guys. <split streaming="true"> <simple>${body}</simple> <convertBodyTo type="era.oddw.entity.CacheMigr" /> <log message=" ######## CleanupMigrated file each: ${body}" /> </split>

Categories : Apache

Cannot find connection string for connection name 'ApplicationServerWorkflowInstanceStoreConnectionString' (machine config))
Make sure you registered the connectionstring to right machine config. Make sure the application pool .NET framework version matches the version of machine config. There are separate machine config files for .NET FW 2 and .NET FW 4..

Categories : Asp Net

I don't see the Web.Debug.config and Web.Release.config files on my web.config after upgrading my project to VS2012
I found the answer in a post here: how to add files in web.config transformation process? In your "App Data" folder you'll find your publish profiles you created and can right click on them to add a config transform file.

Categories : Visual Studio 2012

how to get next Identity not the last inserted identity of Identity column
You don't need to do anything to "lock" an IDENTITY value. As soon as the table uses a value of an IDENTITY, it's used forever, even if you do a rollback. SQL Fiddle example: http://sqlfiddle.com/#!3/5fdb9/1/0. Note the ids that make it into the table, only 1 and 5. If that doesn't address your problem, please revise your question.

Categories : Sql Server

heroku django - process based on static file path (like nginx config in normal server) or atleast middleware
You can force your django app server serve static content for you by defining custom view and adding it into URLs like this: urlpatterns += patterns('', (r'^static/(?P<path>.*)$', view.MyStaticFilesView.as_view()), ) So now you can get path variable and create your own logic. Just ensure that you return images, texts or any other content with propper content-type. And also you can track __someconstantstring and redirect anywhere you want. This method will cause additional load to your app server.

Categories : Python

Finding out the current Identity Provider in Windows Identity Foundation
You typically use the Issuer and OriginalIssuer properties in each claim that you get. If you use e-mail as the unique identifier: var u = this.User as IClaimsPrincipal; var c = (u.Identity as IClaimsIdentity) .Claims .First( c => c.ClaimType == ClaimTypes.Email ); var issuer = c.Issuer; var originalIssuer = c.OriginalIssuer;

Categories : C#

Where is Microsoft.AspNet.Identity.Owin.AuthenticationManager in Asp.Net Identity RTM version?
That class is gone, as it was basically just adding methods that generated a ClaimsIdentity and passed that into an Owin.Security.IAuthenticationManager. Instead the RTM templates have a SignIn method in the controller that looks something like this: private async Task SignInAsync(ApplicationUser user, bool isPersistent) { AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie); var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie); AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity); }

Categories : Asp Net

How to Alter a table for Identity Specification is identity SQL Server
You cannot "convert" an existing column into an IDENTITY column - you will have to create a new column as INT IDENTITY: ALTER TABLE ProductInProduct ADD NewId INT IDENTITY (1, 1); Update: OK, so there is a way of converting an existing column to IDENTITY. If you absolutely need this - check out this response by Martin Smith with all the gory details.

Categories : SQL

How to copy only file permissions and user:group from one machine and apply them on another machine in linux?
How about this? #!/bin/bash user="user" host="remote_host" while read file do permission=$(stat -c %a $file) # retrieve permission owner=$(stat -c %U $file) # retrieve owner group=$(stat -c %G $file) # retrieve group # just for debugging echo "$file@local: p = $permission, o = $owner, g = $group" # copy the permission ssh $user@$host "chmod $permission $file" < /dev/null # copy both owner and group ssh $user@$host "chown $owner:$group $file" < /dev/null done < list.txt I am assuming that the list of the files is saved in "list.txt". Moreover you should set the variables "user" and "host" accordingly to your setup. I would suggest to configure ssh to have "automatic login". Otherwise you should insert the password twice per loop. Here

Categories : Shell

ModelState.isValid = false on production machine, true on development machine
As I mentioned in the edit, I found the cause of and solution to my problem. It was caused by an error being thrown by the automatic binding of parameters, and the reason it was having issues with dates on my production machine was due to the locale settings (dd/mm/yy vs mm/dd/yy) on that machine. To fix, I set the computers region settings (in the control panel), and also added a line into my Web.config.

Categories : Jquery

PyDev: Running Code in local machine to remote machine
One solution would be: Install python on the remote machine Package your code into a python package using distutils (see http://wiki.python.org/moin/Distutils/Tutorial). Basically the process ends when you run the command python setup sdist in the root dir of your project, and get a tar.gz file in the dist/ subfolder. Copy your package to the remote server using scp, for example, if it is an amazon machine: scp -i myPemFile.pem local-python-package.tar.gz remote_user_name@remote_ip:remote_folder Run sudo pip install local-python-package.tar.gz on the remote server Now you can either SSH to the remote machine and run your code or use some remote enabler such as fabric to start commands on the remote server (works for any shell command, specifically python scripts) Alternatively, you c

Categories : Python

MySQL statement failing on local machine but not deployment machine?
The failure is referring to the d.id in the nested subquery: ON dol.id=( SELECT MIN(dol2.id) FROM DOLineEJB dol2 WHERE d.id=dol2.DeliveryOrderEJB_lines ) You can fix the query: SELECT d.id, ..., dol.weight, d.status FROM DeliveryOrderEJB d join InbondEJB_DeliveryOrderEJB_link lnk on d.id=lnk.DeliveryOrderEJB_id left join DOLineEJB dol ON dol.id=( SELECT MIN(dol2.id) FROM DOLineEJB dol2 WHERE d.id=dol2.DeliveryOrderEJB_lines ) WHERE lnk.InbondEJB_itNo='...' ORDER BY d.id I believe the problem is because you have different versions of MySQL on the machines. MySQL changed the semantics of the , around version 5.0.

Categories : Mysql

Use NLP / Machine Learning to teach a machine how to detect if a string is mathematical?
Parsing is a better tool than machine learning for this problem. What you have described is a relatively simple grammar for arithmetic, with some aliases for numbers, and a touch of syntax for those aliases. A tokenizer and some basic syntactic analysis, which you could code directly, will produce better more reliable results with significantly less computational effort than machine learning and optimization will. One reason why parsing is sufficient is that you don't need to worry about misspellings as often as you do, say, with people's names. If you want to get fancy about that, then use your Jaro-Winkler-based things for lexical analysis and then use syntatic analysis on what you think are your tokens. That is still much cheaper and less complex than machine learning. I don't know mu

Categories : PHP

Is it possible to remotely debug a 64 bit machine from 32 bit Host Machine(which has visual studio)
According to MSDN, the answer in the other article is incorrect, and you can debug x64 from an x86 host: http://msdn.microsoft.com/en-us/library/vstudio/ms184681%28v=vs.100%29.aspx If you are debugging remotely, Visual Studio can run under WOW64 or on a 32-bit computer. You can debug both IA64 and x64 applications, in addition to 32-bit applications that are running under x64 WOW mode or on 32-bit operating systems.

Categories : Dotnet

How to disable identity from the existing column & after adding data , how to enable identity again on the same column in SQL Server 2008?
Use SET IDENTITY_INSERT (http://msdn.microsoft.com/en-us/library/ms188059.aspx). SET IDENTITY_INSERT TableName ON; -- Insert Data. SET IDENTITY_INSERT TableName OFF;

Categories : Sql Server

Connecting Clients machine to MySQL Server machine
You can use other tool with good looking GUI. For example: HeidiSQL. Then, you need to enable remote access. If you use windows, there is nice wizard for you to enable remote access with a few clicks. The wizard is located it at MySQL Server 5.5inMySQLInstanceConfig.exe. Then Reconfigure Instance -> Next -> Standard Configuration -> Next -> Next. You will see this screen. Tick on "Enable root access from remote machines". Or you can manually configure it to allow remote access from my.ini file. See this link for how to do it. If having done above still does not allow you to connect to your MySQL. Please make sure that Firewall does not block MySQL port.

Categories : Mysql

How to calculate the offset of machine instructions using machine code itself?
In general, a machine instruction set uses three types of storage addresses: Absolute addresses which refer to the exact storage location of interest. Base-relative addresses which, when added to the contents of a "base register", refer to the storage location of interest. Instruction-relative addresses which, when added to the address of the instruction containing them, refer to the storage location of interest. Usually the 3rd type does not need to be "relocated", since the location being referred to will generally be in the same code segment as the referring instruction, so they move together. The second type may or may not require change upon binding/loading, depending on details of the compiled code binding scheme. The first type will almost always require changing, but it's u

Categories : Assembly

Installation of MSI File on remote machine from local machine
You're running a remote MSI on the local host. To install the remote executable on a remote host, you could use WMI: host = "<IP ADDR>" setup = "msiexec /a ""C:MySetup<FILENAME>"" /quiet ..." Set wmi = GetObject("winmgmts://" & host & "/root/cimv2") rc = wmi.Get("Win32_Process").Create(setup, , , pid) If rc = 0 Then WScript.Echo "Setup started with PID " & pid & "." Else WScript.Echo "Starting setup failed. (" & rc & ")" End If The above will start the process asynchronously (i.e. Create returns immediately). If you need to wait for the remote process to complete, you'll have to monitor it like this: Do WScript.Sleep 100 Set p = wmi.ExecQuery("SELECT * FROM Win32_Process WHERE ProcessID=" & pid) Loop Until p.Count = 0 There may be s

Categories : Vbscript

Powershell tasks from local machine to remote machine
Reading from docs on MSDN: To run a single command on a remote computer, use the ComputerName parameter. To run a series of related commands that share data, use the New-PSSession cmdlet to create a PSSession (a persistent connection) on the remote computer, and then use the Session parameter of Invoke-Command to run the command in the PSSession. To run a command in a disconnected session, use the InDisconnectedSession parameter. To run a command in a background job, use the AsJob parameter. So basically you should do something like: $session = New-PSSession Invoke-Command -Session $session -FilePath <PathToScript>

Categories : Powershell

host webapp in my machine trough virtual machine
Yes to both questions, if your browser machine can hit the port the server machine is serving the app on. On WAN, you would need to make sure your router didn't block requests to the server's port, and the same for any modem/firewall that connects you to the internet at large. Also, if your public ip is not static, it may change.

Categories : Iis

How to SSH from Perl script from windows machine to EC2 machine
Use Net::SSH::Perl to avoid tricky (on Windows!) dependencies to ssh-binaries. This module is written completely in Perl, so it should work on any platform. Net::SSH::Perl

Categories : Windows

If an application is built on a 32-bit machine, when run on a 64-bit machine, how does it look for DLLs?
First of all, you can cross-compile in either direction so being built on a 32-bit machine doesn't necessarily mean anything. It is really an issue of running 32-bit code on a 64-bit machine. In this case, there is a 32-bit emulation layer on 64-bit installations called Wow64. Part of this is file system redirection, which redirects file system requests from 32-bit programs. In this case, trying to access "C:Program Files" from 32-bit code will transparently redirect to "C:Program Files (x86)".

Categories : Windows

Auto Generate Machine Key VS. Custom Machine Key
If you have a WebFarm you have to use custom machine key, other way it won't work. The only secure problem is that there are people, who knows these machine key. If they "sell it" outside your company somebody can for example decrypt your cookies.

Categories : Asp Net

porting opencv project from 32 bit machine to 64 bit machine
As I tried, It will be enough to copy your files to new system and do not forget to add your x:WindowsSysWOW64 some needed dll files for example you might needed opencv_core245.dll file and you might get it from OpenCV directory Or just another way if you were builded with MS VS to download and install your new system redistributable package from following link http://www.microsoft.com/en-us/download/details.aspx?id=14632 Edit: I have just found one more solution which is copying all needed dll files to same directory with .exe Hope it helps

Categories : Opencv

add and tag to collections in applicationHost.config or web.config using Powershell webadministration module
Without resorting to xml manipulation, the following answer may help you get started with this problem: Add a 'clear' element to WebDAV authoringRules using powershell

Categories : Shell

brew doctor yields python config warning: should I remove these config files? (Mac)
Homebrew mainly uses built-in tools, so formulae generally should be built against system Python anyway. You shouldn't have any problem with them unless you override system Python with Homebrew ones (which is generally not recommended unless you need to do something special).

Categories : Python

What is the recommended method of storing EJB configuration? (Java version of app.config/web.config)
There are several ways and depending on what's your deployment structure it may make sense to pick one or another. META-INF/ejb-jar.xml - this is used when the EJBs are inside their own JAR which in turn is part of an EAR. WEB-INF/ejb-jar.xml - this is used when EJBs are part of a WAR. annotations - many configuration options can be specified through annotations on the bean class itself. The above are configurations specific to EJBs. However, some of the resources you mention may be specified in both ejb-jar.xml and web.xml. For reference, try reading the schema file - it's fairly well documented, or something like this.

Categories : Java

override git config --system in .gitconfig user file ( git config --global )
If it is a system wide config, each user can override a config value in his/her global and local settings. But there is no easy way to "deactivate" a setting in a lower config file. Even set it to "" generally has unintended consequences. That very topic was discussed in April 2010. For instance, deactivating the send-email option: True, after thinking a bit about this using no value to unset is a horrible, horrible hack. git-send-email should be corrected to not only check that there is value from config or command line option, but also that it is sane (i.e. non-empty, or simply true-ish if we say that smtpuser = "0" is not something we need to worry about supporting). That would be true for any setting: the diff.c#run_diff_cmd() function will attempt to run an external diff i

Categories : GIT

Is there a way to unset a global git config section in a local git config file?
No Git config includes operate: as if its contents had been found at the location of the include directive ref That means you can't override/remove the include itself, as as soon as it's found the contents of the included file are injected/loaded. You can of course override the settings it contains in a more specific config file: # ~/.git.config.team [user] name = name Locally, via git config user.name nic # /some/project/.git/config [user] name = alias Yielding: /some/project $ git config user.name alias /some/project $

Categories : GIT

mongoDB, could not read from config file -- config in different folder / Uninstall it?
Issue resolved with following steps (thanks to Karl Seguin's 'The Little MongoDB Book'). If you installed MongoDB via the download package from mongodb.org, you have to create create your own config file in /bin. Follow the instructions below (copied from Karl Seguin's book): download package unzip package Create a new text file in the bin subfolder named mongodb.config (if you have permission issues saving the file, save it first to your desktop then move file into folder). Add a single line to your mongodb.config: dbpath=PATH_TO_WHERE_YOU_WANT_TO_STORE_YOUR_DATABASE_FILES. For example, on Windows you might do dbpath=c:mongodbdata and on Linux you might do dbpath=/var/lib/ mongodb/data. Make sure the dbpath you specified exists Launch mongod with the --config /path/to/your/mongodb

Categories : Mongodb



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