w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
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#

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

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

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#

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 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

How to map identity provider claim value to/from identity provider registered in Azure ACS?
I tried to do this last week and couldn't find a way to match the value in the claim to the value in IdentityProvider.js. I landed up looking for specific values. The only thing I can suggest is some resource/code that understands the mapping. I was just looking for a specific one and landed up doing something like this: return (HttpContext.User.Identity as System.Security.Claims.ClaimsIdentity).Claims .First(x => x.Type == "http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider").Value .Contains("Google") I searched high and low for the data, but couldn't find it. If you do, please submit an answer, I would also like to know

Categories : Azure

Using the ion_auth login process and using a templated process to render the login process
There is no need to use ion_auth views or controllers. they are just for reference. we have to use their function as they have define in model for login/logout/register etc... just simply put his model,library and config file to the respective folder of codeigniter in your project and just use their function as they have shown in demo

Categories : Codeigniter

ODBC or SQL DataSource?
Well from what I quickly searched you would use SQL DataSource to connect to an ODBC Database. No matter, you should always be able to give your users the control to select a database table name and then return them all the data you want from that table. This can be done with either a nice switch statement as to not trust what the user submits in the form or well actually yeah you should use a switch statement because NEVER TRUST USER INPUT. You could get a little fancy and create a dynamic switch statement generated from a query to the DB of what tables appear in the DB and then add whatever code you need to get the return. Hope that is a point in the correct direction for you. EDIT switch out table names for Database names, same concept though.

Categories : SQL

ODBC with jBASE
It doesn't look like anything out there in terms of samples, so you'd have to figure out one on your own after downloading the drivers. If you have the luxury of picking your technologies, I recommend not using this particular combo. Even if you do figure out how to get things working -- you're going to run into snags and there isn't going to be much out there in the ways of helping you. I'd recommend picking a server language that has good documentation/examples with that DB, or pick another DB and migrate over.

Categories : Database

Configuring ODBC with PHP on IIS
Start > Run > %windir%system32odbcad32.exe [enter] Control Panel > Administrative Tools > Data Sources (ODBC) - same thing as the above Go to User DNS and try setting it up there and confirm it works. ODBC connection strings are always fun to deal with. I so very much hate them!

Categories : PHP

ODBC connection with Universe 9.6
Officially Universe 9.6 isn't supported for use with the U2 Toolkit for .NET. Per the documentation (page 6): Supported versions of UniData and UniVerse UniData 7.1 or later UniVerse 10.3 or later You can still use straight ODBC or UniObjects to extract data from your database. If you're planning to use ODBC, in addition to enabling RPC, make sure you have configured your Universe account for ODBC per Rocket's ODBC documentation. Before writing C# code, I have often verified my ODBC setup using Excel's external data access tools.

Categories : C#

Poco ODBC and while SQL loop
You are executing an anonymous block of code; if you have to do it like that, you'll have to turn it into a named stored procedure. See ODBCSQLServerTest::testCursorStoredProcedure() for an example on how to do it for SQL Server ODBC. Note: you will need a POCO version higher than 1.5.0.

Categories : C++

How to bind parameters via ODBC C#?
use "?" in place of @ if you are using ODBC. Try to do as follows: OdbcCommand cmd = conn.CreateCommand(); cmd.CommandText = "SELECT * FROM user WHERE id = ?"; cmd.Parameters.Add("@id", OdbcType.Int).Value = 4; OdbcDataReader reader = cmd.ExecuteReader();

Categories : C#

