w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Collect logs and analytics while maintaining user anonymity?
Yes. You can anonymize IPs using HMAC if you do not wish to store IP addresses in plain-text. The problem might be with referer url's which often contain query parameters, same for requests. If for example, a users mail is in the query you would have to substitute it with (e.g. an uuid). The problem with hashing IPv4 addresses is they are 32-bit so it is very easy to do a brute-force search. HMAC could improve this situation a bit unless the key is protected. https://panopticlick.eff.org/ uses this technique (with a periodic key removal/change). You could actually use http://bug.st/mod_anonstats to anonymize the IPs but still count the users. Referers can be quite easily solved for sensitive links: http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-norefer

Categories : Security

How can i collect all the system event logs and save them to a file?
Use EventLog.Exists before trying to get entries from non-existing log: if (!EventLog.Exists(sLogName)) return; // or show error message // build xml EventLog log = new EventLog(sLogName); // specify log name var xml = new XDocument( new XElement(sLogName, from EventLogEntry entry in log.Entries orderby entry.TimeGenerated descending select new XElement("Log", new XElement("Message", entry.Message), new XElement("TimeGenerated", entry.TimeGenerated), new XElement("Source", entry.Source), new XElement("EntryType", entry.EntryType.ToString()) ) ));

Categories : C#

Do we have any options to collect storage service operation logs in Azure using Rest API
Thanks for sharing the steps. Yes, you could programmatically get this information. To do so, you would need to make use of Windows Azure Service Management API especially List Subscription Operations. Portal actually makes use of the same operation.

Categories : Java

how to increase efficiency of invoke-command using session to collect logs from remote computer in powershell?
(I can't comment yet as I don't have enough reputation) Would some of the other Event Log based cmdlets be useful here? For example: Get-EventLog (if using v2 or newer) Get-Event (if using v1) Get-WinEvent Take a look at the output of Get-Command *event* for more options depending on what exactly you need to collect and what you need to do with it. You could use the Measure-Command to see which returns the data faster.

Categories : Powershell

"mod_wsgi : Unable to import site module" in Apache Error Logs
In the document you reference, it says the following: http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bit_And_64_Bit_Packages IOW. y Python installation has not been installed with --enable-shared when configure was run for Python. Also, you do not seem to have removed the existing mod_wsgi properly either if what is installed is still referencing Python 2.4.

Categories : Python

Is Statistics::Descriptive similar to using Statistics::R module( in a PERL Script)?
Statistics::Descriptive is a simple pure-Perl module offering basic functionality for stats. You can read the documentation or the source code to answer the question yourself: Statistics::Descriptive does not use R under the hood. Who would have thought that you could do statistical ananlysis with languages other than R? The Statistics::Descriptive and Statistics::R modules are very different: Whereas S::D offers Perl objects representing data collections which you can call various methods on, the S::R is just a convenient wrapper around an R REPL, and requires you to write snippets of R code.

Categories : Perl

Web Deploy Command Line Logs in Event Logs (Updated / Inserted / Deleted Files) in event logs
I don't believe you can log the activities to the event log, but what you can do is use the -xml parameter to output the changes in XML format. You could then use this to log to the event log via a Powershell script, for example.

Categories : Iis

How to conveniently store common logs and client specific logs
I would have an xml file that contain the appenders to specify what packages go into what log file. You can then load the xml file in your application entry point. Below is an example I have used in my current project <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <!-- appenders --> <appender name="console" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.out" /> <param name="threshold" value="error" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%t] %p %c - %m%n" /> </layout> </appender> <appender name="codebaseXAppender" class="org.apache.log4j.RollingFileAppender"> <

Categories : Java

How to set intellij to show logs in the logs tab and not the output tab
In the application server Run/Debug configuration open the Logs tab and specify the full log file path there. You can just search your disk for algo_js.log file and specify its location.

Categories : Spring

Get iPhone Logs(not crash logs)
Got a breakthrough!!. We need to re-direct NSLog to a file like this and then access the file. - (void)redirectNSLogToDocumentFolder{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *fileName =[NSString stringWithFormat:@"%@.log",[NSDate date]]; NSString *logFilePath = [documentsDirectory stringByAppendingPathComponent:fileName]; freopen([logFilePath cStringUsingEncoding:NSASCIIStringEncoding],"a+",stderr); } http://objcolumnist.com/2009/12/19/redirecting-nslog-to-a-log-file/

Categories : IOS

