w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Selenium regex for trademark?
One reason your pattern doesn't work is that you have forgotten to describe all the spaces. Try this: regexpi:negurici@[A-Z0-9.-]+ regexpi is the same than regexp but it is case-insensitive.

Categories : Regex

Mixed WebForms/MVC Web Api application very slow when hosted on IIS 7.0
I would recommend turning on failed request tracing on your IIS server. http://www.iis.net/learn/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis Also, check your IIS logs and HTTPError logs on the server for hints on what could be going wrong.

Categories : Asp Net Mvc

getting "The resource cannot be found" error when trying to access application hosted in IIS
It seems that you are getting a 401.2 status code: HTTP 401.2: Denied by server configuration Description The client browser and IIS could not agree on an authentication protocol. Common reasons No authentication protocol (including anonymous) is selected in IIS. At least one authentication type must be selected. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 253667 Error message: HTTP 401.2 - Unauthorized: Logon failed due to server configuration with no authentication Only Integrated authentication is enabled, and an older, non-Internet Explorer client browser tries to access the site. This happens because the client browser cannot perform Integrated authentication. To resolve thi

Categories : C#

How do you make an HTTP request to a WCF Service Application hosted with IIS?
You need to use system IP Address to consume WCF service. You can share the link of your svc file which looks like http:// ip address here/Test/Service.svc The client can use this to generate proxy and consume your service.

Categories : Wcf

Why does my Self-Hosted NancyFX application hang when running over HTTPS?
If you pass in a config object to the NancyHost constructor you can hook uncaught errors - you will probably find that it's exploding due to a change that was made with client certificates which will be fixed in 0.18, but you can get the fix now if you grab it from the CI feed: http://www.myget.org/gallery/nancyfx

Categories : Ssl

How to use Devexpress report in Asp.Net MVC 4 Web Application(Not DXperience v12.2 ASP.NET MVC Web Application )
This is the solution which i find out : 1.)Please review the How to: Manually Register DevExpress Extensions to Start Using Them in an MVC Web Application documentation article to learn how to register DevExpress ASP.NET MVC extensions manually. 2.)This way, you will be able to create a reporting application using the approach from the Create a Basic Report in ASP.NET MVC documentation article.

Categories : Asp Net Mvc

Sending mail from my razor web application from the email hosted on Godaddy
I don't know why didn't it worked but then after all the code needs to get changed after the site is hosted.. Finally after the site is hosted this code works: @{ WebMail.SmtpServer = "relay-hosting.secureserver.net"; WebMail.From = "Shayona Infocom support@shayonainfo.com"; } in WebMail.From Shayona Infocom is the name and support@shayonainfo.com is senders mail.

Categories : Asp Net

i2p session key generation suspected to leak
There is no "leak" in the sense that an attacker can tap into the key exchange, but there is certainly a loss of entropy. Because the key seems to be 32 bytes in size this may not be catastrophic, but I personally would have a lot of trouble to accept this implementation. The Diffie-Hellman protocol in clearly specifies in RFC 2631 that Leading zeros MUST be preserved, so that ZZ occupies as many octets as p. This preservation of leading zero's is not present in the implementation of the protocol. Finally, because the designer decided not to pad, there is be an overlap of values: 70, 7000 and 700000 would for instance be thought of as the same value, while they clearly aren't. Furthermore, the BigInteger.toByteArray() will return the two-complement encoding of the signed value.

Categories : Security

An Application which fetches IIS and App Pool details of website hosted in remote server
This is somehow a broad question, but in order to help here are some points you can start from: get the website name at IIS: System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName() to get the list of websites and virtual dirs, check this: How to programmatically get sites list and virtual dirs in IIS 7? to manage IIS: http://www.codeproject.com/Articles/99634/Use-C-to-manage-IIS get IIS version: How to detect IIS version using C#? get site status: Programmtically get site status from IIS, gets back COM error I guess this is enough for you to start exploring everything related to IIS, hope it helps.

Categories : Asp Net

