hCalendar (short for HTML iCalendar) is a microformat standard for displaying a semantic (X)HTML representation of iCalendar-format calendar information
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 ..
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 ..
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..
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..
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?..
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 ..
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..
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 the href attribute value of an <a/> tag through Javascript on button click ?
<script type="text/javascript">
function f1()
{
document.getElementById("abc").href="xyz..
I have a Component and a Service:
Component:
_x000D_
_x000D_
export class WebUserProfileViewComponent {_x000D_
persons: Person [];_x000D_
personId: number;_x000D_
constructor( params: Rou..
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..
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..
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';
..
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..
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..
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..
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..
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..
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..
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..
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..
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 ..
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 ..
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..
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..
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?..
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 =..
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 ..
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..
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..
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 { //..
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?..
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...
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..
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...
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 },
..
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..
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...
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..
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
..
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 ..
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..
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..
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 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..
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..
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..
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?..
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..
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..
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 ..
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 ..
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 ..
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 ..
I have a following class :
[DataContract]
public class Pair<TKey, TValue> : INotifyPropertyChanged, IDisposable
{
public Pair(TKey key, TValue value)
{
Key = key;
Value ..
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 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...
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 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..
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!..
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..
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..
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..
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..
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":
..
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..
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' ..
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..
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..
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..
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"..
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..
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..
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..
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..
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...
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..
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 ..
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:
..
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..
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.
..
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..
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..
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..
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..
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..
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..
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..
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..
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-..
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?..
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..
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..
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..
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..
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..
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 ..
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 ..
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..
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..
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?..
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..
By using "ucbps" command i am able to get all PIDs
$ ucbps
Userid PID CPU % Mem % FD Used Server Port
============================================================..
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 ..
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. ..
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..
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..
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 ..
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..
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)...
(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..
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..
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 ..
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?..
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..
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...
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 ..
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 ..
I have a simple form in my render function, like so:
render : function() {
return (
<form>
<input type="text" name="email" placeholder="Email" />
<inp..
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?
..
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..
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'..
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..
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 ..
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)?..
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..
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..
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..
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 ..
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..
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..
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)) {
..
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..
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..
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;
}
..
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..
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..
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..
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..
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..
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..
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 ?..
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..
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..
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..
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..
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 ..
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..
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..
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..
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?..
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..
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..
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..
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..
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 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..
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..
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..
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..
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 ..
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
..
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 ..
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 ..
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..
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..
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 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..
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..
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..
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..
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..
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..
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..
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..
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?..
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 ..
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..
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 ..
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..
I defined a class in a module:
"use strict";
var AspectTypeModule = function() {};
module.exports = AspectTypeModule;
var AspectType = class AspectType {
// ...
};
module.export.AspectType..
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?..
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..
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..
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) ..
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, ..
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..