Does Azure Point-to-Site or Site-to-Site VPN support cloud services?
I haven't tried personally, but you should be able to do just that by joining your cloud service to a virtual network. See this article for details on how to do this: http://convective.wordpress.com/2012/08/26/windows-azure-cloud-services-and-virtual-networks/.

Categories : Azure

Connect azure web site to on-premise database over site-to-site vpn
Azure Web Sites do not support the Azure Virtual Network (as of 8/22/2013); http://www.windowsazure.com/en-us/manage/services/web-sites/choose-web-app-service/ You will need to create a cloud service deployment instead if you would like to use Virtual Network and access the on-premises database. Once that is done and your firewall is properly configured, it is like you say just a connection string.

Categories : Database

import google spreadsheet to site page and apply site styles to a table tag
My guess was right, this code working — spreadsheet inserting «one in one» and can apply different style: <script> $(document).ready(function() { $('#result').load('-google spreadsheet html import link- #tblMain'); }); </script> All much easier than I expected:)

Categories : Jquery

Subdomain Points to Subfolder and need .Htaccess to Redirect to a Wordpress Multi-Site Sub-Site
Well, depending on your provider, you can point your subdomain towards the same directory of your top level domain, i.e.: example.com -> /public_html/ this.example.com -> /public_html/ But your question is not clear about what you are trying to do. Is it a subdomains network or is it a subfolders network? If subdomains, try to change the directory your subdomain points to as in the example above, and create the blog inside wp-admin/network/ If subfolders, then you don't need the subdomain, unless you really want to redirect it to a subfolder just like an easier to remember shortcut, in that case you don't need a RewriteRule, WP takes care of the virtual subfolder.

Categories : Wordpress

Unauthorized Access when running `azure site log tail` for a recreated site
Since the website was created by another person, I suggest you reset its credentials. Open the Windows Azure Management Portal. Go to the website's dashboard. Click on "Reset your deployment credentials" and reset the username and password. Click on "Reset your publish profile credentials". Click on "Download the publish profile" and configure the command-line tools with the new profile, username and password.

Categories : Node Js

PostgreSQL: Full text search multitenant site, plus only parts of site
The normal approach would be to create: one full text index: CREATE INDEX idx1 ON dw1_posts USING gin(to_tsvector('english', approved_text)); a simple index on the site_id: CREATE INDEX idx2 on dw1_posts(page_id); another simple index on the page_id: CREATE INDEX idx3 on dw1_posts(site_id); Then it's the SQL planner's business to decide which ones to use if any, and in what order depending on the queries and the distribution of values in the columns. There is no point in trying to outsmart the planner before you've actually witnessed slow queries.

Categories : Postgresql

how to add error document for local site (where index is not in doc root) and live site both in one .htaccess file
In a single htaccess, you can't do this since it works identical to a <Directory> container. Additionally, the ErrorDocument directive doesn't have and conditionals. What you need to do is create a second htaccess file with only an error document directive, which will override the one declared in the document root. Everything else in the document root's htaccess file should still apply.

Categories : Apache

