I have very large tables (30 million rows) that I would like to load as a dataframes in R. read.table() has a lot of convenient features, but it seems like there is a lot of logic in the implementati..
I'm working with wechat APIs ...
here I've to upload an image to wechat's server using this API
http://admin.wechat.com/wiki/index.php?title=Transferring_Multimedia_Files
url = 'http://file.api.we..
I have a php page from which I get response in json:
[{'com':'something'},{'com':'some other thing'}]
I want to loop it and append each to a div.
This is what I tried:
var obj = jQuery.parseJSON(..
When I backup or restore a database using MS SQL Server Management Studio, I get a visual indication of how far the process has progressed, and thus how much longer I still need to wait for it to fini..
I have an array of objects and I am using an ng-repeat to iterate over them, which is easy. The array looks something like this:
$scope.steps = [
{companyName: true},
{businessType: true},
..
Some SQL servers have a feature where INSERT is skipped if it would violate a primary/unique key constraint. For instance, MySQL has INSERT IGNORE.
What's the best way to emulate INSERT IGNORE and ON..
Hi
I've got the following query but it doesn't seem to work.
$q = $this->em->createQueryBuilder()
->update('models\User', 'u')
->set('u.username', $username)
->set('u.email..
I'm a little confused with composer.lock used in an application with a repository.
I saw many people saying that we should not .gitignore composer.lock from the repository.
If I update my libraries ..
I updated from VSCode 0.10.6 to 0.10.8, and tried using Typescript for the first time. Unfortunately I when I tell VSCode to build, I get the error:
tsc is not a recognized as an internal or externa..
I'm using the jQuery plugin Validation to validate a form. I have a select list looking like this:
<select id="select">
<option value="">Choose an option</option>
<option value="..
Is there a better way for getting rid of accents and making those letters regular apart from using String.replaceAll() method and replacing letters one by one?
Example:
Input: orcpžsíáýd
Output..
I'm building a PHP script that feeds JSON data to another script. My script builds data into a large associative array, and then outputs the data using json_encode. Here is an example script:
$data =..
I am doing something like this in javascript to print a section of my page on click of a link
function printDiv() {
var divToPrint = document.getElementById('printArea');
var newWin = window.open()..
For C++, we can use OpenMP to do parallel programming; however, OpenMP will not work for Python. What should I do if I want to parallel some parts of my python program?
The structure of the code may b..
I am stuck with this CORS problem, even though I set the server (nginx/node.js) with the appropriate headers.
I can see in Chrome Network pane -> Response Headers:
Access-Control-Allow-Origin:http:/..
I want to ask a question about the multipart/form-data. In the HTTP header, I find that the Content-Type: multipart/form-data; boundary=???.
Is the ??? free to be defined by the user? Or is it gener..
Since MySQL evidently cannot automatically insert the function now() in a datetime field in adding new records like some other databases, based on comments, I'm explicitly trying to insert it using an..
I have the following in configure.ac:
AC_CHECK_PROGS(MAKE,$MAKE make gmake,error)
if test "x$MAKE" = "xerror" ;then
AC_MSG_ERROR([cannot find a make command])
fi
This has been in our project for ..
I think this script is of big interest to any noob around here :) including me :)
What I want to create is a little code that I can use in any file and will generate a breadcrumb like this:
If the f..
Changes exist upstream in a tracked branch, but when I type git status it indicates that my local branch is up-to-date. Is this new behavior, did I change a config setting, or is something wrong?
Th..
I recently changed my Bitbucket password for security reasons. However, IntelliJ didn't update my repository to the new credentials, so it stops me from pulling/pushing anything to my repository. I am..
I have a Perl script that is counting the number of occurrences of various strings in a text file. I want to be able to check if a certain string is not yet a key in the hash. Is there a better way of..
var textTitle = "this is a test"
var result = textTitle.replace(' ', '%20');
But the replace functions stops at the first instance of the " " and I get the
Result : "this%20is a test"
Any ideas o..
THIS IS A QUESTION FOR LARAVEL 3
Given the following route
Route::get('groups/(:any)', array('as' => 'group', 'uses' => 'groups@show'));
And the URL I would like to use,
http://www.example...
Ok so here is what I'm trying to do:
I want to make a little powershell script that takes each file of my music library and then does a hash sum of it and writes that into a file like so:
test.txt ; ..
I really like the strtotime() function, but the user manual doesn't give a complete description of the supported date formats. strtotime('dd/mm/YYYY') doesn't work, it works only with mm/dd/YYYY forma..
I want to know which is the best way to stop a thread in Android. I know I can use AsyncTask instead of it and that there is a cancel() method. I have to use Threads in my situation. Here is how I'm u..
If we have a SELECT statement inside an IF EXISTS, does the execution stop as soon as it finds a record in the table? For example:
IF EXISTS(SELECT * FROM table1 WHERE Name='John' )
return 1
els..
I'm using GROUP_CONCAT() in a MySQL query to convert multiple rows into a single string.
However, the maximum length of the result of this function is 1024 characters.
I'm very well aware that I can ..
IMO both make the function to have a scope of the translation unit only.
What's the difference between "static" and "static inline" function?
Why should inline be put in a header file, not in .c fil..
I was attempting to chain two async functions together, because the first had a conditional return parameter that caused the second to either run, or exit the module. However, I've found odd behavior ..
WebKit/Blink's (Safari/Chrome) default behaviour on MacOS since 10.7 (Mac OS X Lion) is to hide scroll bars from trackpad users when they're not in use. This can be confusing; the scroll bar is often ..
I can't find anywhere it has been documented this. By default, the find() operation will get the records from beginning. How can I get the last N records in mongodb?
Edit: also I want the returned re..
Is there any way to specify the index that I want for a new row, when appending the row to a dataframe?
The original documentation provides the following example:
In [1301]: df = DataFrame(np.random..
I downloaded APK Manager that lets me unpack APK files.
But it only unpacks it and doesn't decompile the .smali file to .java.
Is it possible to decompile the .smali to .java?..
I tried using try-catch block to catch NullPointerException but still the following program is giving errors. Am I doing something wrong or is there any other way to catch NullPointerException in the..
I am aware of CocoaMySQL but I have not seen a Mac GUI for SQLite, is there one?
My Google search didn't turn up any Mac related GUI's which is why I'm asking here rather than Google...
I have a simple mysql table:
CREATE TABLE IF NOT EXISTS `pers` (
`persID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(35) NOT NULL,
`gehalt` int(11) NOT NULL,
`chefID` int(11) DEFAULT NUL..
I'm trying to locally mount a machine's C drive that is on my LAN. I need to able to browse the contents of the other machine when tracing through code. I once saw a sys admin do some crazy windows ..
License keys are the defacto-standard as an anti-piracy measure. To be honest, this strikes me as (in)Security Through Obscurity, although I really have no idea how license keys are generated. What is..
I have a select query where I am trying to search strings for multiple patterns
LIKE ('%this%' or '%that%' ) and something=else
Returns zero results
However
LIKE '%this%' and something=else
re..
I have some questions regarding the the singleton pattern as documented here:
http://msdn.microsoft.com/en-us/library/ff650316.aspx
The following code is an extract from the article:
using System;
..
Alter procedure S_Comp(@str1 varchar(20),@r varchar(100) out)
as
declare @str2 varchar(100)
set @str2 ='welcome to sql server. Sql server is a product of Microsoft'
if(PATINDEX('%'+@str1 +'%',@str2)..
What are my options if I want to create a simple XML file in python? (library wise)
The xml I want looks like:
<root>
<doc>
<field1 name="blah">some value1</field1>
..
Possible Duplicate:
Is there a printf converter to print in binary format?
Here is my program
#include<stdio.h>
int main ()
{
int i,a=2;
i=~a;
printf("a=%d\ni=%d\n",a,i);
..
I have created a procedure to write content to a text file in my local machine.
<form id="addnew">
<input type="text" class="id">
<input type="text" class="content">
<..
I am facing some difficulty with calculating the time difference between two dates.
What I want is, I have two dates let say
@StartDate = '10/01/2012 08:40:18.000'
@EndDate='10/04/2012 09:52:48.000..
I originally thought Python was a pure pass-by-reference language.
Coming from C/C++ I can't help but think about memory management, and it's hard to put it out of my head. So I'm trying to think of..
In a Java application I'm using some calls to System.out.println(). Now I want to find a way to programmatically delete this stuff.
I couldn't find any solution with google, so are there any hints?..
What is the difference between:
@Entity
public class Company {
@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.LAZY)
@JoinColumn(name = "companyIdRef", referencedColumnName = "compa..
I had a list
List<Myclass> li = new List<Myclass>();
where Myclass is
class Myclass
{
public string name {get;set;}
public decimal age {get;set;}
}
items in li looks like
i want ..
I'm trying to run psql on my Vagrant machine, but I get this error:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting connections on
Unix doma..
So I am trying to use the JavaScript on scroll to call a function. But I wanted to know if I could detect the direction of the the scroll without using jQuery. If not then are there any workarounds?
..
I need to find the OS name and version on Unix/Linux platform. For this I tried following:
lsb_release utility
/etc/redhat-release or specific file
But it does not seem to be best solution as LSB_..
I want a random selection of rows in PostgreSQL, I tried this:
select * from table where random() < 0.01;
But some other recommend this:
select * from table order by random() limit 1000;
I ha..
How do I remove an App ID from the developer program portal area? I mistakenly added a couple of app id's under the wrong login and would like to remove them, but I am not seeing a way to do so...
I am setting up a button via javascript, but the button shows not the text.
Any recommendation on how to fix it?
var b = document.createElement('button');
b.setAttribute('content', 'test content');..
I am using dreamweaver to create a website and I thought of just using Photoshop to create backgrounds. I decided to do so only because in case I'd choose to change the button name easily by just edit..
I have a problem, how can i get value from cell of datagridview
----------------------------------
id | p/w | post |
----------------------------------
1 | 1234 | A ..
In a 3-row layout:
the top row should be sized according to its contents
the bottom row should have a fixed height in pixels
the middle row should expand to fill the container
The problem is that ..
I have an upload form and am checking the file size and file type to limit the uploaded file to 2 megabytes and either .pdf, .jpg, .gif or .png file types. My goal is to have an alert message display..
Today I was browsing through some questions on this site and I found a mention of an enum being used in singleton pattern about purported thread safety benefits to such solution.
I have never used enu..
I'm trying to install Bower on XUbuntu 13.10, following the instructions on the Bower home page, after doing sudo apt-get install npm and sudo npm install -g bower I get the following after issuing bo..
I got this error after upgrading to Angular 2 Rc.5.
This is my component template:
<md-input
[(ngModel)]="recipient"
name="recipient"
placeholder="Name"
class="col-sm-4"
(blur)..
I'm making a simple remove link with an onClick event that brings up a confirm dialog. I want to confirm that the user wants to delete an entry. However, it seems that when Cancel is clicked in the di..
Hi i want to set min date in my jquery datepicker to (1999-10-25) so i tried the below code its not working.
$(function () {
$('#datepicker').datepicker({
dateFormat: 'yy-mm-dd',
..
I have a MasterComponent which loads header, footer, sidebar etc. On the header there is a dropdown whose options are set once the user is logged in. I want the header to be constant even if I navigat..
I'm developing an OAuth authentication flow purely in JavaScript and I want to show the user the "grant access" window in a popup, but it gets blocked.
How can I prevent pop up windows created by eit..
To search forward in Vim for cake, I'd type /cake, but the cursor jumps to the first match when I press return. Is there a Vim command analogous to "find next"?..
Disclaimer. This question was asked many times before. But since time has passed and now we are close to Bootstrap 4 release with full flexbox support, it is time for new answers for the same question..
In my app a User can create a Business. When they trigger the index action in my BusinessesController I want to check if a Business is related to the current_user.id:
If yes: display the business.
..
A very easy one for someone,
The following insert is giving me the
ORA-01722: invalid number
why?
INSERT INTO CUSTOMER VALUES (1,'MALADY','Claire','27 Smith St Caulfield','0419 853 694');
INSE..
I want to extract the first (or last) n characters of a string. This would be the equivalent to Excel's LEFT() and RIGHT(). A small example:
# create a string
a <- paste('left', 'right', sep = '')..
I am having this issue where I am using the Android's Holo theme on a tablet project. However, I have a fragment on screen which has a white background. I am adding an EditText component on this fragm..
I use huge data files, sometimes I only need to know the number of lines in these files, usually I open them up and read them line by line until I reach the end of the file
I was wondering if there i..
I've read every other google source and SO thread, with nothing working.
Python 2.7.3 32bit installed on Windows 7 64bit. Download, extracting, and then trying to install PyCrypto results in "Unable ..
I have a JAR file where all my code is archived for running. I have to access a properties file which need to be changed/edited before each run. I want to keep the properties file in the same director..
I'm trying to change the default color for the options menu which is white: I want a black background for every item on the options menu.
I've tried some shoots like android:itemBackground="#000000" ..
This is probably a dumb question, but I can't find the answer in the docs. Did the "Done" button on the pop-up keyboard always cause the keyboard to disappear? I see a lot of code around the web like ..
Trying to create a C# client (will be developed as a Windows service) that sends SOAP requests to a web service (and gets the results).
From this question I saw this code:
protected virtual WebReque..
I need to grab the height of the window and the scrolling offset in jQuery, but I haven't had any luck finding this in the jQuery docs or Google.
I'm 90% certain there's a way to access height and sc..
I have a variable like this:
words="??????"
I want to make a for loop on each of the characters, one at a time, e.g. first character="?", then character="?", character="?", etc.
The only way I kno..
Possible Duplicates:
What is the difference between the dot (.) operator and -> in C++?
What is the arrow operator (->) synonym for in C++?
The header says it all.
What does -> me..
I would like to know how to apply border-radius to IE8 and below IE8 browsers.
I know that border-radius is a HTML5 feature and IE8 doesn't support it.
I found that by using .htc we can achieve this..
How can I strip / remove all spaces of a string in PHP?
I have a string like $string = "this is my string";
The output should be "thisismystring"
How can I do that?..
I'm familiar with the issue behind ORA-01775: looping chain of synonyms, but is there any trick to debugging it, or do I just have to "create or replace" my way out of it?
Is there a way to query t..
Today I upgraded my Intellij Idea on macOS Sierra, and now, when I run apps in console I have this error:
objc[3648]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachine..
When using jquery .change on an input the event will only be fired when the input loses focus
In my case, I need to make a call to the service (check if value is valid) as soon as the input value is ..
Basically I'm trying to pass a URL like this:
www.foobar.com/?first=1&second=12&third=5
into a URL like this:
http://www.facebook.com/sharer.php?&t=FOOBAR&u=http://www.foobar.com/f..
We initialize a numpy array with zeros as bellow:
np.zeros((N,N+1))
But how do we check whether all elements in a given n*n numpy array matrix is zero.
The method just need to return a True if all ..
I have come across this PHP code to check email address using SMTP without sending an email.
Has anyone tried anything similar or does it work for you? Can you tell if an email customer / user enters..
I need to figure out a way uniquely identify each computer which visits the web site I am creating. Does anybody have any advice on how to achieve this?
Because i want the solution to work on all mach..
In Yii2 I'm trying to construct hidden input
echo $form->field($model, 'hidden1')->hiddenInput()->label(false);
But I also need it to have some value option, how can I do that ?..
Crystal Version - Crystal Reports 2008
Business Objects - XI
I have written a query to populate a subreport and want to pull in a parameter to that query based on input from a user. My question is, ..
I know that the entities < and > are used for < and >, but I am curious what these names stand for.
Does < stand for something like "Left tag" or is it just a code?..
I have a C# code which does lot of insert statements in a batch. While executing these statements, I got "String or binary data would be truncated" error and transaction roledback.
To find out the w..
I want to sum the values in columns B, C, and D using a formula. I tried combining SUMIF, VLOOKUP and INDEX with MATCH but no luck.
I would like to look for France and then add the values in B, C..
This would mean that the class was initialized, but the variables were not set.
A sample Class:
public class User {
String id = null;
String name = null;
public String getId() {
..
I want to show a dropdown for gender selection. I passed a string array as
String arr[]=new String[]{"male","female"};
but the problem is that is shows default selection with the value of "male" an..
How to set cell/column value dynamically using PHPExcel library?
I am fetching result set from MySQL database and I want to write data in excel format using PHPExcel library. Looking at example
$ob..
I noticed that JAR, WAR and EAR files have a MANIFEST.MF file under the META-INF folder.
What is the use of the MANIFEST.MF file? What all things can be specified in this file?..
Does anybody know how to easily undo a git rebase?
The only way that comes to mind is to go at it manually:
git checkout the commit parent to both of the branches
then create a temp branch from th..
I don't understand the JG/JNLE/JL/JNGE instructions, which come after CMP.
for example, If I have:
CMP al,dl
jg label1
When al=101; dl =200.
On what we ask the jg? Is it on al>dl? or al-dl>..
I am getting the following error:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at SQLite.Vm.step(Native Method)
at SQLite.Database.get_table(Database.java:31..
I'm building web app that needs to communicate with another application using socket connections. This is new territory for me, so want to be sure that sockets are different than websockets. It seems..
After installing Visual Studio 2012 and opening my solution I get a series of errors in this form:
The Web Application Project Foo is configured to use IIS.
Unable to access the IIS Metabase. Yo..
I am working on an app in which I want to show a ProgressBar, but I want to replace the default Android ProgressBar.
So how can I customize the ProgressBar?
Do I need some graphics and animation for..
I am trying to relearn some PHP basics for making a simple login script, however I get an error I have not received before(I made the same script a little over a year ago and never had this error. I s..
I want to integrate Marketo form with my existing website on yii framework.
My code works on all the browsers except Firefox.
Excerpt from my code:
$('#button').click(function () {
var formD..
I'm writing an iOS app with a table view inside a tab view. In my UITableViewController, I implemented -tableView:didSelectRowAtIndexPath:, but when I select a row at runtime, the method isn't being c..
I want to draw a horizontal bar chart with Chart.js but it keeps scaling the chart instead of using the height I assign the canvas form the script.
Is there any way to set the height of the graph fro..
I have been given a specification that requires the ISO 8601 date format, does any one know the conversion codes or a way of getting these 2 examples:
ISO 8601 Extended Date 2000-01-14T13:42Z
ISO 86..
I have a float column with numbers of different length and I'm trying to convert them to varchar.
Some values exceed bigint max size, so I can't do something like this
cast(cast(float_field as bigin..
I have a Java EE Web Application which connects to a SQL Server 2008 instance. I don't have any problem connecting and retrieving to all my tables, except for one of them. The error in the Tomcat log ..
I'm making a simple, very lightweight front-controller. I need to match request paths to different handlers (actions) in order to choose the correct one.
On my local machine HttpServletRequest.getPat..
I'm not able to get the current physical path within Application_Start using
HttpContext.Current.Request.PhysicalApplicationPath
because there is no Request object at that time.
How else can I ge..
I have this code
public static Boolean freq[] = new Boolean[Global.iParameter[2]];
freq[Global.iParameter[2]] = false;
could someone tell me what exactly i'm doing wrong here and how would i correc..
I want to install setup file of twilio. When I install it through given command it is given me an error:
No module named setuptools.
Could you please let me know what should I do?
I am using p..
Here is a regex that works fine in most regex implementations:
(?<!filename)\.js$
This matches .js for a string which ends with .js except for filename.js
Javascript doesn't have regex lookbehi..
I'm looking for a class for creating CSV Excel files.
Expected features:
Extremely simple to use
Escapes commas and quotes so excel handles them fine
Exports date and datetimes in timezone-proof fo..
How can I statically link only a some specific libraries to my binary when linking with GCC?
gcc ... -static ... tries to statically link all the linked libraries, but I haven't got the static versio..
When using the Bootstrap integration for DataTables, I see the following error in the console:
Uncaught TypeError: Cannot read property 'defaults' of undefined (dataTables.bootstrap.js:20)
This caus..
I'm trying to setup a series of div's with a background image that each have their own fixed height, and stretch to fill up the width, even if there is overflow on the top/bottom that is clipped. I j..
My function is:
CREATE OR REPLACE FUNCTION FnUpdateSalegtab09
(
iacyrid Integer,iRepId Integer,iDrId Integer,ivrid Integer,imode smallint,itrno
varchar,itrdate timestamp,iacid Integer,ivrno varcha..
I am trying to open port 22 on osx so I can connect to localhost using ssh. This is my current situation:
ssh localhost
ssh: connect to host localhost port 22: Connection refused
I have generated ..
I 'm Following this guide in order to set up a pod using minikube and pull an image from a private repository hosted at: hub.docker.com
When trying to set up a pod to pull the image i see CrashLoopBa..
In .NET, what's the best way to prevent multiple instances of an app from running at the same time? And if there's no "best" technique, what are some of the caveats to consider with each solution?..
I tried the following to check for the datatype (specifically for integer), but not working.
var i = "5";
if(Number(i) = 'NaN')
{
console.log('This is not number'));
}
..
I know that you can get column names from a table via the following trick in hive:
hive> set hive.cli.print.header=true;
hive> select * from tablename;
Is it also possible to just get the co..
From what I gather, the iPad is using iPhone OS, but with a different screen resolution from the iPhone and iPod touch. So many sites may have to change their user agent detection to adapt to the iPad..
I'm building a web application using Visual Studio 2012.
I'm attempting to add word count into my textbox.
However after adding the the javascript codes and the html codes. I receive the error as st..
Is there a way using JavaScript to disable the ability to paste text into a text field on an HTML form?
E.g.
I have a simple registration form where the user is required to input their email twice. T..
I'm new to HTML and JavaScript, what I'm trying to do is from an HTML file I want to extract the things that set there and display it to another HTML file through JavaScript.
Here's what I've done so..
I'm trying to multiply two existing columns in a pandas Dataframe (orders_df) - Prices (stock close price) and Amount (stock quantities) and add the calculation to a new column called 'Value'. For som..
If I have a string Abc: Lorem ipsum sit amet, how can I use JavaScript/jQuery to remove the string before the : including the :. For example the above string will become: Lorem ipsum sit amet...
I have a variable in the parent component that might be changed by child, parent will be using this variable in the view and thus has to propagate changes.
import {Component, View} from 'angular2/cor..
Im using Spring Boot and want to use a Controller to receive a multipart file upload.
When sending the file I keep getting the error 415 unsupported content type response and the controller is never r..
I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14.
In MVNrepository site the dependency to put in the POM is:
<dependency>
<groupId>com.oracle..
I'm trying to connect to a Tor hidden service using the following PHP code:
$url = 'http://jhiwjjlqpyawmpjx.onion/'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RET..
How would you do this PHP switch statement?
Also note that these are much smaller versions, the 1 I need to create will have a lot more values added to it.
Version 1:
switch ($p) {
case 'hom..
I have a JavaScript function that fills a table:
<script>
var col1 = ["Full time student checking (Age 22 and under) ", "Customers over age 65", "Below $500.00"];
var col2 = ["None", "None", ..
I have two classes declared as below:
class User
{
public:
MyMessageBox dataMsgBox;
};
class MyMessageBox
{
public:
void sendMessage(Message *msg, User *recvr);
Message receiveMessage();
vec..
I have a link that opens up JSON data in the browser, but unfortunately I have no clue how to read it. Is there a way to convert this data using JavaScript in CSV format and save it in JavaScript file..
I wish to calculate the time it took for an API to return a value.
The time taken for such an action is in the space of nano seconds. As the API is a C++ class/function, I am using the timer.h to cacu..
I am trying to add a message in my jsp after the process is done by hitting the submit button.
function onSubmit() {
alert("Master_Data.xlsx and Consistency_Check_Data.xlsx are located under d:/stage..
I'm brand new to jQuery and have some experience using Prototype. In Prototype, there is a method to "flash" an element — ie. briefly highlight it in another color and have it fade back to norma..
I am running IIS 7.5 in Windows 7 and have already gone into "Turn Windows features on or off" and enabled ASP in "Internet Information Services/World Wide Web Service/application Development Features..
I was asked to build a java system that will have the ability to load new code (expansions) while running.
How do I re-load a jar file while my code is running? or how do I load a new jar?
Obviously..
I've got GlassFish 2.1.1 installed. I have a 1.5 and a 1.6 JDK installed. Even though my JAVA_HOME variable is set to the 1.5 version (and both "java -version" and "javac -version" display 1.5), whene..
I am using Django to build a website with MySQL. Now as I am learning so I need to change the Model very often so I want that all tables get cleared and new table get created.
But syncdb doesn't touc..
How can I get the HTML source in a variable using the Selenium module with Python?
I wanted to do something like this:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get("http..
I want to retrieve information like the city, state, and country of a visitor from their IP address, so that I can customize my web page according to their location. Is there a good and reliable way t..
I am working on a Git branch that has some broken tests, and I would like to pull (merge changes, not just overwrite) these tests from another branch where they are already fixed.
I know I can do
gi..
I have a collection of checkboxes with generated ids and some of them have an extra attribute. Is it possible to use JQuery to check if an element has a specific attribute?
For example, can I verify i..
I have a dictionary: keys are strings, values are integers.
Example:
stats = {'a':1000, 'b':3000, 'c': 100}
I'd like to get 'b' as an answer, since it's the key with a higher value.
I did the fo..
I have a Freemarker template which contains a bunch of placeholders for which values are supplied when the template is processed. I want to conditionally include part of the template if the userName v..
function validate() {
if(document.myForm.name.value =="" ){
alert("Enter a name");
document.myForm.name.focus();
return false;
}
This is what I've written it for an empty string, now i need it to ac..
According to this page http://kangax.github.io/compat-table/es6/, ES6 features are not implemented in IE 11.
Does IE 11 have a plan for implementing them one day or can I forget about it?
Is there a..
I'm writting a regular expression for match with simple words and single hyphenated words using re module of python, so for example in: test_case_input = """the wide-field infrared survey explorer is..
I'm trying to use an ASP.NET RangeValidator to validate a date on a textbox. The format of the date entered on the textbox is dd MMMM yyyy.
How can I use the range validator to validate a valid date?..
In my bash script I do:
mkdir product;
When I run the script more than once I get:
mkdir: product: File exists
In the console.
So I am looking to only run mkdir if the dir doesn't exist. Is th..
Let's say my sample url is
http://example.com/one/two
and I say I have the following route
app.get('/one/two', function (req, res) {
var url = req.url;
}
The value of url will be /one/two..
I see that someone made this for it: https://github.com/brentvatne/react-native-linear-gradient
But is there support for it in RN itself? Something like
style = StyleSheet.create({
backgroundGra..
I have a webpage I want to use with YQL. But I need the XPath of a specific item. I can see it in the debug tools area for Google Chrome but I don't see a way to copy that XPath.
Is there a way to ..
please help me to plot the normal distribution of the folowing data:
DATA:
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
h = [186, 176, 158, 180, 186, 168, 168, 16..
I have a page in chrome which contains many textboxes and I wish to feed values automatically to them. I already have the list of name-value pairs, so if I could simple execute a series of Javascript ..
I am trying to search through a Pandas Dataframe to find where it has a missing entry or a NaN entry.
Here is a dataframe that I am working with:
cl_id a c d e ..
I use Traceur Compiler to have advantage with ES6 features now.
I want to implement this stuff from ES5:
function Animal() {
var self = this,
sayHi;
sayHi = function() {
s..
I'm trying to run npm behind a proxy. I've tried both entering the proxy directly or through Authoxy:
npm config set proxy http://localhost:8999
npm config set https-proxy http://localhost:8999
Reg..
I have an Oracle tnsnames.ora file from my previous workplace. I want to pick it up with my newly installed PL SQL Developer on another computer. I have copied the file into ..ORACLE/product/11.2.0/cl..
I have dynamically created textboxes, and I want each of them to be able to display a calendar on click. The code I am using is:
$(".datepicker_recurring_start" ).datepicker();
Which will only work..
I am trying to learn AJAX for this project at work. I have a site that loads medications that a patient is taking.
I call this AJAX function up recursively so that it will append a new table containi..
Is there any quick way of getting Chrome to output timestamps in console.log writes (like Firefox does). Or is prepending new Date().getTime() the only option?..
I am creating custom Wordpress theme using a starter theme _Underscores. I am also using Bootstrap as a front-end framework.
I would like to modify wp_nav_menu so that it assigns current menu item cl..