Vote count: 0 sudo http_proxy=200.108.138.118:3128 curl -L -> curl -x 200.108.138.118:3128 -L -> Received HTTP code 403 from proxy after CONNECT Why last one doesn't works? asked 57 secs agoNoah Burger Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I Know there are already questions liked this but there are nothing that work in this program. i get this code from one youtube videos tutorial public void ListDrawer() { final List studentList = new ArrayList(); try { JSONObject jsonResponse = new JSONObject(jsonResult); JSONArray jsonMainNode = jsonResponse.optJSONArray("student_info"); for (int i = 0; i < jsonMainNode.length(); i++) { JSONObject jsonChildNode = jsonMainNode.getJSONObject(i); String name = jsonChildNode.optString("student_name"); String number = jsonChildNode.optString("student_id"); String outPut = name + "-" + number; studentList.add(createStudent("Students", outPut)); } } catch (JSONException e) { Toast.ma...
ادامه مطلبVote count: 0 I have encountered the following errors trying to install Angular2 via Terminal. I checked Node and NPM and they are up to date. Terminal grab asked 1 min agoSpencer Millard Let's block ads! بخوانید...
ادامه مطلبVote count: 0 i have the function: //this function takes two params, a string and then the delimiter where the string is to be split up function substringSplit(str, del){ var str; var del; for(var i=0;i...
ادامه مطلبVote count: 0 I created a javascript code to save the contents of a textarea whenever someone types inside of it, and it seemed to be working fine at first, but after looking, it seems to be delayed, or rather, behind by one keydown. Last Saved: Before Reload or Page Change. //check if "call_desk_content" is in localStorage if (localStorage["call_desk_content"]) { var call_desk_content = localStorage["call_desk_content"] ; document.getElementById("call_desk_content").value = call_desk_content ; } else { document.getElementById("call_desk_content").placeholder = "" ; console.log("call_desk_content no found in localStorage") } //save entered content document.getElementById("call_desk_content")...
ادامه مطلبVote count: 0 Hi I am trying to do a simple JSON string to Object conversion. Here is the code: let u = "somehost.com/api/1/ipa/2" let url = NSURL(string: u )! let data = NSData(contentsOfURL: url)! let parsed: AnyObject? = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.AllowFragments) if let json = parsed as? [String: AnyObject]{ // parse json. } but it will not unwrap correctly. Seems to me that this should be much simpler. Could someone please help? Also using Xcode 7.3 and swift 2.2. I want to avoid using a third party library. asked 52 secs agoxazb Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Requirement : If user is inactive then show a popup after 5 minutes. and if selected continue session the timer will reset for this and again check for the same. If user haven't click any continue button then the page will refresh. asked 34 secs agoAnuj Sachan Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Firefox will not open such links in a new tab, so in need of a user script to converts tags to the actual HREF. For insight, an example of what foo does is below. function foo(x) { self.location.href = 'page.asp?ID=' + x } asked 58 secs agoTerry Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a Matlab function block in Simulink that receives 2 inputs and processes it to generate an output. During the course of the simulation, at some time points, one of the inputs is zero. I'd like to use the most recent non-zero input to the function whenever that particular input value is zero. How can I achieve this? I tried creating a persisent variable that updates to most recent non-zero input value but that doesn't seem to work. asked 10 secs agoarun Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have an application that is having some buttons that implement some features. Two of them is: Share Image - The images provided by the app which users can share. "Set As" - Users cal also utilize "set as" features (Set As wallpaper, contact picture, etc.). The app is currently not live, so I tested it's apk on my mobile and 2-3 other Android mobiles. The app is ruing correctly only on my device, but here's what I found, "Share" and "Set As" isn't working on emulator - Log cat ERROR shown below. "Share" and "Set As" working perfectly on my Android mobile - Android 5.0. It creates a folder in "Phone Storage" and saves image according to my code shown below. "Share" and "Set As"...
ادامه مطلبVote count: 0 These are the test files. main.html add-js.js function htmlToElement(html) { var div = document.createElement('div'); div.ierHTML = html; retu div.firstChild; } var testContent = document.getElementById("test"); var oldScript = document.getElementById("test-script"); var myScript = htmlToElement(''); testContent.replaceChild(myScript, oldScript); a.js alert("a"); b.js alert("b"); I open main.html by using chrome, however, I only can see a alerted, why b doesn't alert? And how can do to make b.js useful? aske...
ادامه مطلبVote count: 0 im using angular2 version 2.0.0-rc.5 and i create a file name userdetails.ts import {Injectable} from '@angular/core'; export interface userdetails{ userid: string, password: string, name: string, sbu: string, division: string, position:string, loggedin:boolean } @Injectable() export class Userdetails implements userdetails { public userid: string = null; public password: string = null; public name: string = null; public sbu: string = null; public division: string = null; public position: string = null; public loggedin: boolean = false; constructor(){ } isLoggedin(){ retu this.loggedin; } userSBUdetails(){ retu this.sbu; } getUserdetails(){ retu {userid: this.userid, password: ...
ادامه مطلبVote count: 0 I have a list of the countries stored into XML, as follows: Afghanistan Albania Algeria American Samoa Andorra Angola Anguilla Antarctica ................ Adapter: String[] countries = groupContent.getResources().getStringArray(R.array.nation_array); ArrayAdapter nationAdapter = new ArrayAdapter(mContext, R.layout.simple_list_item_1, countries); autoCompleteTextView.setAdapter(nationAdapter); And everything works fine. But now it tued out that need to drop-down li...
ادامه مطلبVote count: 0 Is it possible to have the command prompt automatically run a command before every command that is entered? The problem is sometimes when I kill the web server I am ruing to develop with in the command prompt with 'CTRL' + 'c' the process will change the color of the command prompt. This will linger in the command prompt and leave the color purple, making things hard to read. Currently when this happens I run color 07 before I start the server again. Is there a way to automatically run color 07 in the background when I type the next command so I always start with white? asked 27 secs agoalallier Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm trying to extract some java script from TripAdvisor to find some geoInfo codes that they use in order to find some restaurants in different towns. To do this I want to visit a few pages and scrape the geoName and parentName from the following bit of the page: geoInfo: { geoId: 31743, geoName: `'London', parentName: 'United `States', shortParentName: 'United States', I am using BeautifulSoup because I have used it with great success for other projects, but I'm struggling to get these variables out. The code above sits inside a tag on a geo search page, e.g.: https://www.tripadvisor.co.uk/Search?geo=31743 I've tried stuff like, for example: parentname = soup.findAll('script',...
ادامه مطلبVote count: 0 I am using the following code to send an outlook appointment using system.net.mail The code works perfectly and i am able to receive the appointment. But the problem is i can't figure out how to assign the appointment start date or end date 'Str.AppendLine(String.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", DateTime.Now)) Str.AppendLine(String.Format("DTSTAMP:{0:yyyyMMddTHHmmssZ}", DateTime.UtcNow)) Str.AppendLine(String.Format("DTEND:{0:yyyyMMddTHHmmssZ}", DateTime.Now.AddHours(3))) 1) How do i set the UTC, as if i assign current date now it's always +8. can i just provide a date time without using UTC. 2) And how do i specify the date time in the code. cause right now it use DateTi...
ادامه مطلبVote count: 0 i'm trying to make exe packer 5 extract exe to buffer(in my case: vector) add new section get offset of new EP and run but after call newmain i got 0xC0000005 main.cpp: pastebin #define WIN32_LEAN_AND_MEAN #include #include "main.h" typedef struct _BASE_RELOCATION_ENTRY { WORD Offset : 12; WORD Type : 4; } BASE_RELOCATION_ENTRY; BOOL applyRelocBlock(BASE_RELOCATION_ENTRY* block, size_t entriesNum, DWORD page, PVOID newBase) { PVOID ImageBaseAddress = NtCurrentTeb()->Peb->ImageBaseAddress; BASE_RELOCATION_ENTRY* entry = block; for (int i = 0; i < entriesNum; i++) { DWORD offset = entry->Offset; DWORD type = entry->Type; if (entry == NULL || type == 0 || offset == 0) { //printf("...
ادامه مطلبVote count: 0 I need a macro that works over different tables like this (lets call tem x y z): x ------------ a 0 b 1 c 2 y ------------ a 3 b 1 c 2 z ------------ a 3 b 1 c 2 and I need a results table like this (table is already made, just fill): x y z ------------ a 0 3 2 b 1 0 3 c 2 2 1 What do I need? When scaing tables, "a b and c" will be repeated. I need to print every result without creating in that column extra set of data. I don't want: x y z ------------ a 0 b 1 c 2 a 3 b 0 c 1 a 1 b 3 c 1 How can I achieve this? asked 17 secs agoPablo Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a basic sign-in page using Bootstrap where a user enters an email address and password and then presses a "Sign-In" button to log into our online app. The bootstrap button uses the "data-xxx-complete" text identifier to change the color and state of the button to "Authenticating..." after the user has clicked it. I was able to use an event handler to trap the enter key and force a form submit, but what I really want to do is trap the enter key to make it act just like the user clicking the sign-in button so I get the "Authenticating..." state change on that element before the form submits. Here is the button: echo ""; echo ""; echo "...
ادامه مطلبVote count: 0 I'm a begier to jquery. I want to make a simple fadeindown when I click a button, but from the above the screen,e.g. minus top value. But what I get is only sliding in the page, not from above. And it only works once when I load the html. After that, opacity is the only one working. Here's the sample code: #Page{ opacity: 0; width:70%; min-height: 300px; background:white; text-align: center; border-radius: 20px; position:relative; padding:20px; margin:0 auto; } in document.ready() , when I load the html $("#Page").position().top=$("#Page").outerHeight()*-1; $("#Page").animate({top:$(".row").outerHeight(),opacity:'1'},1500); and the .click function $("#Page").css('opacity','0');...
ادامه مطلب