How get query with parameters from ODBC on C#
That is not possible by default so you could write a extension that replaces the paramater names with the parameter values. For example: internal class Program { private static void Main(string[] args) { OdbcConnection connection = new OdbcConnection(""); OdbcCommand command = new OdbcCommand("SELECT * FROM Table WHERE Id = ? AND Column = ?", connection); command.Parameters.Add("@id", OdbcType.Int).Value = 2; command.Parameters.Add("@text", OdbcType.VarChar).Value = "test"; string preparedSql = command.GetPreparedSql(); // preparedSql = Console.ReadLine(); } } public static class OdbcExtensions { public static string GetPreparedSql(this OdbcCommand command) { string[] splitted = command.CommandText.Spl

Categories : C#

Successfully connect to DB2 using PHP NOT using ODBC?
Using PHP you only have one option: ODBC. Here are step by step instructions for how to connect to DB2 for i (on the IBM i) on Ubuntu: Download the free iSeriesAccess-6.1.0-1.2.i386.rpm file from IBM (you'll have to create a free account to get it) Convert the RPM file to something Ubuntu understands: sudo alien iSeriesAccess-6.1.0-1.2.i386.rpm Install the resulting .deb: sudo dpkg -i iseriesaccess_6.1.0-2.2_i386.deb Copy the installed iSeries libraries to where Ubuntu expects them: sudo cp /opt/ibm/iSeriesAccess/lib/* /usr/lib Edit the /etc/odbc.ini file to contain: [primary] Description = primary Driver = iSeries Access ODBC Driver System = IP_ADDRESS UserID = USERNAME Password = PASSWORD Naming

Categories : PHP

setAttribute to PDO using ODBC Driver?
You have to use prepared statements to make it secure. While EMULATE_PREPARES is irrelevant to security and safe either way. Also, you have to use only settings supported by the driver.

Categories : PHP

MySQL : C++ Connector vs ODBC
The Qt library has a nice SQL support in its QtSql module. The QtSql module has very good documentation, nice object-oriented API, different database backend support(MySQL, ODBC through unixODBC, PostgreSQL, ORACLE). You don't need to use Qt GUI features to use QtSql module.

Categories : C++

ODBC DERBY DRIVER for PHP
Best thing to do, is send a driver log of the operation to support@easysoft.com and we will take a look at whats going on. I will post whatever we find back here. To get the log, add to your DSN in odbc.ini file: Logging = Yes LogFile = /tmp/drb.log

Categories : PHP

ODBC connection Fail VB6
You need to use the 32 bit version of ODBC. You can't mix 32 and 64 bit code in the same process. Use the 32-bit odbc manager to configure your ODBC source: C:WindowsSysWOW64odbcad32.exe

Categories : Database

Convert SQL query to csv using odbc
Using the tips, here's the working solution: $theArray = array(); while ( ($row = odbc_fetch_array($result)) ) { array_push($theArray, $row); } $header = array('Name', 'Hours', 'Fees', 'Notes', 'ShortDescription', 'URL'); $fp = fopen('array.csv', 'w'); fputcsv($fp, $header); foreach ($theArray as $lines) { fputcsv($fp, $lines); }

Categories : PHP

How do I deal with cases when Process.Kill() yields "access denied" because the process is terminating?
Use the command line C# to kill the task, for example Taskkill /F /IM ExeName.exe. If you do not have a persmission to kill the task than also force kill will not help. More info Please check http://www.c-sharpcorner.com/UploadFile/8ea152/kill-process-from-the-command-prompt-in-windows-8/ here an example how to run command line in C# Run Command Prompt Commands Greetings

Categories : C#

cross memory attach. How do I get the remote address from a child process to a parent process
The system calls process_vm_readv and process_vm_writev are meant for fast data transfer between processes. They are supposed to be used in addition to some traditional way of interprocess communication. For example, you may use a regular pipe or fifo to transfer the required addresses between your processes. Then you may use those addresses to establish faster process_vm_ communication. The simpliest way to transfer something between forked processes should be the pipe() function (man 2 pipe has a good example of its usage). There are many other ways to do so of course, like using sockets or messages. You can even write an address to a file and let the other process read it.

Categories : C

Node.js Detached child process is invoked as interactive foreground process
I think this may be a problem with node on windows. I tried both your code and the sample code on the node documentation you are for sure referencing yourself at http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options on my Ubuntu virtual machine and it works just fine. Process is detached and keeps running and there is no output anywhere but to out.log because it is running successfully in the background. I ran both a simple ping command and also ran a node instance on a javascript file like you are trying to do and both worked just fine. I would recommend you do the same with a ping command in windows. . . var child = child_process.spawn('ping', ['-n','25','localhost'],. . . If that works like you would expect, there may be something insi

Categories : Javascript

multiprocess in python: cross process to process watch-kill-restart
I've enabled Debug functions, and tried to kill and restart child processes from the parent. I've turned A and B in classes and added a shutdown method that kill the failing process, after this, if I try A.start() or A.run() this error appear 'cannot start a process twice'.What this means? the process is dead, there aren't others running. If I call multiprocessing.active_childre() the process aren't restarted but got this output: <Process(SyncManager-2, started)>, <Process(SyncManager-1, started)>, <Process(SyncManager-3, started)>] [INFO/MainProcess] process shutting down [DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0 [SUBDEBUG/MainProcess] calling <Finalize object, callback=_decref, args=(Token(typeid='Value', address='/tmp/pymp-2ObnP1

Categories : Python

How to get process (external program) time, cpu usage for process run from java application?
Run this program in a separate thread, then run tasklist /v process (if Windows), intercept output, split lines into columns, find my-simple-app.exe and get necessary info. If tasklist info is not enough, then read process ID column form tasklist output and run some other util to get more info.

Categories : Java

Symfony2 Process component - unable to create pipe and launch a new process
The file handles are not being garbage collected, so they eventually fill up (os limit or php limit, not sure), but you can fix it by adding an explicit garbage collection call: gc_collect_cycles(); usleep($sleep * 1000000); Also, be forwarned that garbage collection doesn't work very well inside a foreach loop because of the way that php maps the temporary $foo as $bar => $var array variables into memory. If you need it in that part of the code you could switch it to something like this instead, which I think should allow for garbage collection inside the for loop: $processes[] = new Process("ls > /dev/null", null, null, null, 2); $processes[] = new Process("date > /dev/null", null, null, null, 2); $sleep = 0; do { $count = count($processes); for($i = 0; $i < $co

Categories : PHP

In Java What is the exit value of a process which is killed in the background through Linux shell using process id
This is not a Java specific question. The return code will be the same for all Unix systems here (at least I have never seen a Unix system not behaving this way): 128 + the number of the signal which caused the process to terminate. No idea for Windows... Therefore, 130 in your case. In C, you'd check (after a call to waitpid() for instance) whether a process has been terminated by a signal using WIFSIGNALED(status).

Categories : Java

FileMode and FileAccess and IOException: The process cannot access the file 'filename' because it is being used by another process
You need to release control of the file from Program A. Try closing or disposing the streamwriter when you finish. Or you might attempt using as is described in the answer to this question: Releasing access to files

Categories : C#

The process cannot access the file 'x' because it is being used by another process while deleting saved image by application
This is explained in the documentation for Image.FromFile: The file remains locked until the Image is disposed.

Categories : Vb.Net

How to create a new process with command line arguments and give the PID to the parent process?
You can use createprocess() function in windows. Its signature is below BOOL WINAPI CreateProcess( _In_opt_ LPCTSTR lpApplicationName, _Inout_opt_ LPTSTR lpCommandLine, _In_opt_ LPSECURITY_ATTRIBUTES lpProcessAttributes, _In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes, _In_ BOOL bInheritHandles, _In_ DWORD dwCreationFlags, _In_opt_ LPVOID lpEnvironment, _In_opt_ LPCTSTR lpCurrentDirectory, _In_ LPSTARTUPINFO lpStartupInfo, _Out_ LPPROCESS_INFORMATION lpProcessInformation ); Example: STARTUPINFO si; PROCESS_INFORMATION pi; //This structure has process id ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); if( argc != 2 ) { printf("Usage: %s [

Categories : C++

How to trigger an automatic screen lock process on my android phone after a specified process running specified time?
How unlock and lock screen programatically in android Has some excellent information on immediately calling the lock screen. You could implement a system using an alarm manager to trigger this event.

Categories : Android

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

PHP ajax process 404 page not found error before complete the process
You can rise the time that a script is allowed to execute: http://php.net/manual/de/function.set-time-limit.php Give attention to your max_execution_time in php.ini But i wouldnt suggest if you are doing this in the frontend then it sounds more like an performance problem of your script. No user want to wait more than 4 seconds for website. Also 2 seconds are too long.

Categories : PHP

Error "The process cannot access....becuse it is being used by another process. " in Delete Image
When you use Image.FromFile, that will open a file handle to that file and keep it open until the image is disposed. You should: Only call Image.FromFile once and reuse the object in Setimage (you're loading it twice in a single if condition...) Dispose of every Image when you're done with it Dispose of the old BackgroundImage before you set the new one So long as you dispose of every Image which is related to the file before you delete the file, you should be okay.

Categories : C#

Getting the list of child process, called by a parent process in Linux
The f option of the ps command will help. Try: ps afx This will show all processes and will visualize parent -> child dependencies in the console.

Categories : Linux

Is it possible to use "kill" to send a signal to a process without forcing the process to exit?
According to the man pages for kill and signal(7), the best you could hope for would be to stop and then maybe continue. But I don't think that will do what you want. I also question the desire to use "kill", a command whose name makes its intended purpose very clear, to do this. Almost every signal you can send with kill is intended to terminate a process or cause it to dump core. I'm not an expert but I think you are trying to use the wrong tool here.

Categories : Linux

how to run back-end (Non-Stop process) process without affect the Ui Thread in Android
@forgivegod is right (about the service), that will get you in the background. However, if your process is really tightly coupled with an Activity (i.e. you want it to match the lifecycle by starting on Activity start and stopping on Activity stop, instead of running outside of that lifecycle) then I think an AsyncTask would get you what you need.

Categories : Android

Using Start-Process for starting a process having its full command line
Do you need start-process? Can you invoke the executable directly? & "C:Dir 1Dir 2executable.exe" -arg1 "value 1" -arg2 "value 2" See help about_Operators and for info on & (call) operator. Bill

Categories : Powershell



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