w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SQL Developer: Joining tables from connected SQL Server DB and connected Oracle DB
Oracle has the concept of a DBLink, and SQL Server has the concept of a Linked Server. Both these features let you query data from two separate databases. Here's a link with instructions for setting up an Oracle DBLink to a SQL Server DB... http://www.dba-oracle.com/t_database_link_sql_server_oracle.htm And here's a link with instructions for setting up a SQL Server Linked Server to an Oracle DB... http://support.microsoft.com/kb/280106 See also this SO post... SQL statement joing Oracle and MS SQL Server

Categories : SQL

networkstream only sends data to the last IP connected to the server
That's because in sendData you perform NetworkStream nStream = tcpClient.GetStream(); where tcpClient variable stores the last accepted connection. Instead of this, you should use your nStream[] array which stores all the connected streams.

Categories : C#

prestashop: Database Server is not found. Please verify the login, password and server fields (DbPDO)
Ok, I think I know what you did here. Did you create a separate gear on your own running the MySQL cartridge? If that is the case, you will not be able to reach it from your php scaled gears because of SELinux and the way that applications are protected from directly reaching each other. You should add the MySQL database to your existing scaled PHP application, it will get put on it's own gear, and you will get MYSQL environment variables like these to use: [phpscaled-cdaley.rhcloud.com 5296d2cc5973cac73800018f]> env | grep MYSQL OPENSHIFT_MYSQL_DB_PORT=62551 OPENSHIFT_MYSQL_DB_HOST=5296d32550044690010001c3-cdaley.rhcloud.com OPENSHIFT_MYSQL_DB_PASSWORD=xxxxxx OPENSHIFT_MYSQL_DB_GEAR_UUID=5296d32550044690010001c3 OPENSHIFT_MYSQL_DB_USERNAME=xxxxxx OPENSHIFT_MYSQL_DB_URL=mysql://xxxx

Categories : PHP

Batch File Connecting to Server and execute program install on connected server
Here's a little code to help you connect to the SQL server and interrogate the SQL version. @ECHO OFF SQLCMD /? > nul 2> nul IF ERRORLEVEL 1 ECHO.SQLCMD not found on this machine & PAUSE & GOTO :eof SET SQLCmdLine=SQLCMD -b -w400 REM use something like the next line for NT authentication; second line for SQL authentication REM for NT SET SQLCmdLine=%SQLCmdLine% -E -S "YourServerName" REM for SA SET SQLCmdLine=%SQLCmdLine% -U "YourSQLUserName" -P "YourSQLPassword" -S "YourServerName" SET Database=YourDatabaseName REM I will use NT Authentication for this example SET SQLCmdLine=%SQLCmdLine% -E -S "(local)" SET TestSQLCmdLine=%SQLCmdLine% -h-1 -d "%Database%" REM this will get the SQL version %TestSQLCmdLine% -Q "SELECT @@VERSION" | FINDSTR /v "rows affected" REM this will

Categories : SQL

Client-Server: File transfer from Android to PC connected via socket And Response from server
Gustavo, The transfer is done well, but as long as the server don't know how much data you are sending it waits in the read loop until you close the socket or a timeout occurs. In order to let the server knows you have sent the whole data the socket must be shut down for output, with this, the server will received that indication, read() returns 0. Then the server will send the 99 message to the client. For example: at the server: int ret=0; int offset=0; byte[] mybytearray = new byte[filesize]; while ((ret = is.read(mybytearray, offset, filesize -offset)) > 0) { offset+=ret; // just in case the file is bigger that the buffer size if (offset >= filesize) break; } bos.write(mybytearray, 0 , offset); bos.flush(); long end = System.currentTimeMilli

Categories : Android

