I am using following code to execute two commands at once. I used sqltransaction to assure either all command get executed or rolled back.When I run my program without "transaction" it run properly bu..
I have a question regarding client socket on TCP/IP network. Let's say I use
try:
comSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
comSocket.setsockopt(socket.SOL_SOCKET, socket..
After I upgraded to the latest stable node and npm, I tried npm install moment --save. It saves the entry in the package.json with the caret ^ prefix. Previously, it was a tilde ~ prefix.
Why are the..
What is the difference between screenX/Y, clientX/Y and pageX/Y?
Also for iPad Safari, are the calculations similar as on desktop—OR there is some difference because of viewport?
It would be great..
Just starting to get into HTML 5 and an testing out geo location...liking it so far. I am hitting a bit of a speed bump though...when I try to get my geo location, chrome automatically blocks the page..
I'm implementing Google's Instant Search in my application. I'd like to fire off HTTP requests as the user types in the text input. The only problem I'm having is that when the user gets to a space in..
This is my python code:
import subprocess
subprocess.check_output("ls",shell=True,stderr=subprocess.STDOUT)
import subprocess
subprocess.check_output("yum",shell=True,stderr=subprocess.STDOUT)
The..
I have the following javascript in my page which does not seem to be working.
$('form').bind("keypress", function(e) {
if (e.keyCode == 13) {
e.preventDefault();
return false..
Is there any way to write case-insensitive queries in PostgreSQL, E.g. I want that following 3 queries return same result.
SELECT id FROM groups where name='administrator'
SELECT id FROM groups wher..
I am new to powershell, and I am trying to add error handling via try/catch statements, but they don't seem to actually be catching the error. This is powershell v2 CP3.
$objComputer = $objResult.Pro..
There’s not standard way to check if a MySQL user exists and based on that drop it. Are there any workarounds for this?
Edit: I need a straight way to run this without throwing up an error
e.g.
..
I'm designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista?..
I already have a working solution, but I would really like to know why this doesn't work:
ratings = Model.select(:rating).uniq
ratings.each { |r| puts r.rating }
It selects, but don't print unique ..
How can I tell if my Postgresql server is running or not?
I'm getting this message:
[~/dev/working/sw] sudo bundle exec rake db:migrate
rake aborted!
could not connect to server: Connection refused..
I have an application made in AngularJS which has arrow key navigation to switch views.
I want to implement this navigation using swipe for touch devices. I tried jGestures library but it doesn't go ..
I need to convert a string to UTF-8 in C#. I've already try many ways but none works as I wanted.
I converted my string into a byte array and then to try to write it to an XML file (which encoding is ..
I am trying to send a GET message that contains strings with ampersands and can't figure how to escape the ampersand in the URL.
Example:
http://www.example.com?candy_name=M&M
result => candy..
I want to detect whenever a textbox's content has changed. I can use the keyup method, but that will also detect keystrokes which do not generate letters, like the arrow keys. I thought of two methods..
I just started learning about UICollectionViews. I'm wondering if anyone knows how to specify the number of columns in a collectionview. The default is set to 3 (iPhone/portrait). I've looked at the d..
When building a Java 8 project with Maven:
mvn clean package
I get this message:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
How to..
I use IntelliJ IDEA as my development environment, and Maven for dependency management. I frequently build my project structure (directories, poms, etc) outside of IDEA and then import the project in..
My question is about when a function should be referenced with the extern keyword in C.
I am failing to see when this should be used in practice. As I am writing a program all of the functions that ..
I have two projects: Parent project: A, Sub project: B
A/pom.xml:
<groupId>com.dummy.bla</groupId>
<artifactId>parent</artifactId>
<version>0.1-SNAPSHOT</version>..
In Python, trying to do the most basic append function to a list with a loop:
Not sure what i am missing here:
a=[]
for i in range(5):
a=a.append(i)
a
returns:
'NoneType' object has no attr..
Pipes are filters for transforming data (formats) in the template.
I came across the pipe() function as below. What does this pipe() function exactly mean in this case?
return this.http.get<Hero..
Can someone please show me a full python sample code that uses pyserial, i have the package and am wondering how to send the AT commands and read them back!..
I am trying to find an equivalent of DECODE function in MySQL. It works like this:
Select Name, DECODE(Age,
13,'Thirteen',14,'Fourteen',15,'Fifteen',16,'Sixteen',
17,'Seventeen',18,'Eig..
Recently I start to use laravel 5.3 to write a blog, but I have a question after run php artisan make:auth
when I run this, it will generate routes in my web.php
this is the code in it:
Auth::route..
Is there a way to substring a string in Python, to get a new string from the third character to the end of the string?
Maybe like myString[2:end]?
If leaving the second part means 'till the end', an..
I want to program my android app to refresh its current activity on ButtonClick. I have one button on the top of the activity layout which will do the job. When I click on button the current activity ..
I am trying to get the following script to work. The input file consists of 3 columns: gene association type, gene name, and disease name.
cols = ['Gene type', 'Gene name', 'Disorder name']
no_header..
I have been troubleshooting this program for hours, trying several configurations, and have had no luck. It has been written in java, and has 33 errors (lowered from 50 before)
Source Code:
/*This p..
I have a Java class MyPojo that I am interested in deserializing from JSON. I have configured a special MixIn class, MyPojoDeMixIn, to assist me with the deserialization. MyPojo has only int and Strin..
Till now, I used to end my Tkinter programs with: tk.mainloop(), or nothing would show up! See example:
from Tkinter import *
import random
import time
tk = Tk()
tk.title = "Game"
tk.resiza..
I want to append lines to my file. I am using a StreamWriter:
StreamWriter file2 = new StreamWriter(@"c:\file.txt");
file2.WriteLine(someString);
file2.Close();
The output of my file should be seve..
I am very new to using predicates and just learned how to write:
Predicate<int> pre = delegate(int a){ a %2 == 0 };
What will the predicate return, and how is it useful when programming?..
The glorified global variable - becomes a gloried global class. Some say breaking object-oriented design.
Give me scenarios, other than the good old logger where it makes sense to use the singleton...
This issue came up when I got different records counts for what I thought were identical queries one using a not in where constraint and the other a left join. The table in the not in constraint had o..
Possible Duplicates:
How to unset a Javascript variable?
How to remove a property from a javascript object
I'm looking for a way to remove/unset the properties of a JS object so they'll n..
I just learned about Java's Scanner class and now I'm wondering how it compares/competes with the StringTokenizer and String.Split. I know that the StringTokenizer and String.Split only work on String..
I've just started to learn ruby and this is probably very easy to solve. How do I compare two strings in Ruby?
I've tried the following :
puts var1 == var2 //false, should be true (I think)
puts var..
I am writing some code in VB.NET that uses a switch statement but in one of the cases it needs to jump to another block. In C# it would look like this:
switch (parameter)
{
case "userID":
..
I would like to add a logo to the top navbar within the navbar-brand. I would like it to scale with the viewport size so I'm using img-responsive2 class.
It appear that both the image and the text in..
I am creating a session when a user logs in like so:
$_SESSION['id'] = $id;
How can I specify a timeout on that session of X minutes and then have it perform a function or a page redirect once it h..
I am trying to copy properties from one bean to another. Here are the signature of two beans:
SearchContent:
public class SearchContent implements Serializable {
private static final long seria..
I have this structure of an app (node_modules dir excluded from this list):
+-- actions.js
+-- bundle.js
+-- components
¦ +-- App.js
¦ +-- Footer.js
¦ +-- Link.js
¦ +-- Todo.js
¦..
I am able to get the current time as below:
from datetime import datetime
str(datetime.now())[11:19]
Result
'19:43:20'
Now, i am trying to add 9 hours to the above time, how can I add hours t..
How to get a data frame with the same data as an already existing matrix has?
A simplified example of my matrix:
mat <- matrix(c(0, 0.5, 1, 0.1, 0.2, 0.3, 0.3, 0.4, 0.5),
ncol = 3, ..
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 am currently working on password reset page of an Angular 4 project. We are using Angular Material to create the dialog, however, when the client clicks out of the dialog, it will close automaticall..
I just want to validate a credit card number in the JavaScript code. I have used a regular expression for digit numbers, but I don't know why it is not working!
Here is my function as per below:
fun..
When i run this code.
#include <stdio.h>
void moo(int a, int *b);
int main()
{
int x;
int *y;
x = 1;
y = &x;
printf("Address of x = %d, value of x = %d\n", &x, ..
$a = '88';
$b = '88 8888';
echo (int)$a;
echo (int)$b;
as expected, both produce 88. Anyone know if there's a string to int function that will work for $b's value and produce 888888? I've googled a..
The <blink> tag was never an official standard, and is now completely abandoned by all browsers.
Is there a standards compliant way of making text blink?..
Using Java tools,
wscompile for RPC
wsimport for Document
etc..
I can use WSDL to generate the stub and Classes required to hit the SOAP Web Service.
But I have no idea how I can do the same in RE..
How can you get the selected value from drop down list using JavaScript? I have tried the following but it does not work.
var sel = document.getElementById('select1');
var sv = sel.options[sel.select..
How do you play a video with AV Kit Player View Controller in Swift?
override func viewDidLoad() {
super.viewDidLoad()
let videoURLWithPath = "http://****/5.m3u8"
let videoURL..
I've been trying to get an efficient regex for IPv4 validation, but without much luck. It seemed at one point I had had it with (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?(\.|$)){4}, but it produces some st..
I am making a site that publishes articles in issues each month. It is straightforward, and I think using a Markdown editor (like the WMD one here in Stack Overflow) would be perfect.
However, t..
I have the following logging problem with several Java applications using log4j for logging:
I want log files to be rotated daily, like
log.2010-09-10
log.2010-09-09
log.2010-09-08
log.2010-09-07
lo..
I have a Homebrew formula that I wish to uninstall/remove along with all its dependencies, skipping packages whom other packages depend upon (a.k.a. Cascading package removal in Package manager parlan..
I have a dataframe and would like to calculate the correlation (with Spearman, data is categorical and ranked) but only for a subset of columns. I tried with all, but R's cor() function only accepts n..
I need to pass CSRFToken with Ajax based post request but not sure how this can done in a best way.
Using a platform which internally checking CSRFToken in request (POST request only)
initially I was..
I have a Webstorm project that I was about to commit, but before pressing the commit button in the Git Windows GUI, I remembered that I don't want to commit my .idea folder content.
So I used the we..
I need program - main JFrame have 2 buttons
button
button2
When I click button it has to open new JFrame window with new options, while if I click button2 then open another window.
In these 2 ne..
I have a window with a title on it. When the user selects a choice from a drop down list, the title image can change. The problem is when the image loads, it's a blurred, stretched, and pixelated. The..
When I try to compile the piece of code below, I get this warning:
warning: suggest parentheses around assignment used as truth value
Why does this happen? This is a rather common idiom, I believe. ..
I used the strcpy() function and it only works if I use C-string arrays like:
char a[6] = "text";
char b[6] = "image";
strcpy(a,b);
but whenever I use
string a = "text";..
Using Python 2.7 how do I round my numbers to two decimal places rather than the 10 or so it gives?
print "financial return of outcome 1 =","$"+str(out1)
..
My main layout main.xml simply contains two LinearLayouts:
The 1st LinearLayout hosts a VideoView and a Button,
The 2nd LinearLayout hosts an EditText, and this LinearLayout has set the visibility v..
I am using DataGrids in XAML (not Silverlight) with resizable columns, the DataGrid will expand if the user resizes the screen.
Currently if the widths of all the DataGrid columns are less than the w..
I have some HTML data, which contains headings, paragraphs , images and lists tags.
Is there a way to display this data in one UITextView or UILabel?..
I have a list consisting of like 20000 lists. I use each list's 3rd element as a flag. I want to do some operations on this list as long as at least one element's flag is 0, it's like:
my_list = [["a..
I'm trying to perform a LINQ query on a DataTable object and bizarrely I am finding that performing such queries on DataTables is not straightforward. For example:
var results = from myRow in myDataT..
I am trying to create controller actions which will return either JSON or partial html depending upon a parameter. What is the best way to get the result returned to an MVC page asynchronously?..
I have an android app currently published in Google Play which I update periodically. I follow the following process to sign the app before a new push:
Press right-mouse on the project, the 'Android..
When I try to run app.py (Python 3.3, PyCrypto 2.6) my virtualenv keeps returning the error listed above. My import statement is just from Crypto.Cipher import AES. I looked for duplicates and you mig..
I have a problem with Android Studio 0.2.3.
When I run my project the build stops and appears message that says:
Gradle: Execution failed for task ':AppName:compileDebugAidl'.
> failed to find ..
I've installed RubyInstaller on Windows and I'm running IMAP Sync but I need to use it to sync hundreds of accounts. If I could pass these variables to it via command line I could automate the whole p..
I know what base64 encoding is and how to calculate base64 encoding in C#, however I have seen several times that when I convert a string into base64, there is an = at the end.
A few questions came u..
Does JavaScript pass by references or pass by values?
Here is an example from JavaScript: The Good Parts. I am very confused about the my parameter for the rectangle function. It is actually undefined..
I am trying to populate any rows missing a value in their InterfaceID (INT) column with a unique value per row.
I'm trying to do this query:
UPDATE prices SET interfaceID = (SELECT ISNULL(MAX(interf..
Can I return to executing try-block after exception occurs? (The goal is to write less)
For Example:
try:
do_smth1()
except:
pass
try:
do_smth2()
except:
pass
vs
try:
do_smth1..
Please tell with a code example why is SimpleDateFormat not threadsafe. What is the problem in this class?
Is The problem with format function of SimpleDateFormat?
Please give a code which demonstra..
pre tags are super-useful for code blocks in HTML and for debugging output while writing scripts, but how do I make the text word-wrap instead of printing out one long line?..
I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like:
SVN repository in: svn://myserver/path/to/svn/repos
G..
Is there any built in function which tells me that my vector contains a certain element or not
e.g.
std::vector<string> v;
v.push_back("abc");
v.push_back("xyz");
if (v.contains("abc")) // I a..
I'm trying to plot several kernel density estimations on the same graph, and I want them to all be different colors. I have a kludged solution using a string 'rgbcmyk' and stepping through it for each..
Upon page load I want to move the cursor to a particular field. No problem. But I also need to select and highlight the default value that is placed in that text field...
I have been using OpenJDK for ages, initially for small projects where it has no problems. But since I started to play with it for big toys, I started to notice random/unknown fatal error and crashes ..
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..
Several times here on SO I've seen people using rt and wt modes for reading and writing files.
For example:
with open('input.txt', 'rt') as input_file:
with open('output.txt', 'wt') as output_f..
So what I want to do is create and play a sound in swift that will play when I press a button, I know how to do it in Objective-C, but does anyone know how to in Swift?
It would be like this for Obje..
The following is the code that tries to modify the input supplied by a user by using sockets:
from socket import *
serverName = '127.0.0.1'
serverPort = 12000
clientSocket = socket(AF_INET, SOCK_DGR..
I know that Activities are designed to represent a single screen of my application, while Fragments are designed to be reusable UI layouts with logic embedded inside of them.
Until not long ago, I dev..
I have this JavaScript prototype:
Utils.MyClass1 = function(id, member) {
this.id = id;
this.member = member;
}
and I create a new object:
var myobject = new MyClass1("5678999", "text");
If I do..
I am confused about DNS caching. I am writing a small forward proxy server and want to use OS DNS cache on a Linux system.
If I understand correctly, then there is DNS caching at the browser level. T..
I want to use R in Python, as provided by the module Rpy2. I notice that R has very convenient [] operations by which you can extract the specific columns or lines. How could I achieve such a function..
How can you implement regions a.k.a. code collapse for JavaScript in Visual Studio?
If there are hundreds of lines in javascript, it'll be more understandable using code folding with regions as in vb..
I have a tableview with buttons and I want to use the indexpath.row when one of them is tapped.
This is what I currently have, but it always is 0
var point = Int()
func buttonPressed(sender: AnyObjec..
i'm using the modal example from the bootstrap 3 docs. the modal works. however i need to access the show.bs.modal event when it fires. for now i'm just trying:
$('#myModal').on('show.bs.modal', fun..
Say I have a file /templates/apple and I want to
put it in two different places and then
remove the original.
So, /templates/apple will be copied to /templates/used AND /templates/inuse
and then a..
The situation:
I have a class library, called RT.Servers, containing a few resources (of type byte[], but I don't think that's important)
The same class library contains a method which returns one o..
I've got a form, in which I want to handle change event on text inputs, but React onChange triggering on key down (opposite to native JS, that triggers change event when an input field is out of focus..
Consider the code:
File file = new File("c:\\temp\\java\\testfile");
testfile is a file, and it may or may not exist.
I want to get the directory c:\\temp\\java\\ using the File object. How do I g..
I need to copy all keys and values from one A HashMap onto another one B, but not to replace existing keys and values.
Whats the best way to do that?
I was thinking instead iterating the keySet and ..
Does someone know how to turn off this screen?
Also phone has a message (Toast) when trying to make a screenshot:
Unable to capture screenshot. Prevented by security policy
.
One of recomme..
So I want to compare this folder http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/ with this http://svn.boost.org/svn/boost/sandbox/boost/extension/...
Any way to get box-shadow on left & right (horizontal?) sides only with no hacks or images. I am using:
box-shadow: 0 0 15px 5px rgba(31, 73, 125, 0.8);
But it gives shadow all around.
I have ..
Is there an easy way to remove all chars before a "_"? For example, change 3.04_somename.jpg to somename.jpg.
Any suggestions for where to learn to write regex would be great too. Most places I check..
If I want to display the JQUERY UI datepicker inline by attaching it to a DIV like $("div#someID").datepicker() - how do I access the chosen date? I assume if it's not bound to an INPUT then it won't ..
Is there a way to make grep output "words" from files that match the search expression?
If I want to find all the instances of, say, "th" in a number of files, I can do:
grep "th" *
but the output..
There is a phrase that I want to look for in Vim. When found, I want to delete that occurrence of the phrase. What is the easiest way to cycle through all the occurrences (via n), and delete a match..
How do you add an in-app purchase to an iOS app? What are all the details and is there any sample code?
This is meant to be a catch-all of sorts for how to add in-app purchases to iOS apps..
I am trying to download a 2 files by creating the zip file on local-server.the file is downloaded in zip format but when i try to extract it.it gives error:
End-of-central-directory signature not fou..
I created my first MVC 4 project and it works perfectly on local server. But when I publish it on to local folder and upload the folder contents to hosting server. I try to run it and I get this error..
I have problem with starting Apache Tomcat 6 from Netbeans IDE 7.4 (on 7.3 version I had the same troubles. Other people mentioned that this problem exist also in other versions, like 8.0 etc).
What..
How to get only one column as one dimentional array in laravel 5.2 using eloquent?
I have tried:
$array = Word_relation::select('word_two')->where('word_one', $word_id)->get()->toArray();
..
I ran a git pull that ended in a conflict. I resolved the conflict and everything is fine now (I used mergetool also).
When I commit the resolved file with git commit file.php -m "message" I get the..
I want to write a test to establish that an Exception is not raised in a given circumstance.
It's straightforward to test if an Exception is raised ...
sInvalidPath=AlwaysSuppliesAnInvalidPath()
se..
I have a div set to display:block (90px height and width), and I have some text inside.
I need the text to be aligned in the center both vertically and horizontally.
I have tried text-align:center, ..
I was confused with usage of %c and %s in the following C program
#include <stdio.h>
void main()
{
char name[]="siva";
printf("%s\n",name);
printf("%c\n..
Inspired by this question where there are differing views on SET NOCOUNT...
Should we use SET NOCOUNT ON for SQL Server? If not, why not?
What it does Edit 6, on 22 Jul 2011
It suppresses the "..
I'm trying to dynamically add a validation rule to some dynamic controls:
$("input[id*=Hours]").rules("add", "required");
However this line gives me the following error:
$.data(element.form, "vali..
Is there an NOT operator in Regexes?
Like in that string : "(2001) (asdf) (dasd1123_asd 21.01.2011 zqge)(dzqge) name (20019)"
I want to delete all \([0-9a-zA-z _\.\-:]*\) but not the one where it is ..
I'm trying to select all <div>s with the same ID in jQuery. How do i do it?
I tried this and it did not work
jQuery('#xx').each(function(ind,obj){
//do stuff;
});
..
I recently stumbled upon the Object.create() method in JavaScript, and am trying to deduce how it is different from creating a new instance of an object with new SomeFunction(), and when you would wan..
I would like to change the blue colour below the edit text, i don't know what property it is.
I tried using a different background colour for it but it didn't work.
I've attached an image below:
..
Which is the best way to find out whether the division of two numbers will return a remainder?
Let us take for example, I have an array with values {3,5,7,8,9,17,19}. Now I need to find the perfect di..
I am generating multi-series graphs with the date along the X-Axis.
The problem is that not all of the series in the graph have the same dates in the date range. Meaning that if I choose 1 Feb thr..
I'm wondering how to consume a WEBAPI from another ASP.Net Web API to store the response in a database.
I know how to consume a WEBAPI from clients like javascript,console application etc.
But the re..
I'm very new to HTML/CSS and I'm trying to display some text as like 50% transparent. So far I have the HTML to display the text with full opacity
<html><font color=\"black\" face=\"arial\"..
A friend of mine and I are currently discussing what is a closure in JS and what isn't. We just want to make sure we really understand it correctly.
Let's take this example. We have a counting loop a..
I have this html code
<div id="mybox"> aaaaaaa </div>
and this is my css
#mybox{
background-color:green;
}
#mybox:hover{
background-color:red;
}
the question is how to hide th..
I am trying to implement an icon that when clicked will save a variable to the user's clipboard. I have currently tried several libraries and none of them have been able to do so.
How do I properly ..
If I have the text in a shell variable, say $a:
a="The cat sat on the mat"
How can I search for "cat" and return 4 using a Linux shell script, or -1 if not found?..
I am working on a SQL query that reads from a SQLServer database to produce an extract file. One of the requirements to remove the leading zeroes from a particular field, which is a simple VARCHAR(10..
I am unable to clone a Git repository, and getting this error:
krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr
http://<url>/<repository> Cloning into '..
I have two iframes on a page and one makes changes to the other but the other iframe doesn't show the change until I refresh. Is there an easy way to refresh this iframe with jQuery?
<div class="p..
How to added password validation rule in the validator?
Validation rule:
The password contains characters from at least three of the following five categories:
English uppercase characters (A – ..
I have a MySQL table with a primary key field that has AUTO_INCREMENT on.
After reading other posts on here I've noticed people with the same problem and with varied answers. Some recommend not using ..
I'm trying to retrieve records from table by knowing the date in column contains date and time.
Suppose I have table called t1 which contains only two column name and date respectively.
The data sto..
I tried to convert a column from data type float64 to int64 using:
df['column name'].astype(int64)
but got an error:
NameError: name 'int64' is not defined
The column has number of people but..
What is the hierarchy of log4j logging?
DEBUG
INFO
WARN
ERROR
FATAL
Which one provides the highest logging which would be helpful to troubleshoot issues?
Can any one provide the order or hierarchy ..
I'm looking for the coolest thing you can do in a few lines of simple code. I'm sure you can write a Mandelbrot set in Haskell in 15 lines but it's difficult to follow.
My goal is to inspire studen..
Suppose you maintain a library that exposes a function getData. Your users call it to get actual data:
var output = getData();
Under the hood data is saved in a file so you implemented getData using N..
In my iOS video app status bar is hidden in some view controllers. I have done this using following code.
[[UIApplication sharedApplication] setStatusBarHidden:YES];
It works for iOS 5 and iOS 6 ,..
Today Microsoft released the Visual Studio Code file/folder editor.
The first limitation is it appears to be a single-instance application.
Is there a way of getting multiple instances, or otherwise..
short summary:
I am trying to create a program that will send keyboard events to the computer that for all purposes the simulated events should be treated as actual keystrokes on the keyboard.
origi..
I had asked a question about this earlier, but it didn't get answered right and led nowhere.
So I've clarified few details on the problem and I would really like to hear your ideas on how could I fix..
The jar (bcprov-jdk16-145.jar) has been added to the project, Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()) has been added to the class, and BouncyCastleProvider.PROVI..
I know JSONP is JSON with padding.
I understand what JSON is, and how to use it with jQuery.getJSON(). However, I do not understand the concept of the callback when introducing JSONP.
Can anyone ex..
The color command has to do with changing color of windows command promt background/text
color 0A - where 0 is the background color and A is the text color
I want to change these color of text every..
I have two listviews, but they don't scroll. How do I correct this?
Here is my layout.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/..
Looking for some help with integrating a JSON API call into a Python program.
I am looking to integrate the following API into a Python .py program to allow it to be called and the response to be pri..
In a multi-GPU computer, how do I designate which GPU a CUDA job should run on?
As an example, when installing CUDA, I opted to install the NVIDIA_CUDA-<#.#>_Samples then ran several instance..
I am trying to pass path param and query params in a URL but I am getting a weird error. below is the code
String url = "http://test.com/Services/rest/{id}/Identifier"
Map<String, String&g..
In MongoDB, is it possible to update the value of a field using the value from another field? The equivalent SQL would be something like:
UPDATE Person SET Name = FirstName + ' ' + LastName
And th..
How do I change the width of a select field, when using Twitter bootstrap? Adding input-xxlarge CSS classes doesn't seem to work (like it does on other form elements), so the elements in my drop down ..
I understand the purpose of events, especially within the context of creating user interfaces. I think this is the prototype for creating an event:
public void EventName(object sender, EventArgs e);
..
I have a hexadecimal string (e.g 0CFE9E69271557822FE715A8B3E564BE) and I want to write it to a file as bytes. For example,
Offset 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
00000000 0C FE..
I want to print code into a file using cat <<EOF >>:
cat <<EOF >> brightup.sh
!/bin/bash
curr=`cat /sys/class/backlight/intel_backlight/actual_brightness`
if [ $curr -lt 4477 ..
I want to fix my header views in the top of the screen like in the image below and without using external libraries.
In my case, I don't want to do it alphabetically. I have two different types of ..
What's the UNC path to a folder on my local computer, and how can I access it?
I have tried:
Security for the folder -- set to Everyone Full Control (for now!)
Sharing permissions -- set to Everyone..
I have a <div id="content"> want to load url: http://vnexpress.net content into
my code:
<html>
<head>
<script type="text/javascript">
$(document).rea..
I have a small GUI test with a "Start" button and a Progress bar. The desired behavior is:
Click Start
Progressbar oscillates for 5 seconds
Progressbar stops
The observed behavior is the "Start" b..
I have some .class files that I need to convert to .java so I did:
javap -c ClassName.class
and all the time I have the same error
ERROR:Could not find ClassName.class
Do you guys have any idea of w..
How to add a byte to the beginning of an existing byte array?
My goal is to make array what's 3 bytes long to 4 bytes. So that's why I need to add 00 padding in the beginning of it...
Simple idea: I have two images that I want to merge, one is 500x500 that is transparent in the middle the other one is 150x150.
Basic idea is this: Create an empty canvas that is 500x500, position th..
I get this error when I try to source a large SQL file (a big INSERT query).
mysql> source file.sql
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection..
while maintaining my colleague's code from even someone who claims to be a senior developer, I often see the following code:
try
{
//do something
}
catch
{
//Do nothing
}
or sometimes they write ..