zip

1

votes
1

answer
150

views

Cookie missing in Restsharp response but not in Postman

I am able to use Postman and successfully login with a WebAPI using Postman and get a cookie for the following requests. I grab the code from Postman and put in Visual Studio C# using RestSharp. However with Visual Studio and RestSharp, the request comes back as successful ok 200 but there's NO COOK...
zip
1

votes
4

answer
1.8k

views

change value from array

int main() { int Count, Sum = 0; int Group[10]; cout Group[Count]; if(Group[Count] == -303) break; } int T; for(T = 0; T < Count; T++) Sum += Group[T]; for(T = 0; T < Count; T++) cout
zip
0

votes
0

answer
4

views

What libraries i can use for decoding live stream h264 in web browser (i.e. Chrome)?

I'm still pretty new to decoding and web technology. I know there's javascript library Broadway to decode videos, is there any other libraries i can choose from? (Latency is the most important factor in my use case.) Also Broadway only supports 264, is there any libraries support HEVC/265 as well? I...
Zip
1

votes
1

answer
49

views

IDE that can work on an existing website?

Here is my problem: i am taking over development of a website that already exists and is published. I was hoping to use something simple like iWeb to work on the site, but iWeb seems to have no way to work on a project that wasn't started within iWeb. Is there some standard IDE/editor/dev package th...
Zip
1

votes
2

answer
1.4k

views

Why do some characters lose when I use str_shuffle() in PHP?

This is the code in lib.php: And here is index.php: This program gets the a string and the number that you wanna shuffle, then create a table and returns the number, shuffled string and the length of the shuffle string in each row. If I set the variable $string to 'Stack Overflow' for instance it'l...
Programmer.zip
1

votes
1

answer
102

views

Fiddler for Notes Xpages

I want to use Fiddler for my new Notes Xpages application. My application sends mail automatically and in this email there is a link which opens the document in the application in Notes. I want to see what's going on when I click on this link with Fiddler. Can anyone say what I have to do to get thi...
zip
1

votes
2

answer
58

views

jQuery JSON returned from PHP

I have a simple HTML form where user can search a word from database and PHP return result as a JSON object if the word is in database. Strange thing is that a JSON object is returned for a word that is in database when user searches by clicking on a button instead of pressing enter key. I have the...
Zip
1

votes
2

answer
45

views

Use regex get string “get this” in “adfadf[somestring] get-this adfaf” in Java