How to load data from web server on ios
You can use something like this: - (void)viewDidLoad { [super viewDidLoad]; [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; NSURL *url = [NSURL URLWithString:__YOUR URL__]; NSURLRequest *theRequest=[NSURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; NSURLConnection *connection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if (connection) { self.rssData = [NSMutableData data]; } else { NSLog(@"Connection failed"); } } - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURL

Categories : PHP

iOS events to load data from server
You should have a method applicationWillEnterForeground: in your AppDelegate. This method is called each time the app comes back to the foreground - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. }

Categories : IOS

Best way to load data from a website/server to iPhone
A simple solution will be to use JSON over HTTP. To make a more stable solution you could go full RESTful web service. Using HTTP status codes to inform you client application what is going on. Using AFNetworking will make it very easy to call the web service and parse the JSON response.

Categories : IOS

How to force Windows Phone 8 to re-load data from server
The workaround for this is to append a different value to the querystring of the URL on each call: string site = "http://192.168.1.17:5465/MessagesWCF/Messages.svc/Test?nocache=" + Guid.NewGuid();

Categories : C#

Cannot load the data from SQL Server database to Crystal Reports c#
Try using "0" instead of "1".... C# indexes are zero based, not 1 based. ds.Tables[0] or ds.Tables["tbl_Candidates"] or check the name string tName = ds.Tables[1].TableName; I know you're pushing out a RowCount on "1". When in doubt, do a string temp = ds.GetXml(); and get the value of temp and look at it. That always tells the story. If you have a strongly typed DataSet, then you shouldn't be using cardinal number references. ("0", or "1", etc). Use the names of the tables. Then check the report to see which dataset(table) is being references. You may have to open the report in notepad and fish around. The way you are doing the tablename(s) of the dataset's is "loosey goosey", and there is probably a mismatch in the names somewhere.

Categories : C#

Data load everytime when call activity from server
Better option is like, just declare your ADAPTER as public static in your ROOT class or in your activity. This will make single copy. And you are done with. Suppose you have following structure. ABC (ROOT/SPLASH) Activity -> class Feed extends Fragment So basically you are calling Feed from ABC. Inside ABC, declare like public class ABC...{ public static FeedAdapter fdp; //.. all other stuffs } public class Feed...{ //.. to use that object delcared in ABC ABC.fdp = new FeedAdapter(...); }

Categories : Android

Too much xaml makes my wp7 page load slowly
I think definitely the way to go for you is to start looking for controls, data and logic that appear together and extract some sort of smaller pieces you can work with. You can use the PhoneApplicationFrame to display a page within a page. You can also take a look on this tutorial explaining how to take advantage of the built in navigation service The MVVM pattern surely is the nicest way to do XAML development, but it may be a little bit hard to grasp if you have just started out.

Categories : C#

What is "Cannot verify Server identity" in iOS
Just some food for thought. If you are using NSURLConnection have you implemented the following. -(BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace{ } -(void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge{ } Sounds like some authentication issue, Otherwise it could also potentially be your server's certificates is having issues.

Categories : Iphone

Load a PDF document from remote server into base64 encoded data
As you have said there are cross domain restrictions that prevent you from downloading any old file from another domain. There are a couple of ways round this. If the server you're downloading from supports CORS requests then you should be able to download the file as a binary object. If you're downloading from a server you control then you could update it to support CORS requests. If CORS support on the originating server isn't an option then you could create a proxy on your server to download the PDF and pass it on to the client. Either host it on the same domain or make sure it supports CORS requests from your domain.

Categories : Javascript

Why do I get the exception: Could not load type 'xy' from assembly 'System.Xaml'?
You are properly missing the VisualStudio C++ Runtimes. This is a big problem with DevExpress so you may got another exception: FileNotFoundExeption that is "normal" on new PCs and DevExpress

Categories : C#

Load xaml viewmodel at run-time with windows phone
I was busy on a similar problem as yours with XamlReader. I found that you should define the assembly namespace in the root element of your xaml file even if it is included in the same assembly. In the example code below even if the xaml is included in SoundBoard.dll, I declare its namespace in the xaml file. xmlns:vm = "clr-namespace:SoundBoard.ViewModels;assembly=SoundBoard">

Categories : C#

how to verify a string format in SQL server
Try this DECLARE @t TABLE(v VARCHAR(500)) INSERT INTO @t VALUES ('A7(5)B666'), ('A7(555)B66666'), ('A7(5ups)B666'), ('A7(5)B6ups66'), ('A7(5)B666 ') SELECT v, CASE WHEN SUBSTRING(v,CHARINDEX('(',v)+1,CHARINDEX(')',v)-CHARINDEX('(',v)-1) LIKE '%[^0-9]%' THEN 0 ELSE 1 END isNumberInBrackets, CASE WHEN SUBSTRING(v,CHARINDEX(')B',v)+2,DATALENGTH(v)-CHARINDEX('(',v)-1) LIKE '%[^0-9]%' THEN 0 ELSE 1 END isNumberAfterB FROM @t

Categories : Sql Server

Verify if app is mine on server side
There are a couple of things you can do. Create your own Certificate Authority, ship a certificate with your app and use two-way TLS authentication. This does not protect against decompilation and reverse-engineering but protects traffic en route. Use the advice in this slide deck to detect modifications and debuggers. Use Jelly Bean's hardware-backed secure storage. At the end of the day, though, DRM is a lost battle. If the user has root access, all bets are off, with or without obfuscation (which native libraries are). The only question is how important is your data. For 90% of applications, running it through ProGuard makes it nearly impossible to untangle (especially if you use data flow obfuscation). Along with the certificate approach, that should suffice for most things. Alter

Categories : Android

How to load some data into $rootScope from remote server before the module's controller is loaded?
The $http service is implemented using promises. The code you write in your success handler will run when the promise is resolved. Due to the asynchronous nature of promises, it is unknown when this happens. It can be 1 second later or 10 seconds later. Meanwhile, your other code continues to run and your controller is probably getting loaded before the promise is resolved. The best way to tackle this problem is to think in 'asynchronous' terms, not force some kind of synchronous behavior. Here are a few valid options: You could move the code to your controller and move your logic to the success handler like this: myModule.controller('SomeCtrl', function($rootScope, $http, $location) { $http.get("http://mydomain/load_user/"). success(function(respData) { // Perform any l

Categories : Angularjs

In Windows Azure, is it possible to have a load balanced endpoint that's only accessible by traffic from a connected virtual network?
Well... you have a few things to think about. You could set up your own load balancer in a separate role, which then does the load balancing. You'd probably want two instances to deal with high availability, and if there was any stateful/sticky-session data you'd need to sync it between your two load balancers. OR... Now: If your code needing load-balancing lived in a Virtual Machine, rather than in a web/worker role, you could take advantage of the brand-new IP-level endpoint ACL feature introduced at TechEd. With this feature, you can have an endpoint that allows/blocks traffic based on source IP address. So you could have a load-balanced endpoint balancing traffic between a few virtual machines, and you could then limit access to, say, your LAN machines, and even add your existing Clo

Categories : Azure

socket.io determine if already connected to server
It's probably best to maintain state using the socket events: connect, disconnect and error. Keep a connected variable around and set it to true on the connect event and false on the disconnect event. But if you don't want to do that, the socket has connected and disconnected variables on it (don't ask me why there are two). You can see the source here.

Categories : Javascript

Visual Studio 2013 fails to load XAML correctly
I believe they have some problems with their IDE. I got a similar message in Visual Basic when I tried to use the Left(T,2) string function. It throws the error 'not implemented" because it conflicts with the control property 'Left. Then it inserts the prototype for a new function for Left String at the end of the code. Private Function Left(DB As String, p2 As Integer) As String Throw New NotImplementedException End Function It is a fine example of Microsoft's massive failure to test their products before they release them.

Categories : Visual Studio

Load data on server start up and refresh on regular time interval using spring 3.1
If you want to refresh your data in application context on change in the database I have a bad news for you - that's not really possible (or easy and straightforward, at least). Most of the common databases are passive in a sense that they won't let you to subscribe for specific events (like data update) because this will require some additional IPC between database and subscribed application and this is generally not the main purpose of database. In any case something like this will be database-specific, so if you really want this - it is better to check api docs of your database - there is a chance that you'll find means for doing something like this there. Again, this probably won't be very flexible and robust solution. In general case you go one of 3 routes: Pull your data from d

Categories : Spring

Android Billing-in App version 3 verify in server
I use in my project public function verifySignatureTransaction($signed_data, $signature, $public_key_base64) { $key = "-----BEGIN PUBLIC KEY----- " . chunk_split($public_key_base64, 64, " ") . '-----END PUBLIC KEY-----'; //using PHP to create an RSA key $key = openssl_pkey_get_public($key); if ($key === false) { throw new InvalidArgumentException("Public key not valid"); } $signature = base64_decode($signature); //using PHP's native support to verify the signature $result = openssl_verify( $signed_data, $signature, $key, OPENSSL_ALGO_SHA1 ); if (0 === $result) { return false; } else { if (1 !=

Categories : PHP

t-sql query to verify if any server doesn´t exists
If I'm interpreting your question correctly, this should work. But the question is rather vague... are you literally looking for server1, 2, and 3 or is this going to be a table valued parameter or come from some other source? A little more background would help a lot. ;WITH servers AS ( SELECT 'server1' AS server UNION SELECT 'server2' AS server UNION SELECT 'server3' AS server) SELECT * FROM servers LEFT OUTER JOIN Nodes ON (Nodes.Caption = servers.server) WHERE (Nodes.Caption IS NULL)

Categories : SQL

Verify address book contacts iOS from PHP server
If you think of performance the first thing you need to check is how many db calls are there because they are slow. So all you need to do in your case is to perform a single mysql request with all the emails you got from ios call: SELECT email, picture FROM User WHERE email IN ('email1', 'email2', ...) Then you need to iterate through the results of sql call, so that you know which of passed emails exist in your database. And you should consider switching to PDO for sure.

Categories : PHP

How can I Verify Android Generated Tokens on my Server Using PHP?
Ok, I finally stumbled into a solution to my issues. As I suspected, the answer was rather simple. I was already doing many things correctly. Both my web endpoint and my android app were in the same Google API Console project. They shared the project entries such as Audience, etc. All examples I found for doing verification either assumed the reader already knew how to do this or assumed that the PHP needed to generate the token. Finally, I stumbled into this section of Google OAuth2 documentation on Validating a Token that gave me the idea for how to do verification cleanly on my php server. Just verification and nothing else, mam! OAuth is confusing enough. There are other examples for verifying using curl from the command line. But, this is how you would call tokeninfo in PHP to verify

Categories : PHP

What's the difference between workspace and (connected to server) solution?
A TFS workspace defines what change control files and folders and mapped to local files and folders (and thus is specific to the combination of user and machine). A VS solution defines a collection of projects and their mutual dependencies worked on as a unit (usually to create a single software product of one or more execut5able files and libraries). This these concepts are orthogonal. A workspace can contain many folders each within a separate folder. Unless you want to be able to work on multiple different things at once that you need to check in separately I would strongly suggest avoiding multiple workspaces until you are more comfortable with change control. While multiple workspaces is a powerful approach for some ways of working it does add complexity. Equally I would suggest a

Categories : Visual Studio

how to send message to all connected client from server
You could use the Google Cloud Messaging service. Take a look at this page: https://developer.android.com/google/gcm/index.html

Categories : Android

Windows Phone 8 application does not load the mainpage.xaml, gets stuck at "loading"
Oh .... it turns out that I ran VS 2012 code analysis on my application code after I was finished and it added a null check in the "CompleteInitializePhoneApplication" method which resulted in this error. In App.xaml, it should be // Do not add any additional code to this method private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e) { // Set the root visual to allow the application to render if (RootVisual != RootFrame) RootVisual = RootFrame; // Remove this handler since it is no longer needed RootFrame.Navigated -= CompleteInitializePhoneApplication; } But either Resharper or the code analysis added this stupid null check to it which turned it into this: // Do not add any additi

Categories : Windows Phone 8

ColdFusion 10 Can't Verify Exchange 2010 Mail Server
I "solved" this. I could find little online and received no comments to this thread. No combination of settings I tried would work and I have no access to the client's mail server. The person who runs that server couldn't run a lemonade stand so no help there. Then I stumbled across this page. Nothing to do with ColdFusion but seemed like a similar issue. Recent changes in the JavaMail API has changed certain authentication defaults and sometimes will create an authentication error with some Exchange Server environments dependent on the configuration. I'd never put much thought into CFMail because it was always drop dead simple and simply worked. Focusing on this link's Resolution 2 (ie replace the mail.jar with an older version). I wondered if CF used JavaMail and if I could

Categories : Email

couldn't verify android inapp billing via php server
I found what you mistaked. $receipt = $_POST['purchase_data']; $billInfo = json_decode($receipt,true); ... $result = openssl_verify($billInfo, $signature, $key); you verified decoded object with key. so it is always be failed. try this and get success, $result = openssl_verify($receipt, $signature, $key); signature verify string(purchase_data) not decoded OBJECT.

Categories : Android

Ruby verify the certificate of secure ldap server
I am posting my solution here for the sake of completeness. net-ldap gem override to support certificate validation https://gist.github.com/mintuhouse/9931865 Ideal Solution: Maintain list of trusted root CAs on your server (If you are lazy like me, have a cron job which will download (weekly maintained by curl) copy from http://curl.haxx.se/ca/cacert.pem) Override Net::HTTP to always use this trusted certificate list

Categories : Ruby On Rails

Verify in a PHP server that one request is made from a specific client
Take a look at this: https://github.com/serbanghita/Mobile-Detect It is pretty accurate, however it won't stop clients who are faking their User-Agent. Generally the best way however is not to let the client make any decisions. Take a game like Eve Online for example. Every action you make is sent as a user action to the server, the server then validates the action and makes the appropriate decision. If the server relied on the client to decide how much damage a ship is doing, the game would be subject to no end of trainer hacks.

Categories : PHP

Mockito Verify: Verified during verify() than during mocked method call
verify compares the parameter contents at the time verify is called and not when the mocked method is called. If the contents of the list is modified then verify will use the modified values. An alternative is to use an Answer instead to check the parameters as soon as the method is called, or you can create a new list instead of modifying the old one.

Categories : Java

no project is connected to this web server.to configure projects go to web administrator
i'm also faced the same problem after hours of surfing i haven't found any solution.Next day i tried to configured the Desktop to do any samples on it and after some time i tried to open the Web Application miracle it configured and showing my Desktop configured folder in the web.So once try to configure the Desktop and check the Web and tell the result of it

Categories : Misc

how we will know on the server side if the peer still connected using Nodejs WebRTC
You would need to implement your own logic to do that. Since you already have the client registering presence you could: maintain a persistent connection via websockets implement a polling/keep alive algorithm between your clients and server

Categories : Node Js

Emiting an event once a client has connected or disconnected to server
Actually that is fairly simple in sockets only import socket s = socket.socket() host = socket.gethostname() port = 7654 s.bind((host,port)) #bind the host/port to the server s.listen(1024) #put the server into listening mode client, address = s.accept() print "a client has connected "+str(address) onConnect(client) #this function is fired when a client connects (and uses the client object as arg while 1: data=client.recv(1024) #receives the data if data == None: break #breaks when empty data is being received (the client may have disconnected) print data #debug reasons print "The client has disconnected "+str(address) onDisconnect(client) #this function is fired when a client disconnects You still have to create the onConnect and onDisconnect functions

Categories : Python

SQL Server Connected to Hadoop - Thoughts and Challenges of Implementation
HDInsight is the distribution of Hadoop that Microsoft maintains for use in Azure. You could roughly compare this to Amazon Elastic MapReduce. They both serve the purpose of being a hosted Hadoop service that has almost no management overhead. The Hortonworks Data Platform for Windows contains the open source changes that Hortonworks and Microsoft have collaborated on to make Hadoop run well on Windows. HDP isn't HDInsight. In short - you don't need to use HDInsight if you want to run Hadoop in a Windows environment. While I can't speak directly to using HDInsight and moving data back and forth between SQL Server, I've done implemented a data processing solution using SQL Server, Hadoop, and Elastic MapReduce. Barring some data quality issues and BULK INSERT weirdness, the process was

Categories : SQL

How do i uniquely identify a browser (or client) whenever it's connected to server
You can identify each socket using it's unique id: socket.id Perhaps you can do something like this to stop everyone except the first socket from broadcasting. var firstClient; io.sockets.on('connection', function(socket) { if(!firstClient){ firstClient = socket.id; } socket.emit('news', "Hello, welcome to our conversation!<br />"); socket.on('receive', function(data) { if(socket.id!==firstClient){ return; // not the first client, so not allowed to broadcast. } //log it to console console.log(data.data); // announce to all clients that someone sent you data. socket.broadcast.emit('news', "Client says: " + data.data + "<br />"); }); });

Categories : Node Js



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