Best way to store private files in a node.js application hosted on Windows Azure
This question is a bit open-ended, as I'm sure there are several viable ways to securely transfer a file. Having said that: From an Azure-specific standpoint: You should be able to upload a file to your Web Site via ftp. Also, you could push a file to a specific blob and have your app check periodically for files in said blob. To upload (or download later), you'd need the storage account's access key, and as long as you're the only one with that key, you should be ok. When uploading from outside of Azure, you can connect to storage via SSL, further securing the upload. While you could probably use a queue (either Storage or Service Bus) with the .pem file as payload in a message that your node app would monitor, you'd need to ensure that the file fits within the limits of the message siz

Categories : Node Js

"Putting" a JSON String back to a WEB API method hosted in a WebForms application
You are sending wrong format of data to WebAPI. Assuming that you use jQuery to send PUT request, this is valid request (see data property): $.ajax({ url: '/Api/ServiceFeature', type: 'PUT', data: { "Id": 8, "ServiceId": 1, "Name": "Wrap", "Description": "Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc", "Comments": null, "DateAdded": "2013-08-17T22:40:53.2387243+02:00", "DateUpdated": "2013-08-17T00:00:00+02:00", "IsEnabled": true }, success: function() { alert('Done'); }, error: function(textStatus) { alert(textStatus); } }); However, this is serialized into request body in this format:

Categories : C#

Ant task hangs due to suspected permissions issue
Solved, the Ant script was hanging on an exec command that was waiting for input from STDIN. (Execution had continued past that point because it was launched with 'spawn' attribute.) When I removed this 'exec' task from my 'init' target, the Ant script ran as expected. <!-- hanging task in init--> <exec executable="blah.sh" spawn="true">

Categories : Ant

PDO suspected of escaping characters of my Blob in MySql
Thanks to davidstrachan, I've solved the removal of = using : $dbh->setAttribute( PDO::ATTR_EMULATE_PREPARES, false ); Then, I came back to that problem later, just to see that the serialization of my form in jQuery was done wrong. It escaped all the + as spaces (or %20) instead of %2B.

Categories : PHP

Deploying a Ruby Command Line Application that Depends on Non-Rubygems-Hosted Gems
bundle exec sets up your load path correctly so that the gems are visible when you require bundler/setup. One option would be to always run your binary with bundle exec bin/hippo. Something more suited to your purposes might be to run bundle install --standalone, which generates a bundle/bundler/setup.rb file within your project's directory. That file sets up load paths correctly for you, so you'd just need to do something like require_relative '../bundle/bundler/setup' from your binary instead of require 'bundler/setup'.

Categories : Ruby

Using Report Server's Report Builder to edit SSRS report deployed in SharePoint foundation
Yes, l was doing that in Sharepoint Foundation 2013 site last week.

Categories : Sharepoint

Can't get apache nutch to crawl - permissions and JAVA_HOME suspected
It seems that, as a normal user, you don't have permission to write to /usr/share/nutch/logs/hadoop.log, which makes sense as security feature. To get around this, create a simple bash script: #!/bin/sh export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-amd64 bin/nutch crawl urls -dir crawl -depth 3 -topN 5 Save it as nutch.sh, then run it with sudo: sudo sh nutch.sh

Categories : Java

accessing values of web.config file in newly created project under existing .net application hosted on IIS
Add reference: using System.Web.Configuration; In config file: < configuration > < appSettings > < add key="KeyName" value="KeyValue" /> </ appSettings > </ configuration > In your code: string value = WebConfigurationManager.AppSettings["KeyName"]; value should be "KeyValue" Having said that, there are very few cases where accessing the config file for data is the best solution

Categories : Dotnet

Django manage.py commands slow; zlib issue suspected
I think I've resolved the issue, or at least hidden its effects. I had the following line in my .bashrc: export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages which was causing all kinds of weird things to happen, including Python using copies of modules outside of my virtual environments instead of copies inside the environment. I still suspect that zlib is broken (and maybe larger parts of my OSX system Python installation) but removing this line from my .bashrc solved the manage.py issue, at least.

Categories : Python

