[Solved] How to see who access my ip address from web service via wifi [closed]

[ad_1] to find informations about visitor request , please check you xampp apache log file . here is the code you can add in your index.php to deny access for some adress ip : <?php $deny = array(“111.111.111”, “222.222.222”, “333.333.333”); if (in_array ($_SERVER[‘REMOTE_ADDR’], $deny)) { header(“location: http://www.google.com/”); exit(); } ?> add the adress ip in … Read more

[Solved] Adding data dynamically from one json object to another

[ad_1] You’re pretty much going to need a server-side process if you want to save your changes. You can load the JSON via ajax: $.ajax({ url: “/path/to/friends.json”, dataType: “json”, success: function(data) { // Here, `data` will be the object resulting from deserializing the JSON // Store `data` somewhere useful, perhaps you might have a `friends` … Read more

[Solved] Error “no such element: Unable to locate element”

[ad_1] The email field is inside the frame. Before access any element in the frame, you have to switch. please try following code. public static WebElement Email_Field(WebDriver driver) throws InterruptedException { WebElement element; (new WebDriverWait(driver, 30)).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(“alibaba-login-box”)); element = driver.findElement(By.xpath(“//input[@id=’fm-login-id’]”)); while (!isDisplayed(element)) { Thread.sleep(3000); System.out.println(“Element is not visible yet”); } return element; } [ad_2] solved Error … Read more

[Solved] how can parse this xml file? [closed]

[ad_1] try This try { InputStream mInputStream = getAssets().open(“XmlData.xml”); XmlPullParserFactory xmlFactoryObject = XmlPullParserFactory.newInstance(); XmlPullParser myparser = xmlFactoryObject.newPullParser(); myparser.setInput(mInputStream, null); int event = myparser.getEventType(); while (event != XmlPullParser.END_DOCUMENT) { String name=myparser.getName(); switch (event){ case XmlPullParser.START_TAG: break; case XmlPullParser.END_TAG: if(name.equals(“page”)){ Log.e(“TAG”,””+ myparser.getAttributeValue(null,”id”)); Log.e(“Page content “,””+ myparser.getAttributeValue(null,”text”)); } break; } event = myparser.next(); } } catch (Exception e) … Read more

[Solved] Asking the user for a URL to receive a JSON

[ad_1] Create a constructor in your async Task private class JSONTask extends AsyncTask<String, String, String> { String url; public JSONTask(String url){ this.url=url; } use the url string in place of params[0] And wherever you call your async task do it like this new JSONTask(textView.getText()).execute() This should solve it. Else you can directly use the do … Read more

[Solved] Java Switch Statement for operators

[ad_1] Try out this : package com.sujit; import java.util.Scanner; public class UserInput { public static void main(String[] args) { Scanner input = new Scanner(System.in); boolean flag = true; do { System.out.println(“Enter 1st number”); int num1 = input.nextInt(); System.out.println(“Enter 2nd number”); int num2 = input.nextInt(); System.out.println(“select one operator :\n 1)+\n2)-\n3)*\n4)/\n5)Exit(Enter E)\n”); System.out.println(“Enter your choice :”); char … Read more

[Solved] My android application is getting stopped

[ad_1] Go to the your Manifest file and do this in the activity where you want to show the Toolbar <activity android:name=”.YourActivity” android:theme=”@style/AppTheme.NoActionBar”><!– ADD THIS LINE –> Then in styles.xml add the following: <style name=”AppTheme.NoActionBar”> <item name=”windowActionBar”>false</item> <item name=”windowNoTitle”>true</item> </style> [ad_2] solved My android application is getting stopped

[Solved] Choosing language at startup

[ad_1] If I understand you correctly you wish to display that activity only when the user runs the app for the first time. Well, here’s what you can do: 1) Get a handle to a SharedPreference. This is to store if the user has already selected the language or not. SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE); 2) … Read more

[Solved] How to remove duplicate from string/mixed list

[ad_1] I think this is what you are trying to achieve: x = [] while True: data = input() if data.lower() == “done”: break if data not in x: x.append(data) Note the use of while True and break to avoid having two input calls. Alternatively, use a set: x = set() while True: data = … Read more

[Solved] How do I create a trapezoidal button using CSS? [duplicate]

[ad_1] Join a triangle and a div http://jsfiddle.net/togwsmme/21/ .btn { width: 100px; height: 100px; background: red; float: left; } .rit { float: left; width: 0; height: 0; border-top: 100px solid red; border-right: 100px solid transparent; } <div class=”btn”>Content</div> <div class=”rit”></div> 5 [ad_2] solved How do I create a trapezoidal button using CSS? [duplicate]