I have a project with a post build event:
copy $(ProjectDir)DbVerse\Lunaverse.DbVerse.*.exe $(TargetDir)
It works fine every time on my machine. I have a new developer who always gets the "exited..
I have a timestamp stored in a session (1299446702).
How can I convert that to a readable date/time in PHP? I have tried srttotime, etc. to no avail...
I was trying to copy this code:
<?php
foreach ($products as $product) {
$id = $product['id'];
$name = $product['name'];
$description = $product['description'];
$pri..
I want to be able to build a string from a class that I create that derives from Stream. Specifically, I want to be able to write code like this:
void Print(Stream stream) {
// Some code that ope..
All I want to do is fade my logo in on the page loading. I am new today to jQuery and I can't managed to fadeIn on load please help. Sorry if this question has already been answered I have had a look ..
I'm pretty new at laravel, in fact and I'm trying to create my very first project. for some reason I keep getting this error (I haven't even started coding yet)
Error in exception handler: The stream..
I have few client systems where I need to push the ssh key and login from my server without authentication prompts.
First, on the server, I created ssh key as below which was successful
]# ssh-keyg..
I have two json arrays like
var json1 = [{id:1, name: 'xxx' ...}]
var json2 = [{id:2, name: 'xyz' ...}]
I want them merge in to single arrays
var finalObj = [{id:1, name: 'xxx' ...},{id:2, name: '..
I want to read strings from an xml file before I do much of anything else like setText on widgets, so how can I do that without an activity object to call getResources() on?..
How is git revert used?
This might sound like a duplicate question but when people ask it, the response is often, use git reset as per Revert to a commit by a SHA hash in Git?
Then when someone asks..
I'm writing a shell script, and I'm trying to check if the output of a command contains a certain string. I'm thinking I probably have to use grep, but I'm not sure how. Does anyone know?..
How do you generate a random double uniformly distributed between 0 and 1 from C++?
Of course I can think of some answers, but I'd like to know what the standard practice is, to have:
Good standard..
What's the best way with PHP to read a single record from a MySQL database? E.g.:
SELECT id FROM games
I was trying to find an answer in the old questions, but had no luck...
I am posting a date to an API and the required format is as follows:
2014-12-01T01:29:18
I can get the date from the model like so:
Model.created_at.to_s
That returns:
2014-12-01 01:29:18 -0500..
I am trying to upload an Apple TV App to the App Store for testing purposes, but I got the issue:
This Action could not be completed. Try Again (-22421)
as in the below image:
So what can I do?..
I've only just started to use GIT and think its wonderful, however I'm a little confused over what the merge command does.
Let us say we have a working project in the branch "A".
I go home and make ..
I have three files of a very simple angular js application
index.html
<!DOCTYPE html>
<html ng-app="gemStore">
<head>
<script src='https://ajax.googleapis.com/ajax/libs/an..
I was working with a friend on a project, and he edited a bunch of files that shouldn't have been edited. Somehow I merged his work into mine, either when I pulled it, or when I tried to just pick the..
Upon page load I want to move the cursor to a particular field. No problem. But I also need to select and highlight the default value that is placed in that text field...
One of my columns is called from. I can't change the name because I didn't make it.
Am I allowed to do something like SELECT from FROM TableName or is there a special syntax to avoid the SQL Server be..
I am trying to print an integer in JavaScript with commas as thousands separators. For example, I want to show the number 1234567 as "1,234,567". How would I go about doing this?
Here is how I am do..
Possible Duplicates:
clear terminal in python
How to clear python interpreter console?
I'm trying to write a program in Python but I don't know how to clear the screen.
I use both Windows..
Hi there I have a question about dynamically creating a canvas using javascript.
I create a canvas like this:
var canvas = document.createElement('canvas');
canvas.id = "CursorLayer";
canvas.wid..
I'm learning Java and I'm having a problem with ArrayList and Random.
I have an object called catalogue which has an array list of objects created from another class called item.
I need a method in ..
Given a pandas dataframe containing possible NaN values scattered here and there:
Question: How do I determine which columns contain NaN values? In particular, can I get a list of the column names co..
How can I output the value of an enum class in C++11? In C++03 it's like this:
#include <iostream>
using namespace std;
enum A {
a = 1,
b = 69,
c= 666
};
int main () {
A a = A::c;
..
I have generated an EF4 Model from a MySQL database and I have included both StoredProcedures and Tables.
I know how to make regular instert/update/fetch/delete operations against the EF but I can't ..
I'm trying to save a list to a text file.
This is my code:
public void button13_Click(object sender, EventArgs e)
{
TextWriter tw = new StreamWriter("SavedLists.txt");
tw.WriteLine(Lists.ve..
I have a few tables in SQLite and I am trying to figure out how to reset the auto-incremented database field.
I read that DELETE FROM tablename should delete everything and reset the auto-incrememen..
Once upon a time, I changed my ggplot2 font using using windowsFonts(Times=windowsFont("TT Times New Roman")) to change it. Now I can't get it off of this.
In trying to set family="" in ggplot2 them..
I have a website which have a layout page. However this layout page have data which all pages model must provide such page title, page name and the location where we actually are for an HTML helper I ..
In my XAML code, I want to set the Background color of each row, based on a value of the object in one specific row. I have an ObservableCollection of z, and each of the z has a property called State...
I've been reading the articles on MSDN about Unity (Dependency Injection, Inversion of Control), but I think I need it explained in simple terms (or simple examples). I'm familiar with the MVPC patter..
It looks like arraylist is not doing its job for presizing:
// presizing
ArrayList<Integer> list = new ArrayList<Integer>(60);
Afterwards when I try to access it:
list.get(5)
Inst..
I want to use CSS to show div id='b' when I hover over div id='a', but I cannot figure out how to do it because the div 'a' is inside another div that div 'b' is not in.
<div id='content'>
..
I am very new to using predicates and just learned how to write:
Predicate<int> pre = delegate(int a){ a %2 == 0 };
What will the predicate return, and how is it useful when programming?..
1.
int Add (int a, int b = 3);
int Add (int a, int b)
{
}
2.
int Add (int a, int b);
int Add (int a, int b = 3)
{
}
Both work; which is the standard way and why?..
I am developing a simple Android application. But when I run Eclipse, it shows the following error:
Your project contains error(s), please fix it before running it.
I can't find any error in my ..
In this assignment I have completed all the problems except this one. I have to create a python script to solve an equation (screenshot).
Unfortunately, in my research all over the internet I cannot ..
I am trying to find an item index by searching a list. Does anybody know how to do that?
I see there is list.StartIndex and list.EndIndex but I want something like python's list.index("text")...
My repo has 100 commits in it right now. I need to rollback the repository to commit 80, and remove all the subsequent ones.
Why?
This repo is supposed to be for merging from miscellaneous users. A bu..
I use startx to start X which will evaluate my .xinitrc. In my .xinitrc I start my window manager using /usr/bin/mywm. Now, if I kill my WM (in order to f.e. test some other WM), X will terminate too ..
I am using MS Excel 2010 and trying to get the current directory using the below code,
path = ActiveWorkbook.Path
But ActiveWorkbook.Path returns blank...
Suppose we have an application that acts as a middleman, allowing Company A to send reports to their customers.
Company A --> Company B (me)--> Company A's customers
After getting the report we ..
I'm going mad here.
I've got the following HTML:
<a href="#" rel="tooltip" title="A nice tooltip">test</a>
And the Bootstrap style tooltip refuses to display, just a normal tooltip.
..
How do you return 1 value per row of the max of several columns:
TableName
[Number, Date1, Date2, Date3, Cost]
I need to return something like this:
[Number, Most_Recent_Date, Cost]
Query?..
I have a UITableView that is populated with cells of a variable height. I would like the table to scroll to the bottom when the view is pushed into view.
I currently have the following function
NSIn..
I want to check the first two digits of a number in Python. Something like this:
for i in range(1000):
if(first two digits of i == 15):
print("15")
elif(first two digits of i == 16)..
I would like to get just the folder path from the full path to a file.
For example T:\Data\DBDesign\DBDesign_93_v141b.mdb and I would like to get just T:\Data\DBDesign (excluding the \DBDesign_93_v141..
How can I convert seconds to HH:mm:ss?
At the moment I am using the function below
render: function (data){
return new Date(data*1000).toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");;
..
Here's the information according to the official documentation:
There are four different pairs of
opening and closing tags which can be
used in PHP. Two of those, <?php ?>
and <scri..
I'm looking for an explanation of how a hash table works - in plain English for a simpleton like me!
For example, I know it takes the key, calculates the hash (I am looking for an explanation how) a..
Possible Duplicate:
What does BigInteger having no limit mean?
The Javadoc for BigInteger does not define any maximum or minimum. However, it does say:
(emphasis added)
Immutable arbi..
I have the 1 button and some text in my HTML like the following:
function get_content(){
// I don't know how to do in here!!!
}
<input type="button" onclick="get_content()" value="Get Content"..
I'm not too good with regular expressions, but with PHP I'm wanting to remove the style attribute from HTML tags in a string that's coming back from TinyMCE.
So change <p style="...">Text</p..
I have an array:
array( 4 => 'apple', 7 => 'orange', 13 => 'plum' )
I would like to get the first element of this array. Expected result: string apple
One requirement: it cannot be don..
I've got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks like mavenapp/src/main/javascript/[npm project files]
Inside my package.json, ..
I am using Eclipse Luna with the m2e plug-in. When I search for dependencies, I get the following warning (also see the screenshot after):
Index downloads are disabled, search result may be incomp..
I'm having this strange error, CURL ERROR: Recv failure: Connection reset by peer
This is how it happens, if I did not connect to the server and all of a sudden trying to connect to the server via CU..
I have HTML webpages that I am crawling using xpath. The etree.tostring of a certain node gives me this string:
<script>
<!--
function escramble_758(){
var a,b,c
a='+1 '
b='84-'
a+='..
How can I change color of a section header in UITableView?
EDIT: The answer provided by DJ-S should be considered for iOS 6 and above. The accepted answer is out of date...
I am developing a wizard for a machine that is to be used as a backup of other machines. When it replaces an existing machine, it needs to set its IP address, DNS, WINS, and host name to match the ma..
Short question here:
In .Net 4.0 Winforms, how do I use the PasswordChar property of a Textbox to show a common black dot as a character? Is there perhaps some font I can use that has this as a chara..
I am currently using the following function to compare dictionary values. Is there a faster or better way to do it?
match = True
for keys in dict1:
if dict1[keys] != dict2[keys]:
match = ..
I have a fragment I am trying to add into a view.
FragmentManager fragMgr=getSupportFragmentManager();
feed_parser_activity content = (feed_parser_activity)fragMgr
..
I'm trying to get a module to pass the syntax check in ISE 12.4, and it gives me an error I don't understand. First a code snippet:
parameter ROWBITS = 4;
reg [ROWBITS-1:0] temp;
genvar c;
generate..
Say I have a C function which takes a variable number of arguments: How can I call another function which expects a variable number of arguments from inside of it, passing all the arguments that got i..
I've tried looking to see if this is possible, but I can't find my answer.
I'm trying to get the following to work:
var defaults = {
'background-color': '#000',
color: '#fff',
weekdays: {['sun','..
I want to change / add syntax highlighting for a language in Sublime 2/3.
For example I want the keyword this colored in JavaScript.
How can I do that?
I know that there is a preference JavaScript ..
My all applications were working fine but suddenly all sites under IIS are not loading css, images, scripts. It redirect to login page.
If i login it works fine. e.g. mysite.com/Account/LogOn?Return..
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've so far got a simple (but potentially expensive) way:
var myMax = sort(myArray,>)[0]
And how I was taught to do it at school:
var myMax = 0
for i in 0..myArray.count {
if (myArray[i] &g..
I am getting following error in my C# visual studio project:
The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
I also..
I'm getting this weird error:
classification.py:1113: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_..
I'm having a little trouble here,
I'm trying to convert a numpy.ndarray to string, I've already done that like this:
randomArray.tostring()
It works, but I'm wondering if I can transform it back t..
I have a button as such:
<input type="submit" id="submit" value="Save" />
Within jQuery I am using the following, but it still allows for double-clicks:
<script type="text/javascript">..
I have a somewhat confusing question in Git.
Lets say, I have a file dir1/A.txt committed and git preserves a history of commits
Now I need to copy the file into dir2/A.txt (not move, but copy).
I kno..
A new feature in C# / .NET 4.0 is that you can change your enumerable in a foreach without getting the exception. See Paul Jackson's blog entry An Interesting Side-Effect of Concurrency: Removing Item..
While running selenium script, I am getting the following error message in Eclipse console:
Class has been compiled by a more recent version of the Java Environment (class file version 53.0), this..
I have some tests that use the built in Microsoft.VisualStudio.TestTools.UnitTesting, but can not get them to run.
I am using visual studio 2012 ultimate.
I have a solution of two projects; One has ..
I'm having a Structure like
X={ID="1", Name="XX",
ID="2", Name="YY" };
How to dump this data to a DataGridView of two columns
The gridView is like
ID | Name
Can we use LINQ to do this...
I am getting this error while plotting a bar graph and I am not able to get rid of it, I have tried both qplot and ggplot but still the same error.
Following is my code:
library(dplyr)
library(ggp..
What is this error ? How can I fix this? My app is running but can't load data. And this is my Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
This is my frag..
I'm new to objective-c and I'm starting to put a great deal of effort into request/response as of recent. I have a working example that can call a url (via http GET) and parse the json returned.
The..
I just installed IntelliJ IDEA and I'm trying to set it up. I've gotten to the part where I need to select my home directory for my JDK.
I tried navigating to my Java installation, C:\Program Files (..
I use nested counters and scope to create an ordered list:
_x000D_
_x000D_
ol {_x000D_
counter-reset: item;_x000D_
padding-left: 10px;_x000D_
}_x000D_
li {_x000D_
display: block_x000D_
}_..
just wondering if anyone has ever tried embedding and actually integrating any js engine into the .net environment. I could find and actually use (after a LOT of pain and effort, since it's pretty out..
I tried the sql query given below:
SELECT * FROM (SELECT *
FROM TABLE_A ORDER BY COLUMN_1)DUMMY_TABLE
UNION ALL
SELECT * FROM TABLE_B
It results in the following error:
The ORDER BY clause ..
Traditionally I use custom domains with my localhost development server. Something along the lines of:
dev.example.com
dev.api.example.com
This has provided me a ton of flexibility when working wit..
I have an array where I want to search the uid and get the key of the array.
Examples
Assume we have the following 2-dimensional array:
$userdb = array(
array(
'uid' => '100',
..
How to write literal boolean value in SQL Server? See sample use:
select * from SomeTable where PSEUDO_TRUE
another sample:
if PSEUDO_TRUE
begin
select 'Hello, SQL!'
end
Note: The query above..
The question was about plain c functions, not c++ static methods, as clarified in comments.
I understand what a static variable is, but what is a static function?
And why is it that if I declare a f..
In a comment on this answer to another question, someone said that they weren't sure what functools.wraps was doing. So, I'm asking this question so that there will be a record of it on StackOverflow ..
I want to set an image on QPushButton, and the size of QPushButton should depend on the size of the image. I am able to do this when using QLabel, but not with QPushButton.
So, if anyone has a soluti..
Suppose I have a list of string:
string = c("G1:E001", "G2:E002", "G3:E003")
Now I hope to get a vector of string that contains only the parts after the colon ":", i.e substring = c(E001,E002,E003)..
Am new to spring currently am trying to do HTTP POST request application/x-www-form-url encoded but when i keep this in my headers then spring not recognizing it and saying 415 Unsupported Media Type
..
I'm relatively new to Python and it's libraries and I was wondering how I might create a string array with a preset size. It's easy in java but I was wondering how I might do this in python.
So far ..
This has probably been asked before, but a quick search only brought up the same question asked for C#. See here.
What I basically want to do is to check wether a given object implements a given inte..
For a char [], I can easily get its length by:
char a[] = "aaaaa";
int length = sizeof(a)/sizeof(char); // length=6
However, I cannot do like this to get the length of a char * by:
char *a = new c..
I need to add responsive design features to my web application using Twitter Bootstrap. I just want the responsive behavior, I'm not interested in the typography, components or any other stuff include..
I am currently writing a deployment script that installs a number of Windows services.
The services names are versioned, so I want to delete the prior Windows service version as part of the installs ..
Possible Duplicate:
How can i retrieve a table from stored procedure to a datatable
I am trying to populate my datatable. I have created a datatable tmpABCD but i need to populate this with..
I have a server with Rackspace. I want to access the database from my local machine command line.
I tried like:
mysql -u username -h my.application.com -ppassword
But it gives an error:
ERROR 2003 (..
There's a similar post on stack but it doesn't help with my issue possibly because I am using Visual Studio 2015.
How do I get the "Enable NuGet Package Restore" option to appear in VS2015?
I chose ..
On the GitHub site there is a link...
https://help.github.com/articles/generating-ssh-keys
... and it states...
If you have decided not to use the recommended HTTPS method, we can
use SSH keys..
Even though I manually configured JDK project structure file/Project structure it still shows this error
FAILURE: Build failed with an exception.
`What went wrong:
Execution failed for task ':sample..
What is the best cross browser way to open a download dialog (let's assume we can set content-disposion:attachment in the headers) without navigating away from the current page, or opening popups, whi..
I want to check:
IF cells (i,"A") contains the text 'Miami' AND (i,"D") contains the text 'Florida' THEN change value of cell (i,"C") to BA.
Sub ABC()
Dim wsh As Worksheet, i As Long, lngEndRowInv A..
I know the string "foobar" generates the SHA-256 hash c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 using
http://hash.online-convert.com/sha256-generator
However the command line s..
What's the difference between these two?
I noticed that if I changed from socket.emit to socket.send in a working program, the server failed to receive the message, although I don't understand why.
..
I have a path (including directory and file name).
I need to test if the file-name is a valid, e.g. if the file-system will allow me to create a file with such a name.
The file-name has some unicode c..
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..
I keep getting an error message in Eclipse when creating a new project.
I have created a workspace at the level
C:\Users\Martin\Java\Counter
Inside Counter there are no files but there is a dir..
On Mac OSX Mavericks using homebrew php55 whenever I run a a php command I get the following error message (everything runs fine it's just annoying)
PHP Warning: Module 'intl' already loaded in Unkn..
Can somebody explain to me the differences between Document and RPC style webservices? Apart from JAX-RPC, the next version is JAX-WS, which supports both Document and RPC styles. I also understand d..
I have this powershell script to sending emails with attachments, but when I add multiple recipients, only the first one gets the message. I've read the documentation and still can't figure it out. Th..
I've been tasked with coming up with a means of translating the following data:
date category amount
1/1/2012 ABC 1000.00
2/1/2012 DEF 500.00
2/1/2012 G..
I am newb to reactjs, I want to include bootstrap in my react app
I have installed bootstrap by npm install bootstrap --save
Now, want to load bootstrap css and js in my react app.
I am using webpa..
I noticed that JavaScript's new Date() function is very smart in accepting dates in several formats.
Xmas95 = new Date("25 Dec, 1995 23:15:00")
Xmas95 = new Date("2009 06 12,12:52:39")
Xmas95 = new D..
I generated script from old database, created a new database and imported all data from old database. So far so good, however, no user has execute rights for stored procedures. I know I can use
GRAN..
This is similar to Stream data with Node.js, but I don't feel that question was answered sufficiently.
I'm trying to use a jQuery ajax call (get, load, getJSON) to transfer data between a page and a ..
Just wondering what the difference between BeginInvoke() and Invoke() are?
Mainly what each one would be used for.
EDIT: What is the difference between creating a threading object and calling invok..
Possible Duplicate:
Why can't I handle a KeyboardInterrupt in python?
I was playing around with some Python code and created an infinite loop:
y = 0
x = -4
itersLeft = x
while(itersLe..
I have to store UTC dateTime in DB.
I have converted the dateTime given in specific timezone to UTC. for that I followed the below code.
My input dateTime is "20121225 10:00:00 Z" timezone is "Asia/Ca..
I would like to send a new JsonObjectRequest request:
I want to receive JSON data (response from server): OK
I want to send JSON formatted data with this request to the server
JsonObjectRequest re..
How can I set the selectedvalue property of a SelectList after it was instantiated without a selectedvalue;
SelectList selectList = new SelectList(items, "ID", "Name");
I need to set the selected v..
I'm trying to create a ZIP archive with a simple demo text file using a MemoryStream as follows:
using (var memoryStream = new MemoryStream())
using (var archive = new ZipArchive(memoryStream , ZipAr..
In Django, what's the difference between the following two:
Article.objects.values_list('comment_id', flat=True).distinct()
vs
Article.objects.values('comment_id').distinct()
My goal is to get ..
I am trying to make an installer using batch. Of course, an installer needs to consist of files that will be installed, so I'm thinking of encoding the files in base64, and simply decode them and writ..
I'd like to change the value of the onclick attribute on an anchor. I want to set it to a new string that contains JavaScript. (That string is provided to the client-side JavaScript code by the server..
How do I get the probability of a string being similar to another string in Python?
I want to get a decimal value like 0.9 (meaning 90%) etc. Preferably with standard Python and library.
e.g.
simil..
I have a folder in my subdomain which is created through WHM so the owner of that subdomain is not the owner of main domain.
I want to change the owner of one of the folders of subdomain to domain o..
I'm trying to find the Base DN of the user that can access or controls all the users in Active Directory so I can put it in my LDAP.
Usually someone will give me this, and it looks like DC=domain,DC=..
I want to remove all special characters from a string. Allowed characters are A-Z (uppercase or lowercase), numbers (0-9), underscore (_), or the dot sign (.).
I have the following, it works but I su..
I have a nested list of data. Its length is 132 and each item is a list of length 20. Is there a quick way to convert this structure into a data frame that has 132 rows and 20 columns of data?
Here is..
I am new to android development and and I want to setup some of application's attributes based on Application first run after installation. Is there any way to find that the application is running for..
I use GitLab Community Edition 9.1.3 2e4e522 on Windows 10 Pro x64. With Git client.
Error
Cloning into 'project_name'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://m..
What I'm doing:
Opening Visual Studio Community 2015
File -> New -> Project
Under Visual C#: Web -> ASP.NET Web Application
Web Application
And press f5 for the popup error "unable to connect to web..
I want to avoid page break inside row of table in html, when I convert html to PDF by wkhtmltopdf. I use page-break-inside:avoid with table- its works, but I have so many rows,
then not work.
If set ..
It's an old question I know, but with SQL Server 2012 is it finally ok to store files in the database, or should they really be kept in the filesystem with only references to them in the database?
If..
I want to set cookies in Laravel 5 independently
i.e., Don't want to use
return response($content)->withCookie(cookie('name', 'value'));
I just want to set cookie in some page and retrieve in s..
I was wondering is it safe to do so?
wchar_t wide = /* something */;
assert(wide >= 0 && wide < 256 &&);
char myChar = static_cast<char>(wide);
If I am pretty sure the w..
Does anyone know how I can take a MySQL datetime data type value, such as YYYY-MM-DD HH:MM:SS and either parse it or convert it to work in JavaScript's Date() function, for example:- Date('YYYY, MM, D..
I am getting the following error:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in ..
I have an absolute local path pointing to a dir: "file:\\C:\\Users\\john\\documents\\visual studio 2010\\Projects\\proj"
But when I try to throw it into DirectoryInfo's ctor I get the "URI formats ar..
Using MySQL syntax and having a table with a row like:
mydate DATETIME NULL,
Is there a way to do something like:
... WHERE mydate<='2008-11-25';
I'm trying but not really getting it to work...
How to convert UPPERCASE letter to lowercase and first letter Uppercase for each sentences like below only by using CSS?
From:
THIS IS AN EXAMPLE SENTENCE.
To:
This is an example sentence.
Update:..
What is the best way to refresh a DataGridView when you update an underlying data source?
I'm updating the datasource frequently and wanted to display the outcome to the user as it happens.
I've got..
I am working with configuring Django project with Nginx and Gunicorn.
While I am accessing my port gunicorn mysite.wsgi:application --bind=127.0.0.1:8001 in Nginx server, I am getting the following e..
Is there some cron like library that would let me schedule some function to be ran at certain time (15:30 for example, not x hours from now etc)? If there isn't this kind of library how this should be..
I am trying to detect the chrome and safari browser using jquery or javascript.
I thought we are not supposed to use jQuery.browser. Are there any suggestions here? Thanks a lot!..
Essentially I want to suck a line of text from a file, assign the characters to a list, and create a list of all the separate characters in a list -- a list of lists.
At the moment, I've tried this:
..
properties> date created... I thought this meant the date the video was created, but finally realized that date changes every time I move, reorganize, even open a file. often, the date modified is ..
I have a list containing multiple lists as its elements
eg: [[1,2,3,4],[4,5,6,7]]
If I use the built in set function to remove duplicates from this list, I get the error
TypeError: unhashable type..
I have a shell script that runs on Linux and uses this call to get yesterday's date in YYYY-MM-DD format:
date -d "1 day ago" '+%Y-%m-%d'
It works most of the time, but when the script ran yesterda..
I wrote the following code in C++ using VS2012 Express.
void ac_search(
uint num_patterns, uint pattern_length, const char *patterns,
uint num_records, uint record_length, const char *reco..
I have a string say
string display_txt = "1st line text" +"\n" + "2nd line text";
in Jquery, I am trying to use
('#somediv').html(display_txt).css("color", "green")
quite clearly I am expecting..
I am using methods like this
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<UserWithPhoto> getUser(@RequestHeader(value="Access-key") String accessKey,
..
I have a div and in this div I want to display some text in Calibri (Body) font.
How can I do this?
This is the css I have been given :
.an_account_join_1 {
float:left;
width:100%;
colo..
I'm looking at the MDC page for the @font-face CSS rule, but I don't get one thing. I have separate files for bold, italic and bold + italic. How can I embed all three files in one @font-face rule? Fo..
I've got a huge list of date-times like this as strings:
Jun 1 2005 1:33PM
Aug 28 1999 12:00AM
I'm going to be shoving these back into proper datetime fields in a database so I need to magic them ..
I have a css class defined so I can make a div to use all the browser's viewport, the rule is the following:
.fullscreenDiv {
background-color: #e8e8e8;
width: 100%;
height: auto;
bot..
I have the following code:
<video controls autoplay>
<source src="video/myVideo.mp4" type="video/mp4">
<source src="video/myVideo.webm" type="video/webm">
<source src="vid..
I have an account on bitbucket.org that I created by signing up with my Google account. Now everytime I log in I just click "Log in with Google" and that's fine.
How can I access my repos from git co..
I have been reading a bunch of react code and I see stuff like this that I don't understand:
handleChange = field => e => {
e.preventDefault();
/// Do something here
}
..
I need to be able to rotate images individually(in java). The only thing I have found so far is g2d.drawImage(image, affinetransform, ImageObserver ). Unfortunately, I need to draw the image at a spec..
How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code?
I tried this, but it doesn't work:
<!--[if IE 1..
I just installed xampp 1.8.0 for linux and when I opened phpmyadmin I got this error
Access Forbidden!!
New XAMPP security concept:
Access to the requested object is only available from the local n..
I am a beginner to java, and need some help.
I am trying to convert an Abstract Data type Foo which is an associated list to an Arraylist of the strings B. How do you loop through the list and add ea..
Installation failed with message Invalid File:
K:\project\app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk.
It is possible that this issue is resolved by uninstall..
When i am clicking on Logout button in my Profile Activity i want to take user to Login page, where he needs to use new credentials.
Hence i used this code:
Intent intent = new Intent(ProfileActivit..
Has anyone an idea how many tcp-socket connections are possible on a modern standard root server? (There is in general less traffic on each connection, but all the connections have to be up all the ti..
How can I change the following code to look at all the .log files in the directory and not just the one file?
I need to loop through all the files and delete all lines that do not contain "step4" or ..
I want to create a new table with properties of an old table and without duplicates. I want to do something like this:
CREATE TABLE New_Users LIKE Old_Users,
AS
(SELECT * FROM Old_Users GROUP BY ID..
When I clean and then build my solution that has several projects, the output window reports that the build succeeded. However, when I view the Error List Window, it shows me this warning:
Found c..
I am working on a Responsive Web Site with CSS Media Queries.
Is the following a good organization for devices?
Phone, Ipad (Landscape & Portrait), Desktop and Laptop, Large Screen
What are the ..
When I start Android Studio there's a message
Can't start Git: C:\Program Files (x86)\Git\cmd\git.cmd Probably the
path to Git executable is not valid. Fix it.
But I can see that the git.cmd I..
I apparently have a redis-server instance running because when I try to start a new server by entering redis-server, I'm greeted with the following:
Opening port: bind: Address already in use
I can..
How is this achieved? Here it says the java version is:
WebDriver driver; // Assigned elsewhere
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("return document.title");
But I..