I am on the stage of development, where I have two modules and from one I got output as a OutputStream and second one, which accepts only InputStream. Do you know how to convert OutputStream to InputS..
I am using Java.net at one of my project.
and I wrote a App Server that gets inputStream from a client.
But some times my (buffered)InputStream can not get all of OutputStream that client sent to my s..
I'm trying to read a text file line by line using InputStream from the assets directory in Android.
I want to convert the InputStream to a BufferedReader to be able to use the readLine().
I have the..
I am using HTTPURLConnection to connect to a web service. I know how to use HTTPURLConnection but I want to understand how it works. Basically, I want to know the following:
On which point does HTTP..
If you have a java.io.InputStream object, how should you process that object and produce a String?
Suppose I have an InputStream that contains text data, and I want to convert it to a String, so fo..
Someone explain to me what InputStream and OutputStream are?
I am confused about the use cases for both InputStream and OutputStream.
If you could also include a snippet of code to go along with you..
I am converting InputStream to JSONObject using following code. My question is, is there any simple way to convert InputStream to JSONObject. Without doing InputStream -> BufferedReader -> StringBuild..
How do you read the same inputstream twice? Is it possible to copy it somehow?
I need to get a image from web, save it locally and then return the saved image. I just thought it would be faster to use..
I am uploading a file to S3 using Java - this is what I got so far:
AmazonS3 s3 = new AmazonS3Client(new BasicAWSCredentials("XX","YY"));
List<Bucket> buckets = s3.listBuckets();
s3.putObject..
I am trying to send a post request to a url using HttpURLConnection (for using cUrl in java).
The content of the request is xml and at the end point, the application processes the xml and stores a re..
Possible Duplicate:
Can we convert a byte array into an InputStream in Java?
There is a way to convert an array of bytes (byte[]) to InputStream in Java? I looked at some methods in Apache ..
Specifically, the problem is to write a method like this:
int maybeRead(InputStream in, long timeout)
where the return value is the same as in.read() if data is available within 'timeout' milliseco..
Can we convert a byte array into an InputStream in Java? I have been looking on the internet but couldn't find it.
I have a method that has an InputStream as argument.
The InputStream cph I have is ..
What is the prefered method for creating a byte array from an input stream?
Here is my current solution with .NET 3.5.
Stream s;
byte[] b;
using (BinaryReader br = new BinaryReader(s))
{
b = ..
update in java9: https://docs.oracle.com/javase/9/docs/api/java/io/InputStream.html#transferTo-java.io.OutputStream-
I saw some similar, but not-quite-what-i-need threads.
I have a server, which wil..
I have the following structure in a Java Web Application:
TheProject
-- [Web Pages]
-- -- [WEB-INF]
-- -- -- abc.txt
-- -- index.jsp
-- [Source Packages]
-- -- [wservices]
-- -- -- WS.j..
The documentation says that one should not use available() method to determine the size of an InputStream. How can I read the whole content of an InputStream into a byte array?
InputStream in; //assu..
I want to read the text from a text file. In the code below, an exception occurs (that means it goes to the catch block). I put the text file in the application folder. Where should I put this text..
I am using a library, ya-csv, that expects either a file or a stream as input, but I have a string.
How do I convert that string into a stream in Node?..
I'm trying to read from a text/plain file over the internet, line-by-line. The code I have right now is:
URL url = new URL("http://kuehldesign.net/test.txt");
BufferedReader in = new BufferedReader(n..
I have a InputStream that I pass to a method to do some processing. I will use the same InputStream in other method, but after the first processing, the InputStream appears be closed inside the method..
I can never remember how I do this because it comes up so infrequently for me. But in C or C++, what is the best way to read a character from standard input without waiting for a newline (press enter)..
I´m searching for a opportunity to open a url in java.
URL url = new URL("http://maps.google.at/maps?saddr=4714&daddr=Marchtrenk&hl=de");
InputStream is = url.openConnection().getInputSt..
I have a blob column in my database table, for which I have to use byte[] in my Java program as a mapping and to use this data I have to convert it to InputStream or OutputStream. But I don't know wha..
With Java:
I have a byte[] that represents a file.
How do I write this to a file (ie. C:\myfile.pdf)
I know it's done with InputStream, but I can't seem to work it out...
I am writing a program in Java which displays a range of afterschool clubs (E.G. Football, Hockey - entered by user). The clubs are added into the following ArrayList:
private ArrayList<Club>..
What's the difference between:
InputStream is = this.getClass().getClassLoader().getResourceAsStream(fileName)
and
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStre..
My current situation is: I have to read a file and put the contents into InputStream. Afterwards I need to place the contents of the InputStream into a byte array which requires (as far as I know) the..
In Java web application, Suppose if I want to get the InputStream of an XML file, which is placed in the CLASSPATH (i.e. inside the sources folder), how do I do it?..
How do I get an InputStream from a URL?
for example, I want to take the file at the url wwww.somewebsite.com/a.txt and read it as an InputStream in Java, through a servlet.
I've tried
InputStream i..
I am creating a website on localhost. I want to make all of link resources in my website to relative path ( I mean only internal resources).
website is located in
http://localhost/mywebsite
I rea..
I have an asp.net application, and now I am using datasets for data manipulation. I recently started to convert this dataset to a List collection. But, in some places it doesn't work. One is that in m..
In my html I have a span element:
<span class="field" data-fullText="This is a span element">This is a</span>
And I want to get the data-fullText attribute. I tried these two ways, but ..
In my current program one method asks the user to enter the description of a product as a String input. However, when I later attempt to print out this information, only the first word of the String s..
I've seen plenty of info about how to stream video from the server to an android device, but not much about the other way, ala Qik. Could someone point me in the right direction here, or give me some..
Possible Duplicate:
What's the best way to pass a PHP variable to Javascript?
I am using the following code:
<script type="text/javascript">
<?php $ctnme = $_SERVER['REQUEST_URI..
Is there any way to compare two strings in SQL Server 2008 stored procedure like below?
int returnval = STRCMP(str1, str2)
returns 0 if the strings are the same
returns -1 if the first argument is..
I have an onActivityResult returning from an mediastore image selection which I can get a URI for an image using the following:
Uri selectedImage = data.getData();
Converting this to a string gives..
I would like to modify a file inside my jar. Is it possible to do this without extracting and re jarring, from within my application?
File i want to modify are configuration files, mostly xml based.
..
How does one convert from an int or a decimal to a float in C#?
I need to use a float for a third-party control, but I don't use them in my code, and I'm not sure how to end up with a float...
I am using Lumen framework. How can I change Timezone to Europe/Paris CEST?
I added a varaible in my .env file:
APP_TIMEZONE=Europe/Paris
But this doesnt work. What is the right way to update time..
My ListFragment code
public class ItemFragment extends ListFragment {
private DatabaseHandler dbHelper;
private static final String TITLE = "Items";
private static final String LOG_TAG ..
I tried to use the Bootstrap visible and hidden classes to create content only visible on mobile/desktop. I noticed the classes weren't working properly (and I have noticed a lot of people had this pr..
I have a view which is selecting rows from a table in a different database. I'd like to grant select access to the view, but not direct access to the base table. The view has a where clause restrict..
As of today I've been running into an error setting up new projects in Android Studio. Right after creating a blank project the log mentions "Gradle sync failed: failed to find Build Tools revision 2..
I am trying to order by date. I want the most recent dates coming in first. That's easy enough, but there are many records that are null and those come before any records that have a date.
I have tri..
I am making a call to a method by passing ipAddress and it will return back the location of ipAddress like Country, City, etc etc. So I was trying to see how much time it is taking for each call. So I..
I have a long ListView that the user can scroll around before returning to the previous screen. When the user opens this ListView again, I want the list to be scrolled to the same point that it was pr..
I was just programming in c++, when all of a sudden all the "cout"s and "cin"s were errors and "Ambiguous". Including System.
I don't know why this happened. Everything was fine, I was coding the sam..
My cluster: 1 master, 11 slaves, each node has 6 GB memory.
My settings:
spark.executor.memory=4g, Dspark.akka.frameSize=512
Here is the problem:
First, I read some data (2.19 GB) from HDFS to RD..
I have a JSONObject with some attributes that I want to convert into a Map<String, Object>
Is there something that I can use from the json.org or ObjectMapper?..
For example, assuming that x = filename.jpg, I want to get filename, where filename could be any file name (Let's assume the file name only contains [a-zA-Z0-9-_] to simplify.).
I saw x.substring(0, ..
I have Postgresql on a server in a docker container. How can I connect to it from the outside, that is, from my local computer? What setting should I apply to allow that?..
I am trying to use a plugin called "Simplebar" found on GitHub, GitHub SimpleBar but after downloading the scripts and looking at the simple.js script, it looks like it has an error "SyntaxError: impo..
I keep getting different attribute errors when trying to run this file in ipython...beginner with pandas so maybe I'm missing something
Code:
from pandas import Series, DataFrame
import pandas as p..
I have a local host running on XAMPP on a Mac. At some point I set a password in phpMyAdmin which I've ow forgotten. Can anyone help me get back into phpMyAdmin? I've followed a ton of tutorials but t..
First of all, I've already seen the other posts about error TS1005. Same error code, but totally different.
A simple let x: number; will generate the error TS1005 during compilation. It's not about a..
How does one check whether a task is running in celery (specifically, I'm using celery-django)?
I've read the documentation, and I've googled, but I can't see a call like:
my_example_task.state() ==..
I want to execute a simple native query, but it does not work:
@Autowired
private EntityManager em;
Query q = em.createNativeQuery("SELECT count(*) FROM mytable where username = :username");
em.setP..
I want to write a script, that would keep checking if any of the devices in network, that should be online all day long, are really online. I tried to use ping, but
if [ "`ping -c 1 some_ip_here`" ]
..
Can PHP make a redirect call after executing a function? I am creating a function on the completion of which I want it to redirect to a file located in the same root folder. Can it be done?
if (.....
I have a String array kinda like this:
// icon, category, tool
String[,] subButtonData = new String[,]
{
{"graphics/gui/brushsizeplus_icon", "Draw", "DrawBrushPlus"},
{"graphics/gui/brushsize..
Is there any way to resize a jqGrid when the browser window is resized? I have tried the method described here but that technique does not work in IE7...
I want to find an element by class name. I know it will appear in a particular parent div, so rather than search the entire dom, I'd like to search only the particular div. I am trying this, but does ..
I am checking my database in Create(FooViewModel fvm){...} to see if the fvm.prop1 and fvm.prop2 already exist in that combination; if so, I want to add an error to the modelstate, then return the who..
When I tried to deploy my app onto devices with Android system above 5.0.0 (Lollipop), I kept getting these kind of error messages:
07-03 18:39:21.621: D/SystemWebChromeClient(9132):
file:///android_..
sentence = "The quick brown fox jumped over the lazy dog."
characters = {}
for character in sentence:
characters[character] = characters.get(character, 0) + 1
print(characters)
I don't unders..
I want to find all values in a Pandas dataframe that contain whitespace (any arbitrary amount) and replace those values with NaNs.
Any ideas how this can be improved?
Basically I want to turn this:
..
I have 2 login pages: Login.aspx-for customer login and xlogin.aspx for admin login
i just uploaded my project to the server and all application pages works great
but when i log in the admin xlogin.as..
I have one Activity. The Activity has two Fragments.
Fragment A is Menu. Fragment B is Detail.
I try to Make other Fragment C in Fragment B, so, There are 3 Fragment in the Activity.
And I try to Rep..
I have a query which involves getting a list of user from a table in sorted order based on at what time it was created. I got the following timing diagram from the chrome developer tools.
You can s..
I am running a month-end process and want to have it automatically create some of the reports that need to be created at that time. I am using rdlc reports. Is there a way to automatically create a PD..
I have a transaction that contains multiple SQL Statements (INSERT, UPDATE and/or DELETES). When executing, I want to ignore Duplicate Error statements and continue onto the next statement. What's the..
Is there any way to get SQLAlchemy to do a bulk insert rather than inserting each individual object. i.e.,
doing:
INSERT INTO `foo` (`bar`) VALUES (1), (2), (3)
rather than:
INSERT INTO `foo` (`b..
My program does some network activity in a background thread. Before starting, it pops up a progress dialog. The dialog is dismissed on the handler. This all works fine, except when screen orientation..
I am looking to make a simple form validation error message that displays under the username field.
I cannot seem to figure it out.
<form name ="myform" onsubmit="validation()">
Username..
Which of these queries is the faster?
NOT EXISTS:
SELECT ProductID, ProductName
FROM Northwind..Products p
WHERE NOT EXISTS (
SELECT 1
FROM Northwind..[Order Details] od
WHERE p.Produ..
I am trying to filter items with a stored procedure using like. The column is a varchar(15). The items I am trying to filter have square brackets in the name.
For example: WC[R]S123456.
If I do a L..
When writing multi-threaded applications, one of the most common problems experienced are deadlocks.
My questions to the community are:
What is a deadlock?
How do you detect them?
Do you handle..
How can I import variables from one file to another?
example: file1 has the variables x1 and x2 how to pass them to file2?
How can I import all of the variables from one to another?..
I am not sure if I can make myself clear but will try.
I have a tuple in python which I go through as follows (see code below). While going through it, I maintain a counter (let's call it 'n') and 'p..
I have created a simple program in C++ with Code::Blocks.
If I run it from Code::Blocks, it works correctly; but if I run it by doubleclicking on the executable file, a window pops up with this messa..
So I have the following, which seems incredibly hacky, and I've been thinking to myself that Go has better designed libraries than this, but I can't find an example of Go handling a POST request of JS..
Is there any way to create a virtual directory in IIS express? I know that Cassini can't do this and it would be nice to be able to do this without using a full version of IIS.
I've got it so far tha..
Does Python have a built-in, simple way of encoding/decoding strings using a password?
Something like this:
>>> encode('John Doe', password = 'mypass')
'sjkl28cn2sx0'
>>> decode('s..
I need to convert a .cer file to a .jks file.
I saw a few questions about it, but haven't seen a solution to what I need.
I don't need it in order to add it to my local certificates, but as a file to..
I want to trigger the submit event of the form the current element is in. A method I know works sometimes is:
this.form.submit();
I'm wondering if there is a better solution, possibly using jQuery,..
I have a table that is a collection entries as to when a user was logged on.
username, date, value
--------------------------
brad, 1/2/2010, 1.1
fred, 1/3/2010, 1.0
bob, 8/4/2009..
It seems that fieldset defaults to 100% width of its container. Is there any way that you can have the field set just be as big as the widest control inside the fieldset?..
I have a data.frame with column headers.
How can I get a specific row from the data.frame as a list (with the column headers as keys for the list)?
Specifically, my data.frame is
A B ..
Is there a OS command to find what Java version Tomcat6 is using?
I need to use a Perl (including system()) command.
I using Linux. Ubuntu and CentOS
Is there something like?
tomcat6 version
..
How to loop each row that readed? in my code, the row won't bind to next row because of the same productID, so the datagridview won't move to new row, it still in the same row and overwrite the price ..
I have a data frame with a hierarchical index in axis 1 (columns) (from a groupby.agg operation):
USAF WBAN year month day s_PC s_CL s_CD s_CNT tempf
..
I was wondering if it was possible to split a file into equal parts (edit: = all equal except for the last), without breaking the line? Using the split command in Unix, lines may be broken in half. Is..
IMO both make the function to have a scope of the translation unit only.
What's the difference between "static" and "static inline" function?
Why should inline be put in a header file, not in .c fil..
I'm attracted to the neatness that a single file database provides. What driver/connector library is out there to connect and use SQLite with Java.
I've discovered a wrapper library, http://www.ch-we..
How do I encode and decode HTML entities using JavaScript or JQuery?
var varTitle = "Chris' corner";
I want it to be:
var varTitle = "Chris' corner";
..
I tried using gem install pg but it doesn't seem to work.
gem install pg gives this error
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERRO..
I have a text file that has following content:
ac und
accipio annehmen
ad zu
adeo hinzugehen
...
I read the text file and iterate through the lines:
Scanner sc = new Scanner(new File("translate.tx..
What exactly is the difference between Python and IPython?
If I write code in Python, will it run in IPython as is or does it need to be modified?
I know IPython is supposed to be an interactive she..
After a calculation, I want to display a pop up or alert box conveying a message to the user. Does anyone know where I can find more information about this?..
I am using matplotlib to create the plots. I have to identify each plot with a different color which should be automatically generated by Python.
Can you please give me a method to put different colo..
I need to realize a complex if-elif-else statement in Python but I don't get it working.
The elif line I need has to check a variable for this conditions:
80, 443 or 1024-65535 inclusive
I tried
..
I have a username field in my form. I want to not allow spaces anywhere in the string. I have used this regex:
var regexp = /^\S/;
This works for me if there are spaces between the characters. That..
I'm trying to access elements that are present under <form> <iFrame> <form> elements </form> </iFrame> </form>.
Could you help me on accessing these 'elements', wh..
For my assignment I have to create a Gas Meter System for a Gas company to allow employees to create new costumer accounts and amend data such as name and unit costs along with taking(depositing) mone..
I have this exception and I don't understand why it would be thrown or, how I should handle it.
try {
os.writeObject(element);
} catch (IOException e) {
e.printStackTrace();
}
Where elemen..
As a C# developer I'm used to running through constructors:
class Test {
public Test() {
DoSomething();
}
public Test(int count) : this() {
DoSomethingWithCount(count);..
Working my way through Effective STL at the moment. Item 5 suggests that it's usually preferable to use range member functions to their single element counterparts. I currently wish to copy all the va..
I'm not sure if I need a lambda, or something else. But still, I need the following:
I have an array = [1,2,3,4,5]. I need to put this array, for instance, into another array. But write it all in one..
How can one modify the format for the output from a groupby operation in pandas that produces scientific notation for very large numbers?
I know how to do string formatting in python but I'm at a lo..
I'm trying to develop a simple web scraper. I want to extract text without the HTML code. In fact, I achieve this goal, but I have seen that in some pages where JavaScript is loaded I didn't obtain go..
I'm using Bootstrap, and drawing a table. The rightmost column has a button in it, and I want it to drop down to the minimum size it needs to fit said button.
_x000D_
_x000D_
<link href="https://m..
i want to show a custom popup menu when user click on a floating icon
the float icon create with an service and i have no activity
this is my floating icon code
public class copy_actions_service ex..
Is it possible to create an HTML fragment in an AngularJS controller and have this HTML shown in the view?
This comes from a requirement to turn an inconsistent JSON blob into a nested list of id: va..
What is the difference between the following statements when issued from a Android Studio Project's terminal :
Android_Studio_Project_Path: ./gradlew clean
Android_Studio_Project_Path: ./gradlew clea..
Given a filename in the form someletters_12345_moreleters.ext, I want to extract the 5 digits and put them into a variable.
So to emphasize the point, I have a filename with x number of characters th..
I want to develop some kind of utility bar. I can position each element in this bar side by side using float:left;
But I want the second element to be positioned at the very right of the bar. This is..
Using MySQL, I can do something like:
SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;
My Output:
shopping
fishing
coding
but instead I just want 1 row, 1 col:
Expected Output:
shoppin..
Does a Python equivalent to the Ruby ||= operator ("set the variable if the variable is not set") exist?
Example in Ruby :
variable_not_set ||= 'bla bla'
variable_not_set == 'bla bla'
variable_s..
What is the best way to convert a JSON code as this:
{
"data" :
{
"field1" : "value1",
"field2" : "value2"
}
}
in a Java Map in which one the keys are (field1, field..
I come from OOP background and trying to learn python.
I am using the max function which uses a lambda expression to return the instance of type Player having maximum totalScore among the list players..
Related:
Why would one use REST instead of Web services?
When deciding whether to implement a web service using SOAP or REST (by which I mean HTTP/XML in a RESTful manner) what should I be aware..
I have this error since a long time but can't figure it out :
Caught TypeError while rendering: coercing to Unicode: need string or buffer, NoneType found
It happens in admin when I try to add or mo..
I have two javascript functions that are called from android. After long debug sessions finally I realized that the problem is arising from the fact that second function is getting called before first..
I've been searching around this morning and I'm not finding any simple solutions... basically, I want to capture a change in an input element, but also know the previous value.
Here's a change event..
In PowerShell, how can I test if a variable holds a numeric value?
Currently, I'm trying to do it like this, but it always seems to return false.
add-type -Language CSharpVersion3 @'
public clas..
I am in the process of writing an application that sends mail via an valid GMail user ID and password.
I just wanted to simulate the SMTP connection on my Windows XP command line, and when I telnet s..
I would like to know is there a way to select randomly generated number between 100 and 500 along with a select query.
Eg: SELECT name, address, random_number FROM users
I dont have to store this n..
I want to change the color of a title when a button is clicked.
This is my code, but it's not working and I can't figure out why not...
<div id="about">About Snakelane</div>
<..
How can I center an unordered list of <li> into a fixed-width div?
_x000D_
_x000D_
<table width="100%">_x000D_
<tbody>_x000D_
<tr>_x000D_
<td width="41%"><img..
I'm writing an angular2 component and am facing this problem.
Description: I want to push an option value in select selector to its handler when the (change) event is triggered.
Such as the below temp..
I am writing a JSON file which would be read by a Java program. The fragment is as follows...
{
"testCases" :
{
"case.1" :
{
"scenario" : "this the case 1.",
"result" : "this ..
I am trying to adapt an existing code to a 64 bit machine. The main problem is that in one function, the previous coder uses a void* argument that is converted into suitable type in the function itsel..
I've looked around for a long while now and I can't find anywhere that answers this seemingly basic question. I don't care if the page reloads or displays the results immediately; I just want to have ..
I have a string that has email addresses separated by semi-colon:
$address = "foo@bar.com; boo@bar.com; zoo@bar.com"
How can I split this into an array of strings that would result as the following..
I have a very large NumPy array
1 40 3
4 50 4
5 60 7
5 49 6
6 70 8
8 80 9
8 72 1
9 90 7
....
I want to check to see if a value exists in the 1st column of the array. I've got a bunch of homegrown..
When I access my aspx page in chrome or safari it shows this error in console
Not allowed to load local resource: file:///D:/CSS/Style.css
Everything works fine in IE and FF.
I use an external ..
How do you test an element for existence without the use of the getElementById method?
I have set up a live demo for reference. I will also print the code on here as well:
<!DOCTYPE html>
<..
I'm using Spring to define stages in my application. It's configured that the necessary class (here called Configurator) is injected with the stages.
Now I need the List of Stages in another class, na..
So I have a webpage with a header, mainbody, and footer.
I want the mainbody to fill 100% of the page (fill 100% in between footer and header)
My footer is position absolute with bottom: 0. Everytime ..
I have a data frame with several rows. I want to select some rows with specific rownames (such as stu2,stu3,stu5,stu9) from this dataframe. The input example dataframe is as follows:
attr1 at..
I would like to return the most recent record (top 1) from ElasticSearch index similar to the sql query below;
SELECT TOP 1 Id, name, title
FROM MyTable
ORDER BY Date DESC;
Can this be done?..
I am stuck on converting a varchar column UserID to INT. I know, please don't ask why this UserID column was not created as INT initially, long story.
So I tried this, but it doesn't work. and give m..
I am trying to debug stored procedures in SQL Server Management Studio 2008. I want to insert some print statements to test some IF-statements that I know are wrong.
In order to do debugging, I tried..
Currently I have an input box which will detect the URL and parse the data.
So right now, I am using:
var urlR = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)
(?::(\d+))?(?:\/([^?#]*))?(?..
It's impossible to use placeholder on date fields but I really need it.
I want two date inputs with texts "From" and "To" on each one as placeholders...
I've searched and I can only find questions about the other way around: writing stdin to a file :)
Is there a quick and easy way to dump the contents of a file to stdout?..
I know an .so file is a kind of dynamic library (lots of threads can share such libraries so there is no need to have more than one copy of it in memory). But what is the difference between .a and .la..
hello i am new to phpexcel,
and i was wondering if there is some way send the excel i have created to the clients download without saving it on my server or to delete it right after he downloads it
..
Say I have an ID row (int) in a database set as the primary key. If I query off the ID often do I also need to index it? Or does it being a primary key mean it's already indexed?
Reason I ask is beca..
How do I apply a function to the list of variable inputs?
For e.g. the filter function returns true values but not the actual output of the function.
from string import upper
mylis=['this is test', '..
I want to break a while loop of the format below which has an if statement. If that if statement is true, the while loop also must break. Any help would be appreciated.
while(something.hasnext()) {
..
I am wondering whether it is possible to set the date format in the html <input type="date"></input> tag... Currently it is yyyy-mm-dd, while I need it in the dd-mm-yyyy format...
I have installed node modules by npm install, then I tried to do gulp sass-watch in command prompt. After that I got the below response.
[18:18:32] Requiring external module babel-register
fs.js:27
c..
I have installed nvm (ubuntu with zsh shell) with two node version: v6.11.5 and v9.0.0 and the default version in nvm is the v9.0.0
Every time I need to change the node version
$ nvm list
..
What is the difference between # and . when declaring a set of styles for an element and what are the semantics that come into play when deciding which one to use?..
I want to implement FIFO through a class in Java.
Does such a class already exist? If not, how can I implement my own?
NOTE
I found a class here http://www.dcache.org/manuals/cells/docs/api/dmg/uti..
I do this:
a = 'hello'
And now I just want an independent copy of a:
import copy
b = str(a)
c = a[:]
d = a + ''
e = copy.copy(a)
map( id, [ a,b,c,d,e ] )
Out[3]:
[4365576160, 4365576160, 4365..
I've heard that putting a block element inside a inline element is a HTML sin:
<a href="http://www.mydomain.com"><div>
What we have here is a problem.
You see, an anchor element is an in..
I have written a javascript function that uses setInterval to manipulate a string every tenth of a second for a certain number of iterations.
function timer() {
var section = document.getElementB..
I'm trying to run testng via command line and I have following things in classpath:
testng jar, jar of compiled test case file, and other required jars.
testng.xml points to appropriate class in the..
I have an array building multiple instances of the following fields: <div class="checkbox_vm"> <input type="hidden" name="fk_row[]" value="<?php echo $i; ?>"> <input type..
I want to copy a CSV file to a Postgres table. There are about 100 columns in this table, so I do not want to rewrite them if I don't have to.
I am using the \copy table from 'table.csv' delimiter ',..
I've CSV file (around 10,000 rows ; each row having 300 columns) stored on LINUX server.
I want to break this CSV file into 500 CSV files of 20 records each. (Each having same CSV header as present i..
I'm working on a JavaScript dynamically loaded tree view user control. I'd like to test it with real world data.
Does anybody know any public service with an API that provides access to hierarchical ..
Please explain the difference between x86, x32 and x64? Its a bit confusing when it comes to x86 and x32 because most of the time 32-bit programs run on x86... ..
How can I check if any of the strings in an array exists in another string?
Like:
a = ['a', 'b', 'c']
str = "a123"
if a in str:
print "some of the strings found in str"
else:
print "no strings f..
I'm new to C#.
I know in vb.net, i can do this:
Dim guid as string = System.Guid.NewGuid.ToString
In C#, I'm trying to do
String guid = System.Guid.NewGuid().ToString;
but i get an "Cannot co..
I am writing a prototype TCP connection and I am having some trouble homogenizing the data to be sent.
At the moment, I am sending nothing but strings, but in the future we want to be able to send an..
The example I see posted all of the time seems like it's suboptimal, because it involves concatenating strings, which seems so not jQuery. It usually looks like this:
$.getJSON("/Admin/GetFolderList/..
The following JSF code contains two separate <c:if></c:if>. Let's look at it.
<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="ht..
Now I am totally confused by this error message: Android library projects cannot be launched.
I carefully checked the build path and library, everything seems "OK", and there is no error on Problems..
I have read in an XML email attachment with
bytes_string=part.get_payload(decode=False)
The payload comes in as a byte string, as my variable name suggests.
I am trying to use the recommended Pyth..
I'm trying to submit my first app in iOS. I have entered iOS Provisioning Portal and I am about to create an app ID.
Lets say that I name my bundle identifier:
com.mycompany.appdemo
Then going to..
I am facing a problem with overlaying a 100% height div. I could use position fixed to solve the cover, but that's not really what I want because you should be able to scroll down on the 'cover' > so ..
I have a working code here: http://jsfiddle.net/WVm5d/ (you might need to make the result window bigger to see the align center effect)
Question
The code works fine but I don't like to have display:..
I've done some stuff like: FILE* a = fopen("a.txt", "w"); const char* data = "abc123"; fwrite(data, 6, 1, a); fclose(a); and then in the generated text file, it says "abc123" just like expected. Bu..
When script tries to access a frame from a different origin Chrome blocks it and throws exception as
"Uncaught SecurityError: Blocked a frame with origin 'provider domain' from accessing a frame ..
While running an app on the virtual device (AVD) created on Android studio (in Windows 10), I am getting an error and panic.
Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_RO..
Since I received no positives answers to my last question. I will try to write a Java FTP upload applet myself.
My question is: "Can you recommend a Java FTP client library for me to use?"
I want it..
I am trying to push
data.push({"country": "IN"});
as new id and value to a json string. but it gives the following error
Uncaught TypeError: data.push is not a function
data{"name":"ananta","age..
I'm trying to run a web service using PHP & SOAP, but all I'm getting so far is this:
(SoapFault)[2] message which states: 'SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/MyReg..
I'm trying to mix background-image and background-size properties in a shorthanded background property. Based on W3C documentation background-size should come after background-position property separa..
I have a page with a lot of textboxes. When someone clicks a link, i want a word or two to be inserted where the cursor is, or appended to the textbox which has the focus.
For example, if the cursor..
I have custom designed EditText
search_page.xml
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:p..
For example if I have this:
n = c(2, 3, 5)
s = c("aa", "bb", "cc")
b = c(TRUE, FALSE, TRUE)
df = data.frame(n, s, b)
n s b
1 2 aa TRUE
2 3 bb FALSE
3 5 cc TRUE
Then how do I combine th..
I am developing an application using a toggle button, I entered 1 or 0 in EditText. When button is clicked, the toggle button has to change if I enter 1 the toggle button shows TOGGLE ON, if I enter 0..
Suppose you maintain a library that exposes a function getData. Your users call it to get actual data:
var output = getData();
Under the hood data is saved in a file so you implemented getData using N..
I want to insert special character & in my insert statement. My insert is:
INSERT INTO STUDENT(name, class_id) VALUES ('Samantha', 'Java_22 & Oracle_14');
If I try to run this query I am ge..
I am using Visual Studio Code on my Windows 10 PC. I want to change my default terminal from Windows PowerShell to Bash on Ubuntu (on Windows).
How can I do that?..
I've always loved trees, that nice O(n*log(n)) and the tidiness of them. However, every software engineer I've ever known has asked me pointedly why I would use a TreeSet. From a CS background, I don'..
I've installed ELMAH 1.1 .Net 3.5 x64 in my ASP.NET project and now I'm getting this error (whenever I try to see any page):
Could not load file or assembly
'System.Data.SQLite, Version=1.0.61.0..