I want to get 'get-this' without the blank around it. String input = 'adfa dfadf[somestring] get-this adfaf adfadfad adfajiojoij [somestring] dont-get-this '; So basically I want to get the first string after the first paired square bracket. Here's my regex but it doesn't work: (?
Zip
1

votes
1

answer
436

views

Sending message between content.js and background.js fails [duplicate]

This question already has an answer here: Chrome Extension Message passing: response not sent 3 answers I am trying to send a url from content.js to background.js to make an ajax request there. In content.js I have the following code. By the way, this message sending from content.js to background....
Zip
1

votes
1

answer
2.9k

views

Graphics.py: How to clear the window?

I have a window and I'm rendering an image onto it. Every frame the position changes, so the problem is that (obviously) it doesn't disappear from the last frame. I want to clear the window every frame. I can't find any clear methods for the window object (GraphWin) anywhere. And I can't use undraw...
The Zip Creator
1

votes
2

answer
849

views

Resume timer after clearInterval()

The clearInterval function only stops the timer in my code, but not the actual time. After I click the stop button, the timer stops, but it seems like it is still running in the background. When I re-click the start button again, it does not resume from where it stop, but show me the actual time tha...
Zip
1

votes
1

answer
796

views

Android - How to add animation (Zoom in) only to background image without affecting others?

I'm thinking of making an app's first view like this: it's just a basic search view with one EditText and two Button on it. I want the background image zooming in and out when user stay on this view, typing or doing nothing. So I add zoomin.xml and set the animation to the view. Zooming is working b...
Zip
1

votes
2

answer
47

views

How can I center my two blue boxes here? [duplicate]

This question already has an answer here: Flexbox: center horizontally and vertically 10 answers I would like to center my two blue boxex shown in the example below using CSS Flexbox. I tried to center them with both align-items: center; and justify-content: center; but it is not working. Thanks f...
Zip
-2

votes
0

answer
12

views

PHP Learning - Second DB not saving

I have been learning phpmyadmin, this is my current learning/test environment below i created first database today i refer to as db1 it is simple structure with only two input fields i then copied these files to a new directory and created a second db2 and updated the $dbName within db.php, now t...
zip
1

votes
1

answer
134

views

Two dimensional ArrayList error

I am here trying to get an element from my two dimensional ArrayList but getting IndexOutOfBoundException error. What am I doing wrong here? Do I need to allocate the space like in a simple Array first? If so, How can I do it in two dimensional array? Below is the code, import java.util.ArrayList; p...
Zip
11

votes
3

answer
17.7k

views

How to execute python script on schedule?

I have two Python scripts on my machine that I want to execute two times a day on specific time period. How do I automate this task? Since I will be away from home and thus my computer for a while, I want to upload them to a site and be executed from there automatic without me doing anything. How...
Zip
1

votes
2

answer
4.8k

views

How do I display millisecond in my stopwatch?

I am implementing a stopwatch by using Javascript. I have basic html document setup and a javascript file called stopwatch.js in which I have the following code. I make use of setInterval function to execute the clockRunning function every 1 second(1000ms). This gives me control over sec, min and ho...
Zip
1

votes
3

answer
645

views

Save the actual date in a variable (only date, no time)

I want to save the actual date in a variable. only the date, no time var a = @Date(@Now()); datasource.replaceItemValue('variable', a)` And var a = @Date(@Now()); var b = new Date(a.getYear(), a.getMonth(), a.getDay()); datasource.replaceItemValue('variable', b) Are returning 28.10.14 00:00 var dt:...
zip
3

votes
5

answer
2.5k

views

How to detect numbers in a string with PHP

This is the test.php file: It splits the string character by character and check if the character is a number or not. Problem: It's output is always 'This variable includes number(s)'. Please help me to find the reason. TIP: When I change range(0,9) to range(1,9) It works correctly (But it can't det...
Programmer.zip
1

votes
1

answer
59

views

What does extendable array do when we re-allocate the memory for array when it's full?

I'm just encountered with this question that if we have a dynamically allocated array, it takes O(1) to do the insertion. But when the array is full, we need to re-allocate double space to the array, so copying of the old array takes O(n). Is there any way we can make it O(1)? I have read some arti...
Zip
2

votes
1

answer
374

views

Why can't my content script use already injected script?

For my Chrome extension, I inject a Javascript file and a CSS file that are needed for the modal to load up by using content.js. Injection is successful and I see those two files in the DOM. And then I send a message to the background.js to do some stuff and this works too because I receive the mess...
Zip
12

votes
3

answer
827

views

Is there a way to save the JAVA JIT information for the next run so that i don't have to warm up the code every day?

I have a JAVA process that runs every day and takes about 1,000 or 2,000 hits before it is fully optimized by the JIT. What I'd like to do is save the JIT info so that the next day it can start in an optimized state. It seems like this should be possible, but I have not been able to find any method...
Zip
6

votes
1

answer
5k

views

How do I pass props in react router v4?

I need to pass some data in Link component of react router v4, but I cannot find a way to do it. Basically, I have some links that are dynamically generated. I have linked these links with Link component in the following way. Upon clicking one of these links, user is routed to a new component. I wan...
Zip
2

votes
4

answer
8.8k

views

Generating sequence numbers in Java

I would like to generate sequence number from 01 to 10. But I only want the odd ones. For example, 01 03 05 07 09 I tried this way. for (int i = 1; i < 10; i++) { String sequence = String.format('%02d', i); System.out.println(sequence); //this prints out from 01,02,03.... to 09. So how should I cha...
Zip
3

votes
1

answer
1k

views

File write access on ubuntu server

I have this simple function. @app.route('/save') def save(): with open('hello.txt', 'w') as file: file.write('hello') file.close() return 'done' But when I visit the www.example.com/save route, the server returns 500 Internal Server Error and the file is not written. What kind of permission should I...
Zip
3

votes
5

answer
3.3k

views

handler.postDelayed is not working in onHandleIntent method of IntentService

final Handler handler = new Handler(); LOG.d('delay'); handler.postDelayed(new Runnable() { @Override public void run() { LOG.d('notify!'); //calling some methods here } }, 2000); The 'delay' does shows in the log, but not others at all. And the method called in the run() is not called at all also....
Zip
4

votes
5

answer
1.1k

views

How to find all possible subtrees of a binary tree in Haskell?

I need to find all possible subtrees in a binary tree: allSubtrees :: BinaryT a -> [BinaryT a] allSubtrees = undefined and the tree is: data BinaryT a = Empty | Node (BinaryT a) a (BinaryT a) deriving (Eq, Show) I'm new to Haskell and I know there's no while ⁄ for loop in Haskell. Haskell is all a...
Zip
2

votes
1

answer
248

views

BeautifulSoup url scraping

Trying out BeautifulSoup for the first time. I have this link http://www.mediafire.com/download/alv8dq6k35n4m2k/For+You.zip I want to catch the direct download url from the download button which is http://download2110.mediafire.com/niz8p9iu6r9g/alv8dq6k35n4m2k/For+You.zip What I have tried so far....
Zip
3

votes
2

answer
4k

views

In Haskell, how to generate a perfectly balanced binary search tree?

The function should takes a list xs and constructs a balanced binary search tree consisting of exactly the same set of elements as xs. The result should be like this: (if the list is [1,2,3,4,5,6,7,8]) Node (Node (Node (Node Empty 1 Empty) 2 Empty) 4 (Node Empty 4 Empty)) 5 (Node (Node Empty 6 Empty...
Zip
2

votes
1

answer
615

views

Why Flask gives 404 for files in the same directory with my application

Let's say I have a domain. Under home directory of the domain I have a text(.txt) file called note.txt. Like below https://www.example.com/note.txt When I access the url, browser display text string contained inside the file. But when I run a Flask under that domain instead of a traditional html,cs...
Zip
1

votes
3

answer
308

views

What is the state of GIT IDE plugins in 2010?

My firm is switching to GIT and I'm curious as to the state of IDE plug ins for GIT. The old question was answered in 2008, and I'm hoping the answer no longer applies.
Zip
4

votes
2

answer
100

views

How do I compare these two strings in python?

In crawling RSS feed, I do not want duplicate items added to my list. The problem is that some duplicates are not detected by my if title not in mylist line because they are slightly different. Nonetheless, these two news items are basically the same. Take a look at this two. 'Kom igjen, norsk ungdo...
Zip
5

votes
2

answer
1.4k

views

Different behaviour using mvn jetty:run or jetty standalone

I have a project with multiple modules. Two of them generate war files. One war file is a REST application and provides a couple of resources. The Other war file is a Angular JS web application (static content only) to talk to the REST backend. For demo purposes I'd like to deploy both war-file...
zip
3

votes
2

answer
2.8k

views

Can I deploy react.js web app to a share hosting?

I am wondering if it is possible to deploy react.js web app that I've built to a share hosting site that does not have node.js installed? I use webpack to build the application and it creates normal html, js, css file. I uploaded the static folder that includes all those html, js(bundle.js) and css...
Zip
48

votes
7

answer
95.3k

views

How do I reference a local image in React?

How can I load image from local directory and include it in reactjs img src tag? I have an image called one.jpeg inside the same folder as my component and I tried both and inside my renderfunction but the image does not show up. Also, I do not have access to webpack config file since the project...
Zip
2

votes
1

answer
692

views

Read NFC Mifare Ultralight cards with javax.smartcardio

I try to read NFC Mifare Ultralight cards (page 4) with an ACR1252U and the javax.smartcardio Java library this way: TerminalFactory factory = TerminalFactory.getDefault(); List terminals = factory.terminals().list(); System.out.println('Terminals: ' + terminals); CardTerminal terminal = terminals.g...
Zip
6

votes
3

answer
19.4k

views

How to iterate through two dimensional ArrayList using iterator?

I would like to iterate through two dimensional ArrayList which includes String objects using iterator. I also would like to iterate in a way that let me choose whether I want to iterate horizontally(row) first or vertically(column) by using a boolean value. How can I implement this in java? What I'...
Zip
2

votes
3

answer
1.3k

views

How to get android context from a reference of interface?

I have an activity which instantiate a class with an interface. How I can get the android context within MyClass with only the reference to the interface? public class TestActivity extends Activity implements MyInterface { @Override public void onCreate(final Bundle savedInstanceState) { final MyCla...
Zip
2

votes
1

answer
3.8k

views

Can I make a window close in Google Chrome using javascript when launched from a desktop icon?

I've got a web application that I'm working on. What I want to happen is this: Form pops up on the computer at a certain time, User submits the form, the form processes, the page closes. The part I have trouble with is the page closing part. I've tried running without it, and when I check the machin...
zip_000
4

votes
3

answer
497

views

Is it safe to do a Collections.swap() inside a arraylist for loop?

I have the following code: private List listOfStrings = new ArrayList(); listOfStrings.add('a'); listOfStrings.add('b'); listOfStrings.add('c'); listOfStrings.add('d'); for (String temp : listOfStrings) { if (temp.equals('c')) { Collections.swap(listOfStrings, 0, listOfStrings.indexOf(temp)); } } Th...
Zip

View additional