Segmentation fault (core dumped) error with strcpy() (suspected)
system does not return char * but int. Using its return value as string - char * - most likely will give you segfault. int system(const char *command); RETURN VALUE The value returned is -1 on error (e.g. fork(2) failed), and the return status of the command otherwise. This latter return status is in the format specified in wait(2). Thus, the exit code of the command will be WEXITSTATUS(status). In case /bin/sh could not be executed, the exit status will be that of a command that does exit(127).

Categories : C

Suspected faulty error: DataGridView Column exceeds the MaxLength limit
when creating the "Notes" column what type did you specify for it to use. I myself use varChar(maxStringLenth) Also to able to help you more efficiently can you provide some more technical info about your dataGrid and DataBase

Categories : Vb.Net

How to use a cloned Git repo as a "master" and remain in sync with a remote Git repo at a client site?
Eric, You should modify your approach to using Git in the way that it's meant to be used: have everyone work with their own git AND the remote. Do not complicate the process by adding these QA restrictions and an responsibility a developer with the ultimate responsibility to push things up to remote, as this will only bog things down. Learn about git tagging and branching, and have QA become comfortable with it too. In this way, builds can be stamped ready for QA, developers can work off branches which will not impact head - until it's ready to do so - and most importantly, you won't be the bottleneck overseeing the push to remote. A very good read on the subject is http://pragprog.com/book/tsgit/pragmatic-version-control-using-git

Categories : GIT

Pushed to my forked Github repo but didn't update my local from the main repo beforehand
a pull request does not mean "overwrite what you have with what i offer in the pull request". it means "apply the changes in my pull request on top of what you currently have". so what you describe is perfectly normal and expected and nothing should be changed about it. the only inconvenience that might happen, is that if the changes are interdependent you might end up with conflicts that need to be resolved during the merge (i.e. when incorporating the pull request). again, this is perfectly normal and expected and nothing should be changed about it. if however you want to do the conflict resolution yourself (instead of the other developer), you need to pull his changes and then either do the merge or rebase your patches to his latest version.

Categories : GIT

How to package, compress and deploy binaries as zip/tar.gz from a github repo with maven/travis to bintray.com generic repo
I think there are 2 ways to deploy your zip/tar.gz files to bintray.com. 1. Upload over CI You can upload generic files to bintrac.com with curl. curl -T <FILE.EXT> -u$USER:<API_KEY> https://api.bintray.com/content/$USER/generic/<UR_COOL_PACKAGE_NAME>/<VERSION_NAME>/<FILE_TARGET_PATH> You can build your project over maven with a CI/travis and upload a specified file with curl. It should be possible with travis. See here 2. Deploy with Maven With maven you can deploy a specified file like a *.zip with mvn deploy:deploy-file. Maybe this is a solution for you? EDIT after answer To create a *.zip archive you can use the maven-assembly-plugin 1. Add maven-assembly-plugin to pom <plugin> <groupId>org.apache.maven.plugins</groupId>

Categories : Java

I need to get a list of branches of a git repo without having cloned the repo on my local machine
You can use git ls-remote --heads <URL OF REMOTE REPO> to get a list of branches in the remote repository. The entries will have the format <SHA> <REF NAME>, where the <REF NAME> is prefixed with refs/heads/. You can ignore this prefix (it's the full name of the branch refs, but that's not important for you in this situation). If you need to do this often and only want to see the actual branch names (not the full ref names), you could also write a script to filter and transform the output.

Categories : GIT

