w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
DurandalJS 2.0.0 : where is "settings" in the new router?
I misunderstood the docs, the answer is : router.map([ { route: 'home', moduleId: 'viewmodels/home/home', title: 'Home', nav: true, mySetting: ['mySetting'] }, ... ]);

Categories : Javascript

How to block Iphone game using router setting?
You could connect the iphone to a computer and then using a proxy like Charles, try to identify the specific URLs that potentially are accessed when playing the game. After you obtain that, it's easy to block access to that specific URLs from your router's admin interface. However, this will work only if the game is an online one and needs to pull or push data from the internet. Otherwise, there's no way of blocking it from the router

Categories : Iphone

Email to SMS Gateway Verizon iPhone response goes to phone only
I saw the same issue while using Amazon SES to send emails to Verizon customers. Amazon did a bunch of digging and found that it was just an error with the way Verizon's gateway is set up. I don't think there was ever a resolution. https://forums.aws.amazon.com/thread.jspa?threadID=59605

Categories : Iphone

How do sites bypass a browsers 'block popup / under' settings
They just open the popup on the click event for the document. Browsers usually allow popups from user initiated events (like button clicks). If you use 2 monitors and browse on the non main monitor you can always catch those pesky popunders before they load.

Categories : Javascript

How to configure Provider Settings in Administer Website tool
First of all you are using legacy ASP.Net Membership Provider. Here is the new ASP.NET Universal Providers. Then, you need to configure Membership Provider (see in the Scott Hanselman's article).

Categories : C#

Save website settings in Database vs File(.json)
The answer is yes, there are reasons against using a File (whatever the format). If they are enough to switch to a database, that's for you to decide. I can think of: you will be parsing the file on every request, unless you save the json object in a php cache you need to be very careful with permissions: 644 will make the file readable by everyone, you probably want 640 and the file owned by the sysadmin user and the webserver group. a file based system is hard to scale and query: if you ever add a new server to the system, you need to keep the files in sync or on a separate/shared filesystem, which creates a bottleneck for the application; you also lose the ability to search the contents with the convenient SQL interface of your database. The points can probably summarized with: if

Categories : PHP

ImportError: Could not import settings 'company.foo.settings' (Is it on sys.path?): No module named foo.settings
Have you tried setting the DJANGO_SETTINGS_MODULE environment variable to "company.foo.settings"? From the Djanjo Documentation; https://docs.djangoproject.com/en/dev/topics/settings/#designating-the-settings When you use Django, you have to tell it which settings you’re using. Do this by using an environment variable, DJANGO_SETTINGS_MODULE. The value of DJANGO_SETTINGS_MODULE should be in Python path syntax, e.g. mysite.settings. Note that the settings module should be on the Python import search path. EDIT: Can you also add the following to the top of your manage.py file? import sys sys.path.append('/path/to/folder/containing/company') EDIT2: In response to your clarification, you can try relative imports: http://www.python.org/dev/peps/pep-0328/#guido-s-decision

Categories : Python

How to block opera mini users from accessing my website?
I seriously don't know why you would want to do this, as you will lose a good percentage of your visitors. But, You can download and use this PHP extension: https://code.google.com/p/php-mobile-detect/ It is called PHP Mobile Detect, and it can detect browsers, operating systems, copmuter types, etc... it may be useful for you! I can also post some code if needed.I hope this helps!

Categories : PHP

Block single user's access to website within a network
Short answer: no. Most other stuff you could verify in request headers would be spoofable by the client browser and thus easily changed. The best way would be to hamper login attempts from the same IP address/range, rather than block. You could introduce an artificial delay once there have been a number of recent incorrect login attempts from the same IP. For example, log each attempt server side and check this log on each subsequent login attempt - if there have been more than 5 failed logins within the last 2 minutes, make your application wait 2 seconds before returning a response. This would significantly reduce the effectiveness of any automated brute force attack, while allowing an legitimate user on the same public IP gain access to their account.

Categories : C#

Fat Free router blocks Backbone router, how/when does Backbone router.js work?
If you are not using pushState, then the backbones routes are easy to differentiate from the server routes: /route1 /route2 /route1#route/a /route1#route/b The part before the hash is the one transmitted to the server (F3 routes). The part after the hash corresponds to the backbone routes. //F3 routing $f3->route('GET /route1',…) $f3->route('GET /route2',…) //Backbone routing routes: { "route/a": "routeA", "route/b": "routeB", } Note that the Backbone router doesn't generate any HTTP request to the server (unless you specifically define it of course). What generates automatically HTTP requests is the Backbone model. A backbone model is mapped to a server resource using urlRoot. The methods fetch(), save() and destroy() are then mapped respectively to the GET, PUT and

Categories : Backbone Js

Meteorite router package installation - Uncaught 'error' event on 'mrt add router'
Node 0.10.9 has a couple of issues. I'm not sure it'll help but try mrt add router --repoPort=80 as suggested here : https://github.com/oortcloud/meteorite/issues/135

Categories : Javascript

KnockOut JS - applying a new binding. Error - Message: ReferenceError: 'router' is undefined; Bindings value: css: { active: router.isNavigating }
Before you execute the problematic code, the Composition lifecycle of Durandal has bound the the shell.jsand subsequently the ViewModel agency.js with the UI. Meanwhile in the addContact function, at the last line you basically change the whole binding applied to the view: ko.applyBindings(objAgency); So your whole UI is now bound to this objAgency which I guess does not contain a router instance as the errors is pointing : ReferenceError: 'router' is undefined; This error comes probably from the binding of the shell because is no longer bound to the UI since your code applied new bindings. SOLUTION: The applyBindings is managed by Durandal in the composition process. If you want to modify some properties of the ViewModel there's no need to update the bindings. I don't know if

Categories : Javascript

How to test Meteor router or Iron router with laika
I had the same problem. I needed to navigate to some page before running my tests. I'm using iron router as well. I figured you can't just execute Router.go('foo') and that's it. You need to wait until the actual routing took place. Fortunately the router exposes a method Router.current() which is a reactive data source that will change as soon as your page is ready. So, in order to navigate to a specific route before running my tests, I firstly run the following code block: // route to /some/path client.evalSync(function() { // react on route change Deps.autorun(function() { if (Router.current().path == '/some/path') { emit('return'); this.stop(); } }); Router.go('/some/path'); }); Since this is within an evalSync()everything that

Categories : Meteor

How can I work locally with facebook login with the settings of App Domains and Website with Facebook Login?
Let's say you are doing local development and your app hosted locally with url: http://localhost:53750/ Go to your settings on Facebook: Apps-> YOUR_APP_NAME -> Settings -> Add Platform Select WebSite and enter your url and save changes After that you should have something like: Done. Try to login from your web app.

Categories : Misc

Block pointer variable 'block' is uninitialized when captured by block
To just declare your block you would use void (^block)(void); then initialize it with block =^ // Get warning here! { next = dispatch_time(next, DELAY_IN_MS * 1000000L); // Do my periodic thing ... dispatch_after(next, dispatch_get_main_queue(), block); } That is why putting in the semicolon works. Why it gives you an error without the semicolon: you are referencing block in its own declaration/assignment. You are using it in the "dispatch_after" call, but its not fully set up yet.

Categories : IOS

ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details
Did you try the stuff in the documentation at https://devcenter.heroku.com/articles/django#django-settings? import dj_database_url DATABASES['default'] = dj_database_url.config() It says Django settings Next, configure the application for the Heroku environment, including Heroku’s Postgres database. The dj-database-url module will parse the values of the DATABASE_URL environment variable and convert them to something Django can understand. Make sure ‘dj-database-url’ is in your requirements file, then add the following to the bottom of your settings.py file: settings.py # Parse database configuration from $DATABASE_URL import dj_database_url DATABASES['default'] = dj_database_url.config() # Honor the 'X-Forwarded-Proto' header for request.is_secure() SE

Categories : Django

Configure the settings page of the application in mobile device settings
How to do that? Download the Android source code. Modify the Settings app to contain this sort of feature. Compile the source code into a ROM mod, and install that ROM mod on your device. Otherwise, an SDK app cannot affect what appears on the app's page in Settings in the manner that you describe.

Categories : Android

How to export/import settings and change advanced settings
Regarding question #2, jshint ignore list in web essentials is currently implemented (hardcoded) as a private static, see the source on GitHub (lines highlighted). Also, parsing .jshintignore files is not currently implemented.

Categories : Visual Studio

Encrypt segments of config file (Settings.settings)
You don't need to encrypt the section, only the value for the password. An example of how to encrypt/decrypt a password is shown here: http://www.codeproject.com/Questions/304187/how-to-create-password-encrypt-decrypt-in-csharp I hope this helps. Ed

Categories : C#

App settings attributes missing in "Settings" app of device - iOS
You can't put the Settings bundle wherever you want. It needs to be in the top level diretory of your app's bundle. from the manual: A Settings bundle has the name Settings.bundle and resides in the top-level directory of your app’s bundle.

Categories : Iphone

Can I store settings in a settings.config file in ASP.NET MVC?
To answer the title question, yes you can store settings in a separate config file, to do so you need to define the configSource property of appSettings element E.g. <appSettings configSource="settings.config" /> and in the settings.config file <?xml version="1.0" encoding="UTF-8"?> <appSettings> <add key="settingKey" value="environmentValue" /> </appSettings> However, for the sake of environment specific settings, you may want to look at config transforms. Setting up a transform config for each environment then deploying to that environment with the specified build configuration. E.g. Web.Dev.config (provided you have setup a 'Dev' build configuration) <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <app

Categories : C#

Django: "Could not import settings 'blog.settings'"
Do not touch DJANGO_SETTINGS_MODULE, revert to the original value. You need to set properly DATABASES dictionary, at least 'default' key - ENGINE -> what kind of database backend you are using, username/password for the database access, name of the database etc.

Categories : Python

firewall: 2-way UDP communication possible?
Yes this is called NAT traversal (or UDP punch through) and works in a similar way to TCP - the stateful NAT device is aware you recently sent a UDP packet from a certain end point internally to a certain end point outside and for a period will accept UDP packets from the same outside endpoint and forward them to the same internal end point. I always prefer the IETF docs than the plethora of conflicting information out there (including on this site): http://tools.ietf.org/html/rfc5128

Categories : Networking

how the FireWall knows if the transportation is UDP or TCP?
The header of the packets are completely different, TCP is much bigger for example. A stateful firewall needs to intercept the TCP headers to map the packets to its state table, but also stateless firewalls sometimes have techniques implemented to recognize valid TCP or UDP headers. Most home routers (broadband/wireless) make use of this when you are using port forwarding to distinguish between both protocol versions.

Categories : Security

Symfony2 - Logging out of one firewall
Logging out clears the security-context in the session, therefore you are logged out of your second firewall aswell. You should be using roles instead of two different firewalls. ROLE_ADMIN and ROLE_CLIENT - i don't see the need for a second firewall here :)

Categories : Security

C# HttpListener and Windows Firewall
This is because HttpListener is built on top of http.sys which will listen on the port you specified on behalf of your program. I haven't found a way to allow only a single program using HttpListener through the Windows Firewall, but you might want to limit your inbound rule to system components only by: Entering typing system in the field "This program" in the tab "Program and services" Selecting protocol type TCP in the tab "Protocols and Ports" together with the port you will be listening on

Categories : C#

How can I log into a firewall first before running fabric commands?
Creating a new task and fabric role should do the trick: from fabric.api import run, task from fabric.decorators import roles from fabric.state import env env.roledefs = {"firewall": ["mybox"]} @roles("firewall") @task def do_stuff_on_firewall_server(): run("some-cmd") You can run this command pretty easily: fab do_stuff_on_firewall_server

Categories : Python

How to add an application as Firewall exception in WiX installer
heat accepts an XSL transform argument to modify its output in any way you need. A simple XSL stylesheet can add an element to a particular File element selected via XPath. This assumes that there is only test.exe in your heat run. If that's not the case, modify the XPath in the match attribute: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix='http://schemas.microsoft.com/wix/2006/wi' xmlns:fire='http://schemas.microsoft.com/wix/FirewallExtension' xmlns='http://schemas.microsoft.com/wix/2006/wi' exclude-result-prefixes='wix' > <xsl:output method="xml" indent="yes" /> <xsl:template match="//wix:File[contains(@Source,' est.exe')]"> <wix:File>

Categories : Wix

C# MYSQL - "Tunnel" past firewall
Microsoft Windows include a firewall which specifically blocks ports. If you plan on using MySQL through a network port then you should open and create an exception for this port before performing the installation. To check and if necessary add an exception to the firewall settings: First ensure that you are logged in as an Administrator or a user with Administrator privileges. Go to the Control Panel, and double click the Windows Firewall icon. Choose the Allow a program through Windows Firewall option and click the Add port button. Enter MySQL into the Name text box and 3306 (or the port of your choice) into the Port number text box. Also ensure that the TCP protocol radio button is selected. If you wish, you can also limit access to the MySQL server by choosing the Change scope butto

Categories : C#

How can I install Leiningen packages behind a firewall?
Dependency Tree In order to figure out which jars your project needs you can do: $ lein deps :tree Which will show you something that is called a "dependency tree". It will look similar to: [clj-time "0.5.0"] [joda-time "2.2"] [clojure-complete "0.2.3"] [org.myproject/some-proto "0.0.1-20130523.145830-9"] [org.flatland/protobuf "0.7.2"] [ordered-collections "0.4.0"] [org.flatland/schematic "0.1.0"] [org.flatland/useful "0.9.0"] [com.datomic/datomic-free "0.8.3862"] ... Installing Jars with Lein One simple way to install manually downloaded jars would be to use "lein-localrepo": $ lein localrepo install [-r repo-path] [-p pom-file] <filename> <[groupId/]artifactId>

Categories : Clojure

Creating firewall rules using iptables
Yes and no. No because: iptables works by defining how to treat packets based on their categorization into chains (INPUT, OUTPUT, FORWARD, ...) first and only then also on specific characteristics (source or destination address, protocol type, source or destination port, etc). You can never define an iptable rule that does not apply to a specific chain. INPUT, OUTPUT, and FORWARD are the default chains of the iptables system. INPUT addresses everything with destination localhost (i.e. that is addressed to your network device); OUTPUT applies to everything with source localhost (i.e. that comes from your computer). Yes because: You can define custom chains. You can do that like so sudo iptables -N MYCHAIN then you can send packets from both the INPUT and the OUTPUT (and if you like t

Categories : Linux

How do I make my program ask for firewall permisions
Basicly, Firewall supposed to pop up automatically (in my programs it did), but if it don't you can add firewall rules programatically, as explained here or here. Also, consider asking Administrator authentication: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> Good luck!

Categories : C#

Coded UI - How to prevent Debug mode from enabling LAN proxy server settings and clearing previous proxy settings
I found the answer right here on StackOverflow.com! Thank Ja' for StackOverflow.com See: What is overriding Windows proxy settings (inserting “vsts-proxy-installed-indicator”) and how do I turn it off? What is overriding Windows proxy settings (inserting "vsts-proxy-installed-indicator") and how do I turn it off?

Categories : Visual Studio 2012

Encrypt a string in c# Settings.settings
First thing I'd ask ask - do you need to have an admin password in your application? If the answer is yes then it depends what you want to do. If you need to use the password for something then you can use aspnet_regiis to encrypt sections of your config file and be able to recover them again. http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=vs.80).aspx If the password is never going to be used, i.e. you are just expecting someone to login as the administrator and you want to check the password is correct then the best method to use is salting, which is basically a one-way encryption meaning that no one can recover your password. When you come to authenticate you simply repeat the process and validate the results against your salted password http://en.wikipedia.org/wiki/Salt_(crypt

Categories : C#

How to add own VPN settings to system VPN settings page?
Here is starting point to what @shoe rat proposed, using Java Reflection: package com.nikola.despotoski.whatever; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; public class VpnSetter { private static Map<String , Class<?>> getMappedFields(){ Map<String , Class<?>> fieldsAndTypes = new HashMap<String, Class<?>>(); fieldsAndTypes.put("name", String.class); // 0 fieldsAndTypes.put("type" , int.class); // 1 fieldsAndTypes.put("server", String.class); // 2 fieldsAndTypes.put("username", String.

Categories : Android

Symfony2 lock full site with firewall
You need to add an catch-all firewall that requires authentication, like this: - { path: ^/, roles: ROLE_ACTIVE_USER } That will make all pages that aren't explicitely listed to be accessible without authentication (i.e. with IS_AUTHENTICATED_ANONYMOUSLY) inaccessible. However, since you didn't list your homepage yet, you'll need to add that too. - { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY } Make sure to put it above the catch-all entry, as Symfony processes entries from top to bottom, and stops when it found a matching entry.

Categories : Security

Forward ssh protocol via ssh tunnel | corporate firewall
Disclaimer: If this kind of connection is allowed ask your security people to enable it for you. If it is not allowed and you nevertheless use some tunneling to circumvent the security concept of your company you will get a lot of trouble! Be warned. You already managed to get to your router. In this case I would use ProxyCommand ssh router nc -w1 %h %p in your .ssh/config. This will first open a ssh connection to you router and connect to the actual target host and then start the actual ssh connection. Also git should work with this kind of setup.

Categories : GIT

display login form inside firewall
I finally fixed it, I was just confusing firewalls and access control list. As shown in the question, I had created 2 firewalls on the home page, and in symfony2, you cannot be logged in 2 different firewalls - in no way that I know - In this case, if you want to have the login form inside any firewall page, you do not manage it with the firewall, but with the access control list. # Security.yml firewalls: members_area: pattern: ^/ provider: <any_working_entity-based_provider> anonymous: ~ # To allow unauthenticated users to access the firewall --> The login form form_login: login_path: / check_path: /login_check post_only: true default_target_path: / use_referer: false logou

Categories : PHP

Jenkins Slave port number for firewall
We had a similar situation, but in our case Infosec agreed to allow any to 1, so we didnt had to fix the slave port, rather fixing the master to high level JNLP port 49187 worked ("Configure Global Security" -> "TCP port for JNLP slave agents"). TCP 49187 - Fixed jnlp port 8080 - jenkins http port Other ports needed to launch slave as a windows service TCP 135 139 445 UDP 137 138

Categories : Jenkins

php can only access from local machine, it does not result from firewall
nginx is only listening to localhost server_name localhost; you need to change that to either server_name *; or server_name youraddress.com;

Categories : PHP



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