w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Make Greasemonkey throw error on undefined variable
Unfortunately, Greasemonkey - and javascript in general, along with at least a few other non-compiled languages - do not give very good debugging errors... I can't count the number of times it tells me there is a missing ) at the end of an argument list that doesn't exist, and it turns out my error is elsewhere... When a script of mine won't run I add an alert after any value assignments and if they don't alert or alert the wrong data I have found the problem... for your example above I would debug by: this=self; alert(self); Although I would probably see the problem when I went to add the alert, but if I didn't notice - the alert either wouldn't pop up or it would have the wrong value... and if it didn't pop up, the error console would likely say self not defined.

Categories : Misc

grant access to XML file on step over folder
Open IIS -> Application Pools Click Advanced Settings for your both pools and select Process Model -> Identity "NetworkService" Provide Read/Write permissions for Network and Network Service for the physical folder with your xml.

Categories : C#

What is the best and easiest way to grant access to my site (OAuth, OpenID...)
I found that OpAuth [ https://github.com/opauth/opauth ] was fairly easy to implement. I should say though, Twitter will not expose you to the users email address which makes it almost useless when using a combination of other providers for a single sign on. You could of course have them manually verify everything in order to link other provider accounts to their twitter account, but then doesn't that defeat the purpose of single signon? Unless you, as a developer, and your users are willing to take extra steps, I would not suggest using Twitter as a sign on provider.

Categories : PHP

How to grant write access to mySQL dataset with Delphi
I think the problem is that your dataset is not on edit mode. How to Modify Field Values in TDataSetProvider.OnUpdateData Take a look at the link below.

Categories : Mysql

amzon s3 boto, grant a new group IAM access, 403 error
The problem is with your code that tries to extract the access_key_id and secret_access_key from the create_access_key method. Your code ends up truncating two characters from the secret_access_key. A better way to get the values would be to do this: user_conn=boto.connect_s3(key_response.access_key_id, key_response.secret_access_key) user_conn.create_bucket('<bucket_name>') There is no need to convert the key_response to a JSON string since the IAM calls return a special Python dictionary that allows you to access any embedded key by accessing it as an attribute. You could also use normal dictionary access like this: key_response['create_access_key_response']['create_access_key_result']['access_key']['access_key_id'] But as you can see, this is rather clumsy.

Categories : Amazon

Postgresql Won't grant user access to database that is existent
Lesson learned the long way: GRANT ALL PRIVILEGES ON DATABASE <yourdbhere> TO <youruserhere>; the <yourdbhere> the db name MUST be in lower case. By using Launch for my db name - it was messing things up.

Categories : Postgresql

Securely Allow Users to Grant Tech Support Access to Their Account
I'd like to allow users [...] to grant access to their account for a time, with the option to manually revoke access. You are describing delegated authorization. The OAuth protocol is designed for exactly this, and is more secure. In OAuth 2.0 terms, the end user is a resource owner, and the system that tech support reps use to access a user's account is called a client. OAuth provides a way for a resource owner to grant a client access to his resources at a resource server. After the authorization process, the client receives an access token. The access permissions associated with the client's access token have a scope, which defines the degree of access authorization the client has for the resource owner's (the end user's) resources. This is more secure than your solution to share

Categories : PHP

Symfony, configure firewall to grant access to authenticated and anonymous users
You can use twig's is_granted() function to show different content to users and guests. {% if is_granted('IS_AUTHENTICATED_ANONYMOUSLY') %} {# ... only non logged-in users content ... #} {% endif %} ... or ... {% if is_granted('ROLE_USER') %} {# .. user's content ... #} {% endif %}

Categories : Security

How to grant access to a specific IP address that is blocked by GeoIP[country] in nGinx?
Finally found the solution for this problem. 1) in nginx.conf add http { geoip_country /usr/share/GeoIP/GeoIP.dat; map $geoip_country_code $allowed_country { default no; LV yes; # in my case it is Latvia (allowed country, but all other are not) } geo $exclusions { default 0; 1; # here comes allowed IP that is in blocked country list } } 2) in your vhost configuration server{} container if ($allowed_country = yes) { set $exclusions 1; } if ($exclusions = "0") { return 403; } The main idea is from HERE

Categories : Nginx

Google Play Services - force to show permission window (grant access)
Using Google Play Services: http://developer.android.com/reference/com/google/android/gms/auth/GoogleAuthUtil.html Add https://www.googleapis.com/auth/userinfo.profile to your scope. Example: String scope="oauth2:https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" final String token = GoogleAuthUtil.getToken(context, "xxxx@gmail.com", scope); OR "brute force" Intent res = new Intent(); res.addCategory("account:xxxx@gmail.com"); res.addCategory("scope:oauth2:https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"); res.putExtra("service", "oauth2:https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"); Bundle extra= new Bundle(); extra.putString("androidPac

Categories : Android

VBA: Attempting to access website, but website occasionally fails to load
You could try modifying the code to read Sub LoadWebsite() Dim iSecondCounter As Integer Static iAttempts As Integer iAttempts = iAttempts + 1 Set ie = CreateObject("InternetExplorer.Application") ie.Navigate "https://www.website.com/" Application.StatusBar = "https://www.website.com/ is loading. Please wait..." iSecondCounter = 0 Do While ie.Busy And iSecondCounter < 30 Application.Wait DateAdd("s", 1, Now) iSecondCounter = iSecondCounter + 1 Loop If iSecondCounter = 30 Then ie.Quit If iAttempts <= 3 Then Call LoadWebsite End If Set ie = Nothing End Sub

Categories : Excel

Access to website/website correct?
You could data drive your test putting the URL and any other data that needs to change in different columns (ie fields) of the data source. It is quite valid to data drive with just one set of data.

Categories : Windows

User with grant option can't grant create user
The newly create user is missing the grant option on *.* (needed for grant create user on *.* ...) GRANT GRANT OPTION ON *.* TO 'new_user'@'%'; GRANT GRANT OPTION ON *.* TO 'new_user'@'localhost';

Categories : Mysql

How to stop google to craw/index duplicate and non existing page in website
If the URLs are actually invalid, you should return a 404 response, which should prevent Google from indexing the page. If the URL leads to duplicate content, then you should make sure the page has a canonical URL on it. That will help Google to recognize that it is a duplicate

Categories : PHP

Duplicate Query in Microsoft Access
You could try adding a CASE statement in a WHERE clause, something like this: SELECT Field1 FROM Table WHERE 1 = CASE WHEN Field1 IS NOT NULL THEN 1 WHEN Field1 LIKE '%foo%' THEN 1 ELSE 0 -- Otherwise, don't include in result set. END GROUP BY Field1 HAVING COUNT(*) > 1

Categories : Ms Access

Access to duplicate ID's in cloned structure
id is an attribute, not a tag, so getElementsByTagName('id') will not work. You could loop through the danglingNode elements checking their id each time. for (i = 0; i < danglingNode.length; ++i) { if (!danglingNode[i].id) { // no id, do something } } If the nodes are nested then you'll need to use a recursive (DOM walking) process instead.

Categories : Javascript

How does the subclass object access the private variable of super class,as in java no except the class itself can access the private variable?
The method " test() " is inside of the class "pac". Therefore, when you create an instance of pac, the test method belongs to this instance, and can see and use all the variables. If you had done this, it would have caused an error. int mainC = ob.c; the main method (where this is happening) cannot access the variable "c"

Categories : Java

How to access a variable in a dataset if the variable name is stored in a variable?
Try this instead: ds.(colName) This is often called dynamic field names, and works in regular struct as well Alternative ways: % find index of variable varsNames = get(ds,'VarNames'); colIdx = find(strcmp(varsNames,colName), 1, 'first'); ds(:,colIdx) ds.(colIdx)

Categories : Database

Merge partially duplicate rows into one row in Access
To get to VBA you press ALT+F11 and that will bring up the editor. Since you're not developing a form, you can just create a module. Go to Insert, and select Module and you'll see a blank window with Option Compare Database across the top. To start your module you create a sub function and put you're code there: Public Sub CleverNameHere() 'Code End Sub When you save this, do not name the module the same name as CleverNameHere, because if you ever have to call it then it will look like this ModuleNameHere.CleverNameHere and the parenthesis are for parameters. From there you will just write something that calls your table, creates a recordset, and takes a record line by line and manipulates it until end of file (EOF). Maybe something like this: Public Sub CompareDuplicates()

Categories : Ms Access

Can not access the website via SSL
Because your site is working when you access http://mysite.com:443, I am almost sure that you created wrong binding on IIS. Instead of selecting https from combo box you selected default http. There is a tutorial on how to do this on youtube: Changing IIS 7.5 Bindings by David Johnson

Categories : Asp Net

how to suppress "Duplicate primary key" error message in Access
The following works for me: In the Before Update event handler for the form I have Private Sub Form_BeforeUpdate(Cancel As Integer) If DCount("*", "Attandence of Employee Lunch", "[RFID Number]=" & Me.RFID_Number) > 0 Then MsgBox "Primary key already exists." Cancel = True End If End Sub Note that the Cancel = True statement cancels the update .

Categories : Vba

What are the ramifications of duplicate variable definitions?
You're correct in your assessment of the warning. It's just letting you know there was already a variable in scope with that name and that you're about to redefine it. This way you don't accidentally overwrite a variable. Although they may not appear to be in the same scope if you check out variable hoisting on this page you'll see what the deal is: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9d.html An interesting implication of the lack of block-level scope is that you can read or write to a variable before it is declared, as long as it is declared before the function ends. This is because of a technique called hoisting , which means that the compiler moves all variable declarations to the top of the function. For exam

Categories : Actionscript

Access website through android
Yes, it's possible to send queries to a website. public void postData() { // Create a new HttpClient and Post Header HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.yoursite.com/script.php"); try { // Add your data List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); nameValuePairs.add(new BasicNameValuePair("id", "12345")); nameValuePairs.add(new BasicNameValuePair("stringdata", "AndDev is Cool!")); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); // Execute HTTP Post Request HttpResponse response = httpclient.execute(httppost); } catch (ClientProtocolException e) { // TODO Auto-generated catch block } catch (IOException e) { // TODO Auto-generated catch block }

Categories : Android

Emacs org-mode: define variable in buffer and access variable
Define a variable in your .emacs. Just like how you'd define a function, you can bind a variable to certain value. You can do setq or defvar, defconst, depending on what you want. For an instance: (setq image-width 10) Make sure to eval-buffer after you set your variable.

Categories : Emacs

Using descriptor to access variable instead of binding this variable with the target in the instance
It makes db read-only. You cannot set base_handler.db, there is no setter associated with the property: >>> class Foo(object): ... @property ... def bar(self): return 'spam' ... >>> foo = Foo() >>> foo.bar 'spam' >>> foo.bar = 'ham' Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: can't set attribute You'd need to add a setter for it to be writable: class Foo(object): _bar = 'spam' @property     def bar(self): return self._bar @bar.setter def bar(self, value): self._bar = value Note the @name_of_property.setter decorator; the property object itself gives you a decorator function to create a new decorator with the setter replaced with the new decorated f

Categories : Python

No data found when access the website
You do not provide enough info to get help. You need to troubleshoot your system by looking into the logs. "Mostly while working with Magento, you end up with serious errors or broken stuffs. So, Magento Error Logs come to the rescue here. Whenever you have a serious error on your site, you can just view your error logs and debug the error and get rid of that situation. As simple as it is. Many of you may be wondering, how to switch on Magento Error Logs or view it. So,here are the simple steps : 1) Turn on your logging: Admin > Configuration > Developer > Log Settings > Enabled = Yes 2) Watch your var/log/system.log and var/log/exception.log for raw information from this. You may run into file permission errors, so you might need to set your folder permissions appropriately. Source : ht

Categories : Magento

WWW::Mechanize to access secure website
WWW::Mechanize does not handle JavaScript. If JavaScript is involved (and it seems so, onclick="submitForm...), use some other module (e.g. WWW::Mechanize::Firefox).

Categories : Oracle

Azure: access RoleEnvironment from a website
Are you trying to debug this locally or running from Azure? If locally, try to switch to Visual Studio webserver. If you are running on VS webserver, try iis express instead. HTH

Categories : Asp Net

Access limitation to files in website
Store the files outside of the web root and give them a key (not the file name). Create a handler to serve up the files. When a request is made for a file, ensure that the requested file id is valid, and the current user has access to the requested file. If everything is ok, read the file contents and write them to the http response.

Categories : Asp Net

Show human error if inserting duplicate data in access database
Two ways to do this: Catch the error. I think classic ASP requires on error resume next and then you need to check the err message. You might even have to match the string since I think the error code will be the same for different errors. Do a select from the database before the insert to check if the value already exists Either way you can then display your own message. Might be even more user-friendly to customize the message further ("Sorry - species 'Gruffalo' already exists").

Categories : Ms Access

Duplicate row in table when sending a variable from as3 to mysql database
In your code you have two commands, which both do the same thing: Loader.load(Request); navigateToURL(Request, "participant.php"); So you need to use only one of them. To get an appropriate response in your Complete() function, use the first one. I have tried to do it by myself. It works for both commands well! (the second command does not cause the reaction in Flex, because it is not supposed to do it).

Categories : Mysql

Object variable or With Block variable not set - Access 2010 VBA
It's almost definitely because (on occasion) there is no child node member named "metadata" in the XML body - so when you try to bind your "metadata" object to the .selectSingleNode() method it returns Nothing. You can always check to make sure that it's actually bound... '// ...start code snippet... Set metadata = candidate.selectSingleNode("metadata") If Not metadata is Nothing Then PassedCongressionalDistrict.Value = CInt(metadata.selectSingleNode("congressional_district").nodeTypedValue) End If PassedValidated.Value = True '// ...end code snippet...

Categories : Vba

VBA Access: XML, Error '91': Object variable or With block variable not set?
Since XML in VBA can sometimes be a pain for me, I just take the XML response text and then load it into a MSXML2.DOMDocument. From there you can parse and get the data you need. First you need to make sure that the file has a reference to Microsoft XML dll (do this by selecting Tool > References from the Visual Basic window and then selecting "Microsoft XML 6.0"). As for the code, it would look something like this: Dim xmlhttp As MSXML2.xmlhttp Dim xmldoc As MSXML2.DOMDocument Dim XMLNodes As MSXML2.IXMLDOMNodeList Dim xmlElement As MSXML2.IXMLDOMElement Dim bookTitle as String ' Fetch the XML Set xmlhttp = CreateObject("Microsoft.xmlHTTP") xmlhttp.Open "Get", yourURL, False xmlhttp.send ' Create a new XMLDocument to which to load the XML text Set xmlDoc = New DOMDocument xmldoc.Load

Categories : Xml

Access a variable from within a method when being passed a block that contains the variable
n.times returns n, does not it? that is, measure returns 4 if n is 4, so average_time is 4, not 6.5.

Categories : Ruby

how to access the returned php variable using ajax, as a php variable in the view
PHP is a server-side language. If you want to use PHP data in your view, you need to convert it to a client-side language like Javascript. For example, in your display_info controller, you could return some JSON, using PHP's json_encode to convert a PHP array made of useful data for your view. Output it with the application/json content-type header.

Categories : PHP

Permanent access token for the facebook app on a website
Instead of trying to get a permanent access token, try making a call to a function like this one each time where you have 'accesstokengoeshere': function getAccessToken () { FB.getAuthResponse(function(response) { if (response.status == 'connected') { return response.authResponse.accessToken; } else if (response.status === 'not_authorized') { // if the user is not logged in to FB, prompt them to do so // later might want to change this so it doesn't automatically prompt you to login FB.login(function(response) { return getAccessToken(); }); } else { FB.login(function(response) { return getAccessToken(); }); } }); }

Categories : Facebook

Not able to access Website using ip address, DNS working fine
In the vhost config for the www.rocketbanner.com domain, add a server alias for the IP address: ServerAlias Otherwise, if the "name" isn't associated with a vhost, it ends up being handled by a default vhost which may not be the one serving www.rocketbanner.com.

Categories : Htaccess

Access is denied when trying to open an exe application from a website
Hope the following links already have an answer. Reference: 1.Which permissions are required to enable process.start via asp.net application? 2. Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

Categories : Asp Net

Access to website data from chrome extension
When text is selected, the selected text will be shown in an alert window. A good starting point.... manifest.json { "name": "Selecty thingy", "version": "1.0.1", "manifest_version": 2, "description": "Selecty thingy", "browser_action": { }, "permissions": [ "tabs", "*://*/*" ], "content_scripts": [ { "matches": ["*://*/*"], "js": ["jquery-1.7.2.min.js","content_script.js"], "run_at": "document_end" } ] } content_script.js $(document).ready(function(){ $('html').mouseup(function() { var selectedText = getSelectedText(); if(selectedText > ''){ alert(selectedText); } }); function getSelectedText() { if (window.getSelection) { var selection = window.getSelection()

Categories : Javascript

Is it possible to get access to my chrome extension localStorage from my website?
You would have to inject a content script into your web site and then have your background script pass the localStorage to your content script. As for communication between your content script and the script on your web site, you'll have to get creative.

Categories : HTML

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