Merge specific commit from official repo into local repo
You have 3 options: Rebase X onto upstream/master. Merge upstream/master into X. Cherry-pick the specific commit (let's call it <sha fix>) into X. Before you choose any of these, be sure to fetch the changes from upstream first: # First fetch upstream/master $ git fetch upstream Then here are the commands for your various options: Rebase $ git rebase upstream/master X Merge # With X checked out $ git merge upstream/master Cherry-pick # With X checked out $ git cherry-pick <sha fix> In general, I recommend using rebase to bring branches in sync with their upstream branches, but you may decide that you want to use merge instead. I don't recommend using cherry-pick for this, because if you're going to eventually merge X back into master, you'll end up duplicating

Categories : GIT

How to automatically connect to mirror svn repo when source repo crashed?
There are many ways to handle this. The repos UUIDs must match on the mirror and master for probably any solution. The simplest way is to use the 'svn switch' command to point to the mirror site. However this results in read only access from the mirror until the master is back up. For auto read/write failover, and assuming you are using svnsync and apache to create the mirror, one way is as follows: Make sure all repos in in mirror site have the UUIDs set to match the master repos UUIDs. Implement a backup DNS alias entry to switch DNS to upon primary failure Have a name based vhost clone of the primary server setup preconfigured on the mirror site Use some svn hook scripting to detect the primary vhost entry through the mirror Come up with your plan to fail back and untangle the me

Categories : Svn

copyright file in deb package - how to
if you build a package using low-level tools like dpkg-deb you should have a good knowledge on the internals of a debian package. the DEBIAN/-folder is really only for control files, e.g. the control description file of the package, and various pre/post installation scripts (e.g. postinst). otoh, the usual way to build packages is using high-level tools, namely dpkg-buildpackage, which uses a debian/ directory, which has a similar name to DEBIAN/ but is really something completely different (note the upper/lower case spelling). dpkg-buildpackage (or rather it's underlying tools like debhelper or cdbs or whatever you choose) will install the debian/changelog file into /usr/share/doc/<packagename>/. if you insist on using low-level tools, then you must not put your changelog into DE

Categories : Ubuntu

Converting Symbols (Copyright, Reg etc)
The problem that the entity doesn't decode when using html_entity_decode is likely that the target character set given to html_entity_decode is still the default ISO-8859-1. ISO-8859-1 cannot encode "Ⓡ" (the CIRCLED LETTER R), but it can encode "®" (the REGISTERED MARK). So, first, to decode it correctly: html_entity_decode('&#9415;', ENT_COMPAT, 'UTF-8') But secondly, "Ⓡ" and "®" are not the same character, and you probably don't want "Ⓡ".

Categories : PHP

BitBucket: how to track a repo's branches in its Wiki repo?
There does not seem to be a way to track the wiki directory inside the project directory. But you can link to files in the project repository from the wiki. Example: [README from default](https://bitbucket.org/owner/repository/src/tip/README.md) [README from feat-aa](https://bitbucket.org/owner/repository/src/aa/README.md) [Some other file](https://bitbucket.org/owner/repository/src/tip/doc/SOMEFILE.md) You can even embed pictures hosted in the repository by putting "raw" in the url when using the ![]() syntax: ![A image](https://bitbucket.org/owner/repository/raw/tip/image.png) If you use the Creole syntax instead of markdown, there is even an easier way.

Categories : GIT

How to keep a deployment repo for Heroku within a development Git repo and keep them separate?
I would create another branch called 'dist': git checkout -b 'dist' And inside that branch I would alter the gitignore file so that the 'dist' folder is included. I'd then push my dist branch to heroku like so: git push heroku dist:master Does that work for you?

Categories : GIT

Pull to Hg repo from Git repo that is the same project but has lost the history
Never tried this, but maybe manipulating the git-mapfile in /.hg of the bridge-repo could work. I'd try it like so: Lets say Hg repo's tip is Git repo's root. Clone the Git repo via hg-git only up to the root (that's possible with Git, right?). Pull all the commits from the original Hg repo into the hg-git clone. Strip away the lone root, but note down the full hash of this root. Note down the full hash of the Hg repo's tip (also the tip of the hg-git clone now). Edit /.hg/git-mapfile. It should only contain one entry with the lone root's hash on one side (should be on the right). Replace this hash with the one of the tip. Do not replace the other side (left), as it is the hash of the corresponding Git commit object. "hg pull". If the theory holds, this will add the new Git nodes onto th

Categories : GIT

How can I get the git repo on my server to automatically sync with changes to the github repo?
First get your git to login automatically without a password. See this helpful article on github https://help.github.com/articles/why-is-git-always-asking-for-my-password Next, add a cronjob as described here Git auto-pull using cronjob

Categories : GIT

When building only a subdirectory of a Git repo, Jenkins shows the changes of the whole repo - why?
I'm assuming you mean the commit log when you refer to changes, in which case you cannot do what you require without a custom git client or at least a custom git commit viewer script. A single repository should in theory only ever contain one project. Otherwise you are using git "wrong" (using the word "wrong" in a very loose sense as git is just a tool, using it wrong is impossible, there's just using it badly for your own requirements). The only way to do what you want is to split the bar1 and bar2 folders into separate git repo's. If they are a bit like modules, which are both required on the same site, you could git init/clone into the bar1 and bar2 folders respectively for each project so you can control them separately. Another alternative would be to separate them out into separ

Categories : GIT

Fork a github repo and push to my private repo
set up two remote branches, one for your private and one to the class git remote add classwide sshblah git remote add private sshblah then you can git fetch classwide to grab your class stuff and git merge localbranch to work on it, then you can git push localbranch private to put it into your private repo

Categories : Github

View report using JasperViewer or something else in web application
You can export to html file then you can send it as output or ServletOutputStream , show it in a frame String htmlpath="E:/JASPER/OUTPUT/test_jasper.html"; JasperDesign jasperDesign = JRXmlLoader.load(inputStream); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn); JasperExportManager.exportReportToHtmlFile(jasperPrint,htmlpath); InputStream in=new FileInputStream(htmlpath); int len = -1; byte[] byt = new byte[1024]; ServletOutputStream outputStream = response.getOutputStream(); while((len = in.read(byt)) != -1){ outputStream.write(byt, 0, len); } outputStream.flush(); outputS

