Questions Tagged with #Hcalendar

hCalendar (short for HTML iCalendar) is a microformat standard for displaying a semantic (X)HTML representation of iCalendar-format calendar information

C# - Print dictionary

I have made a dictionary which contains two values a DateTime and a string. Now I want to print everything from the dictionary to a Textbox. Does anybody know how to do this. I have used this code to ..

Get day of week using NSDate

I created a method that is supposed to take in a string in "YYYY-MM-DD" form and spit out an int that represents the dates position in relation to the week it is in (regardless if it overlaps between ..

How to get the current time as datetime

Just started with the playground. I'm trying to create a simple app. I've created a date object like this: var date = NSDate() How can I get the current hour? In other languages I can do something..

How to get the selected date of a MonthCalendar control in C#

How to get the selected date of a MonthCalendar control in C# (Window forms)..

How do I get the current date in Cocoa

I'm getting started developing for the iPhone and as such I am looking at different tutorials online as well as trying some different things out myself. Currently, I'm trying to create a countdown unt..

Add CSS or JavaScript files to layout head from views or partial views

Layout pages head: <head> <link href="@Url.Content("~/Content/themes/base/Site.css")" rel="stylesheet" type="text/css" /> </head> A View (AnotherView) from the appli..

Can you do a partial checkout with Subversion?

If I had 20 directories under trunk/ with lots of files in each and only needed 3 of those directories, would it be possible to do a Subversion checkout with only those 3 directories under trunk?..

Using global variables in a function

How can I create or use a global variable in a function? If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable ..

Check cell for a specific letter or set of letters

In a Google Spreadsheet, I want to use a formula that will output a certain text or number if a certain cell contains certain letters. For example, if I put =IF(A1="Black";"YES";"NO") and A1 is equal..

Hyper-V: Create shared folder between host and guest with internal network

Set up: Host: Windows 10 Enterprise Guest: Windows 10 Professional Hypervisor: Hyper-V Aim: Create a shared folder between Host and Guest via an internal network to exchange files How can I ac..

How to change href of <a> tag on button click through javascript

How to change the href attribute value of an <a/> tag through Javascript on button click ? <script type="text/javascript"> function f1() { document.getElementById("abc").href="xyz..

Angular 2 TypeScript how to find element in Array

I have a Component and a Service: Component: _x000D_ _x000D_ export class WebUserProfileViewComponent {_x000D_ persons: Person [];_x000D_ personId: number;_x000D_ constructor( params: Rou..

How to set the timeout for a TcpClient?

I have a TcpClient which I use to send data to a listener on a remote computer. The remote computer will sometimes be on and sometimes off. Because of this, the TcpClient will fail to connect often. I..

Call child component method from parent class - Angular

I have created a child component which has a method I want to invoke. When I invoke this method it only fires the console.log() line, it will not set the test property?? Below is the quick start Ang..

ORA-29283: invalid file operation ORA-06512: at "SYS.UTL_FILE", line 536

Below is the code i use to extract data from a table to a flat file. BEGIN DECLARE file_name VARCHAR2(50); file_handle utl_file.file_type; BEGIN file_name := 'table.txt'; ..

justify-content property isn't working

I have an odd issue that I'm having trouble with. So I've been working on this prototype html5 template that uses flexbox. Though I've been running into one slight problem. I'm trying to a small space..

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

After downloading the EF6 by nuget and try to run my project, it returns the following error: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient..

g++ undefined reference to typeinfo

I just ran across the following error (and found the solution online, but it's not present in Stack Overflow): (.gnu.linkonce.[stuff]): undefined reference to [method] [object file]:(.gnu.link..

When do I need to use AtomicBoolean in Java?

How I can use AtomicBoolean and what is that class for?..

Android SDK is missing, out of date, or is missing templates. Please ensure you are using SDK version 22 or later

Possible duplicate, I just download a Android Studio Zip file like Eclipse, as I opened getting this error. But problem is how to update it?..

S3 Static Website Hosting Route All Paths to Index.html

I am using S3 to host a javascript app that will use HTML5 pushStates. The problem is if the user bookmarks any of the URLs, it will not resolve to anything. What I need is the ability to take all url..

How can you run a Java program without main method?

Possible Duplicate: Printing message on Console without using main() method Can someone suggest how can a JAVA program run without writing a main method.. For eg: System.out.println("Main..

Get file path of image on Android

I have an app that can make pictures and upload them. The upload requires the file path of the photo but I can't get it. This is my code: public void maakfoto (View v) { Intent cameraIntent..

Error: Argument is not a function, got undefined

Using AngularJS with Scala Play, I'm getting this error. Error: Argument 'MainCtrl' is not a function, got undefined I'm trying to create a table consisting of the days of the week. Please take..

Count number of records returned by group by

How do I count the number of records returned by a group by query, For eg: select count(*) from temptable group by column_1, column_2, column_3, column_4 Gives me, 1 1 2 I need to count the a..

What is Options +FollowSymLinks?

I am using a Lamp server on my computer. I started to use Laravel php framework. In my .htaccess , If I use Options +FollowSymLinks , I get 500 error. And If I comment out , I have to use index.php ..

How to write asynchronous functions for Node.js

I've tried to research on how exactly asynchronous functions should be written. After a lot of plowing through a lot of documentation, it's still unclear to me. How do I write asynchronous functions ..

Convert integer value to matching Java Enum

I've an enum like this: public enum PcapLinkType { DLT_NULL(0) DLT_EN10MB(1) DLT_EN3MB(2), DLT_AX25(3), /*snip, 200 more enums, not always consecutive.*/ DLT_UNKNOWN(-1); private fina..

How do I convert ticks to minutes?

I have a ticks value of 28000000000 which should be 480 minutes but how can I be sure? How do I convert a ticks value to minutes?..

How to execute an SSIS package from .NET?

I have a SSIS package that eventually I would like to pass parameters too, these parameters will come from a .NET application (VB or C#) so I was curious if anyone knows of how to do this, or better y..

Alternative to google finance api

I wanted to use Google Finance API to get stock data about the company but this API is deprecated since 2011/26/05. What do you use as free API to get stock data in real time?..

Color a table row with style="color:#fff" for displaying in an email

We would like to display order details as table in an email ?<table> <thead> <tr> <th>Header 1</th> <th>Header 2</th> ..

Java string to date conversion

What is the best way to convert a String in the format 'January 2, 2010' to a Date in Java? Ultimately, I want to break out the month, the day, and the year as integers so that I can use Date date =..

If Radio Button is selected, perform validation on Checkboxes

I'm trying to work this form so when the first radio button is selected, run a certain validation. When the second radio button is selected, run a different validation, etc. Currently using Alerts to ..

Android, Java: HTTP POST Request

I have to do a http post request to a web-service for authenticating the user with username and password. The Web-service guy gave me following information to construct HTTP Post request. POST /login..

Add all files to a commit except a single file?

I have a bunch of files in a changeset, but I want to specifically ignore a single modified file. Looks like this after git status: # modified: main/dontcheckmein.txt # deleted: main/plzcheckmei..

Thread-safe List<T> property

I want an implementation of List<T> as a property which can be used thread-safely without any doubt. Something like this: private List<T> _list; private List<T> MyT { get { //..

What is the difference between statically typed and dynamically typed languages?

I hear a lot that new programming languages are dynamically typed but what does it actually mean when we say a language is dynamically typed vs. statically typed?..

Write-Host => Export to a file

I have got a script with some commands such as Write-Host "Server1". How can I export it to a file? When I tried with script > export.txt it didn't work...

How to delete an instantiated object Python?

I am relatively new to object oriented programming and I cannot figure out how to delete an instantiated object in python. Any help would be much appreciated. if self.hit_paddle(pos) == True..

How do I merge a git tag onto a branch

I'm trying to find the syntax for merging a tagged commit onto another branch. I'm guessing that it's straight forward but my feeble search attempts aren't finding it...

Angular routerLink does not navigate to the corresponding component

My routing in the angular2 apps works well. But I am going to make some routeLink based on this: Here is my routing: const routes: RouterConfig = [ { path:'home' , component: FormComponent }, ..

In Javascript, how do I check if an array has duplicate values?

Possible Duplicate: Easiest way to find duplicate values in a javascript array How do I check if an array has duplicate values? If some elements in the array are the same, then return true..

Detect page change on DataTable

With DataTable I can order, list, do pagination but I want to detect when the pagination changes, I've seen the API but the only one I can do is change the page but no detect this change...

Should IBOutlets be strong or weak under ARC?

I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) be strong or weak? The following: @property (nonatomic, weak) IBOutlet UIButton *button; Would get rid..

Delayed function calls

Is there a nice simple method of delaying a function call whilst letting the thread continue executing? e.g. public void foo() { // Do stuff! // Delayed call to bar() after x number of ms ..

get everything between <tag> and </tag> with php

I'm trying to grab a string within a string using regex. I've looked and looked but I can't seem to get any of the examples I have to work. I need to grab the html tags <code> and </code> and ..

Python: how to capture image from webcam on click using OpenCV

I want to capture and save a number of images from my webcam using OpenCV. This is my code currently: import cv2 camera = cv2.VideoCapture(0) for i in range(10): return_value, image = camera.rea..

How to call C++ function from C?

I know this. Calling C function from C++: If my application was in C++ and I had to call functions from a library written in C. Then I would have used //main.cpp extern "C" void C_library_functio..

Multiple IF statements between number ranges

I'm trying to set up a formula with multiple IF statements between number ranges but I'm seeing the error: Formula parse error Here is the forumula: =IF((AND(A2>0,A2<500),"Less than 500",..

how to display full stored procedure code?

How do you view a stored procedure/function? Say I have an old function without the original definition - I want to see what it is doing in pg/psql but I can't seem to figure out a way to do that. u..

jQuery to remove an option from drop down list, given option's text/value

I have a drop down list and would like to remove an option from it, given the text/value of that particular option. Is it possible using jQuery? Just like 'append' which adds an option to the drop dow..

fatal error LNK1104: cannot open file 'kernel32.lib'

I've been getting this error ever since I installed the .NET Framework SDK for 64-bit programming on my Visual C++ 2010 Express compiler. I can't compile even a simple program at all because of this s..

How to enable C++17 compiling in Visual Studio?

I want to use C++17 features. How can I switch compiling from C++14 to C++17 in Microsoft Visual Studio? Or it's not avaiable in release versions of VS?..

How to delete a stash created with git stash create?

Git stash seems to do a lot of what I want, except that it is a little hard to script, as the if you have no changes, then git stash; git stash pop will do something different than if you do have chan..

How do I set default value of select box in angularjs

I have a form that is used to edit a object and I can't select a value in the select box. I have a json array which represents the to be edited and look like this: $scope.item = [{ "objec..

How to pass values arguments to modal.show() function in Bootstrap

I have a page the shows a list of local cafes. When the user clicks on a certain cafe, a modal dialog is shown, that already has the "cafe name" pre-filled. The page contains many cafe names, and the ..

Kill process by name?

I'm trying to kill a process (specifically iChat). On the command line, I use these commands: ps -A | grep iChat Then: kill -9 PID However, I'm not exactly sure how to translate these commands ..

convert double to int

What is the best way to convert a double to an int? Should a cast be used?..

Why am I getting "(304) Not Modified" error on some links when using HttpWebRequest?

Any ideas why on some links that I try to access using HttpWebRequest I am getting "The remote server returned an error: (304) Not Modified." in the code? The code I'm using is from Jeff's post here ..

Set content of HTML <span> with Javascript

In a webpage I am calling a WebService that gives me an integer value. I need to display this value in a block of text. I am currently using an HTML <span>. So far, I've found two methods of ..

How do I sort an observable collection?

I have a following class : [DataContract] public class Pair<TKey, TValue> : INotifyPropertyChanged, IDisposable { public Pair(TKey key, TValue value) { Key = key; Value ..

When saving, how can you check if a field has changed?

In my model I have : class Alias(MyBaseModel): remote_image = models.URLField(max_length=500, null=True, help_text="A URL that is downloaded and cached for the image. Only used when the alias is..

How to pass command line arguments to a shell alias?

How do I pass the command line arguments to an alias? Here is a sample: alias mkcd='mkdir $1; cd $1;' But in this case the $xx is getting translated at the alias creating time and not at runtime...

CRC32 C or C++ implementation

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 ..

Allowed memory size of 262144 bytes exhausted (tried to allocate 24576 bytes)

I was going crazy with this. I got the next message: Allowed memory size of 262144 bytes exhausted (tried to allocate 24576 bytes) TODO LIST Check phpinfo(), got the right php.ini route and edit..

How to configure encoding in Maven?

When I run maven install on my multi module maven project I always get the following output: [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!..

Excel VBA: function to turn activecell to bold

I have the following function inside my module. Function Colorize(myValue) ActiveCell.Select Selection.Font.Bold = True Colorize = myValue End Function The cell that will use this funct..

How to use IntelliJ IDEA to find all unused code?

When I am in a .java file the unused code is usually grayed out or has a green underline saying this code will probably (probably because of some weird JNI/Reflection corner cases) be unused. But I ha..

angular2: how to copy object into another object

Please help me in order to copy the object into another object using angular 2? In angular, I used angular.copy() to copy objects to the loose reference of the old objects. But, when I used the same i..

Call and receive output from Python script in Java?

What's the easiest way to execute a Python script from Java, and receive the output of that script? I've looked for different libraries like Jepp or Jython, but most appear out of date. Another proble..

VB.NET Switch Statement GoTo Case

I am writing some code in VB.NET that uses a switch statement but in one of the cases it needs to jump to another block. In C# it would look like this: switch (parameter) { case "userID": ..

How to take a first character from the string

Using VB.Net & SQL Server 2005 Dim S as string s = "Rajan" s = "Sajan" I want to take a first character from the string (s) Expected Output R S Need VB.Net Code Help..

Insert multiple lines into a file after specified pattern using shell script

I want to insert multiple lines into a file using shell script. Let us consider my input file contents are: input.txt: abcd accd cdef line web Now I have to insert four lines after the line 'cdef' ..

How can I parse a CSV string with JavaScript, which contains comma in data?

I have the following type of string var string = "'string, duppi, du', 23, lala" I want to split the string into an array on each comma, but only the commas outside the single quotation mar..

Ordering by the order of values in a SQL IN() clause

I am wondering if there is away (possibly a better way) to order by the order of the values in an IN() clause. The problem is that I have 2 queries, one that gets all of the IDs and the second that r..

Split Java String by New Line

I'm trying to split text in a JTextArea using a regex to split the String by \n However, this does not work and I also tried by \r\n|\r|n and many other combination of regexes. Code: public void inse..

How to change shape color dynamically?

I have <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#FFFF00"..

Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)

I have my first node.js app (runs fine locally) - but I am unable to deploy it via heroku (first time w/ heroku as well). The code is below. SO doesn't let me write so much code, so I would just say t..

jQuery - Get Width of Element when Not Visible (Display: None)

It seems like in jQuery when an element is not visible width() returns 0. Makes sense, but I need to get the width of a table in order to set the width of the parent before I show the parent. As not..

golang why don't we have a set datastructure

I'm trying to solve "The go programming lanaguage" exercise #1.4 which requires me to have a set. I can create a set type but why doesn't the language come with one ? go, having come from google, wher..

VirtualBox: mount.vboxsf: mounting failed with the error: No such device

I'm using VirtualBox with OS X as host and CentOS on the guest VM. In OS X I created folder myfolder, added it as shared folder to the VM, turned on the VM, in CentOS created folder /home/user/myfold..

Export a graph to .eps file with R

How do I export a graph to an .eps format file? I typically export my graphs to a .pdf file (using the 'pdf' function), and it works quite well. However, now I have to export to .eps files...

Implementing two interfaces in a class with same method. Which interface method is overridden?

Two interfaces with same method names and signatures. But implemented by a single class then how the compiler will identify the which method is for which interface? Ex: interface A{ int f(); } in..

Nginx not running with no error message

I am trying to start my nginx server. When I type "$> /etc/init.d/nginx start", I have a message appearing "Starting nginx:", and then nothing happens. There is no error message, and when I check the ..

How to make matrices in Python?

I've googled it and searched StackOverflow and YouTube.. I just can't get matrices in Python to click in my head. Can someone please help me? I'm just trying to create a basic 5x5 box that displays: ..

What is the purpose of "&&" in a shell command?

As far as I know, using & after the command is for running it in the background. Example of & usage: tar -czf file.tar.gz dirname & But how about &&? (look at this example: https..

Datatables - Search Box outside datatable

I'm using DataTables (datatables.net) and I would like my search box to be outside of the table (for example in my header div). Is this possible ?..

Android SDK installation doesn't find JDK

I'm trying to install the Android SDK on my Windows 7 x64 System. jdk-6u23-windows-x64.exe is installed, but the Android SDK setup refuses to proceed because it doesn't find the JDK installation. ..

Histogram using gnuplot?

I know how to create a histogram (just use "with boxes") in gnuplot if my .dat file already has properly binned data. Is there a way to take a list of numbers and have gnuplot provide a histogram base..

Regular Expression: Allow letters, numbers, and spaces (with at least one letter or number)

I'm currently using this regex ^[A-Z0-9 _]*$ to accept letters, numbers, spaces and underscores. I need to modify it to require at least one number or letter somewhere in the string. Any help would be..

How do I add a project as a dependency of another project?

There are two independent projects (myWarProject and MyEjbProject). So when I build the myWarProject I need to install the MyEjbProject in to the local repository, so then I can define in the myWarPro..

Bootstrap Align Image with text

I am trying to align an image on the left side with text using boostrap, and when page is viewed on mobile devices the images becomes centred on top of the text ! <div class="container"> <di..

How to run a shell script on a Unix console or Mac terminal?

I know it, forget it and relearn it again. Time to write it down...

Ruby String to Date Conversion

I am faced with an issue in Ruby on Rails. I am looking to convert a string of format Tue, 10 Aug 2010 01:20:19 -0400 (EDT) to a date object. Is there anyway i could do this. Here is what I've looke..

Algorithm to convert RGB to HSV and HSV to RGB in range 0-255 for both

I am looking for color space converter from RGB to HSV, specifically for the range 0 to 255 for both color spaces...

How can I set a website image that will show as preview on Facebook?

When you share a link on facebook it will automatically find images on the website and randomly picks one as a preview. How can you influence the preview image? When a person shares the website link o..

org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing

In my project I have User, Role, UserRole and BloodGroup entities. Firstly I take List<BloodGroup> from DB and set to User. Then I give User and Role entites to UserRole. After that I insert Use..

Merge 2 DataTables and store in a new one

If I have 2 DataTables (dtOne and dtTwo) and I want to merge them and put them in another DataTable (dtAll). How can I do this in C#? I tried the Merge statement on the datatable, but this returns v..

DATEDIFF function in Oracle

I need to use Oracle but DATEDIFF function doesn't work in Oracle DB. How to write the following code in Oracle? I saw some examples using INTERVAL or TRUNC. SELECT DATEDIFF ('2000-01-01','2000-01-..

How to force garbage collection in Java?

Is it possible to force garbage collection in Java, even if it is tricky to do? I know about System.gc(); and Runtime.gc(); but they only suggest to do GC. How can I force GC?..

Server configuration is missing in Eclipse

Im using Eclipse Galileo, and have configured it for Apache Tomcat . I have added Apache Tomcat 6.0 to Windows->Server->Runtime Environments, with the following settings: Tomcat Installation Director..

How to make div background color transparent in CSS

I'm not using CSS3. So I can't use opacity or filter attributes. Without using these attributes how can I make the background-color transparent of a div? It should be kind of the text box example in t..

Reading a resource file from within jar

I would like to read a resource from within my jar like so: File file; file = new File(getClass().getResource("/file.txt").toURI()); BufferedReader reader = new BufferedReader(new FileReader..

Chrome Uncaught Syntax Error: Unexpected Token ILLEGAL

Receiving the subject error when Chrome tries to load the script file on the page. It says it's at the last line of the javascript file. I can't seem to find anything wrong with it. No errors in firef..

How can I find out a file's MIME type (Content-Type)?

Is there a way to find out the MIME type (or is it called "Content-Type"?) of a file in a Linux bash script? The reason I need it is because ImageShack appears to need it to upload a file, as for som..

How do I check to see if a value is an integer in MySQL?

I see that within MySQL there are Cast() and Convert() functions to create integers from values, but is there any way to check to see if a value is an integer? Something like is_int() in PHP is what ..

How to pipe list of files returned by find command to cat to view all the files

I am doing a find and then getting a list of files. How do I pipe it to another utility like cat (so that cat displays the contents of all those files) and basically need to grep something from these ..

jquery function val() is not equivalent to "$(this).value="?

When I try to set a text input to blank (when clicked) using $(this).value="", this does not work. I have to use $(this).val(''). Why? What is the difference? What is the mechanism behind the val fun..

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed

I have a grid view on my page and I want to export it to the Excel Sheet, Below is the code I had written to do this task, here I am already passing the dataset to the method to bind the grid and btnE..

Online SQL Query Syntax Checker

I need an online sql query syntax validator. I searched online but didn't find anything good. I saw the references in this question too: Syntax Checker and Validator for SQL?..

Change connection string & reload app.config at run time

When I change the connection string using this code, it does not reload app.config at runtime. I expected it to reload similarly to how we reload app.config. config.ConnectionStrings.ConnectionString..

How to get PID of process by specifying process name and store it in a variable to use further?

By using "ucbps" command i am able to get all PIDs $ ucbps Userid PID CPU % Mem % FD Used Server Port ============================================================..

Delete rows containing specific strings in R

I would like to exclude lines containing a string "REVERSE", but my lines do not match exactly with the word, just contain it. My input data frame: Value Name 55 REVERSE223 22 ..

set the width of select2 input (through Angular-ui directive)

I have problem making this plunkr (select2 + angulat-ui) work. http://plnkr.co/edit/NkdWUO?p=preview In local setup, I get the select2 work, but I cannot set the width as described in the docs. ..

Angular 2 two way binding using ngModel is not working

Can't bind to 'ngModel' since it isn't a know property of the 'input' element and there are no matching directives with a corresponding property Note: im using alpha.31 import { Component, View, boo..

Big O, how do you calculate/approximate it?

Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity of..

How to deploy correctly when using Composer's develop / production switch?

Composer has the option to load several dependencies only while being in development, so the tools will not be installed in production (on the live server). This is (in theory) very handy for scripts ..

How to create a service running a .exe file on Windows 2012 Server?

I have created .exe in .net and want to use as a service, run all time on my local machine. I am using windows server 2012. how to setup a service on my local computer. **You can use windows shell sc..

Pandas concat: ValueError: Shape of passed values is blah, indices imply blah2

I'm trying to merge a (Pandas 14.1) dataframe and a series. The series should form a new column, with some NAs (since the index values of the series are a subset of the index values of the dataframe)...

How to import functions from different js file in a Vue+webpack+vue-loader project

(See end for why this is not a dupe of How do I include a JavaScript file in another JavaScript file?) Javascipt + Vue + webpack + vue-loader noob... stumbling on the simplest of things! I have App..

How to properly override clone method?

I need to implement a deep clone in one of my objects which has no superclass. What is the best way to handle the checked CloneNotSupportedException thrown by the superclass (which is Object)? A cow..

Web API optional parameters

I have a controller with the following signature: [Route("products/filter/{apc=apc}/{xpc=xpc}/{sku=sku}")] public IHttpActionResult Get(string apc, string xpc, int? sku) { ... } I call this method ..

How to link to specific line number on github

I know I can link to a specific line number on a file on a github repo (I'm sure I've seen this before)... Can someone tell me how to do this?..

How to identify unused CSS definitions from multiple CSS files in a project

A bunch of CSS files were pulled in and now I'm trying to clean things up a bit. How can I efficiently identify unused CSS definitions in a whole project?..

"android.view.WindowManager$BadTokenException: Unable to add window" on buider.show()

From my main activity, I need to call an inner class and in a method within the class, I need to show AlertDialog. After dismissing it, when the OK button is pressed, forward to Google Play for purcha..

Get a UTC timestamp

How can I get the current UTC timestamp in JavaScript? I want to do this so I can send timestamps from the client-side that are independent of their timezone...

"OSError: [Errno 1] Operation not permitted" when installing Scrapy in OSX 10.11 (El Capitan) (System Integrity Protection)

I'm trying to install Scrapy Python framework in OSX 10.11 (El Capitan) via pip. The installation script downloads the required modules and at some point returns the following error: OSError: [Errno ..

Safe Area of Xcode 9

While exploring Xcode9 Beta Found Safe Area on Interface builders View hierarchy viewer. Got curious and tried to know about Safe Area on Apples documentation, in gist the doc says "The the view area ..

Get form data in ReactJS

I have a simple form in my render function, like so: render : function() { return ( <form> <input type="text" name="email" placeholder="Email" /> <inp..

How do I read CSV data into a record array in NumPy?

I wonder if there is a direct way to import the contents of a CSV file into a record array, much in the way that R's read.table(), read.delim(), and read.csv() family imports data to R's data frame? ..

How to call a function after delay in Kotlin?

As the title, is there any way to call a function after delay (1 second for example) in Kotlin?..

Creating and appending text to txt file in VB.NET

Using VB.NET, I am trying to create a text file if it doesn't exist or append text to it if exists. For some reason, though it is creating the text file I am getting an error saying process cannot ac..

Create a asmx web service in C# using visual studio 2013

Hy, how can I create a asmx web service in Visual Studio 2013? I have found this short tutorial about that, but when I follow this in Visual Studio 2013 I get an error that says "the type 'Service1'..

How to deserialize JS date using Jackson?

I'm getting a date string from ExtJS in the format: "2011-04-08T09:00:00" when i try to deserialize this date, it changes the timezone to Indian Standard Time (adds +5:30 to the time) . This is..

How do I update a Python package?

I'm running Ubuntu 9:10 and a package called M2Crypto is installed (version is 0.19.1). I need to download, build and install the latest version of the M2Crypto package (0.20.2). The 0.19.1 package ..

Convert array of strings into a string in Java

I want the Java code for converting an array of strings into an string...

Running Google Maps v2 on the Android emulator

I've tried to implement Google Maps v2 in my Android application, but unfortunately instead of maps I get this message: Is it possible to run these maps on the Android emulator (Platform 4.2)?..

How do you automatically resize columns in a DataGridView control AND allow the user to resize the columns on that same grid?

I am populating a DataGridView control on a Windows Form (C# 2.0 not WPF). My goal is to display a grid that neatly fills all available width with cells - i.e. no unused (dark grey) areas down the ri..

Unable to launch the IIS Express Web server

I have an asp.net MVC 4 solution. When I try to open it using Visual studio 2012, I get following error: Microsoft Visual Studio Configuring Web https://localhost: for ASP.NET 4.5 failed. You..

Failed to install android-sdk: "java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema"

When installing the android sdk tools the following error is emitted: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema Why is this happening and how can it be fixed? Debug ou..

Don't change link color when a link is clicked

I have a link in an HTML page: <a href="#foo">foo</a> The color of the link text is originally blue. When the link is clicked, the color of the link text changes to Red first, and then ..

How to get first and last day of previous month (with timestamp) in SQL Server

I could not find the solution which gives first and last day of previous month with timestamp. Hope this helps others. If there is already a solution for this problem I apologize. Here is the solutio..

Get Hard disk serial Number

I want to get hard disk serial number. How I can I do that? I tried with two code but I am not getting StringCollection propNames = new StringCollection(); ManagementClass driveClass = new Management..

How to create a directory if it doesn't exist using Node.js?

Is this the right way to create a directory if it doesn't exist. It should have full permission for the script and readable by others. var dir = __dirname + '/upload'; if (!path.existsSync(dir)) { ..

NuGet Packages are missing

I searched this problem but none of the solutions worked. I have Visual Studio Professional 2015 installed and I am using TFS. My NuGet version is 3.1.6. This problem is happening only in my C# Web AP..

Foreign key constraints: When to use ON UPDATE and ON DELETE

I'm designing my database schema using MySQL Workbench, which is pretty cool because you can do diagrams and it converts them :P Anyways, I've decided to use InnoDB because of it's Foreign Key suppor..

Function passed as template argument

I'm looking for the rules involving passing C++ templates functions as arguments. This is supported by C++ as shown by an example here: #include <iostream> void add1(int &v) { v+=1; } ..

ORA-01950: no privileges on tablespace 'USERS'

I'm getting this error: ORA-01950: no privileges on tablespace 'USERS' I have a default tablespace and I'm able to create tables, however, they do not show at the objects tab in Toad. I cannot i..

Best way to do Version Control for MS Excel

What version control systems have you used with MS Excel (2003/2007)? What would you recommend and Why? What limitations have you found with your top rated version control system? To put this in pers..

How to concatenate and minify multiple CSS and JavaScript files with Grunt.js (0.3.x)

Note: This question is only relevant for Grunt 0.3.x and has been left for reference. For help with the latest Grunt 1.x release please see my comment below this question. I'm currently trying to use..

How to show PIL images on the screen?

I am doing some image editing with the PIL libary. The point is, that I don't want to save the image each time on my HDD to view it in Explorer. Is there a small module that simply enables me to set u..

How do I disable a Button in Flutter?

I'm just starting to get the hang of Flutter, but I'm having trouble figuring out how to set the enabled state of a button. From the docs, it says to set onPressed to null to disable a button, and gi..

invalid use of incomplete type

I'm trying to use a typedef from a subclass in my project, I've isolated my problem in the example below. Does anyone know where I'm going wrong? template<typename Subclass> class A { publ..

Get folder up one level

I am using this: echo dirname(__FILE__); which gives: C:\UwAmp\www\myfolder\admin However I am looking for path until: C:\UwAmp\www\myfolder\ from current script. How can that be done ?..

Converting String Array to an Integer Array

so basically user enters a sequence from an scanner input. 12, 3, 4, etc. It can be of any length long and it has to be integers. I want to convert the string input to an integer array. so int[0] woul..

what do these symbolic strings mean: %02d %01d?

I'm looking at a code line similar to: sprintf(buffer,"%02d:%02d:%02d",hour,minute,second); I think the symbolic strings refer to the number of numeric characters displayed per hour, minute etc - o..

JS: Failed to execute 'getComputedStyle' on 'Window': parameter is not of type 'Element'

In short: I am trying to understand the meaning of this TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element' The error appears while lunching Mediawiki's V..

Convert a SQL Server datetime to a shorter date format

I have a datetime column in SQL Server that gives me data like this 10/27/2010 12:57:49 pm and I want to query this column but just have SQL Server return the day month and year - eg. 2010 10 27 or so..

How to print Two-Dimensional Array like table

I'm having a problem with two dimensional array. I'm having a display like this: 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 . . . etc What basically I want is to display to display it as: 1 2 3 4 5 6 ..

Java NoSuchAlgorithmException - SunJSSE, sun.security.ssl.SSLContextImpl$DefaultSSLContext

Background I have been using the Authorize.net SDK in an Eclipse project of it's own. Everything was working great. I then needed to add it to my main project. I added the dependencies to the class p..

Android how to use Environment.getExternalStorageDirectory()

How can i use Environment.getExternalStorageDirectory() to read a a stored image from the SD card or is there a better way to do it?..

How to read response headers in angularjs?

My server returns this kind of header: Content-Range:0-10/0: I tried to read this header in angular with no luck: var promise = $http.get(url, { params: query }).then(function(response) { c..

While loop to test if a file exists in bash

I'm working on a shell script that does certain changes on a txt file only if it does exist, however this test loop doesn't work, I wonder why? Thank you! while [ ! -f /tmp/list.txt ] ; do sle..

How do I get the month and day with leading 0's in SQL? (e.g. 9 => 09)

DECLARE @day CHAR(2) SET @day = DATEPART(DAY, GETDATE()) PRINT @day If today was the 9th of December, the above would print "9". I want to print "09". How do I go about doing this?..

Convert Year/Month/Day to Day of Year in Python

I'm using the datetime module, i.e.: >>> import datetime >>> today = datetime.datetime.now() >>> print(today) 2009-03-06 13:24:58.857946 and I would like to compute the day..

How to run a command in the background and get no output?

I wrote two shell scripts a.sh and b.sh. In a.sh and b.sh I have a infinite for loop and they print some output to the terminal. I want to write another script which calls both a.sh and b.sh but I wan..

Symfony2 and date_default_timezone_get() - It is not safe to rely on the system's timezone settings

I have a Symfony2 project. I updated my php to 5.5.7 today and since then, I am getting the Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *r..

How to add plus one (+1) to a SQL Server column in a SQL Query

The simple question is, how do you increment a field value in a MS Query by 1 ? I am trying to add 1 (+1) to an int column in my SQL Server database using a parametrized method. Similar to an i++ oper..

Python os.path.join on Windows

I am trying to learn python and am making a program that will output a script. I want to use os.path.join, but am pretty confused. According to the docs if I say: os.path.join('c:', 'sourcedir') ..

how to convert a string to an array in php

how to convert a string in array in php i.e $str="this is string"; should be like this arr[0]=this arr[1]=is arr[2]=string The str_split($str, 3); split the string in 3 character wo..

How to create a temporary table in SSIS control flow task and then use it in data flow task?

I have a control flow where I create a temp database and table in a with a T-SQL Command. When I add a dataflow I would like to query the table but I can't because the table doesn't exist to grab info..

How can I concatenate a string within a loop in JSTL/JSP?

<c:forEach items="${myParams.items}" var="currentItem" varStatus="stat"> <c:set var="myVar" value="<c:out var="myVar" />" /> </c:forEach> I want to concatenate the values o..

How to install Java 8 on Mac

I want to do some programming with the latest JavaFX, which requires Java 8. I'm using IntelliJ 13 CE and Mac OS X 9 Mavericks. I ran Oracle's Java 8 installer, and the files look like they ended up a..

How do I truly reset every setting in Visual Studio 2012?

I am trying to reset every single setting inside Visual Studio as I have completely lost all IntelliSense. I tried the Tools -> Import/Export settings -> Reset, but that is not clearing all the settin..

Cannot import keras after installation

I'm trying to setup keras deep learning library for Python3.5 on Ubuntu 16.04 LTS and use Tensorflow as a backend. I have Python2.7 and Python3.5 installed. I have installed Anaconda and with help of ..

All inclusive Charset to avoid "java.nio.charset.MalformedInputException: Input length = 1"?

I'm creating a simple wordcount program in Java that reads through a directory's text-based files. However, I keep on getting the error: java.nio.charset.MalformedInputException: Input length = 1 ..

How can I open a link in a new window?

I have a click handler for a specific link, inside that I want to do something similar to the following: window.location = url I need this to actually open the url in a new window though, how do I ..

Singleton in Android

I have followed this link and successfully made singleton class in Android. http://www.devahead.com/blog/2011/06/extending-the-android-application-class-and-dealing-with-singleton/ Problem is that i ..

CSS Display an Image Resized and Cropped

I want to show an image from an URL with a certain width and height even if it has a different size ratio. So I want to resize (maintaining the ratio) and then cut the image to the size I want. I ca..

Python read in string from file and split it into values

I have a file in the format below: 995957,16833579 995959,16777241 995960,16829368 995961,50431654 I want to read in each line but split the values into the appropriate values. For example the firs..

How to reset settings in Visual Studio Code?

It's a simple thing and I was pretty sure it's well described, but surprisingly it is not so obvious. Here I've found a detailed description of settings file. As it states it should be setting.json f..

What is the difference between `let` and `var` in swift?

What is the difference between let and var in Apple's Swift language? In my understanding, it is a compiled language but it does not check the type at compile time. It makes me confused. How does the..

How to use an existing database with an Android application

I have already created an SQLite database. I want to use this database file with my Android project. I want to bundle this database with my application. Instead of creating a new database, how can t..

How can I access the MySQL command line with XAMPP for Windows?

How can I access the MySQL command line with XAMPP for Windows?..

How to uninstall a package installed with pip install --user

There is a --user option for pip which can install a Python package per user: pip install --user [python-package-name] I used this option to install a package on a server for which I do not have ro..

Unable to run 'adb root' on a rooted Android phone

After rooting my device, I need to run adb root and then adb shell so I could then access my applications database. When trying to run adb root I keep getting "adbd cannot run as root in production b..

Key Listeners in python?

Is there a way to do key listeners in python without a huge bloated module such as pygame? An example would be, when I pressed the a key it would print to the console The a key was pressed! It..

How to get an object's property's value by property name?

In PowerShell, how do you get an object's property value by specifying its name (a string)? I want something like the following: $obj = get-something # View the object's members: $obj | gm # I coul..

How can I show figures separately in matplotlib?

Say that I have two figures in matplotlib, with one plot per figure: import matplotlib.pyplot as plt f1 = plt.figure() plt.plot(range(0,10)) f2 = plt.figure() plt.plot(range(10,20)) Then I show bo..

Display a table/list data dynamically in MVC3/Razor from a JsonResult?

I have a view page, users.cshtml. And I have a JsonResult action method, jsongetusers() that returns the list of users in json format. On users.cshtml page load, I want to get the list of users, bui..

How to truncate text in Angular2?

Is there a way that I could limit the length of the string to a number characters? for e.g: I have to limit a title length to 20 {{ data.title }}. Is there any pipe or filter to limit the length?..

Setting up a websocket on Apache?

So I'm doing some research on websockets, and I have a few questions I can't seem to find a definitive answer for: How can I set up a web socket on my Linux server? Is there an Apache module? Would ..

Gulp error: The following tasks did not complete: Did you forget to signal async completion?

I have the following gulpfile.js, which I'm executing via the command line gulp message: var gulp = require('gulp'); gulp.task('message', function() { console.log("HTTP Server Started"); }); I'm..

error_reporting(E_ALL) does not produce error

This is my php script- <?php error_reporting(E_ALL); echo('catch this -> ' ;. $thisdoesnotexist); ?> Which obviously should show something if it were to be executed. All I see is an ..

How to see what privileges are granted to schema of another user

Consider the case : In a database , I have two users A and B and their corresponding schema. I want to know , How can I get the information : what permissions are there for USER A in Schema B . Cons..

How to properly export an ES6 class in Node 4?

I defined a class in a module: "use strict"; var AspectTypeModule = function() {}; module.exports = AspectTypeModule; var AspectType = class AspectType { // ... }; module.export.AspectType..

How to install pip3 on Windows?

I use python 2.7, 3.5.2 and 3.6. Normally pip3 is installed with python3.x. But ... The code: where pip3 gives me: INFO: Could not find files for the given pattern(s). How can I fix this?..

Simple line plots using seaborn

I'm trying to plot a ROC curve using seaborn (python). With matplotlib I simply use the function plot: plt.plot(one_minus_specificity, sensitivity, 'bs--') where one_minus_specificity and sensitivi..

How can I tail a log file in Python?

I'd like to make the output of tail -F or something similar available to me in Python without blocking or locking. I've found some really old code to do that here, but I'm thinking there must be a bet..

SQL Error: ORA-12899: value too large for column

I have created the following table CREATE TABLE Customers( CustomerID varchar2(9) PRIMARY KEY, Customer_Contact varchar2(40) NOT NULL, Address varchar2(20) NOT NULL, Post_Code varchar2(7) ..

Understanding the set() function

In python, set() is an unordered collection with no duplicate elements. However, I am not able to understand how it generates the output. For example, consider the following: >>> x = [1, ..

How to replace comma with a dot in the number (or any replacement)

I could not found a solution yet, for replacing , with a dot. var tt="88,9827"; tt.replace(/,/g, '.') alert(tt) //88,9827 i'm trying to replace a comma a dot thanks in advance..

How do I tokenize a string in C++?

Java has a convenient split method: String str = "The quick brown fox"; String[] results = str.split(" "); Is there an easy way to do this in C++?..

IndentationError: unexpected unindent WHY?

IndentationError: unexpected unindent WHY??? #!/usr/bin/python import sys class Seq: def __init__(self, id, adnseq, colen): self.id = id self.dna = adnseq self.cdnl..