Load Login site instead of the default controller site when no session is set
Try this: class My_Controller extends CI_Controller{ public function __construct() { parent::__construct(); if ( !$this->session->userdata('username') ) { //$this->load->view('login_view'); redirect('My_Controller/login', 'refresh'); } } public function login(){ #load the view here $this->load->view('login_view'); } }

Categories : Codeigniter

Accessing .ASPX page on password protected site from within same site
If you want you can remove authentication for just one page as follows. <location path="mypage.aspx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location>

Categories : Asp Net

CodeIgniter backend site to extend to support frontend site
I will suggest this link for complete solition http://philsturgeon.co.uk/blog/2009/07/Create-an-Admin-panel-with-CodeIgniter On this site 3 methods are given choose which fits your requirements

Categories : PHP

Redirect loop in full site to mobile site using session
From what I could get from github page you should be able to make it work like this: index.php session_start(); if ($_GET['fullscreen'] == 'yes') { $_SESSION['fullscreen'] = 1; } else if ($_GET['fullscreen'] == 'no') { $_SESSION['fullscreen'] = 0; } if (false == isset($_SESSION['fullscreen']) && ($_SESSION['fullscreen'] == 0)) { // If session['fullscreen'] has not been set (maybe first visit // or the user does not what in fullscree // check the device and do redirect require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect(); // Any mobile device (phones or tablets). if ( $detect->isMobile() ) { } ... } // Other code here When visiting from mobile, if the user wants the full version, provide an anchor to url with GET pa

Categories : PHP

.htaccess if subdomain show www.site.com/subs/. no redirect url must bu sub.site.com
Try adding these rules to the htaccess file in your document root: RewriteEngine On RewriteCond %{HTTP_HOST} ^sub.site.com$ [NC] RewriteCond %{DOCUMENT_ROOT}/sub%{REQUEST_URI} -f [OR] RewriteCond %{DOCUMENT_ROOT}/sub%{REQUEST_URI} -d RewriteRule ^(.*)$ /sub/$1 [L]

Categories : Apache

redirect users from desktop site to mobile site based on URL
I think I understand what you are saying: // Make a mobile detect object $detect = new Mobile_Detect(); // Check the device if($detect->isMobile()){ // Here is where you put the page you have // i.e. http://desktopsite.com/specific-page; $location = "http://desktopsite.com/specific-page;"; // We need to swap the url in that $location variable $location = str_replace("http://desktopsite","http://m.mobilesite",$location); // Then to a classic redirect header("Location: {$location}"); }

Categories : PHP

site will not redirect to custome page and throw 404 error in asp.net site
You may need to look into Handlers in your web.config . http://msdn.microsoft.com/en-us/library/46c5ddfy(v=vs.100).aspx

Categories : C#

sending post/get request to another site without leaving current site
use simplexml_load_file <?php $xml = simplexml_load_file($your url); print_r($xml); ?> simply you got a array response.

Categories : PHP

how to better link some sharepoint site(live site) using camelop php tools
It seems as if you made all necessary steps, there is a new guide available here http://www.bendsoft.com/documentation/camelot-php-tools/2_0/installation/ The steps are as follows Install the .NET Connector Install and configure the Integration Toolkit Test with PHP Tools What most users forget is to restart the Camelot SharePoint Integration Service in services.msc after changing it's setup. You can also have a look at this youtube movie, the first two minutes should cover this, http://www.youtube.com/watch?v=mDtvcTnTbeM If this doesn't resolve your issues contact the support of Bendsoft, support@bendsoft.com and someone will help you!

Categories : PHP

Is Puppet the right tool for pull-deploying .NET site from TFS with site shut down
For the client infrastructure, I'd shrink-wrap the product with a Windows Installer MSI. The TFS cloud build sever has Windows Installer XML on it and you can use that to build your installer. Deliver the installer to the client and have it do all the work. Just like downloading TFS from MSDN and installing it on an on premises server. You can also publish the MSI on a website and use an autoupdate pattern running on the client to pull it down and execute it.

Categories : Dotnet

PyMongo statistics
Looks like it's a task for the mongodb aggregation framework: db.collection.aggregate([{$group: {_id: "$_country_code", count: {$sum: 1}}}]) will produce results like: { "result" : [ { "_id" : "US", "count" : 302000 }, { "_id" : "CA", "count" : 180000 }, ... ], "ok" : 1 } The same query using pymongo: db.command('aggregate', 'collection', pipeline=[{"$group": {"_id": "$_country_code", "count": {"$sum": 1}}}]) Hope that helps.

Categories : Python

Directional statistics in R
There may be a more elegant way to do this, but try df$Year<-format(df$Date,"%Y") that should put just the year if a single column. Then make a new column to indicate if it is a leap year df$Leap<-0 df$Leap[df$Year=="1972" | df$ Year=="1976" |df$Year=="1980"]<-1 depending on your data, you may find it easier to change to a number and then use the %% to see if you can divide it evenly by 4, but beware of the year 2000. Then you can use an if statement to the effect of if (df$Leap==0) {do * 360/365} else {do * 360/366}

Categories : R

Statistics circles in CSS
One method would be to just use a chart framework which supports donut charts like d3js. Examples made with d3js: http://bl.ocks.org/mbostock/3887193 http://bl.ocks.org/mbostock/3888852 http://www.visualizing.org/visualizations/uk-olympic-sentiment-analysis

Categories : Javascript

Media query to turn site into mobile site
This has nothing to do with the zoom, but with the current width of the window, ( At least in your examples, the same happens when you change your browser's window to a smaller size ) they are most likely using CSS media queries to apply conditional styles depending on the width. Sample ( from first google result http://css-tricks.com/css-media-queries/ ) @media all and (max-width: 699px) and (min-width: 520px), (min-width: 1151px) { body { background: #ccc; } }

Categories : CSS

How can I share a created google maps in my site to another site
That's a pretty open question. Before all, you and your friend should use the same app or at least agree on certain comventions. For example - the map will be a json with properties such as latn lng and zoom. - Another properties should yield strings, integers, floats, arrays and objects - among objects, there could be some mcarrays, circles, polygons, etc. All of them have a map property that would throw a circular reference if you try to stringify the map. There are a lot of other comventions to make in order to be able to flatten the map to make it stringifiable, and on the other side, the equivalent to rebuild the map.

Categories : Jquery

Does Strawberry Perl still wipe out /site/lib and /site/bin contents?
I would just rename C:strawberry to C:strawberry-old before installing the new version. Chances are you could just copy modules from the old installation to the new one (not forgetting to look for bits in the "auto" directories). That said, I would probably just reinstall everything from CPAN anyway to get the latest versions. It helps if you have a .bat file that automates this for your favourite additions.

Categories : Perl

Gwan report.c statistics
the "Errors" rate seem to be quite high That's HTTP errors (wrong requests coming from a client, not found resources, etc. - look at the error.log file for a trace). The only way to avoid HTTP errors is to prevent clients from connecting to the server. If you can't live with this "high rate of HTTP errors" of 1.22% of all requests then use a G-WAN connection handler (with the HTTP_ERROR notification) to make G-WAN ignore HTTP errors and close the connection without sending an HTTP error message (just return 0; in the handler) - but that's probably not what most users want. there an exceptions occur on CSP too An exception means a 'graceful crash report' was issued for a servlet bug. As you have only 1 crash on 5,650 dynamic requests, that was probably during the servlet devel

Categories : Misc

Drupal export statistics
the views data export module may be what you are after; it can generally be used to export all fields in a particular view. I'm not sure if it will work with the statistics module, though.

Categories : Drupal

Top level MySQL statistics
Dunno why do you need that but that's very easy to get Assuming you are using safeMysql (though you can use whatever way to get data into array) $results = $db->getAll("SELECT * FROM t"); $num_rows = count($results); $num_cols = count($results[0]); that's all I am mainly just trying to make sure I come up with the most logical and fastest method to get the required data. Yes, you are. Nothing wrong with getting aggregated data with every loop. As for the count beyond LIMITs - when you need it, you can use mysql's SQL_CALC_FOUND_ROWS / FOUND_ROWS() feature

Categories : Mysql

Code benchmarking statistics -
Your average looks OK. Mean (i.e. average) is mean = 1/N * sum( x[i] ) Standard deviation is square root of variance: sigma = sqrt( 1/N * sum( (x[i]-mean)^2 )

Categories : C

Postfix statistics of each user, how do?
Try using postfix-logwatch # Sample Usage perl postfix-logwatch --nosummary --nodetail --limit envelopesenderdomains='2 1:10: 2:8:' /var/log/maillog # Command says Give 2 level output in which give top ten domains in level one( 1:10:) and top 8 users in each domain ie. level two ( 2:8: ) ****** Detail (2) ********************************************************************************** 72488 Envelope sender domains ----------------------------------------------------------------- 14055 intranet.domain1.com 6912 domain1-owner 1203 owner 486 cmowner 370 sysaduser 219 cowner 185 towner 175 autoowner 167 cpanel-owner ... 8867 live.com 8867

Categories : Linux

Line of code statistics with out comments
Consider using cloc, which would give you a nice output like: 7892 text files. 4289 unique files. 9574 files ignored. http://cloc.sourceforge.net v 1.56 T=58.0 s (43.9 files/s, 7442.5 lines/s) -------------------------------------------------------------------------------- Language files blank comment code -------------------------------------------------------------------------------- Objective C 872 44323 20568 198133 HTML 34 1032 8 76432 C/C++ Header 908 16427 35415 19872 D 684 0 0

Categories : Xcode

Use a dataset array without Statistics Toolbox
In version 13b of MATLAB (out this September, prerelease is available now), there will be something similar to a dataset array in base MATLAB called a table data container (I haven't tried it yet, and can't be sure it will be exactly the same). Also a categorical array similar to that currently in Statistics Toolbox. Until then, there's not really a way to use a dataset array without Statistics Toolbox, and I would suggest either of the two methods you mention (personally I'd go with just using a structure throughout, as I find the convenience of dataset arrays to be overrated - but that's just my experience, yours may differ).

Categories : Matlab

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