Categories : Java

Create pie chart from an Application Report?
Your data would need to show the relevant browser but since you would like % then a pie chart from a PivotTable is probably easiest: Select your range (Browser & Run Time), Insert > Tables - PivotTable, PivotTable. Drag "Choose fields to show in report:" as shown, for Σ values Summarize value field by Sum and Shows values as % of total. Click on PivotTable and Insert, Charts, Pie, select something suitable, right click on pie and Add Data Labels.

Categories : Excel

can't get In-App-Purchase hosted content to be actually hosted
I had to "review" my "iOS Paid Applications Agreement". This means going to iTunes connect - then "Contracts, Tax, and Banking" click the "Request" button and accept all the changes... After this every problem was gone. Got the answer from this stackoverflow site: Updated iOS Applications Agreement My problem wasn't similar to yours but I have read similar so posts with the same solution that did it for me. Try it out. Hope it helps you or anyone else :)

Categories : Iphone

Android : Application with Crash dump report
I suggest to take a look at ACRA. https://github.com/ACRA/acra At least if you don't want to use it, it's still open source so you can take a look at the code. They do a lot of thing you want to achieve and when looking at the code you may find answers to your question. I forked ACRA to make some of the things you mention in your questions : How do I get the logfile from an Android device? You can log into the acra report file everything you want. We use a special logger that write into the acra logfile. So we know what is the sequence of events that triggered the crash. Programmatically get log cat data It's a text file, we use [sections] and timestamp/key=value to display logs to the users before sending the report. Be careful to anonymize your log reports and do not put

Categories : Android

Specify copyright and author in Django translation (.po) file
The django translations normally does a merging on makemessages. So, if you change the header, it will keep the header you added. This behavior is consistent, e.g. if you change a string on your code, the .po will keep the translation of the original string, so that nothing is lost in makemessage.

Categories : Python

How to get interesting commits from my git repo's forks into my repo?
The fact that these commits aren't in pull requests don't prevent you to apply them to your fork. You can simply add these fork as remotes to your repo, and cherry-pick/rebase/merge (choose the right one) commits from them. So it's just: git remote add nice-fork https://github.com/author/repo git fetch nice-fork #then the remote branches and commits are imported in your repo. If the commits you want are in pull requests, you can also get them.

Categories : GIT

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