General question: What's the proper way to reverse a stream? Assuming that we don't know what type of elements that stream consists of, what's the generic way to reverse any stream?
Specific question..
I often see JavaScript code which checks for undefined parameters etc. this way:
if (typeof input !== "undefined") {
// do stuff
}
This seems kind of wasteful, since it involves both a type loo..
If I wanted to programatically assign a property to an object in Javascript, I would do it like this:
var obj = {};
obj.prop = "value";
But in TypeScript, this generates an error:
The property ..
I have an XML document that I would like to update after it already contains data.
I thought about opening the XML file in "a" (append) mode. The problem is that the new data will be written after th..
What exactly is the difference between array_map, array_walk and array_filter. What I could see from documentation is that you could pass a callback function to perform an action on the supplied array..
Normally I would start a command like
longcommand &;
I know you can redirect it by doing something like
longcommand > /dev/null;
for instance to get rid of the output or
longcommand 2&g..
I want to create a directory if it does not exist already.
Is using the is_dir function enough for that purpose?
if ( !is_dir( $dir ) ) {
mkdir( $dir );
}
Or should I combine is_dir with f..
I noticed that after installing cdt, Eclipse always loads the default workspace. The workspace listed in the config.ini in osgi.instance.area.default. Eclipse does not ask which workspace to open rega..
Please take a look at the following code:
$this->session->set_flashdata('message', 'This is a message.');
var_dump($this->session->flashdata('message'));
It returns bool(false).
I hope..
What is this double-colon ::? E.g. Foo::Bar.
I found a definition:
The :: is a unary operator that allows: constants, instance methods and class methods defined within a class or module, to be a..
Does anyone know how to achieve the cover-flow effect using JavaScript to scroll through a bunch of images. I'm not talking about the 3D rotating itunes cover-art, but the effect that happens when yo..
I have a website where I need to update a status.
Like for a flight, you are departing, cruise or landed.
I want to be able to refresh the status without having my viewers to have and reload the whole..
I want to combine two OR-queries with AND in Monoose, like in this SQL statement:
SELECT * FROM ... WHERE (a = 1 OR b = 1) AND (c=1 OR d=1)
I tried this in a NodeJS module which only gets the model..
I am trying to "import existing project into workspace". As the "root directory" I select the directory where all my .java (and .class) files are located. Eclipse writes me that "no projects are found..
I have SQL Server database and I just realized that I can change the type of one of the columns from int to bool.
How can I do that without losing the data that is already entered into that table? ..
I am trying to make an upload to YouTube from my Java based web app, I spent a few days to understand what and where is the problem and I cannot get it, for now I am pulling my hair out off my head.
..
In Qt I'm trying to set a QTimer that calls a function called "update" every second. Here is my .cpp file:
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QTimer>
#include "QDebug"..
I am working on MySQL 5.5 and trying to do index rebuild using an OPTIMIZE TABLE query. I am getting the error below:
Table does not support optimize, doing recreate + analyze instead
What does ..
I'm trying to create a Crystal Reports formula field (to calculate the percentage change in a price) that will return "N/A" if a particular report field is null, but return a number to two decimal pla..
Is there any significant difference between the two python keywords continue and pass like in the examples
for element in some_list:
if not element:
pass
and
for element in some_list:
..
I want to be able to list only the directories inside some folder.
This means I don't want filenames listed, nor do I want additional sub-folders.
Let's see if an example helps. In the current direct..
I write a fair amount of linq in my day to day life, but mostly simple statements. I have noticed that when using where clauses, there are many ways to write them and each have the same results as fa..
Is there a way to tell curl command not to use server's side cache?
e.g; I have this curl command:
curl -v www.example.com
how can I ask curl to send a fresh request to not use the cache?
Note: I ..
I want to grab the last two numbers (one int, one float; followed by optional whitespace) and print only them.
Example:
foo bar <foo> bla 1 2 3.4
Should print:
2 3.4
So far, I have the fo..
Is it possible in Hibernate to print generated SQL queries with real values instead of question marks?
How would you suggest to print queries with real values if it is not possible with Hibernate API..
Following the javadocs, I have tried to scale a BufferedImage without success here is my code:
BufferedImage image = MatrixToImageWriter.getBufferedImage(encoded);
Graphics2D grph = image.createGraph..
I have to face a new little project. It will have about 7 or 9 tables, the biggest of them will grow by a max rate of 1000 rows a month.
I thought about SQLite as my db... But i will need to protect ..
How can I connect wireless network adapter to wmvare workstation ?(My Host OS is Win Seven Ultimate, my Guest OS is Fedora 13 & my VMWare version is 6.5.0)
I'm running win seven on my Dell Vostro ..
How do I alter column in sqlite?
This is in Postgresql
ALTER TABLE books_book ALTER COLUMN publication_date DROP NOT NULL;
I believe there is no ALTER COLUMN in sqlite at all, only ALTER TABLE is s..
I have pushed a view onto the navigation controller and when I press the back button it goes to the previous view automatically. I want to do a few things when back button is pressed before popping th..
This is in Notes 8.5 environment.
I just wanted to know how to attach an email to another email as real attachment not a "Document Link".
I intended to attach an email, so I drag & dropped an e..
On Linux, I have a directory with lots of files. Some of them have non-ASCII characters, but they are all valid UTF-8. One program has a bug that prevents it working with non-ASCII filenames, and I ha..
I have used the following without success. The active workbook closes, indeed, but the excel window remains open.
Application.ActiveWindow.Close SaveChanges:=False
ActiveWorkbook.Close SaveChanges:=F..
I'm attempting to read a CSV file into a Dataframe in Pandas. When I try to do that, I get the following error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 55: invalid sta..
I'm writing a bash script where I need to pass a string containing spaces to a function in my bash script.
For example:
#!/bin/bash
myFunction
{
echo $1
echo $2
echo $3
}
myFunction "f..
What's wrong? I want to change the opacity if #nav .drop is display:block;
jQuery(document).ready(function(){
if (jQuery('#nav .drop').css('display') === 'block') {
jQuery('#main').css('o..
I'm trying to understand how I can achieve this. Can anyone advise me or point me in the right direction?
What I currently do, which is shown in the code snippet below, allows me to display 1 error f..
I am building something called the "HTML Quiz". It's completely ran on JavaScript and it's pretty cool.
At the end, a results box pops up that says "Your Results:" and it shows how much time they too..
My situation is this... someone working on the same repo has deleted a branch from his local & remote repo...
Most people who have asked about this kind of problem on Stack Overflow, or other sit..
i just installed sql server 2008 r2 and SQL Server Management Studio.
After installation i found that the SQL Server Management Studio has not been installed.
i wanted to install SQL Server Managemen..
All previous version of SQL Server Express were available in both web and full downloads. But I cannot find full download of SQL Server® 2016 Express. Does it exist?
Asked the same question on MSDN ..
How do I programmatically set the InitialViewController for a Storyboard? I want to open my storyboard to a different view depending on some condition which may vary from launch to launch...
I have searched high and low and get a lot of different solutions and variables containing info to get the absolute path. But they seem to work under some conditions and not under others. Is there o..
I have two String fields which represent Dates in my page and I would like to compare these two fields to know if my first date < second date. How can I do this?
<tr>
<td align="right..
I need to produce fixed length string to generate a character position based file. The missing characters must be filled with space character.
As an example, the field CITY has a fixed length of 15 ..
I'm trying to build folders to store data pulls. I want to label the folders with the day of that data in the pull.
Ex. I pull 5 days ago data from mysql i want to name the folder the date from 5 day..
I am very new to R, and I could not find a simple example online of how to remove the last n characters from every element of a vector (array?)
I come from a Java background, so what I would like to..
I have to .unbind() all elements from a parent node.
How can I select all children (at any level) from a parent?
Tried :
$('#google_translate_element *').unbind('click');
but it works only for th..
I have an app.js node application. As this file is starting to grow, I would like to move some part of the code in some other files that I would "require" or "include" in the app.js file.
I'm trying ..
I have reinstalled XAMPP for some reason and MySQL is not working, giving the following error in the console:
01:56:03 [mysql] Error: MySQL shutdown unexpectedly.
01:56:03 [mysql] This may be d..
I am trying to build a web application using PHP and I am using memcached for storing user data from the DB.
For example lets say that I have this code:
$sql = "SELECT * FROM users WHERE user_id..
Is there a method I can use for a div to extend to full height? I've got a sticky footer in it as well.
Here's the web page: Website removed. The middle bit I'm talking about is the white div, midcon..
I'm trying a simple thing like
detector = cv2.SIFT()
and get this bad error
detector = cv2.SIFT()
AttributeError: 'module' object has no attribute 'SIFT'
I do not understand that because cv2 is ..
Is there an easy way to print out a Perl array with commas in between each element?
Writing a for loop to do it is pretty easy but not quite elegant....if that makes sense...
In C# ASP.net, could someone show me how I can write entries from an Array/List to a CSV file on the server and then open the file? I think the second part would be something like - Response.Redirect(..
So I've been searching and searching for guidance in this with no avail.
Basically, I just want to have a sidebar, but when the screen gets small, aka smartphones screen size, it transforms into a na..
I want to get current timestamp in laravel 5 and I have done this-
$current_time = Carbon\Carbon::now()->toDateTimeString();
I am getting eror- 'Carbon not found'-
What can I do?
Can anyone ..
this is the error Fatal error: Call to undefined function assign(
this is the code, as you can see i obviously have defined the function so why is it not working
class shades {
function create($n..
I have installed JDK 8 and trying to run Eclipse. I am getting following warning message:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m;
support was removed in 8.0
Wh..
Is it possible to have more than one version of Xcode installed at the same time?
If so, please post any tip, tricks, or potential issues to watch out for.
EDIT:
The reason I want to install multi..
I've got the following plots:
It would look nicer if they have the same width. Do you have any idea how to do it in ipython notebook when I am using %matplotlib inline?
UPDATE:
To generate both f..
I accidentally installed the PowerPC version of MySQL on my Intel Mac in Snow Leopard, and it installed without a problem but of course doesn't run properly. I just didn't pay enough attention. Now wh..
Which one of the following queries is faster (LIKE vs CONTAINS)?
SELECT * FROM table WHERE Column LIKE '%test%';
or
SELECT * FROM table WHERE Contains(Column, "test");
..
I have a submit button at the end of the form.
I have added the following condition to the submit button:
onClick="this.disabled=true;
this.value='Sending…';
this.form.submit();"
But when it mov..
Is it possible to split a PowerShell command line over multiple lines?
In Visual Basic I can use the underscore (_) to continue the command in the next line...
I have a class Items with properties (Id, Name, Code, Price).
The List of Items is populated with duplicated items.
For ex.:
1 Item1 IT00001 $100
2 Item2 IT0000..
I know I can write a query that will return all rows that contain any number of values in a given column, like so:
Select * from tbl where my_col in (val1, val2, val3,... valn)
but if val1, for exa..
I am using sweet-alert plugin to display an alert. With a classical config (defaults), everything goes OK. But when I want to add a HTML tag into the TEXT, it display <b>...</b> without ma..
The MainActivity contains some buttons. Each button opens a new activity via an intent. These activities then have a button to return to the MainActivity via an intent.
But when I press a button to r..
I love to use git diff -w to ignore whitespace differences. But, I just noticed that it ignores even whitespace differences in the middle of lines. How could I only ignore whitespace differences that ..
I'm trying to parse some JSON data from the Google AJAX Search API. I have this URL and I'd like to break it down so that the results are displayed. I've currently written this code, but I'm pretty lo..
I get following error when trying to access Xampp from a network I've tried but does not get any idea how to resolve it. Any help??I really confused
Access Forbidden :
Access to the requested Object ..
I'm looking for some succinct, modern C# code to generate a random date between Jan 1 1995 and the current date.
I'm thinking some solution that utilizes Enumerable.Range somehow may make this more s..
How do you calculate the least common multiple of multiple numbers?
So far I've only been able to calculate it between two numbers. But have no idea how to expand it to calculate 3 or more numbers.
..
Is there a way to open a file for both reading and writing?
As a workaround, I open the file for writing, close it, then open it again for reading. But is there a way to open a file for both reading ..
We have installed applications programmatically.
If the application is already installed in the device the application is open automatically.
Otherwise install the particular application.
Guide Me..
Possible Duplicate:
PHP page redirect
how do i redirect to another page in php, once a process is finished.
for example my <form> tag sets the action attribute to "process.php". Afte..
What are the main differences between Hibernate and Spring Data JPA? When should we not use Hibernate or Spring Data JPA? Also, when may Spring JDBC template perform better than Hibernate / Spring Dat..
I continually get these errors when I try to update tables based on another table. I end up rewriting the query, change the order of joins, change some groupings and then it eventually works, but I ju..
How do I write an SQL script to create a ROLE in PostgreSQL 9.1, but without raising an error if it already exists?
The current script simply has:
CREATE ROLE my_user LOGIN PASSWORD 'my_password';
..
I am working on a Java EE Application in a Windows environment. (I am using Windows 7)
I am using Tomcat Server, unfortunately port number 8080 is busy (used by Oracle). Now I want to assign a differ..
CString is quite handy, while std::string is more compatible with STL container. I am using hash_map. However, hash_map does not support CStrings as keys, so I want to convert the CString into a std::..
I have a problem with list within a class in python. Here's my code :
class Residues:
def setdata(self, name):
self.name = name
self.atoms = list()
a = atom
C = Residues()
C.atom..
Please correct me if I'm wrong.
I'm new to mobile development and I would like to develop an app to submit to the apple store.
But I am heavily discouraged by the prices of the macs that I am develo..
I've seen this asked several times, but not with a good resolution. I have the following string:
$string = "<p>Résumé</p>";
I want to print or echo the string, but the output will ret..
I have a PL/SQL function (running on Oracle 10g) in which I update some rows. Is there a way to find out how many rows were affected by the UPDATE? When executing the query manually it tells me how ma..
How can I send data from one activity (intent) to another?
I use this code to send data:
Intent i=new Intent(context,SendMessage.class);
i.putExtra("id", user.getUserAccountId()+"");
i.putExtra("nam..
I am trying to import an image file in one of my react component. I have the project setup with web pack
Here's my code for the component
import Diamond from '../../assets/linux_logo.jpg';
export..
I am trying to understand the differences between Insertion Sort and Selection Sort.
They both seem to have two components: an unsorted list and a sorted list. They both seem to take one element from..
Is there a built-in function in Python that would replace (or remove, whatever) the extension of a filename (if it has one)?
Example:
print replace_extension('/home/user/somefile.txt', '.jpg')
In my ..
I'm new to android with almost no knowledge about Java and XML.
I'm learning it through pdfs that i'm getting on net.
I have learnt about Toast, a bit about Intents but me not able to understand anyth..
On an Amazon S3 Linux instance, I have two scripts called start_my_app and stop_my_app which start and stop forever (which in turn runs my Node.js application). I use these scripts to manually start a..
This seems rather obvious, but I can't seem to figure out how to convert an index of data frame to a column?
For example:
df=
gi ptt_loc
0 384444683 593
1 384444684 594..
I have PyCharm 1.5.4 and have used the "Open Directory" option to open the contents of a folder in the IDE.
I have Python version 3.2 selected (it shows up under the "External Libraries" node).
How ..
I'm using SQL Server 2008. Say I create a temporary table like this one:
create table #MyTempTable (col1 int,col2 varchar(10))
How can I retrieve the list of fields dynamically? I would like to see..
I am looking for a way in LINQ to match the follow SQL Query.
Select max(uid) as uid, Serial_Number from Table Group BY Serial_Number
Really looking for some help on this one. The above query gets..
I use Git in Windows, and want to push the executable shell script into git repo by one commit.
Usually I need to do two steps (git commit).
$ vi install.sh
$ git add install.sh
$ git commit -am "..
I have a simple html multi select drop down list:
<select id="transactionType" multiple="multiple" size="10">
<option value="ALLOC">ALLOC</option>
<option value="LOAD1">LO..
I have a maven project that builds with no problems from the command line. However, when I build it with IntelliJ, I get the error:
java: FileName.java:89: cannot find symbol
symbol : variable log
..
So I just installed Ubuntu, and this is my first time working in a Linux environment, so bear with my noobishness here.
Anyway, I downloaded the Java 8 JDK directly from Oracle, but I understand ther..
I'm currently working on a data set which is formatted as a table, with headers. What I need to do is cycle through all cells in a specific column and change the contents. Through research on MSDN I..
I have the following SQL:(bitemp)
SELECT COUNT (*) AS Count
FROM Table T
WHERE (T.Update_time =
(SELECT MAX (B.Update_time )
FROM Table B
WHERE (B.Id = T.Id))..
I would like to use cron on my Mac. I choose it over launchd, because I want to be able to use my new knowledge on Linux as well. However, I cannot seem to get the crontab -e command to work. It fires..
I'm looking for an implementation of CRC32 in C or C++ that is explicitly licensed as being no cost or public domain. The implementation here seems nice, but the only thing it says about the license ..
I am using the imgscalr Java library to resize an image .
The result of a resize() method call is a BufferedImage object. I now want to save this as a file (usually .jpg).
How can I do that? I want ..
I'm on Linux command line and I have file with
127.0.0.1
128.0.0.0
121.121.33.111
I want
127.0.0.1:80
128.0.0.0:80
121.121.33.111:80
I remember my colleagues were using sed for that, but after r..
I would like to calculate the exact location of a mobile device inside a building ( so no GPS access)
I want to do this using the signal strength(in dBm) of at least 3 fixed wifi signals(3 fixed rout..
I am unable to clone HTTPS repositories. I can clone SSH repos fine, but not HTTPS repos. I cannot test the GIT protocol since I am behind a corporate firewall.
This is what I am trying to do:
$ git..
I am using Mongoose with my Node.js app and this is my configuration:
mongoose.connect(process.env.MONGO_URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
use..
Hello Stackoverflowers,
I'm trying to use a button, that first goes to another excel file in a specific directory. While performing something, I want to add a row in a sheet the excel file i'm runnin..
I have a text input and I don't want to allow users to use spaces, and everything typed will be turned into lowercase.
I know I'm not allowed to use filters on ng-model eg.
ng-model='tags | lowercas..
I want to close a Excel 2010 file with VBA..
but when the code runs, it shows a prompt confirmation....
i dont want to see this prompt..
didnt work:
Application.DisplayAlerts = False
ActiveWorkbook..
Assume I have a histogram script that builds a 960 500 svg graphic. How do I make this responsive so on resize the graphic widths and heights are dynamic?
<script>
var n = 10000, // number of..
This is probably easy, but I have the following data:
In data frame 1:
index dat1
0 9
1 5
In data frame 2:
index dat2
0 7
1 6
I want a data frame with the following form:
index..
I have a .submit() event set up for form submission. I also have multiple forms on the page, but just one here for this example. I'd like to know which submit button was clicked without applying a ...
So I have a generic list, and an oldIndex and a newIndex value.
I want to move the item at oldIndex, to newIndex...as simply as possible.
Any suggestions?
Note
The item should be end up between th..
How can I programmatically scroll to a specific position in a ListView?
For example, I have a String[] {A,B,C,D....}, and I need to set the top visible item of the ListView to the index 21 of my Stri..
I've been trying to figure out how to run a bash command in a new Max OS X Terminal.app window. As, an example, here's how I would run my command in a new bash process:
bash -c "my command here"
Bu..
I would like to start a stopped Docker container with a different command, as the default command crashes - meaning I can't start the container and then use 'docker exec'.
Basically I would like to ..
I am trying to know how many files there are in 1 specific folder with .xls extension.
I read hundreds of examples with message boxes, but that is not what I'm looking for.
I just want to have the num..
When I make an Intellij project, I keep getting the following out of memory error.
I already increased my heap size in idea.vmoptions:
-Xms128m
-Xmx2048m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCache..
I am going to make a RESTful call in Java. However, I don't know how to make the call. Do I need to use the URLConnection or others? Can anyone help me. thank you...
What I am trying to do is embed a website into mine. When you search something on their page their embed site redirects through their pages though it will still be on my web page. Any help will be app..
I'm trying to use the following validation logic in a batch file but the "usage" block never executes even when no parameter is supplied to the batch file.
if ("%1"=="") goto usage
@echo This should..
I am having this issue where I am using the Android's Holo theme on a tablet project. However, I have a fragment on screen which has a white background. I am adding an EditText component on this fragm..
As I understand it, in Linq the method FirstOrDefault() can return a Default value of something other than null. What I haven't worked out is what kind of things other than null can be returned by th..
I want to build a blade view from 3 tables:
"inputs_details" - fields: article_type (values: 'p' for product,'s' for service), article_id, ....
"products" - fields: id, name
"services" - fields: id,..
If I want to use the BatchNormalization function in Keras, then do I need to call it once only at the beginning?
I read this documentation for it: http://keras.io/layers/normalization/
I don't see w..
Could anyone tell me how to start new line with space for next line in Html.fromHtml for text view in android?
I used <br> tag for next line; I can't achieve to give space because wi..
I have two dictionaries, but for simplification, I will take these two:
>>> x = dict(a=1, b=2)
>>> y = dict(a=2, b=2)
Now, I want to compare whether each key, value pair in x has ..
This is probably a simple where clause but I want to say, from columnX (which is datetime) I want all rows where just the year = 2010.
so:
select * from mytable where Columnx =
..
If I put the following line in a index.html file, to make Apache include the index.php file:
<?php include("/Live/ls_client/index.php"); ?>
visiting the index.html page shows me this:
..
OS: Mac OS X 10.7.5
Python Ver: 2.7.5
I have installed setuptools 1.0 with ez_setup.py from https://pypi.python.org/pypi/setuptools
Then I download pip.1.4.1 pkg from https://pypi.python.org/pypi/pi..
Having a look on the PHP documentation, the following two methods of the DateTime object would both seem to solve my problem:
DateTime::diff : Get the difference and use that to determine which is m..
I'm trying to install TensorFlow using pip:
$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching dist..
Allergro is an open souce C++ addon library for graphics manipulation. How do I add this library to my compiler?
The instructions don't work for me as I have Windows 7. I don't know if the OS matters..
I have been reading online and some places say it isn't possible, some say it is and then give an example and others refute the example, etc.
How do I declare a 2 dimensional array in JavaScript? (..
I am running an android 4.0.3 device, and I want to extract the back up file created by :
adb backup -f ~/data.ab -noapk app.package.name
The above line works inside the CMD (windows) and I am able..
How can I set a Hibernate Parameter to "null"? Example:
Query query = getSession().createQuery("from CountryDTO c where c.status = :status and c.type =:type")
.setParameter("status", status, Hiberna..
I'm using Twitter Bootstrap's popover on the dynamic list. The list item has a button, when I click the button, it should show up popover. It works fine when I tested on non-dynamic.
this is my Jav..
I would like to be able to either blur or dim the background when I show my popup window using popup.showAtLocation, and unblur/dim the background when popup.dismiss is called.
I have tried applying ..
In Java, you can define multiple top level classes in a single file, providing that at most one of these is public (see JLS §7.6). See below for example.
Is there a tidy name for this technique (a..
I'm trying to get a gradient applied to an SVG rect element.
Currently, I'm using the fill attribute. In my CSS file:
rect {
cursor: pointer;
shape-rendering: crispEdges;
fill: #a71a2e;
..
Ok...I dont know where module x is, but I know that I need to get the path to the directory two levels up.
So, is there a more elegant way to do:
import os
two_up = os.path.dirname(os.path.dirname(_..
I want to display a progress bar while doing some work, but that would hang the UI and the progress bar won't update.
I have a WinForm ProgressForm with a ProgressBar that will continue indefinitely ..
I created the following Oracle Directory csvDir:
create or replace directory csvDir as
'd:\oracle\oradata\external_data\downloadedFiles';
Now, how can I retrieve the path from this csvDir alias?
..
From what I've ready you should be able to use the 'value' property of a file input field to get the currently set path of that field. But when I do this:
$('#fileinput').value()
I get 'undefined..
I have the following html...
<div class="header"></div>
<div class="main"></div>
<div class="footer"></div>
And following css...
.header{
position: fixed;
backg..
I'm working on a code that prints out duplicated integers from an array with the number of their occurrence. I'm not allowed to use LINQ, just a simple code. I think I'm so close but confused about ho..
I have the jre7 and jdk1.7.0 installed along with the Tomcat 7.0 but it shows this error. servlet.http is not the only one that "does not exist", there are also other (servlet.) components.
Can anybo..
I want to run a python script and capture the output on a text file as well as want to show on console.
I want to specify it as a property of the python script itself. NOT to use the command echo "h..
I'm trying to get a default vibrate and sound alert when my notification comes in, but so far no luck. I imagine it's something to do with the way I set the defaults, but I'm unsure of how to fix it. ..
I just made changes to a branch. How can I commit the changes to the other branch?
I am trying to use:
git checkout "the commmit to the changed branch" -b "the other branch"
However, I don't think..
I selected console application as my C# project. But the imports that seemed to work under windows form project doesnt seem to work here. It says that the drawing namespace does not exist.
using Syst..
From what I understand, Git doesn't really need to track file rename/move/copy operations, so what's the real purpose
of git mv? The man page isn't specially descriptive...
Is it obsolete? Is it an in..
I am using laravel 5. I have try to use the
$now = DateTime();
$timestamp = $now->getTimestamp();
But it shows error likes this.
FatalErrorException in ProjectsController.php line 70:
Call ..
Initial Attempt
I have an Azure VM with Windows Server 2012, on which I just installed SQL Server 2012 Express Database Engine component. Then, I followed the instructions here to connect remotely wi..
I tried to do a lot of research but I'm more of a db guy - so even the explanation in the MSDN doesn't make any sense to me. Can anyone please explain, and provide some examples on what Include() stat..
Using plain JavaScript (not jQuery), Is there any way to check if an element contains a class?
Currently, I'm doing this:
_x000D_
_x000D_
var test = document.getElementById("test");_x000D_
var testC..
How can I unset/remove an element from an array in Apple's new language Swift?
Here's some code:
let animals = ["cats", "dogs", "chimps", "moose"]
How could the element animals[2] be removed from ..
I've just installed a Laravel 5 project on MAMP and my pages are not finding the css files.
This is the link to my css in my app.blade.php file:
<link href="/css/app.css" rel="stylesheet">
A..
I am learning about the wonders of JdbcTemplate and NamedParameterJdbcTemplate. I like what I see, but is there any easy way to see the underlying SQL that it ends up executing? I'd like to see this f..
I'm using:
FileInfo(
System.Environment.GetFolderPath(
System.Environment.SpecialFolder.ProgramFiles)
+ @"\MyInstalledApp"
In order to determine if a program is detected on a users..
I've created an RSA public key and I want to add that to authorized_keys file, but there is no such file in my Ubuntu 11.10 machine.
How can I add the key to authorized_keys?..
I am writing a bash shell script to display if a process is running or not.
So far, I got this:
printf "%-50s %s\n" $PROC_NAME [UP]
The code gives me this output:
JBoss ..
Recently, I ran some of my JavaScript code through Crockford's JSLint, and it gave the following error:
Problem at line 1 character 1: Missing "use strict" statement.
Doing some searching, I rea..
I'm looking at creating a basic ORM (purely for fun), and was wondering, is there a way to return the list of tables in a database and also the fields for every table?
Using this, I want to be able t..
Possible Duplicate:
Casting vs using the ‘as’ keyword in the CLR
I recently learned about a different way to cast. Rather than using
SomeClass someObject = (SomeClass) obj;
one can u..
So, I'm testing a component that relies on an event-emitter. To do so I came up with a solution using Promises with Mocha+Chai:
it('should transition with the correct event', (done) => {
const cF..
I'm playing with Typescript and I wonder, how to properly instantiate and declare multidimensional array. Here's my code:
class Something {
private things: Thing[][];
constructor() {
..
This is the try catch in PowerShell 2.0
$urls = "http://www.google.com", "http://none.greenjump.nl", "http://www.nu.nl"
$wc = New-Object System.Net.WebClient
foreach($url in $urls)
{
try
{
..
I have the following error with one of our web applications -
Query3 failed: Error writing file '/tmp/MY1fnqpm' (Errcode: 28) ... INSERT MailList... (removed the rest of the query for security reaso..
On my Wikipedia user page, I run a Wikipedia script that displays my statistics (number of pages edited, number of new pages, monthly activity, etc.).
I'd like to put this information on my blog.
I..
I have to download a git python repo and install since the pypi version is not updated.
Normally I would do this:
pip install mypackage
pip install mypackage[redis]
Now I have the repo cloned in t..
I've tried many examples of ng-repeat with orderBy, but I can't make my json work with it.
<div ng-app>
<script type="text/javascript" src="http://code.angularjs.org/1.0.1/angular-1.0.1...
currently I have the following:
$.ajax({
type: 'POST',
url: this.action,
data: $(this).serialize(),
});
This works fine, however I would like to add a value to data, so I tried
$.ajax(..
I am trying to develop a batch file which can automatically press left arrow and right arrow key for n number of times with some pause in between. Could anybody please help me with this?
P.S: I tried..
I am pulling a subset of data from a column based on conditions in another column being met.
I can get the correct values back but it is in pandas.core.frame.DataFrame. How do I convert that to list..
I have a tag <a href="#"> Previous </a> 1 2 3 4 <a href="#"> Next </a> and in some conditions I want this tag to be completely disabled.
Code from comments (this is how the li..
What would be the query for:
select s.* from Service s
inner join ServiceAssignment sa on sa.ServiceId = s.Id
where sa.LocationId = 1
in entity framework?
This is what I wrote:
var serv = (fro..
I need to convert PDF files to images. If the PDF file is multi-page,I just need one image that contains all of the PDF pages.
Is there an open source solution which is not charged like the Acrobat p..