If someone deleted a remote branch because the work is over and I don't know, I won't do a git fetch --prune and eventually I will push back the deleted branch.
Is there a viable solution for forcing..
I need to create a File object from URL object
My requirement is
I need to create a file object of a web image (say googles logo)
URL url = new URL("http://google.com/pathtoaimage.jpg");
File f = c..
My table has two DATE format attributes, however, when i try to insert value it throws an error: date format picture ends before converting entire input string.
Here is my attempted code:
insert into..
I've searched for 2 days and can't find anything. I find things that are close, but not what I need.
I got a new computer recently and copied all of my projects over to my new computer.
I opened Ecl..
I have a user control that I load into a MainWindow at runtime. I cannot get a handle on the containing window from the UserControl.
I have tried this.Parent, but it's always null. Does anyone know ..
Our developers use a mix of Windows and Unix based OS's. Therefore, symlinks created on Unix machines become a problem for Windows developers. In windows (msysgit), the symlink is converted to a text ..
In my mvc asp.net application, I am getting an error in edit function : in given code
public ActionResult Edit(int id)
{
var res = (from r in objeEntities.DocumentationsSet.Include("DocStatus"..
I'm trying to invoke the method in my onClick (View v) XML, but does not work with Fragment. This is the error.
01-17 12:38:36.840: E/AndroidRuntime(4171): java.lang.IllegalStateException:
Could not..
I am not sure what is this error!
#1292 - Truncated incorrect DOUBLE value:
I don't have double value field or data!
I have wasted a whole hour trying to figure this out!
here is my query
INSER..
What is the best way to close an ASPX page from the code-behind?
I have a button event handler that I want to close the page after the user has clicked an ASP.NET button on the page. I have tried ..
I am new to C++ programming, but I have experience in Java. I need guidance on how to pass objects to functions in C++.
Do I need to pass pointers, references, or non-pointer and non-reference values..
If I have a .html file in a GitHub repository, e.g. for running a a set of JavaScript tests, is there any way I can view that page directly—thus running the tests?
For example, could I somehow actu..
I'm newbie in Go. This issue is driving me nuts. How do you init array of structs in Go?
type opt struct {
shortnm char
longnm, help string
needArg bool
}
const basename_opts []..
On my debian server (squeeze) I get this message every few seconds:
Sep 18 21:28:14 myhost kernel: [7903784.720091] AIF:UNPRIV connect
attempt: IN=eth0 OUT= MAC= SRC=my_serverip_eth0 DST=224.0.0..
I am using jQuery and jQuery-ui and want to animate various attributes on various objects.
For the sake of explaining the issue here I've simplified it to one div that changes from blue to red when ..
I have a list 'a'
a= [(1,2),(1,4),(3,5),(5,7)]
I need to find all the tuples for a particular number. say for 1 it will be
result = [(1,2),(1,4)]
How do I do that?..
I am looking to implement a sort feature for my address book application.
I want to sort an ArrayList<Contact> contactArray. Contact is a class which contains four fields: name, home number, mo..
I'm using SQL Server 2008 R2. I have table called EmployeeHistory with the following structure and sample data:
EmployeeID Date DepartmentID SupervisorID
10001 20130101 001 10009
..
If I had a URL such as
http://localhost/search.php?year=2008
How would I write a JavaScript function to grab the variable year and see if it contains anything?
I know it can be done with location...
As I know, %debug magic can do debug within one cell.
However, I have function calls across multiple cells.
For example,
In[1]: def fun1(a)
def fun2(b)
# I want to set a b..
User u = new User();
Type t = typeof(User);
u is User -> returns true
u is t -> compilation error
How do I test if some variable is of some type in this way?..
I have a view in SQL Server 2008 and would like to view it in Management Studio.
Example:
--is the underlying query for the view Example_1
select *
from table_aView
View name: Example_1
How to ..
I would like to build a navigation-bar effect like it is on http://dootrix.com/ on my page (after scrolling down the bar getting smaller and the logo changes). Im using bootstrap 3 for my page. Is the..
In a cell in Excel sheet I have a Date value like:
01/01/2010 14:30:00
I want to convert that Date to Text and also want the Text to look exactly like Date. So a Date value of 01/01/2010 14:30:00 s..
I have two characters displayed in a game I am writing, the player and the enemy. defined as such:
public void player(Graphics g) {
g.drawImage(plimg, x, y, this);
}
public void enemy(Graphics g..
I am trying to define a function to make the perimeter of a rectangle. Here is the code:
width = input()
height = input()
def rectanglePerimeter(width, height):
return ((width + height)*2)
print(r..
I have tried a few different methods, like print(boolean isLeapYear) and a few others, but I can not figure out how to get it to work. It always says that I have a missing class (boolean is primitive,..
I was wondering if it was possible, in a console application, to write characters like ? using .NET. When I try to write this character, the console outputs a question mark...
A server software my client communicates with regularly sends transaction messages on port 4000. I need to print those messages to the console line by line. (Eventually I will have to write those valu..
Here is my code (well, some of it). The question I have is, can I get the first 9 numbers to show with a leading 00 and numbers 10 - 99 with a leading 0.
I have to show all of the 360 monthly payment..
I'm trying to get a simple Java method call from C++ while Java calls native method. Here's the Java code:
public class MainActivity extends Activity {
private static String LIB_NAME = "name";
..
How can I post values from a multiple select in a form? When I hit submit none of the selected values are posted.
<form id="form" action="" method="post">
<div>
<select id..
I want to check if a String contains the words "stores", "store", and "product" in that order, no matter what is in between them.
I tried using someString.contains(stores%store%product); and also .co..
It's clear that a search performance of the generic HashSet<T> class is higher than of the generic List<T> class. Just compare the hash-based key with the linear approach in the List<T&..
I am trying to use Java 8 Streams to find elements in a LinkedList. I want to guarantee, however, that there is one and only one match to the filter criteria.
Take this code:
public static void main..
I'm getting acquainted with signals in C. I can't figure out what kind of signals SIGUSR1 and SIGUSR2 are and how can I trigger them. Can anyone please explain it to me?..
Is it possible to cancel a UIView animation while it is in progress? Or would I have to drop to the CA level?
i.e. I've done something like this (maybe setting an end animation action too):
[UIView ..
Is there a way to immediately stop PHP code execution?
I am aware of exit but it clearly states:
Terminates execution of the script. Shutdown functions and object destructors will always be execu..
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'm trying to get an API Controller to work inside an ASP.NET MVC 4 web app. However, every request results in a 404 and I'm stumped. :/
I have the standard API controller route from the project temp..
I just started learning apple swift programming for iOS coming from android. I basically can now read and manipulate swift code and also learned some common classes used in iOS swift programming but s..
Object cannot be cast from DBNull to other types.
I have a following function which throws the above error. I am handling all nulls in store procedure and in the C# code.
So where is it getting this..
I just installed vs 2010, followed by IIS in window 7. when building a website in .net framework 4.0 and convert this into application in IIS then its shows this error
If i remove the targetFramew..
I'm trying to create required libraries in a package I'm distributing. It requires both the SciPy and NumPy libraries.
While developing, I installed both using
apt-get install scipy
which installed..
I cant seem to get build tools for the latest gradle at all. I suspect its something to do with proxy setting for gradle. I have had a good look online but still cant seem to find a solution. I use gr..
I have a really simple external css stylesheet that has the following :
div.hideBox {
display:none;
}
So when the html page loads, the div with that class attribute 'hideBox' will not show on t..
There's been many questions on styling on action bars, but the ones I've found either are relating to styling the tabs, or have answers that don't work for me.
The question is really quite simple. I ..
I've got a stylesheet that will not, for whatever reason, apply list-style-type to a UL element. I'm using YUI's Grid CSS with their reset-fonts-grid.css file, which I know strips that out as part of ..
I need to get a line count of a large file (hundreds of thousands of lines) in python. What is the most efficient way both memory- and time-wise?
At the moment I do:
def file_len(fname):
with op..
I have a button on a JFrame that when clicked I want a dialog box to popup with multiple text areas for user input. I have been looking all around to try to figure out how to do this but I keep on ge..
This might appear to be a dupe, but rest assured it isn't - I have searched both SO as well as the rest of the web for an answer to my problem and ended up finding the same insufficient "solutions" ov..
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..
I have a div and want to find the bottom position. I can find the top position of the Div like this, but how do I find the bottom position?
var top = $('#bottom').position().top;
return top;
..
After the installation of OSX Lion, I tried to:
nano /etc/apt/sources.list
But I get this error:
Error opening terminal: xterm-256color
If I try to switch terminal.app preferences to open termin..
Task: Print numbers from 1 to 1000 without using any loop or conditional statements. Don't just write the printf() or cout statement 1000 times.
How would you do that using C or C++?..
There are quite a lot of unittesting frameworks out there for .NET. I found this little feature comparison: http://xunit.github.io/docs/comparisons.html
Now I am to choose the best one for us. But how..
I have two integers x and y. I need to calculate x/y and as outcome I would like to get float. For example as an outcome of 3/2 I would like to have 1.5. I thought that easiest (or the only) way to do..
Is there a way to find out the IP address of a device that is directly connected to a specific ethernet interface? I.e. given one host, one wired ethernet connection and one second host connected to t..
Note: this question originates from a dead link which was a previous SO question, but here goes...
See this code (note: I do know that this code won't "work" and that Integer::compare should be used ..
Is there a simple way, in a pretty standard UNIX environment with bash, to run a command to delete all but the most recent X files from a directory?
To give a bit more of a concrete example, imagine ..
I have a JSP page which has to display the status of various jobs that are running. Some of these jobs take time, so it takes a while for their status to change from processing to complete.
Is it a g..
I need to find my MySQL username. When I open the MySQL command line client, it only asks me for my password. I don't remember my username. And for connectivity with JDBC, I need the URL, host and por..
I'm trying to using a PagedList in my ASP.Net application and I found this example on the Microsoft website http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-pag..
I want to read this JSON lines but because it start with JSONArray i'm a little confused
"abridged_cast": [
{
"name": "Jeff Bridges",
"id": "162655890",..
I'm having a bit of a rough time laying out how I would count certain elements within a text file using Python. I'm a few months into Python and I'm familiar with the following functions;
raw_input..
I have found several resources that use the following script to get folder sizes
$colItems = (Get-ChildItem $startFolder -recurse | Where-Object {$_.PSIsContainer -eq $True} | Sort-Object)
foreach ($..
I have a table to store information about my rabbits. It looks like this:
create table rabbits (rabbit_id bigserial primary key, info json not null);
insert into rabbits (info) values
('{"name":"He..
I have a .svg image file I want to display in my project.
I tried using UIImageView, which works for the .png & .jpg image formats, but not for the .svg extension. Is there any way to display a ..
I have downloaded "jenkins-1.501.zip" from http://jenkins-ci.org/content/thank-you-downloading-windows-installer .
I have extracted zip file and installed Jenkins on Windows 7 successfully. Jenkins ..
I want to push my commits to a Bitbucket repository but this error occurred:
Fatal: unable to access
'https://[email protected]/myUsername/myRepository.git/':
Unknown SSL protocol error in con..
This is similar to #40796374 but that is around types, while I am using interfaces.
Given the code below:
_x000D_
_x000D_
interface Foo {_x000D_
name: string;_x000D_
}_x000D_
_x000D_
function go()..
I'm learning Python, and I would like to use it to create a simple GUI application, and since Tkinter is already built-in (and very simple to use) I would like to use it to build my application.
I wo..
I have a very large dataframe with rows as observations and columns as genetic markers. I would like to create a new column that contains the sum of a select number of columns for each observation usi..
I'm testing out the new Google Maps API V2 for Android, and I'm getting this message when the app launches:
This is running on an 4.1 emulator.
Here is my AndroidManifest.xml file:
<manifest x..
When I try to build my app with Xcode, an error interrupts the build process:
Command CompileStoryboard failed with a nonzero exit code
Sometimes, it shows this error instead:
Command Compil..
There are Implicit and Explicit wait in Selenium WebDriver. What's the difference between them?
Kindly share the knowledge about Selenium WebDriver. Please show the real time example with Implicit &a..
I can do
>>> os.path.join("c:/","home","foo","bar","some.txt")
'c:/home\\foo\\bar\\some.txt'
But, when I do
>>> s = "c:/,home,foo,bar,some.txt".split(",")
>>> os.path.jo..
Below is the query that I am using to backup (create a .bak) my database.
However, whenever I run it, I always get this error message:
Msg 3201, Level 16, State 1, Line 1
Cannot open backup de..
SCENARIO A user has a dropdown and he selects an option. I want to display that dropdown and make that option a default value which was selected by that user last time.
I am using selected attribute ..
Since the last update, I'm having an error with cookies, related with SameSite attribute.
The cookies are from third party developers (Fontawesome, jQuery, Google Analytics, Google reCaptcha, Google ..
I'm writing this in mere desperation :) I've been assigned to make a standalone barcode scanner (as a proof of concept) to an Android 1.6 phone.
For this i've discovered the ZXing library.
I've goog..
I have a HTML form field $_POST["url"] having some URL strings as the value.
Example values are:
https://example.com/test/[email protected]
https://example.com/test/1234?basic=2&email=xyz2@te..
In nodejs I use __dirname . What is the equivalent of this in Golang?
I have googled and found out this article http://andrewbrookins.com/tech/golang-get-directory-of-the-current-file/ . Where he use..
This Question is almost the same as the previously asked Get the IP Address of local computer-Question. However I need to find the IP address(es) of a Linux Machine.
So: How do I - programmatically i..
I want to connect to our local Active Directory with C#.
I've found this good documentation.
But I really don't get how to connect via LDAP.
Can somebody of you explain how to use the asked paramet..
Joshua Bloch in "Effective Java" said that
Use checked exceptions for
recoverable conditions and runtime
exceptions for programming errors
(Item 58 in 2nd edition)
Let's see if I understa..
Is there a good command-line UNIX charting / graphing / plotting tool out there? I'm looking for something that will plot xy points on an ASCII graph.
Just to clarify, I'm looking for something that..
I want to configure Sublime Text 3 to build Python 3, but I don't seem to understand how the builds work. Many tutorials have told me to make a build file containing code such as:
{
'cmd': ['/usr..
In my current project I make use of multiple .so files. These are located at the armeabi and armeabi-v7a folder. Unfortunately one of the .so files is a 6MB and I need to reduce file size. Instead of ..
I was trying to install rails on Ubuntu Natty Narwhal 11.04, using ruby1.9.1.
I installed ruby using apt-get install ruby1.9.1-full which contains the dev package. I googled the error and all have su..
basically an server instance is running at
somesite.com/production/folder/here?param=here&count=1
I want to point someite.com/demo to /production/folder/here so when user types somesite.com/pr..
I want to send dynamic object like
new { x = 1, y = 2 };
as body of HTTP POST message. So I try to write
var client = new HttpClient();
but I can't find method
client.PostAsJsonAsync()
So I ..
I am trying to merge multiple linux commands in one line to perform deployment operation.
For example
cd /my_folder
rm *.jar
svn co path to repo
mvn compile package install
..
I'm learning JavaScript and while browsing through the jQuery library I see : (colon) being used a lot. What is this used for in JavaScript?
// Return an array of filtered elements (r)
// and the mo..
I have an HTML form whose action should be set dynamically through JavaScript. How do I do it?
Here is what I am trying to achieve:
<script type="text/javascript">
function get_act..
I understand that in Razor, @Html does a bunch of neat things, like generate HTML for links, inputs, etc.
But I don't get the DisplayFor function...
Why would I write:
@Html.DisplayFor(model => ..
I have two tables named Evaluation and Value.
In both tables, there are four columns. But three of the four are the same. In other words, they both have the CaseNum, FileNum, ActivityNum columns. In a..
Does anyone know how to get the HTML out of an IFRAME I have tried several different ways:
document.getElementById('iframe01').contentDocument.body.innerHTML
document.frames['iframe01'].document.body..
Is there anyway to install Apple iOS in VirtualBox? i have installed Android on VirtualBox with live Android and i have installed Snow leopard on VirtualBox but i don't know whether i could do the sam..
Google strips most special characters from the text they index so it's not a good tool for many troubleshooting-related tasks, such as finding out what the variable "$-" is in perl, or searching for e..
What is the simplest SOAP example using Javascript?
To be as useful as possible, the answer should:
Be functional (in other words actually work)
Send at least one parameter that can be set elsewher..
I initialized i18n translation object once in a component (a first component that loads in the app ). That same object is required In all other components. I don't want to re-initialize it in every co..
I wrote a script in python that takes a few files, runs a few tests and counts the number of total_bugs while writing new files with information for each (bugs+more).
To take a couple files from curr..
I am having trouble applying a blur effect on a semi-transparent overlay div. I'd like everything behind the div the be blurred, like this:
Here is a jsfiddle which doesn't work: http://jsfiddle.ne..
Possible Duplicate:
How to replace a string in an existing file in Perl?
I need to create a subroutine that does a search and replace in file.
Here's the contents of myfiletemplate.txt: ..
We are developing in-house web-based application for viewing data reports while targeting on smartphones and tablets. Our customer asked us for possibility that only certain devices could access the c..
What I mean is:
interface B {...}
interface A extends B {...} // allowed
interface A implements B {...} // not allowed
I googled it and I found this:
implements denotes defining an implemen..
I would like to know how to remove additional spaces when I print something.
Like when I do:
print 'Value is "', value, '"'
The output will be:
Value is " 42 "
But I want:
Value is "42"
Is t..
Original question: How to use the VOLUME instruction in Dockerfile?
The actual question I want to solve is -- how to mount host volumes into docker containers in Dockerfile during build, i.e., having ..
I am trying to load and parse a JSON file in Python. But I'm stuck trying to load the file:
import json
json_data = open('file')
data = json.load(json_data)
Yields:
ValueError: Extra data: line 2 ..
We have a unit test with variable that contains a very long string.
Question is how to write this in code, without having problems with line breaks or that the code is difficult to read.
In VB there..
I didn't find it, yet. Did I miss something?
I know a factorial method is a common example program for beginners. But wouldn't it be useful to have a standard implementation for this one to reuse?
I ..
I want an easy way to create multiple directories in C++/Linux.
For example I want to save a file lola.file in the directory:
/tmp/a/b/c
but if the directories are not there I want them to be cr..
I was diving into Symfony framework (version 4) code and found this piece of code:
$env = $_SERVER['APP_ENV'] ?? 'dev';
I'm not sure what this actually does but I imagine that it expands to something..
Let's say I have an application that utilizes the Executor framework as such
Executors.newSingleThreadExecutor().submit(new Runnable(){
@Override
public void run(){
// do stuff
}
..
First I'll state that I'm much more familiar with enums in C# and it seems like enums in java is a quite mess.
As you can see, I'm trying to use a switch statement @ enums in my next example but I al..
I need to get the total of two fields which are within the same row and input that number in a field at the end of that same row.
This is my code.
Sum(tbl1.fld1 + tbl1.fld2) AS [Total]
Is this wh..
I'm looking for a simple algorithm to generate a large number of random, aesthetically pleasing colors. So no crazy neon colors, colors reminiscent of feces, etc.
I've found solutions to this proble..
In Swift, how can I check if an element exists in an array? Xcode does not have any suggestions for contain, include, or has, and a quick search through the book turned up nothing. Any idea how to che..
I am using a query parameters to set the values needed by the Google Maps API.
The issue is I do not need the & sign for the first query parameter.
@GET("/maps/api/geocode/json?")
Call<Js..
I have taken backup of SQL Server 2008 DB on server, and download them to local environment.
I am trying to restore that database and it is keep on giving me following error.
An exception o..
I get following error when I was running an app within Android Studio 2.
Gradle tasks [:app:assembleDebug]
Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug'.
> Task wi..
I'm trying to vertically and horizontally center some content overlaying an image slide (flexslider). There were some similar questions to this one, but I couldn't find a satisfactory solution that a..
I have a DTO class which I Serialize
Json.Serialize(MyClass)
How can I exclude a public property of it?
(It has to be public, as I use it in my code somewhere else)..
I want to work with promises but I have a callback API in a format like:
1. DOM load or other one time event:
window.onload; // set to callback
...
window.onload = function() {
};
2. Plain callba..
Currently, my app has a controller that takes in a JSON file then iterates through them using "ng-repeat". This is all working great, but I also have a directive that needs to iterate through the same..
The simple question is, how do you increment a field value in a MS Query by 1 ? I am trying to add 1 (+1) to an int column in my SQL Server database using a parametrized method. Similar to an i++ oper..
I am trying to run Asp.net MVC project retrieved from TFS source control. I have added all assembly references and I am able to build and compile successfully without any error or warning.
But I get..
my API controller is returning a csv file as seen below:
[HttpPost]
public HttpResponseMessage GenerateCSV(FieldParameters fieldParams)
{
var output = new byte[] { };
if (..
As an example, this URL:
http://example.com/get_image?type=1
should return a response with a image/gif MIME type. I have two static .gif images,
and if type is 1, it should return ok.gif, else retu..
How to get the currently logged-in user's id?
in models.py:
class Game(models.model):
name = models.CharField(max_length=255)
owner = models.ForeignKey(User, related_name='game_user', verbos..
I would like to purge my SQL database from all entires older than 1 week, and I'd like to do it nightly. So, I'm going to set up a cron job. How do I query mySQL without having to enter my password ma..
I have this module which componentize the external library together with additional logic without adding the <script> tag directly into the index.html:
import 'http://external.com/path/file.js'..
I am trying to precompile assets using the command rake assets:precompile RAILS_ENV=production, but I always get the error below.
** Invoke assets:precompile (first_time)
** Execute assets:precom..
When I try to set a longish worksheet name using ruby and win32ole with the following code:
require "win32ole"
excel = WIN32OLE.new('Excel.Application')
excel.Visible = 1
puts excel.version
workbook ..
Our web app is rendered totally on the browser.The server only talks to the browser through JSON messaging.
As a result, we only need a single page for the app and mostly all the <a> tags do no..
I need to get data from the serial port of a Linux system and convert it to TCP/IP to send to a server. Is this difficult to do? I have some basic programming experience, but not much experience with ..
I have some HTML code on a page that I don't want to erase, but make inactive for the short term. How can I make the browser ignore parts of the page in the same way the // works in some programming l..
i know that in vb.net you can just do Exit Sub
but i would like to know how do i exit a click event in a button?
here's my code:
private void button1_Click(object sender, EventArgs e)
{
if (tex..
So I've followed this tutorial but it doesn't seem to do anything. Simply nothing. It waits a few seconds and closes the program. What is wrong with this code?
import cv2
vidcap = cv2.VideoCapture('..
I downloaded dateutil which comes with a setup.py file but it throws an error when I try to open it. What's the proper way to install this module?
This is the error:
error: no commands supplied
..
I want to create an iCal Calendar that can be downloaded from my website to the users Calendar program or imported to Google Calendar. What I want to know is if I do a direct Export from iCal on Mac O..
I have situation, when click on button opens the new browser window with search results.
Is there any way to connect and focus to new opened browser window?
And work with it, then return back to or..
I am getting an array arr passed to my Django template. I want to access individual elements of the array in the array (e.g. arr[0], arr[1]) etc. instead of looping through the whole array.
Is there ..
It seems easy to get the
From
To
Subject
etc via
import email
b = email.message_from_string(a)
bbb = b['from']
ccc = b['to']
assuming that "a" is the raw-email string which looks something like..
I want to have a page run some PHP code when a user clicks on a link, without redirecting them. Is this possible with
<a href=""></a>
or with the javascript onclick event?..
Say I have nodes connected in the below fashion, how do I arrive at the number of paths that exist between given points, and path details?
1,2 //node 1 and 2 are connected
2,3
2,5
4,2
5,11
11,12
6,7
..
I have a FragmentActivity using a ViewPager to serve several fragments. Each is a ListFragment with the following layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:andro..
Matplotlib seems to require the $DISPLAY environment variable which means a running X server.Some web hosting services do not allow a running X server session.Is there a way to generate graphs using m..
in my code, I have:
class A:
def a():
......
def b():
a()
......
b()
Then the compiler will say "NameError: global name a() is not defined." If I pull all the s..
I'm trying to work out if it's possible to use percentage positions/sizes when creating a layout. What I want is something like this...
^
|
|
| 68%
|
|
v
Gallery (height equivalent of 16% total scree..
With cURL, we can pass a username with an HTTP web request as follows:
$ curl -u <your_username> https://api.github.com/user
The -u flag accepts a username for authentication, and then cURL ..
Here i am trying to wrap my head around promises.Here on first request i fetch a set of links.and on next request i fetch the content of first link.But i want to make a delay before returning next pro..
I have two data.frames, one with only characters and the other one with characters and values.
df1 = data.frame(x=c('a', 'b', 'c', 'd', 'e'))
df2 = data.frame(x=c('a', 'b', 'c'),y = c(0,1,0))
merge(d..
I'm trying to make a very simple 'counter' that is supposed to keep track of how many times my program has been executed.
First, I have a textfile that only includes one character: 0
Then I open the..
I'm looking for a fast way to turn an associative array in to a string. Typical structure would be like a URL query string but with customizable separators so I can use '&' for xhtml links or ..
I am storing my project related images in drawable folder. Also I am storing the image names in string variable and dynamically I am trying to set those images to the imageview. But the image is not d..
I have the following HTML layout:
<div class="container">
<div class="column-center">Column center</div>
<div class="column-left">Column left</div>
<div clas..
I'm trying to build two functions using PyCrypto that accept two parameters: the message and the key, and then encrypt/decrypt the message.
I found several links on the web to help me out, but each o..
How can I get selenium to wait for something like a calendar widget to load? Right now I am just doing a Thread.sleep(2500) after exporting the testcase to a junit program...
Bloomberg Open API announced recently - is it just the Bloomberg SDK which had been (limitedly) exposed to public for quite a while?
My understanding is that Bloomberg SDK is possible to use only on ..
In my project I have User, Role, UserRole and BloodGroup entities. Firstly I take List<BloodGroup> from DB and set to User. Then I give User and Role entites to UserRole. After that I insert Use..
I often see the following code:
(function () {
// init part
})();
but I never could get my head around how it works. I find the last brackets especially confusing.
Could someone explain how it wo..
I've never done this before and can't find the answer. This may not be the correct data type to use for this, but I just want to assign an int, then another int without a for loop into a 2D array, the..
Is there a way to add some custom font on a website without using images, Flash or some other graphics?
For example, I was working on a wedding website, and I found a lot of nice fonts for that subje..
I am coming from riak and redis where I never had an issue with this services starting, or to interact.
This is a pervasive problem with mongo and am rather clueless. Restarting does not help.I am n..
Other than the fact that PNG is a more common image format, is there any technical reason to favor favicon.png vs. favicon.ico?
I'm supporting modern browsers which all support PNG favorite icons...
I am trying to pass an arrayList to another activity using intents. Here is the code in the first activity.
case R.id.editButton:
Toast.makeText(this, "edit was clicked", Toast.LENGTH_LONG).s..
I try to create react native app that looks like existing web app. I have a fixed footer at bottom of window. Do anyone have idea how this can be achieved with react native?
in existing app it's simp..
I have a for loop which produces a data frame after each iteration. I want to append all data frames together but finding it difficult. Following is what I
am trying, please suggest how to fix it:
d..
I'm looking to create a form where pressing the enter key causes focus to go to the "next" form element on the page. The solution I keep finding on the web is...
<body onkeydown="if(event.keyCode..
I am trying to create a batch (.bat) file for windows XP to do the following:
If (file.txt contains the string 'searchString') then (ECHO found it!)
ELSE(ECHO not found)
So far, I have found a way..
In the following TensorFlow function, we must feed the activation of artificial neurons in the final layer. That I understand. But I don't understand why it is called logits? Isn't that a mathematical..
I've a problem with the following dependency in my pom.xml where org.springframework.version = 3.1.0.RELEASE:
<!-- Spring MVC framework -->
<dependency>
<groupId>org.springframe..