I've got a property in my model called Promotion that its type is a flag enum called UserPromotion. Members of my enum have display attributes set as follows:
[Flags]
public enum UserPromotion
{
N..
Following is my JavaScript (mootools) code:
$('orderNowForm').addEvent('submit', function (event) {
event.preventDefault();
allFilled = false;
$$(".required").each(function (inp) {
..
I am trying to add text subtitles to an .mp4 container using ffmpeg:
ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mp4
When I am trying to run this line, it gives me an error :..
I'm trying to port a program which uses a hand-rolled interpolator (developed by a mathematician colleage) over to use the interpolators provided by scipy. I'd like to use or wrap the scipy interpolat..
I want to convert some of my divs into PDF and I've tried jsPDF library but with no success. It seems I can't understand what I need to import to make the library work. I've been through the examples ..
Currently, I'm using:
DataTable dt = CreateDataTableInSomeWay();
List<DataRow> list = new List<DataRow>();
foreach (DataRow dr in dt.Rows)
{
list.Add(dr);
}
Is there a better/magi..
I have a functioning Rails 3 app that uses has_many :through associations which is not, as I remake it as a Rails 4 app, letting me save ids from the associated model in the Rails 4 version.
These a..
Reproducing the problem
I'm running into an issue when trying to pass error messages around using web sockets. I can replicate the issue I am facing using JSON.stringify to cater to a wider audience:..
I'm trying to set up email for my first laravel project, and was thrilled that there's a laracast for it: https://laracasts.com/lessons/mailers
I've followed the simple steps, chose gmail in mail.ph..
I would like to make static navbar to fixed navbar on scroll, when it reaches top of the page.
Is there a way to get it using bootstrap 3 css or javascript?..
When we use Text Replacement using CSS and give a negative test-indent i.e. text-indent:-9999px. Then when we click on that link the Dotted line appears like in the sample image below. What's the solu..
I just did git init to initialize my folder as git repo and then added a remote repository using git remote add origin url. Now I want to remove this git remote add origin and add a new repository git..
I just need to know how to have plain text and a variable in a messagebox.
For example:
I can do this: MsgBox(variable)
And I can do this: MsgBox("Variable = ")
But I can't do this: MsgBox("Variab..
Is there a way to check strings for nil and "" in Swift? In Rails, I can use blank() to check.
I currently have this, but it seems overkill:
if stringA? != nil {
if !stringA!.isEmpty {
..
I would like to program Java servlets using Eclipse and I plan on deploying them using Tomcat. I think I can build the projects using Ant which is bundled with Eclipse. I have the standard Eclipse IDE..
I want to use dynamically registered BroadcastReceiver that has a reference to an Activity so it can modify its UI. I am using Context.registerReceiver() method but receiver's onReceive() method is ne..
I read about Pragma header on Wikipedia which says:
"The Pragma: no-cache header field is an HTTP/1.0 header intended for
use in requests. It is a means for the browser to tell the server and
..
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..
Is there any alert and confirm dialog available in jquery with custom title and custom content in it. I have searched many sites but cannot find appropriate. Any site link or any content are appreciab..
I am looking for the best way to check if a Com Object exists.
Here is the code that I have; I'd like to improve the last line:
$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate(..
Using a rich-text editor, our users can drag and drop a saved image from their desktop to the editor. The image appears and displays properly in the web page after they submit.
Since the image is not..
How fix Error:
[$resource:badcfg] Error in resource configuration. Expected response
to contain an array but got an object?
// Service
angular.module('admin.services', ['ngResource']) ..
I'm trying to get the hang of ES6 imports in Node.js and am trying to use the syntax provided in this example:
Cheatsheet Link
I'm looking through the support table, but I was not able to find what ve..
I have two HTML select boxes. I need to reset one select box when I make a selection in another.
<select id="name" >
<option value="">select all</option>
<option value="1..
I'm trying to make update form, that is going to retrieve the data for the specific ID selected, and fill in the form, so its going to be available for updating.
When I click edit on the specific ent..
It looks like a standard question, but I couldn't find clear directions anywhere.
I have java code trying to connect to a server with probably self-signed (or expired) certificate. The code reports t..
In my User model I could have:
has_many :tasks
and in my Task model:
belongs_to :user
Then, supposing the foreign key 'user_id' was stored in the tasks table, I could use:
@user.tasks
My qu..
I'm simply trying to access named pandas columns by an integer.
You can select a row by location using df.ix[3].
But how to select a column by integer?
My dataframe:
df=pandas.DataFrame({'a':np.r..
I used the following code to configure the facebook API and my structure what to follow is also OK. But I am receiving warning like that. Warning: session_start(): Cannot send session cache limiter -..
Is there an efficient method in VB to check if a string can be converted to a double?
I'm currently doing this by trying to convert the string to a double and then seeing if it throws an exception. B..
I'm sort of new to bundler and the files it generates. I have a copy of a git repo from GitHub that is being contributed to by many people so I was surprised to find that bundler created a file that d..
I have a .eps file that I can look at in Photoshop, and it has a very high resolution, sharp edges, etc. at even larger than 1024x1024.
With ImageMagick I want to convert this .eps to a 1024x1024 .jp..
Does an Integer variable in C occupy 2 bytes or 4 bytes? What are the factors that it depends on?
Most of the textbooks say integer variables occupy 2 bytes.
But when I run a program printing the suc..
I have a regex, for example (ma|(t){1}). It matches ma and t and doesn't match bla.
I want to negate the regex, thus it must match bla and not ma and t, by adding something to this regex. I know I ca..
Should I put the shebang in my Python scripts? In what form?
#!/usr/bin/env python
or
#!/usr/local/bin/python
Are these equally portable? Which form is used most?
Note: the tornado project use..
I am displaying 5 userImage on one screen.I want to display userID and email on mouseover on those userImage.I used alt property of image control but that not working in mozila,chrome and some versio..
I would like to pass a new value for an integer from one Activity to another.
i.e.:
Activity B contains an
integer[] pics = { R.drawable.1, R.drawable.2, R.drawable.3}
I would like activity A to ..
I'm trying to add items to an array in python.
I run
array = {}
Then, I try to add something to this array by doing:
array.append(valueToBeInserted)
There doesn't seem to be a .append method f..
How do I simply get GET and POST values with JQuery?
What I want to do is something like this:
$('#container-1 > ul').tabs().tabs('select', $_GET('selectedTabIndex'));
..
I want to use the new Multidex support library to break the method limit for one of my apps.
With Android Lollipop Google introduced a multidex support library that makes it easy to multidex.
What..
How can I recursively count files in a Linux directory?
I found this:
find DIR_NAME -type f ¦ wc -l
But when I run this it returns the following error.
find: paths must precede expression: ¦..
When running any java application, or just 'java', the jvm fails:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
Here is a list of wrong answers:
..
I have this script on one free PHP-supporting server:
<html>
<body>
<?php
$file = fopen("lidn.txt","a");
fclose($file);
?>
</body>
</html>
It creates the file lidn..
I see this a lot in tutorials, with navigation properties as ICollection<T>.
Is this a mandatory requirement for Entity Framework? Can I use IEnumerable?
What's the main purpose of using IColl..
how can I make a stand-alone exe in Visual Studio. Its just a simple Console application that I think users would not like to install a tiny Console application. I compiled a simple cpp file using the..
I want to change the Git default remote branch destination so I could just
git push
Instead of:
git push upstream
Currently this is set to the origin remote and I want to set it to a different r..
I want to have a datetime string from the date with milliseconds. This code is typical for me and I'm eager to learn how to shorten it.
from datetime import datetime
timeformatted= str(datetime.utcn..
I have an XSD that requires me to use a BigDecimal for a lat/lon. I currently have the lat/lon as doubles, and convert them to BigDecimal, but I am only required to use about 12 places of precision. ..
Is there a way to use joins in update statements for DB2?
Google has really let me down on this one
This is roughly what I'm trying to achieve (... except obviously working ....)
update file1 inner..
Visual Studio allows unit testing of private methods via an automatically generated accessor class. I have written a test of a private method that compiles successfully, but it fails at runtime. A fai..
I want to convert a string to Base64. I found answers in several places, but it does not work anymore in Swift. I am using Xcode 6.2. I believe the answer might be work in previous Xcode versions and ..
How can I convert integers into roman numerals?
function romanNumeralGenerator (int) {
}
For example, see the following sample inputs and outputs:
1 = "I"
5 = "V"
10 = "X"
20 = "XX"
3999 = "MMMCM..
I have to sync large files across some machines. The files can be up to 6GB in size. The sync will be done manually every few weeks. I cant take the filename into consideration because they can change..
I have Eclipse 3.4.2 installed on Windows with subclipse. Another developer added an SVN repository with his credentials and selected 'Save password'. Now every time I do anything with SVN his cached ..
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 encountered an odd situation where appending OPTION (RECOMPILE) to my query causes it to run in half a second, while omitting it causes the query to take well over five minutes.
This is the case wh..
I need to pass an array of "id's" to a stored procedure, to delete all rows from the table EXCEPT the rows that match id's in the array.
How can I do it in a most simple way?..
I'm new to WPF. I just want to know how should we add columns and rows programmatically to a DataGrid in WPF. The way we used to do it in windows forms. create table columns and rows, and bind it to D..
This problem seems very simple, yet I just can not find the solution (I am already loosing my mind about it :) )
OK, so I just want to put a certain value into an excel cell, using vba code, just as ..
I am using this bit of jQuery code to get href of the link:
var url = $(this).attr('href');
-- and this bit of code to go to that href:
window.location = url;
Everything is just the way I want i..
plaintext = input("Please enter the text you want to compress")
filename = input("Please enter the desired filename")
with gzip.open(filename + ".gz", "wb") as outfile:
outfile.write(plaintext)
..
I am new to Android and this is my first question here.
I am trying to add a colored vertical border at the beginning of the cardview. How can I achieve it on xml ? I tried adding it with empty textv..
I'm looking for any manner of accessing the "parent" scope within a directive. Any combination of scope, transclude, require, passing in variables (or the scope itself) from above, etc. I'm totally ..
I have this code which reads all the files from a directory.
File textFolder = new File("text_directory");
File [] texFiles = textFolder.listFiles( new FileFilter() {
public boole..
Is there any way in Java so that I can get Unicode equivalent of any character? e.g.
Suppose a method getUnicode(char c). A call getUnicode('÷') should return \u00f7...
In a Git code repository I want to list all commits that contain a certain word. I tried this
git log -p | grep --context=4 "word"
but it does not necessarily give me back the filename (unless it's..
Is there an easy way to get AIC for a Conway–Maxwell-Poisson regression from COM-poisson package in R? see http://cran.r-project.org/web/packages/COMPoissonReg/COMPoissonReg.pdf I am not able to f..
I want to set a variable in Python to true or false. But the words true and false are interpreted as undefined variables:
#!/usr/bin/python
a = true;
b = true;
if a == b:
print("same");..
I don't like CMD.EXE, the built-in Windows terminal. Among its problems:
Hard to copy and paste.
Hard to resize the window.
Hard to open another window (no menu options do this).
Seems to always sta..
What is the fastest way to check if an object is empty or not?
Is there a faster and better way than this:
function count_obj(obj){
var i = 0;
for(var key in obj){
++i;
}
re..
In my Win 7 development machine, and in order to use SQL Express instance instead of the localDB installed by default. I unchecked "Use IIS Express" in my MVC 4 project properties page (Web tab), then..
Here comes the trouble.
I want to delete all rows from datagridview.
This how i add rows:
private void ReadCompleteCallback(object clientHandle, Opc.Da.ItemValueResult[] results)
{
foreach (O..
I am unit testing a .NET application (.exe) that uses an app.config file to load configuration properties. The unit test application itself does not have an app.config file.
When I try to unit tes..
I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes.
How do I resize the iframes to fit the height of the iframes' content?
I've t..
I am using scikit-learn for classification of text documents(22000) to 100 classes. I use scikit-learn's confusion matrix method for computing the confusion matrix.
model1 = LogisticRegression()
mode..
I've just upgraded to 2.3.0 and now I'm getting the error
You cannot apply bindings multiple times to the same element.
that I wasn't getting in 2.2.1.
I'm getting a partial view from my MVC c..
<script type="text/javascript">
/* ... */
</script>
vs.
<script language="Javascript">
/* ... */
</script>
Which should be used and why?
Or, the third alternative..
I get these error messages for all cout and endl:
main.cc:17:5: error: ‘cout’ was not declared in this scope
main.cc:17:5: note: suggested alternative:
/usr/include/c++/4.6/iostream:62:18: note: ..
I want to know that what should be the package name of android app? Means normally we used com.appname OR com.organizationName.appName, But when we are submitting our application in to market then som..
This problem has completely shot my entire day. I reformatted my old windows XP comp and tried installing XAMPP only to find that when i try to start Apache xampp claims port 80 is busy....WHAT DOES T..
I want to access a URL which requires a username/password. I'd like to try accessing it with curl. Right now I'm doing something like:
curl http://api.somesite.com/test/blah?something=123
I get an ..
I would like to write a like query in JpaRepository but it is not returning anything :
LIKE '%place%'-its not working.
LIKE 'place' works perfectly.
Here is my code :
@Repository("registerUserRep..
I want to list all packages I have installed on a system from a given repo using yum. Usually to do this I use yum list installed | grep "something". But now I am faced with a problem. The repo I am i..
How do I get the current route in Symfony 2?
For example, routing.yml:
somePage:
pattern: /page/
defaults: { _controller: "AcmeBundle:Test:index" }
How can I get this somePage value?..
I need to write JUnit tests for an old application that's poorly designed and is writing a lot of error messages to standard output. When the getResponse(String request) method behaves correctly it re..
Usually we can define a variable for a C++ struct, as in
struct foo {
int bar;
};
Can we also define functions for a struct? How would we use those functions?..
I am new to Android Studio and want to know about shortcuts.
In Eclipse we use shift-ctrl-O for importing. In Android Studio we use
alt-enter. My question about importing override methods and unimple..
I have following DIV . I want to display the DIV after button click .Now it is display none
<div style="display:none;" class="answer_list" > WELCOME</div>
<input type="button" name="..
Is there a place where I can find all the keycodes for keys on a keyboard? (For example, the key up may be #114)
I can't seem to find one no matter what I search :(
Thanks!..
I made a collection for which I want to provide an STL-style, random-access iterator. I was searching around for an example implementation of an iterator but I didn't find any. I know about the need f..
Is there a way to tell IntelliJ never to use wildcard imports?
Under 'Settings > Code Style > Imports', I can see that you can specify the 'class count' prior to IntelliJ using wildcard imports. Howe..
I'm still fairly new at React, but I've been grinding along slowly and I've encountered something I'm stuck on.
I am trying to build a "timer" component in React, and to be honest I don't know if I'..
I have uploaded my localhost files to my website but it is showing me this error:-
: [2] file_put_contents( ***WebsiteURL*** /cache/lang/ ***FileName*** .php)
[function.file-put-contents]: failed to..
HashSet is based on HashMap.
If we look at HashSet<E> implementation, everything is been managed under HashMap<E,Object>.
<E> is used as a key of HashMap.
And we know that HashMap..
How would i do this?
I got this:
name = "^aH^ai"
string.gsub(name, "^a", "")
which should return "Hi", but it grabs the caret character as a pattern character
What would be a work around for thi..
I have some template code that I would prefer to have stored in a CPP file instead of inline in the header. I know this can be done as long as you know which template types will be used. For example..
I am running Eclipse Helios and I have g++-4.6 installed. Hope I am not wrong that g++4.6 implements C++ 11 features. I have created a C++ project which uses the nullptr and auto keywords. The build g..
Are there overall rules/guidelines for what makes a method thread-safe? I understand that there are probably a million one-off situations, but what about in general? Is it this simple?
If a method o..
I have images that will be quite big in dimension and I want to shrink them down with jQuery while keeping the proportions constrained, i.e. the same aspect ratio.
Can someone point me to some code, ..
I'm trying to get Javascript to read/write to a PostgreSQL database. I found this project on github. I was able to get the following sample code to run in node.
var pg = require('pg'); //native libpq..
I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results..
I am finding it difficult to easily see what attributes/properties exist on all of my model classes since they are not explicitly defined in my class files.
To discover model attributes, I keep the s..
I'm trying to read some really big numbers from standard input and add them together.
However, to add to BigInteger, I need to use BigInteger.valueOf(long);:
private BigInteger sum = BigInteger.valu..
Classes such as Stream, StreamReader, StreamWriter etc implements IDisposable interface. That means, we can call Dispose() method on objects of these classes. They've also defined a public method call..
I want my datetime to be converted to a string that is in format "dd/MM/yyyy"
Whenever I convert it using DateTime.ToString("dd/MM/yyyy"), I get dd-MM-yyyy instead.
Is there some sort of culture inf..
I'm using FormData to upload files. I also want to send an array of other data.
When I send just the image, it works fine. When I append some text to the formdata, it works fine. When I try to attac..
I'm trying to create an array of structs. Is the code below valid? I keep getting an expected primary-expression before '{' token error.
int main() {
int pause;
struct Customer {
int uid;
..
This is concerning Windows XP processes.
I have a process running, let's call it Process1. Process1 creates a new process, Process2, and saves its id.
Now, at some point Process1 wants Process2 to d..
I've created one WCF service and deployed it on Server. When I browse this service it gives me positive response with ?wsdl URL. Now I'm trying to test the service through WCF Test client. It shows pr..
I'm trying to create a interval call to a function in jQuery, but it doesn't work! My first question is, can I mix common JavaScript with jQuery?
Should I use setInterval("test()",1000); or somethin..
I created a local GIT repository on Windows. Let's call it AAA. I staged, committed, and pushed the contents to GitHub. git@github.com:username/AAA.git
I realized I made a mistake with the name.
On..
I need a function to add a GUID to cells in excel. I found this previous question on stackoverflow, but it is not working. It suggests the following function:
=CONCATENATE(DEC2HEX(RANDBETWEEN(0,429496..
Instead of making a list of alphabet characters like this:
alpha = ['a', 'b', 'c', 'd'.........'z']
is there any way that we can group it to a range or something? For example, for numbers it can be..
I've set up PyCharm, created my virtualenv (either through the virtual env command, or directly in PyCharm) and activated that environment as my Interpreter. Everything is working just fine.
However,..
Can anyone explain the use of Python's setUp and tearDown methods while writing test cases apart from that setUp is called immediately before calling the test method and tearDown is called immediately..
I have downloaded some open source software written in Java and tried to compile it using Eclipse.
I got the error: "The hierarchy of the type 'Class name' is inconsistent" in some files.
What causes ..
I would like to check if the decimal number is NULL or it has some value, since the value is assigned from database in class object:
public decimal myDecimal{ get; set; }
and then I have
myDecima..
I'm trying to retrieve a picture from my file system after a good storage,(instead of putting it in the database I copy it to the disc and i put the path to the db)
I had st..
I found out ways to terminate (shut-down or stop) my Java programs. I found two solutions for it.
using return;When I want to quit or terminate my program execution , I add this.
using System.exit(..
I am new to using the json-simple library in Java and I've been through both the encoding and decoding samples. Duplicating the encoding examples was fine, but I have not been able to get the decoding..
I'm currently learning C++ and I've learned about the incrementation a while ago.
I know that you can use "++x" to make the incrementation before and "x++" to do it after.
Still, I really don't know ..
I need to use UTF-8 in my resource properties using Java's ResourceBundle. When I enter the text directly into the properties file, it displays as mojibake.
My app runs on Google App Engine.
Can any..
I need to run all of my .html files as .php files and I don't have time to change all of the links before our presentation tomorrow. Is there any way to "hack" this with my Apache server?..
How do I compare dates in between in Java?
Example:
date1 is 22-02-2010
date2 is 07-04-2010 today
date3 is 25-12-2010
date3 is always greater than date1 and date2 is always today. How do I veri..
New at Python and Numpy, trying to create 3-dimensional arrays. My problem is that the order of the dimensions are off compared to Matlab. In fact the order doesn't make sense at all.
Creating a matr..
I have the following array, which I would like to reindex so the keys are reversed (ideally starting at 1):
Current array (edit: the array actually looks like this):
Array (
[2] => Object
(
..
I have a library that I distribute using maven 2. The typical user of this library doesn't use maven to build their applications, but is likely somewhat familiar with maven and probably has it instal..
I can do such thing in python:
l = ['one', 'two', 'three']
if 'some word' in l:
...
This will check if 'some word' exists in the list. But can I do reverse thing?
l = ['one', 'two', 'three']
if..
I'm trying to make a gradient that emits from the middle of the screen in white, and turns to black as it moves toward the edges of the screen.
As I make a "normal" gradient like this, I have been ex..
What I need is to encrypt string which will show up in 2D barcode(PDF-417) so when someone get an idea to scan it will get nothing readable.
Other requirements:
should not be complicated
it shoul..
I'm a web developer at day and thinking about building my first real desktop application. The idea is to build a tool that automates a very repetitive task in a web application where no API is availab..
I am trying to set up FTP on Amazon Cloud Server, but without luck.
I search over net and there is no concrete steps how to do it.
I found those commands to run:
$ yum install vsftpd
$ ec2-authorize..
I'm trying to make bootstrap twitter dialog modal draggable with this jquery plugin:
http://threedubmedia.com/code/event/drag#demos
but it doesn't work.
var $div = $('html');
console.debug($('.drag..
I'm trying to fix an email issue with an inherited website and don't have access to the code (i.e. just the compiled files). This site needs to be hosted on a new web server having a different SMTP se..
I would like to create a temporary table in a Oracle database
something like
Declare table @table (int id)
In SQL server
And then populate it with a select statement
Is it possible?
Thanks..
I am creating a website, but in the database I use windows authentication.
I know that you use this for SQL authentication
<connectionStrings>
<add name="NorthwindContex"
conne..
So my dilemma is that I don't want to write the same code twice. Once for the click event and another for the touchstart event.
Here is the original code:
document.getElementById('first').addEventLi..
I know how to take a single input from user in python 2.5:
raw_input("enter 1st number")
This opens up one input screen and takes in the first number. If I want to take a second input I need to rep..
I'm trying to compile a C++ software package that was written in 2007 and I'm getting this error:
error: ‘uint32_t’ does not name a type
This is happening in 64-bit Ubuntu using g++ 4.5.2. It co..
I have a Parallel.ForEach() async loop with which I download some webpages. My bandwidth is limited so I can download only x pages per time but Parallel.ForEach executes whole list of desired webpages..
I have a 4 part CSS3 animation playing on click - but the last part of the animation is meant to take it off the screen.
However, it always goes back to its original state once it has played. Anyon..
Symbols are usually represented as such
:book_author_title
but if I have a string:
"Book Author Title"
is there a built in way in rails/ruby to convert it into a symbol where I can use the : no..
class Person
{
public:
int age;
};
I want to store objects of the class Person in a priority queue.
priority_queue< Person, vector<Person>, ??? >
I think I need to define a class ..
I'm a javascript newbie and trying to write a script for a spreadsheet that will pull various things out of it. Right off the bat, I'm having trouble defining an array of names that will be in the spr..
I have two classes, Shape and Square
class Shape {
var numberOfSides = 0
var name: String
init(name:String) {
self.name = name
}
func simpleDescription() -> String {
..
I would like to close my login menu dropdown when the user click anywhere outside of that dropdown, and I'd like to do that with Angular2 and with the Angular2 "approach"...
I have implemented a solu..
Possible Duplicate:
Installing specific package versions with Pip
I am a bit new to pip install and virtualenv in general.
I have setup an virtualenv on my server as well as on my local de..
Is there a way to detect if a key is currently down in JavaScript?
I know about the "keydown" event, but that's not what I need. Some time AFTER the key is pressed, I want to be able to detect if it ..
I want to send data to a java servlet for processing. The data will have a variable length and be in key/value pairs:
{ A1984 : 1, A9873 : 5, A1674 : 2, A8724 : 1, A3574 : 3, A1165 : 5 }
The data ..
I see in tons of examples on the web using the new HttpClient object (as part of the new Web API) that there should be HttpContent.ReadAsAsync<T> method. However, MSDN doesn't mention this metho..
I'm trying to move old data from:
this_table >> this_table_archive
copying all columns over. I've tried this, but it doesn't work:
INSERT INTO this_table_archive (*) VALUES (SELECT * FROM t..
I coded a php page that displays information from a mysql database neatly into tables. I would like to hide empty table rows with an onLoad event handler.
Here is a sample table with code that hides ..
is there a way to run the emulator without starting the Android Studio first. Perhaps from the command line. I know that this feature was available in older versions and has vanished since then. But p..
I had my solution in Visual Studio 2012 (which is under TFS source control) open and the TFS server (2010) was down. When I then made a change to one of the files and attempted to save it I got a prom..
How can we disable Chrome's autofill feature on certain <input>s to prevent them from being automatically populated when the page loads?
At the same time I need to keep autocomplete enabled, s..
I would like to know what exactly is the difference between querySelector and querySelectorAll against getElementsByClassName and getElementById?
From this link I could gather that with querySelecto..
In C#/.NET TimeSpan has TotalDays, TotalMinutes, etc. but I can't figure out a formula for total months difference. Variable days per month and leap years keep throwing me off. How can I get TotalMont..
Do you know of any "JSON Beautifier" for JavaScript?
From
{"name":"Steve","surname":"Jobs","company":"Apple"}
To
{
"name" : "Steve",
"surname" : "Jobs",
"company" : "Apple"
}
Example
som..
I'm trying to handle a bunch of files, and I need to alter then to remove extraneous information in the filenames; notably, I'm trying to remove text inside parentheses. For example:
filename = "Exam..
I am trying to get a small box to appear on the bottom-left side of an image when a mouse moves over it. Inside the box there will be a link to a different page.
Here is somewhat similar to what I wa..
I want to create a class library project with Target Framework .NET Standard 2.0.
I've updated my Visual Studio 2017 to Version 15.3 and also in Visual Studio installer checked .NET Framework 4.7 SD..
I want to compress a JPG image file with ImageMagick but can't get much difference in size. By default the output size is bigger than the input. I don't know why, but after adding some +profile option..
I am getting this error while running sudo npm install. On my server, npm was installed earlier. I've tried to delete the package-lock.json file, and ran npm cache clean --force, but it didn't work.
..
C++17 is now feature complete, so unlikely to experience large changes. Hundreds of proposals were put forward for C++17.
Which of those features were added to C++ in C++17?
When using a C++ compile..
I have something like /Date(1370001284000+0200)/ as timestamp. I guess it is a unix date, isn't it? How can I convert this to a date like this: 31.05.2013 13:54:44
I tried THIS converter for 13700012..
I want to have a small QFormLayout that grows to fill its parent widget.
I created a new .ui file using the QWidget template in Qt Designer. I put a QFormLayout inside that 'window', then put some co..
Possible Duplicate:
Generic methods and multiple constraints
I need a generic function that has two type constraints, each inheriting from a different base class. I know how to do this with..
What is the best way to horizontally space Bootstrap buttons?
At the moment the buttons are touching:
<div class="btn-group">
<button class="btn btn-inverse dropdown-toggle" data-toggle..
How can I call psql so that it doesn't prompt for a password?
This is what I have:
psql -Umyuser < myscript.sql
However, I couldn't find the argument that passes the password, and so psql alway..
HTTP has HTTP Cookies. Cookies allow the server to track the user state, the number of connections, last connection, etc.
HTTP has persistent connections (Keep-Alive) where several requests can be se..
Right now I have a canvas and I want to save it as PNG. I can do it with all those fancy complicated file system API, but I don't really like them.
I know if there is a link with download attribute o..
I am reading a C book, talking about ranges of floating point, the author gave the table:
Type Smallest Positive Value Largest value Precision
==== ======================= ============..
Not a SQL person at all. Have the following code a consultant wrote.
First, it makes sure only an elementary school has been chosen - then, after the BEGIN, if the variable @Term equals a 3 we wa..
So essentially I'm looking for specifically a 4 digit code within two angle brackets within a text file. I know that I need to open the text file and then parse line by line, but I am not sure the bes..
I am trying to fire an event on the right and left arrow key presses with jQuery. Using the following code, I can fire events on any of the alphanumeric keys, but the cursor keys (up, down, left, righ..
I have a table that contains a Xml column:
SELECT *
FROM Sqm
A sample of the xml data of a row would be:
<Sqm version="1.2">
<Metrics>
<Metric id="TransactionCleanupThread...
I have the following data frame in R:
> str(df)
'data.frame': 545227 obs. of 15 variables:
$ ykod : int 93 93 93 93 93 93 93 93 93 93 ...
$ yad : Factor w/ 42 levels "BAKUGAN","BARBIE",..: ..
I need to realize a complex if-elif-else statement in Python but I don't get it working.
The elif line I need has to check a variable for this conditions:
80, 443 or 1024-65535 inclusive
I tried
..
CString is quite handy, while std::string is more compatible with STL container. I am using hash_map. However, hash_map does not support CStrings as keys, so I want to convert the CString into a std::..
My task is to write a program that asks the user to enter 5 names which it stores in a list. Next, it picks one of these names at random and declares that person as the winner. The only issue is that ..
Here is model:
class User(Base):
...
birthday = Column(Date, index=True) #in database it's like '1987-01-17'
...
I want to filter between two dates, for example to choose all users in..
Somehow during the upgrade to VS2012 and .NET 4.5, I've managed to get NuGet confused. There are packages that appear in the package manager (and the packages folder) that I cannot delete (I believe ..