I have the following file:
/spec/controllers/groups_controller_spec.rb
What command in terminal do I use to run just that spec and in what directory do I run the command?
My gem file:
# Test ENVI..
I am simply trying to create a powershell script which calculates the md5 sum of an executable (a file).
My .ps1 script:
$answer = Read-Host "File name and extension (ie; file.exe)"
$someFilePath = ..
I tend to use before blocks to set instance variables. I then use those variables across my examples. I recently came upon let(). According to RSpec docs, it is used to
... to define a memoized h..
I want to:
Export table from sql server database to a comma delimited csv file without using sql Server import export wizard
I want to do it using a query because I want to use the query in automatio..
I have a file as shown below in an SVN repo that I would like to revert to a previous version. What is the way to do this in SVN? I want only downgrade this particular file to an older version, not th..
I want to run some Java programs in the background when the system boots in Ubuntu. I have tried to add a script in /etc/init.d directory but failed to start a program. i.e programs are not started. W..
When users register with our app, we are able to infer their zip code when we validate them against a national database. What would be the best way to determine a good potential guess of their time z..
In Microsoft SQL Server, I know the query to check if a default constraint exists for a column and drop a default constraint is:
IF EXISTS(SELECT * FROM sysconstraints
WHERE id=OBJECT_ID('SomeTable..
I want to check if a value is in an accepted range. If yes, to do something; otherwise, something else.
The range is 0.001-0.009. I know how to use multiple if to check this, but I want to know if th..
I've a database table of timesheets with some common feilds.
id, client_id, project_id, task_id, description, time, date
There are more but thats the gist of it.
I have an export running on that ..
Is there a way to round a single column in pandas without affecting the rest of the dataframe?
df:
item value1 value2
0 a 1.12 1.3
1 a 1.50 2.5
2 a 0.10..
When I use the code below it doesn't alter the size at all, it still fills the area in the grid.
JPanel displayPanel = new JPanel(new GridLayout(4, 2));
JTextField titleText = new JTextField("title"..
In SAML metadata file there are several NameID format defined, for example:
<NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat>
<NameIDFormat>urn:oasis:names:tc:SAM..
I am formatting a string to a date using the code
String start_dt = '2011-01-01';
DateFormat formatter = new SimpleDateFormat("YYYY-MM-DD");
Date date = (Date)formatter.parse(start_dt);
But how d..
Currently I am getting these alerts:
Upgrade Required Your version of Elasticsearch is too old. Kibana requires Elasticsearch 0.90.9 or above.
Can someone tell me if there is a way I can find ..
As a developer, I found the new Internet Explorer version to be a complete nightmare. I turned the windows feature off, but I wasn't able to install Internet Explorer 10. It says that i..
I'm generating a self-signed SSL certificate to protect my server's admin section, and I keep getting this message from OpenSSL:
unable to write 'random state'
What does this mean?
This is on a..
I have a function that accepts a string, that is:
void log_out(char *);
In calling it, I need to create a formatted string on the fly like:
int i = 1;
log_out("some text %d", i);
How do I do thi..
My company has a VB6 application using Crystal Reports 7 which a client has asked to be installed on Windows 7 32 bit. It is currently installed on Windows XP 32bit SP2 machines at the client. Connect..
We have the query below. Using a LEFT OUTER join takes 9 seconds to execute. Changing the LEFT OUTER to an LEFT INNER reduces the execution time to 2 seconds, and the same number of rows are returned...
There's a similar post on stack but it doesn't help with my issue possibly because I am using Visual Studio 2015.
How do I get the "Enable NuGet Package Restore" option to appear in VS2015?
I chose ..
Working on a client's server where there are two different versions of nginx installed. I think one of them was installed with the brew package manager (its an osx box) and the other seems to have bee..
Possible Duplicate:
Installing specific package versions with Pip
I am a bit new to pip install and virtualenv in general.
I have setup an virtualenv on my server as well as on my local de..
Tried to perform REST GET through python requests with the following code and I got error.
Code snip:
import requests
header = {'Authorization': 'Bearer...'}
url = az_base_url + az_subscription_id +..
I have installed the Visual Studio Code on Windows. When I try to open a solution file in VS Code it opens the solution file, instead of opening all projects in solution. Is there a way to open existi..
I can run this fine:
$msbuild = "C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe"
start-process $msbuild -wait
But when I run this code (below) I get an error:
$msbuild = "C:\WINDOWS\Microsof..
Given a number:
int number = 1234;
Which would be the "best" way to convert this to a string:
String stringNumber = "1234";
I have tried searching (googling) for an answer but no many seemed ..
I found a macro on the web to protect a worksheet with a password. It works fine, but when I save the file I get the message: run-time error '9': subscription out of range. I have never programmed ..
I need a shell command or script that converts a Unix timestamp to a date. The input can come either from the first parameter or from stdin, allowing for the following usage patterns:
ts2date 1267619..
I need to find out a way to ask Kafka for a list of topics. I know I can do that using the kafka-topics.sh script included in the bin\ directory. Once I have this list, I need all the consumers per to..
Java 8 allows for default implementation of methods in interfaces called Default Methods.
I am confused between when would I use that sort of interface default method, instead of an abstract class (w..
I need to send a value to an iframe.
The iframe is present within the current window. How can I achieve this?
I need to do it with javascript in the parent window that contains the iframe...
I want to do some programming with the latest JavaFX, which requires Java 8. I'm using IntelliJ 13 CE and Mac OS X 9 Mavericks. I ran Oracle's Java 8 installer, and the files look like they ended up a..
I have a textarea and I would like to know if I am on the last line in the textarea or the first line in the textarea with my cursor with JavaScript.
I thought of grabbing the position of the first n..
Are there any compelling performance reasons to choose static linking over dynamic linking or vice versa in certain situations? I've heard or read the following, but I don't know enough on the subject..
I have the following HTML:
<form name="frmSave">...</form>
Just to know, I am not able to modify the HTML in order to add an id or something else.
This is what I tried to get the form ..
I have noticed .pyc files spontaneously being generated when some .py file of the same name gets run. What is the difference between .py and .pyc files?
Also, I find that having .pyc files lying aro..
It is quite simple to run a Unix command from Java.
Runtime.getRuntime().exec(myCommand);
But is it possible to run a Unix shell script from Java code? If yes, would it be a good practice to run a..
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 problem uploading file using POST request in Node.js. I have to use request module to accomplish that (no external npms). Server needs it to be multipart request with the file field containing ..
Are applicationContext.xml and spring-servlet.xml related anyhow in Spring Framework?
Will the properties files declared in applicationContext.xml be available to DispatcherServlet?
On a related note..
I am trying to create a signature using the HMAC-SHA256 algorithm and this is my code.
I am using US ASCII encoding.
final Charset asciiCs = Charset.forName("US-ASCII");
final Mac sha256_HMA..
Suppose I have an activity to select an image from the gallery, and retrieve it as a BitMap, just like the example: here
Now, I want to pass this BitMap to be used in an ImageView for another activit..
Let's say I have a makefile with the rule
%.o: %.c
gcc -Wall -Iinclude ...
I want *.o to be rebuilt whenever a header file changes. Rather than work out a list of dependencies, whenever any header..
I can't believe what is happening in my website. When I add this line:
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
Everything works fine. And ..
I was wondering how I could play a notification sound without playing it over the media stream. Right now I can do this via the media player, however I don't want it to play as a media file, I want i..
import pandas as pd
import numpy as np
e = np.random.normal(size=100)
e_dataframe = pd.DataFrame(e)
When I input the code above, I get this answer:
But how do I change the column na..
I'm developing an algorithm to parse a number out of a series of short-ish strings. These strings are somewhat regular, but there's a few different general forms and several exceptions. I'm trying to ..
I'm using YouTube iframe to embed videos on my site.
<iframe width="100%" height="443" class="yvideo" id="p1QgNF6J1h0"
src="http://www.youtube.com/embed/p1QgNF6J1h0?rel=0&control..
My application throws 'Access denied' errors when writing temporary files in the installation directory where the executable resides. However it works perfectly well in Windows XP. How to provide acce..
I have an old dll that uses the Microsoft Visual C++ 2003 (7.1) run time package. Unfortunately I don't have that DLL around anymore. Short of reinstalling VS2003, is there another way to get the ru..
I am trying to read HTTP headers in Spring based REST API. I followed this. But I am getting this error:
No message body reader has been found for class java.lang.String,
ContentType: applicatio..
I want a group of radio buttons to look like a group of toggle buttons (but still function like radio buttons). It's not necessary that they look exactly like toggle buttons.
How can I do this only w..
can I import,use class from other package?
In Eclipse I made 2 packages
one is main other is second
main
-main (class)
second
-second (class)
and I wanted the main function of main class to call..
I am trying to get started building a site in ReactJS. However, when I tried to put my JS in a separate file, I started getting this error: "Uncaught SyntaxError: Unexpected token <".
I tried addi..
I would like to troubleshoot per directory authentication with client certificate. I would specially like to find out which acceptable client certificates does server send.
How do I debug SSL handsha..
I am unable to connect to my MySQL in xampp I have this error:
MySQL said: Documentation
1045 - Access denied for user 'root'@'localhost' (using password: NO)
mysqli_real_connect(): (HY0..
Given an arbitrary enumeration in C#, how do I select a random value?
(I did not find this very basic question on SO. I'll post my answer in a minute as reference for anyone, but please feel free to ..
I have text stored in the php variable $text. This text can be 100 or 1000 or 10000 words. As currently implemented, my page extends based on the text, but if the text is too long the page looks ugly...
Correct me if I am wrong.
This is my understanding of JNZ and CMP.
JNZ - The jump WILL take place if the Z Flag is NOT zero (1)
CMP - If the two values are equal, the Z Flag is set (1) otherwise it..
I have this code and the config file below:
ILog log = LogManager.GetLogger(typeof(MyClass));
log.Debug("Testing");
TestProj directory is not created and if I create it, no TestLog.txt file, no log..
What is the best way to set the href attribute of the <a> tag at run time using jQuery?
Also, how do you get the value of the href attribute of the <a> tag using jQuery?..
I am new to phonegap. I have prepared one sample application. My application has 2 pages, the first page has one button, when clicked the second page will open. It is working fine using the following
..
When I have to use a classic adapter with a ListView, I update my data in the ListView like this:
myAdapter.swapArray(data);
public swapArray(List<Data> data) {
clear();
addAll(data);
no..
Here's an example of the query I'm trying to convert to LINQ:
SELECT *
FROM Users
WHERE Users.lastname LIKE '%fra%'
AND Users.Id IN (
SELECT UserId
FROM CompanyRolesToUsers
..
I need to develop a single routine that will be fired each 5 minutes to check if a list of SQL Servers (10 to 12) are up and running.
Is there a way to simply "ping" a SQL Server from C# one..
Is there any function in Python that I can use to insert a value in a certain position of a string?
Something like this:
"3655879ACB6" then in position 4 add "-" to become "3655-879ACB6"..
I am developing a component in Angular2 (Beta 8). The component has a textbox and a dropdown. I would like to set the focus in textbox as soon as component is loaded or on change event of dropdown. Ho..
I'm trying to mock a class, called UserInputEntity, which contains a property called ColumnNames: (it does contain other properties, I've just simplified it for the question)
namespace CsvImporter.En..
I have a file (called "number.txt") which I want to read to an array in Java. How exactly do I go ahead and do this? It is a straight-forward "1-dimensional" file, containing 100 numbers.
The problem..
Possible Duplicate:
How to center div horizontally and vertically
I need to put image in center of html page, both vertical and horizontal ... been trying few stuff but seems to work fine. ..
I'm trying to figure out why the heck my Android studio isn't recognizing the AppCompat v7 library correctly. The import statement below shows up as gray and says there's no package for support.v7.app..
Using jQuery i would like to run a function when either .change() or .keyup() are raised.
Something like this.
if ( jQuery(':input').change() || jQuery(':input').keyup() )
{
alert( 'something ha..
I use annotation in my code, and I try to use value which determine in run time.
I define my list as static final (lst), and I add to this list some elements.
When I use lst.get(i), I get compilatio..
I know that multiple inheritances between Interfaces is possible, e.g.:
public interface C extends A,B {...} //Where A, B and C are Interfaces
But is it possible to have a regular Class inherit fro..
select *
from table
where date > '2010-07-20 03:21:52'
which I would expect to not give me any results... EXCEPT I'm getting a record with a datetime of 2010-07-20 03:21:52.577
how can I make th..
I have stumbled into an issue that is really annoying.
When I debug my software, everything runs OK, but if I hit a breakpoint and edit the code, when I try to continue running I get an error:
Metadat..
I have a Public Class "General" in which is a Public Sub "updateDynamics". When I attempt to reference it in the code-behind for a page like so:
updateDynamics(get_prospect.dynamicsID)
I get the fo..
I am new to AngularJS and gone through their tutorial and got a feel for it.
I have a backend for my project ready where each of the REST endpoints needs to be authenticated.
What I want to do
a.) I..
I am creating neural nets with Tensorflow and skflow; for some reason I want to get the values of some inner tensors for a given input, so I am using myClassifier.get_layer_value(input, "tensorName"),..
I have a Swing window which contains a button a text box and a JLabel named as flag. According to the input after I click the button, the label should change from flag to some value.
How to achieve ..
when click somewhere else the border disappears, tried onfocus none, but didn't help, how to make ugly button border disappear when click on?
_x000D_
_x000D_
input[type="button"] {_x000D_
width: 12..
I am using following code for handling row clicks. (source)
static class RecyclerTouchListener implements RecyclerView.OnItemTouchListener {
private GestureDetector gestureDetector;
private ..
Given that the TCP connection is already established when the HTTP request is sent, the IP address and port are implicitly known -- a TCP connection is an IP + Port.
So, why do we need the Host header..
I'm looking at the article C# - Data Transfer Object on serializable DTOs.
The article includes this piece of code:
public static string SerializeDTO(DTO dto) {
try {
XmlSerializer xmlSe..
I'm not too sure how to do this. I need to validate email addresses using regex with something like this:
[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-..
I'm looking for a way to list all views in a database.
Initially I found and tried an answer on the MySQL forums:
SELECT table_name
FROM information_schema.views
WHERE information_schema.views.table..
Is there any solution to get the function name of an object?
function alertClassOrObject (o) {
window.alert(o.objectName); //"myObj" OR "myClass" as a String
}
function myClass () {
this.foo ..
I need to somehow retrieve the client's IP address using JavaScript; no server side code, not even SSI.
However, I'm not against using a free 3rd party script/service...
I'd like to parse the response of a web request, but I'm getting trouble accessing it as string.
func main() {
resp, err := http.Get("http://google.hu/")
if err != nil {
// handle er..
Okay, this one's making me feel stupid... I'm a feature film editor who's recently started teaching myself Objective-C after many years away from coding. I think the last code I wrote was in Cobol, i..
I'm using the ec2 module with ansible-playbook I want to set a variable to the contents of a file. Here's how I'm currently doing it.
Var with the filename
shell task to cat the file
use the result..
I'm trying to check whether a $_POST exists and if it does, print it inside another string, if not, don't print at all.
something like this:
$fromPerson = '+from%3A'.$_POST['fromPerson'];
function ..
I'm wondering what options one has in xhtml 1.0 strict to create a line on both sides of text like-so:
Section one
----------------------- Next section -----------------------
Section two
I've tho..
I'm writing a program in C# that needs to repeatedly access 1 image file. Most of the time it works, but if my computer's running fast, it will try to access the file before it's been saved back to th..
I am trying to develop an image-based web site. I am really confused about the best image type for faster page loading speeds and best compression practices. Please advise me on the best way to compre..
I have data from like A1:Z50 but I want to delete only A5:X50 using VBA
(I think it will be a lot faster than dragging the whole cell or using clickA5+shift+clickX50+delete).
How can I do this ?
And ..
Since about 1 week now, Bitbucket doesn't (?) send a request to my Jenkins server.
I've set it all up like this:
Endpoint http://username:apitoken@jenkinshost/
username = username in Jenkins
apito..
I have a variable which contains a space-delimited string:
line="1 1.50 string"
I want to split that string with space as a delimiter and store the result in an array, so that the following:
echo ..
I need to implement splash screen in my honeycomb app.
I use this code in activity's onCreate to show splash:
setContentView(R.layout.splash);
getActionBar().hide();
and this code to show main UI a..
When I 'Run' my project in Android Studio, in the 'Messages' window, I get:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':play01:compileDebug'.
>..
I am storing time in a MySQL database as a Unix timestamp and that gets sent to some JavaScript code. How would I get just the time out of it?
For example, in HH/MM/SS format...
How can I get the first n characters of a string in PHP? What's the fastest way to trim a string to a specific number of characters, and append '...' if needed?..
I was trying to implement authenticated routes but found that React Router 4 now prevents this from working:
<Route exact path="/" component={Index} />
<Route path="/auth" component={Unauth..
Where can I find a simple jquery image slideshow tutorial for beginners from scratch (without plugins) without left and right navigation button?
thank you...
I know there is a method for a Python list to return the first index of something:
>>> l = [1, 2, 3]
>>> l.index(2)
1
Is there something like that for NumPy arrays?..
In sqlserver, how do I compare dates?
For example:
Select * from Users where RegistrationDate >= '1/20/2009'
(RegistrationDate is datetime type)
Thanks..
I have date and time in a string formatted like that one:
"2011-03-21 13:26" //year-month-day hour:minute
How can I parse it to System.DateTime?
I want to use functions like DateTime.Parse() or Da..
How do I parse the first, middle, and last name out of a fullname field with SQL?
I need to try to match up on names that are not a direct match on full name. I'd like to be able to take the full n..
I don't understand what exactly Camel does.
If you could give in 101 words an introduction to Camel:
What exactly is it?
How does it interact with an application written in Java?
Is it something ..
I need to add proper index to my tables and need some help.
I'm confused and need to clarify a few points:
Should I use index for non-int columns? Why/why not
I've read a lot about clustered and no..
I'm using the hide css class to hide a button on page load.
The problem is that when i try to show the button i've previuosly hidden with jQuery the button is smaller.
(the same thing doesn't happen..
I have multiple branches which are branched off the master (each in a separate subdirectory).
Branch1: new development, not yet completely finished
Branch2: hotfix for a problem, but still under tes..
I am using a web view in which I am adding an image view. How can I set the background of this image view to transparent?
I have tried this:
mImageview.setBackgroundResource(R.color.trans);
Where ..
I am faced with an issue in Ruby on Rails. I am looking to convert a string of format Tue, 10 Aug 2010 01:20:19 -0400 (EDT) to a date object.
Is there anyway i could do this.
Here is what I've looke..
Are lexers and parsers really that different in theory?
It seems fashionable to hate regular expressions: coding horror, another blog post.
However, popular lexing based tools: pygments, geshi, or..
I want to use the mail() function from my localhost. I have WAMP installed and a Gmail account. I know that the SMTP for Gmail is smtp.gmail.com and the port is 465 (more info from gmail).
What I need..
I've always found it frustrating in WordPress that images, files, links, etc. are inserted into WordPress with an absolute URL instead of relative URL. A relative url is much more convenient for switc..
I'm using the new toolbar widget introduced in the appcompat / support-v7. I would like to hide/show the toolbar depending on if the user is scrolling up/down the page, just like in the new Google's p..
I am trying to use a bit of code I found at the bottom of this page. Here is the code in a class that I created for it:
import java.io.LineNumberReader;
import java.io.FileReader;
import java.io.IOE..
Is it possible to set a transparency or alpha level on SVG fill colours?
I've tried adding two values to the fill tag (changing it from fill="#044B94" to fill="#044B9466"), but this doesn't work...
I have downloaded apache-tomcat-7.0.35. My JDK version is jdk1.6.0_27.
How do I configure CATALINA_HOME as an environment variable and how do I run Tomcat server under Windows 7?..
I installed and tried to use jasper report studio. The first brick wall you hit when you try to create a datasource for your reports is
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
The ..
I'm curious as to the best route (more looking towards simplicity, not speed or efficiency) to sort a DropDownList in C#/ASP.NET - I've looked at a few recommendations but they aren't clicking well ..
My activity_main.xml is below, as you see, the height is set 40 dip.
And in MyEclipse, it looks like below:
But when I run it on my phone, it looks like below:
So my question is why the re..
I want to fetch the Java version in Linux in a single command.
I am new to awk so I am trying something like
java -version|awk '{print$3}'
But that does not return the version. How would I fe..
Is there a MySQL function which can be used to convert a Unix timestamp into a human readable date? I have one field where I save Unix times and now I want to add another field for human readable date..
Is it good practice to let abstract classes define instance variables?
public abstract class ExternalScript extends Script {
String source;
public abstract void setSource(String file);
..
I have array of two objects:
genericItems: Item[] = [];
backupData: Item[] = [];
I am populating my HTML table with genericItemsdata. The table is modifiable. There is a reset button to undo all ch..
I got my WAMP installed on my windows 7 64bit. cURL is not working, but still I got it enabled from the WAMP tray.
I have also uncommented extension=php_curl.dll in php.ini for both the PHP and Apach..
I have built a neural network with Keras. I would visualize its data by Tensorboard, therefore I have utilized:
keras.callbacks.TensorBoard(log_dir='/Graph', histogram_freq=0,
..
Pressing Shift+F6 seems only to rename the last directory.
For example, in the project com.example.test it will offer to rename test only. The same applies if I navigate to package name in .java or Ma..
I'm relatively new in C#, & I'm wondering when to use Delegates appropriately.
they are widely used in events declaration, but when should I use them in my own code and why are they useful? why no..
I am currently transforming from Java to Javascript, and it's a bit hard for me to figure out how to extend objects the way I want it to do.
I've seen several people on the internet use a method call..
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..
How do I wrap long lines in Python without sacrificing indentation?
For example:
def fun():
print '{0} Here is a really long sentence with {1}'.format(3, 5)
Suppose this goes over the 79 cha..
I made some changes in my master branch and want to bring those upstream. when I cherry-pick the following commits however I get stuck on fd9f578 where git says:
$ git cherry-pick fd9f578
fatal: Comm..
I have installed two PHP versions in my WAMP server. When I am using 5.3.10, my wamp server is running just fine. But when I switch to older version of PHP (5.2.9) my wamp server tray icon is showing ..
As an exercise, does a method exist to redirect a string to a file without echo? Currently I am using
echo "Hello world" > test.txt
I know about cat and printf. I was thinking something like
&g..
Altough I have very small size image in drawable folder, I am getting this error from users. And I am not using any bitmap function in code. At least intentionally :)
java.lang.OutOfMemoryError
a..
I am using a Servlet Filter in my JSF application. I have three groups of Web pages in my application, and I want to check Authentication for these pages in my Servlet Filter:
my Folders
/Admin/ *...
How can i send an email with an attachment (either local file or a file in the intranet) using outlook 2010?
<a href="mailto:[email protected]?subject=my report&body=see attachment&attachment=c:..
Using the following code:
#include<stdio.h>
#include<time.h>
int main()
{
clock_t start, stop;
int i;
start = clock();
for(i=0; i<2000;i++)
{
printf("%d", (..
So all of a sudden, after a week of using it, I get an error message on my zabbix server gui (http://localhost/zabbix/.)
The error says: Zabbix server is not running: the information displayed may n..
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 the simple code:
f = open('out.txt','w')
f.write('line1\n')
f.write('line2')
f.close()
Code runs on windows and gives file size 12 bytes, and linux gives 11 bytes
The reason is new line
In ..
Is it possible to do a select statement that takes only NOT NULL values?
Right now I am using this:
SELECT * FROM table
And then I have to filter out the null values with a php loop.
Is there a w..
I've been bashing my head against the wall trying to do what should be a simple regex - I need to match, eg 12po where the 12 part could be one or two digits, then an optional non-alphanumeric like a ..
I'm in the process of creating a C# console application which reads text from a text file, turns it into a JSON formatted string (held in a string variable), and needs to POST the JSON request to a we..
An activity indicator view is useful in many applications.
Any ideas about how to add, activiate and dismiss an activity indicator view on iPhone?
All the methods for this are welcomed here...
I've tried to find a suitable Google Places API that takes in My Location and returns the nearby restaurants.
Currently, I've been able to find only restaurants in a "particular" city.
https://maps...
How can I recursively count files in a Linux directory?
I found this:
find DIR_NAME -type f ¦ wc -l
But when I run this it returns the following error.
find: paths must precede expression: ¦..
I am trying to run some unit tests in a C# Windows Forms application (Visual Studio 2005), and I get the following error:
System.IO.FileLoadException: Could not load file or assembly 'Utility, Versio..
I am trying to solve:
int total=0, number=0;
float percentage=0.0;
percentage=(number/total)*100;
printf("%.2f", percentage);
If the value of the number is 50 and the total is 100, I should get 50..
I am doing a little exploring simulation and I want to show the graphs to compare the performance among the algorithms during run-time.
What library comes to your mind? I highly prefer those that com..
I'm working on a library to provide simple reliable communication over an RS232 or RS485 connection. Part of this code involves using a CRC16 checksum on the data to detect corruption from line noise..
I have the following code...
int Val=-32768;
String Hex=Integer.toHexString(Val);
This equates to ffff8000
int FirstAttempt=Integer.parseInt(Hex,16); // Error "Invalid Int"
int SecondAttempt=Integ..
On a question for Java at the university, there was this snippet of code:
class MyExc1 extends Exception {}
class MyExc2 extends Exception {}
class MyExc3 extends MyExc2 {}
public class C1 {
pub..
According to AngularJS doc, calls to $http return the following:
Returns a promise object with the standard then method and two http specific methods: success and error. The then method takes two ..
An error occurred in script 'C:\xampp\htdocs\framework\connect.php' on line 13:
mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
..
I'm struggling with a piece of code and getting the error:
Too many characters in character literal error
Using C# and switch statement to iterate through a string buffer and reading tokens, but get..
I know it is a common issue, but looking for references and other material I don't find a clear answer to this question.
Consider the following code:
#include <string>
// ...
// in a method
s..
"It is not possible to check out a single file. The finest level of checkouts you can do is at the directory level."
How do I get around this issue when using Subversion?
We have this folder in Subv..
I'm attempting to copy the contents of a text box from one workbook to another. I have no problem copying cell values from the first workbook to the 2nd, but I get an object required error when I att..
I am trying to get my first taste of Android development using Eclipse. I ran into this problem when trying to run Eclipse, having installed version 4.2 only minutes ago.
After first trying to start ..
I have Visual Studio 2012 + Resharper 7.1.1000.900 + StyleCop 4.7.44 installed.
The problem is that no shortcuts are active since Resharper was installed.
For example:
I can rename via 'Refactor > ..
Is there a built-in/quick way to use a list of keys to a dictionary to get a list of corresponding items?
For instance I have:
>>> mydict = {'one': 1, 'two': 2, 'three': 3}
>>> myk..
I am trying to iterate over a formArray in my component but I get the following error
Error: Cannot find control with unspecified name attribute
Here is what the logic looks like on my class file
..
This error occur only when I try to cordova run ios --device
Even after cordova build ios command executed, non error is reported.
Whats I do wrong? And how to debug cordova projects on my iPhone (n..
I want to do something very simple.
I have one button in my page.
<form action="/process" method="POST">
<input class="btn btn-large btn-primary" type="submit" value='Analyze Topics'>
..
I have a class - xClass, that I want to load into an array of xClass so I the declaration:
xClass mysclass[] = new xClass[10];
myclass[0] = new xClass();
myclass[9] = new xClass();
However, I don'..
My Idle is throwing errors that and says tkinter can't be imported.
Is there a simple way to install tkinter via pip or easy_install?
There seem to be a lot of package names flying around for this...
..
Does anyone know of a really good tutorial or sample project where Phonegap and jQuery Mobile is used for a real world example?
All the examples I found were showing fancy transitions or theming in j..
I'm a newbie to Python and currently learning Control Flow commands like if, else, etc.
The if statement is working all fine, but when I write else or elif commands, the interpreter gives me a synta..
I have a vector of the following data structure
struct Rule {
int m_id = -1;
std::wstring name;
double angle;
};
std::vector<Rule>& topPriorityRules;
and I am..
here's the deal I got a datagridviewer which is called gridview1 and a fileupload1 when i upload a file it updates the gridview1 and table in database with the file name and path and stores the said f..
android-studio 0.2.7
Fedora 18
Hello,
I am trying to add the jtwitter jar to my project.
First I tried doing the following:
1) Drag the jtwitter.jar into the root directory of my project explorer..
How do I get a property in a PHP based on a string? I'll call it magic. So what is magic?
$obj->Name = 'something';
$get = $obj->Name;
would be like...
magic($obj, 'Name', 'something');
$get..
I am stuck on figuring out some css, I need a section of my form to look like the following,
I have tried every variation I can think of,
I have given the labels a fixed width and floated them l..
I have an application using hibernate 3.1 and JPA annotations. It has a few objects with byte[] attributes (1k - 200k in size). It uses the JPA @Lob annotation, and hibernate 3.1 can read these just..