I am fetching data from a json file using $.getJSON to get an id of a character and then use $.getJSON to fetch it from another page using the id that I go previously. However, in the console it says..
I'm new to React and I'm puzzled on something kind of basic.
I need to append a component to the DOM after the DOM is rendered, on a click event.
My initial attempt is as follows, and it doesn't wor..
When trying to run the Example CorDapp (GitHub CorDapp) via IntelliJ, I receive the following error:
Cannot inline bytecode built with JVM target 1.8 into bytecode that is
being built with JVM target..
I'm trying to read in a CSV file into a pandas dataframe and select a column, but keep getting a key error.
The file reads in successfully and I can view the dataframe in an iPython notebook, but whe..
This is pretty basic but I was coding and started wondering if there was a pythonic way to check if something does not exist. Here's how I do it if its true:
var = 1
if var:
print 'it exists'
..
Hello i was wondering how i can type a javascript game on textmate with my mac and have just a regular .js file but than take the .js file and open it and have it run in chrome like if i have it say "..
I'm creating an SQL setup script and I'm using someone else's script as an example. Here's an example of the script:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[be_Categorie..
Using AJAX I populate a DIV with a bunch of checkboxes (each with it's own unique ID). The IDs are "projectID1", "projectID2", "projectID3" and so on... I have given all checkboxes a class of "pChk".
..
I've tried to display UTF-8 in the win7 cmd. Currently, I'm using the standard font because as I see with the mysql.exe, it works fine with the characters I'm working with (currently the german umlaut..
What's going wrong here?
The ResourceConfig instance does not contain any root resource classes.
Dec 10, 2010 10:21:24 AM com.sun.jersey.spi.spring.container.servlet.SpringServlet initiate
SEVERE: Ex..
Searched, but don't come across a satisfying answer.
I know there's no a portable way to print a pthread_t.
How do you do it in your app?
Update:
Actually I don't need pthread_t, but some small..
I just installed netbeans and I have problems deploying a new Java Web App. I simply create the project without editing anything, this is what project has by default (using apache):
index.html
<!..
I'm new on the android system.
Is this correct, the android 2.2.1 WIFI only detects non-ad hoc wireless network?
I was wondering if there's a way to connect my android to an ad hoc network set-up from..
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..
I know I can get the project through git clone command, but is there any way, how to download the project through the web interface from BitBucket.org?
In the best way, I am looking for a way to downl..
I have a php page that echos out rows from a database. I want to call it via jquery/ajax every 30 seconds. But I also want to be able to call the page at any time so that if I add a record via the for..
I have a "meter" class. One property of "meter" is another class called "production".
I need to access to a property of meter class (power rating) from production class by reference. The powerRating i..
I'm trying to find UNIX or bash command to run a command after connecting to an ssh server. For example:
ssh name@ip "tmux list-sessions"
The above code works, it lists the sessions, but it then i..
I putting an in-game chat module into an app. I am adding text messages as they are received into a LinearLayout view. I want to set the layout params to the TextView but the following code is crashin..
I have a dataframe look like this:
import pandas
import numpy as np
df = DataFrame(np.random.rand(4,4), columns = list('abcd'))
df
a b c d
0 0.418762 0.042369 0.86920..
I am trying to build a Hudson plugin I've modified and it requires jdk1.6. This is fine, but I don't see how I can tell maven where the different jdk is. I've found few mentions on the internet but th..
I am trying to implement an AJAX file upload feature in my project. I am using jQuery for this; my code submits the data using AJAX. I also want to implement a file upload progress bar. How can I do t..
I am trying to read SharedPreferences inside Fragment. My code is what I use to get preferences in any other Activity.
SharedPreferences preferences = getSharedPreferences("pref", 0);
I get er..
I am using MAC and I have successfully logged in to the server and started the server using the following command
./mongod
then it says
Thu Jul 14 01:50:41 db version v1.6.5, pdfile version 4.5
T..
I'm trying to connect my access front-end to the SQL Server backend.
It was working when SQL Server was on my computer but now i'm trying to connect to a server
So when I create the DSN file with ac..
I have installed the JDK on Mac OS X v10.8 (Mountain Lion). When I upgraded it to Mac OS X v10.9 (Mavericks) and ran java -version in the terminal, it showed:
No Java..
I'm looking for a way to do the equivalent to the SQL
SELECT DISTINCT col1, col2 FROM dataframe_table
The pandas sql comparison doesn't have anything about distinct.
.unique() only works for a si..
I have some doubts over how Enumerators work, and LINQ. Consider these two simple selects:
List<Animal> sel = (from animal in Animals
join race in Species
..
I have a table with two DATETIME columns.
One of them is never NULL, but one of them is sometimes NULL.
I need to write a query which will set all the NULL rows for column B equal to the values in c..
I am using this call:
Secure.getString(getApplicationContext().getContentResolver(), Secure.ANDROID_ID);
To get a UID for the device. I think I am getting the same ID from multiple devices though. ..
I have a list of dictionaries and each dictionary has a key of (let's say) 'type' which can have values of 'type1', 'type2', etc. My goal is to filter out these dictionaries into a list of the same di..
I know the absolute path of an image (say for eg, /sdcard/cats.jpg). Is there any way to get the content uri for this file ?
Actually in my code, I download an image and save it at a particular loc..
<?php
echo strtotime("2014-01-01 00:00:01")."<hr>";
// output is 1388516401
?>
I am surprised if it can be reverse. I mean can I convert 1388516401 to 2014-01-01 00:00:01.
What I actuall..
In another question, other users offered some help if I could supply the array I was having trouble with. However, I even fail at a basic I/O task, such as writing an array to a file.
Can anyone expl..
In Onselect event I have script:
$("#vinanghinguyen_images_bbocde").val('');
$("#vinanghinguyen_images_bbocde").val(vinanghinguyen_final_bbcode);
I want clear text area id="vinanghinguyen_images_bb..
pretty trivial question, I know. But I can not find anything online.
I need to disable the user from being able to edit the text inside of a text field. So that when the click on the text, a keyboard..
We are running Jenkins 2.x and love the new Pipeline plugin. However, with so many branches in a repository, disk space fills up quickly.
Is there any plugin that's compatible with Pipeline that I..
Ive got a block of text, and i want to write the authors name and date bellow it in small italics, so i put it in a <span> block and styled it, but i want to space the name out a little bit so i..
What is the SQL Server SYSNAME data type for? BOL says:
The sysname data type is used for
table columns, variables, and stored
procedure parameters that store object
names.
but I don't rea..
I have used LinkedHashMap because it is important the order in which keys entered in the map.
But now I want to get the value of key in the first place (the first entered entry) or the last.
Should ..
I am trying to put the relative path to one of my images in my assets folder in an image src tag in my Angular2 app. I set a variable in my component to 'fullImagePath' and used that in my template. I..
Want to get current datetime to insert into lastModifiedTime column. I am using MySQL database. My questions are:
is there a function available in SQL? or
it is implementation depended so each data..
I am using XAMPPS to host PHP files from my machine. I have recently installed XAMPPs but I am unable to start Apache service as port 80 is in use by PID 4 - NT Kernel & System.
I know by using a..
I need to use UTF-8 in my resource properties using Java's ResourceBundle. When I enter the text directly into the properties file, it displays as mojibake.
My app runs on Google App Engine.
Can any..
I have written a batch script to find and replace a string in a text file. Following is my script.
@echo off &setlocal
set "search=%1"
set "replace=%2"
set "textfile=Input.txt"
set "newfile=Outpu..
I'm new to mongodb and am trying to query child objects. I have a collection of States, and each State has child Cities. One of the Cities has a Name property that is null, which is causing errors in ..
I want to count the number of times each character is repeated in a string. Is there any particular way to do it apart from comparing each character of the string from A-Z
and incrementing a counter?
..
I am looking to create a program that finds all files of a certain type on my desktop and places them into specific folders, for example, I would have all files with .txt into the Text folder.
Any id..
I forked a project on github, made some changes, so far so good.
In the meantime, the repository I forked from changed and I would like to get those changes into my repository. How do I do that ?..
I'm using iTextSharp to read the text from a PDF file. However, there are times I cannot extract text, because the PDF file is only containing images. I download the same PDF files everyday, and I wan..
Edit: I don't want to call handleChange only if the button has been clicked. It has nothing to do with handleClick. I gave an example in the @shubhakhatri answer's comment.
I want to change the input..
I want to send multiple parameters using angularjs HTTP post service.
Here is client side code:
$http.post("http://localhost:53263/api/Products/", [$scope.product, $scope.product2]).
then(fu..
This question is while postmaster is running your query in the background, how to kill or stop it?
For example, your shell or any frontend may be disconnected due to network issue, you cannot use ctr..
I created a function in javascript like that:
function addNewManufacturer() {
var name = $("#id-manuf-name").val();
var address = $("#id-manuf-address").val();
var phone = $("#id..
In Objective C I've been using the following code to hash a string:
-(NSString *) sha1:(NSString*)stringToHash {
const char *cStr = [stringToHash UTF8String];
unsigned char result[20];
..
I have got into a bad state with my ASP.Net MVC 5 project, using Code-First Entity Framework. I don't care about losing data, I just want to be able to start fresh, recreate the database and start usi..
I built a web application containing a WCF service contract and a Silverlight control which makes calls to that WCF service. On my development and test servers it works great.
When I deploy to our l..
I want to download an image accessible from this link: https://www.python.org/static/apple-touch-icon-144x144-precomposed.png into my local system. Now, I'm aware that the curl command can be used to ..
I am currently learning Pandas for data analysis and having some issues reading a csv file in Atom editor.
When I am running the following code:
import pandas as pd
df = pd.read_csv("FBI-CRIME11...
As the title suggests, I am trying to figure out a way of generating random numbers using the new C++11 <random> library. I have tried it with this code:
std::default_random_engine generator;
s..
I have a strange problem.
I have an iPad with iOS 5.0.1 (9A405) and iOS SDK 5.0.1 with Xcode 4.2 (Build 4C199) installed on my Mac.
Xcode doesn't see my device. It says "iOS Device" not "Sauron's iP..
I have multiple email recipients stored in SQL Server. When I click send in the webpage it should send email to all recipients. I have separated emails using ;.
Following is the single recipient code...
What is the RegEx pattern for DateTime (2008-09-01 12:35:45 ) ?
I get this error:
No ending delimiter '^' found
Using:
preg_match('(?n:^(?=\d)((?<day>31(?!(.0?[2469]|11))|30(?!.0?2)|29(?..
I have a list box in the bootstrap modal and a button.
When the button is clicked a new button gets rendered inside a div in the modal.
When I close the modal and reopen it, the last operation perform..
I have read lots of information about page caching and partial page caching in a MVC application. However, I would like to know how you would cache data.
In my scenario I will be using LINQ to Entiti..
I have an app that has a text field on the lower half of the view.
This means that when I go to type in the text field the keyboard covers the textfield.
How would I go about moving the view upwards ..
This is my function where I'm trying to show the User history. For this I need to display the user's current credits along with his credit history.
This is what I am trying to do:
public function g..
Using the async CTP from Microsoft for .NET,
is it possible to catch an exception thrown by an async method in the calling method?
public async void Foo()
{
var x = await DoSomethingAsync();
..
Is there a way to make the following return true?
string title = "ASTRINGTOTEST";
title.Contains("string");
There doesn't seem to be an overload that allows me to set the case sensitivity.. Current..
In the fiddle below, I've a transition on visibility and opacity separately. The latter works but the former doesn't. Moreover, in case of visibility, the transition time is interpreted as delay on ho..
I want to remove all special characters and spaces from a string and replace with an underscore.
The string is
var str = "hello world & hello universe";
I have this now which replaces only ..
Suppose I created a table table in a Rails app. Some time later, I add a column running:
rails generate migration AddUser_idColumnToTable user_id:string.
Then I realize I need to add user_id as an..
I want to write an ArrayList<String> into a text file.
The ArrayList is created with the code:
ArrayList arr = new ArrayList();
StringTokenizer st = new StringTokenizer(
line, ":Mode set..
I have these definition in my function which work
class MyClass {
func myFunc() {
let testStr = "test"
let testStrLen = countElements(testStr)
}
}
But if I move 'testStr' an..
I'm using Java, and I have a String which is JSON:
{
"name" : "abc" ,
"email id " : ["[email protected]","[email protected]","[email protected]"]
}
Then my Map in Java:
Map<String, Object> retMap = new ..
How do you use LINQ (C#) to select the value in a particular column for a particular row in a datatable. The equivalent SQL would be:
select NAME from TABLE where ID = 0
Thanks in advance...
On Updating version my project gradle to 5.0 release I am getting error in android studio it was working fine with gradle 5.0 rc 3 and 4 release. following is the error detail:
Cause: org.jetbra..
Given the following markup, how could I use CSS to force one cell (all cells in column) to fit to the width of the content within it rather than stretch (which is the default behaviour)?
<style ty..
I have a Java Date object containing date and time information. I want to write a method that cuts off the time information, truncates the hours-minutes-seconds, so I only have the date left.
Example..
This is from SQL Server 2008, ssms
When I create a table, it creates under dbo.
I would like to create it under a different schema, but when I use the 'New Table' dialog, I can never find the field ..
I deployed my app to Heroku. It's a node.js + express + socket.io app and this is the package.json file
{
"name": "game_test",
"author": "Ilya",
"description": "A test app for our board game",
..
I've started to use Subversion with TortoiseSVN. If I open up the log and right click on an old revision I see two options that sound like they roll back to an older version: "Update item to revision"..
Is there a method similar to equals() that expresses "not equal to"?
An example of what I am trying to accomplish is below:
if (secondaryPassword.equals(initialPassword))
{
JOptionPane.showMess..
I am attempting to split a list into a series of smaller lists.
My Problem: My function to split lists doesn't split them into lists of the correct size. It should split them into lists of size 30 bu..
I have seen uses of @ in front of certain functions, like the following:
$fileHandle = @fopen($fileName, $writeAttributes);
What is the use of this symbol?..
This is continuation of question
Spring MVC @PathVariable getting truncated
Spring forum states that it has fixed(3.2 version) as part of ContentNegotiationManager. see the below link.
https://jira.s..
I'm using a radial gradient as the background on my webpage, like so:
background-image: -webkit-gradient(radial, 100% 100%, 10, 90% 90%, 600, from(#ccc), to(#000));
It works, but when the content d..
I have seen various versions of the dex erros before, but this one is new. clean/restart etc won't help. Library projects seems intact and dependency seems to be linked correctly.
Unable to execute ..
Is there any way to set a system wide memory limit a process can use in Windows XP? I have a couple of unstable apps which do work ok for most of the time but can hit a bug which results in eating who..
I know that with a UIDatePicker, you can use something like:
NSDate *myDate = picker.date;
But I am using a UIPickerView in my view. How can i similarly get the value selected? Or do I have ..
This is the error that is thrown when trying to run my web app:
[INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.b..
How can I detect the page zoom level in all modern browsers? While this thread tells how to do it in IE7 and IE8, I can't find a good cross-browser solution.
Firefox stores the page zoom level for fu..
$('div').data('info', 1);
alert($('div').data('info'));
//this works
$('div[data-info="1"]').text('222');
//but this don't work
I'm creating element within jquery. After that, I want to add at..
Basically I want to do this:
obj = 'str'
type ( obj ) == string
I tried:
type ( obj ) == type ( string )
and it didn't work.
Also, what about the other types? For example, I couldn't replicate ..
Hi just learn to use js and react-native. I cant use FormData it always shows unsupported bodyinit type. I want to send text rather then JSON.stringify. Can anyone help me? Thanks!
var data = new For..
I have a CSV file with about 2000 records.
Each record has a string, and a category to it:
This is the first line,Line1
This is the second line,Line2
This is the third line,Line3
I need to read t..
I have created a program, tried to post a string on a site and I get this error:
"The server committed a protocol violation. Section=ResponseStatusLine"
after this line of code:
gResponse = (..
Is there any convenient way to read and parse data from incoming request.
E.g client initiate post request
URLConnection connection = new URL(url).openConnection();
connection.setDoOutput(true);
con..
I'm building a little website using bootstrap. The base structure looks like this:
<!DOCTYPE html>
<html>
<head>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-..
I am using this CSS for background opacity of a <div>:
background: rgba(255, 255, 255, 0.3);
It’s working fine in Firefox, but not in IE 8. How do I make it work?..
I’m editing a <textarea> with JavaScript. The problem is that when I make line breaks in it, they won’t display. How can I do this?
I’m getting the value to write a function, but it won�..
What is the best practice when returning data from functions. Is it better to return a Null or an empty object? And why should one do one over the other?
Consider this:
public UserEntity GetUserBy..
I've designed a page, where buttons look good when the browser zoom is at 90%, but by default other users view it at 100/125%+ in their browser which is resulting an overlap in buttons and input forms..
Possible Duplicate:
How to format a JSON date?
My webs service is returning a DateTime to a jQuery call. The service returns the data in this format:
/Date(1245398693390)/
How can I conv..
I recently decided that I needed to change from using milliseconds to microseconds for my Timer class, and after some research I've decided that QueryPerformanceCounter is probably my safest bet. (The..
How do I make a textbox that has a grayed out content, and when I click on it to enter text, the grayed out portion, it disappears and allows me to enter the desired text?
Example:
A "First Name" te..
I have a Java date object:
Date currentDate = new Date();
This will give the current date and time. Example:
Thu Jan 12 10:17:47 GMT 2012
Instead, I want to get the date, changing it to one hour..
Is there an easy way to verify that a given private key matches a given public key? I have a few *.puband a few *.key files, and I need to check which go with which.
Again, these are pub/key files, D..
Let's say that I have a dataframe like this one
import pandas as pd
df = pd.DataFrame([[1, 2, 1], [1, 3, 2], [4, 6, 3], [4, 3, 4], [5, 4, 5]], columns=['A', 'B', 'C'])
>> df
A B C
0 1 2..
I am new to laravel framework.
I want to use jQuery in web application built using laravel framework.
But don't know how to link to jQuery library in laravel project...
I'm trying to test some legacy code, using Mockito.
I want to stub a FooDao that is used in production as follows:
foo = fooDao.getBar(new Bazoo());
I can write:
when(fooDao.getBar(new Bazoo()))...
I'd like to know if it is possible to include a .js file within another .js file?
The reason for me wanting to do this is to keep client includes to a minimum. I have several .js files already writte..
I am currently using underscorejs for sort my json sorting. Now I have asked to do an ascending and descending sorting using underscore.js. I do not see anything regarding the same in the documentatio..
I've successfully converted something of 26 Sep 2012 format to 26-09-2012 using:
datetime.strptime(request.POST['sample_date'],'%d %b %Y')
However, I don't know how to set the hour and minute of som..
I was wondering if it is possible to disable the Required validation attribute in certain controller actions. I am wondering this because on one of my edit forms I do not require the user to enter val..
I want to show a map in on of my activity.
In google map V1 we use -
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="match_parent"
androi..
I have a UITableViewController that doesn't display any sections if there is nothing to show. I've added a label to indicate to the user that there is nothing to display with this code:
label = UILa..
looking for some help writing a batch file to use as a joke on my friend. essentially i want it to open a certain URL in chrome. then i was going to disguise it as something like svchost.exe and have ..
I'm trying to count how many occurrences there are of specific characters in a string, but the output is wrong.
Here is my code:
inputString = str(input("Please type a sentence: "))
a = "a"
A = "A"
..
I spent the last two days trying to figure out how to debug an HTML5 app I created using Cordova 3.2 and deployed to an Android 2.3 device. All the articles/posts I've seen provide hacks rather than r..
I have a Windows Service which I install using the InstallUtil.exe. Even though I have set the Startup Method to Automatic, the service does not start when installed, I have to manually open the servi..
I am running a simple "HelloWorld" Program. I get this error in the command prompt:
Could not find or load main class HelloWorld.
I have set the CLASSPATH and PATH variable in the system. In the..
I'm new to R but I've made numerous correlation plots with smaller data sets. However, when I try to plot a large dataset (2gb+), I can produce the plot just fine, but the legend doesn't show up. Any ..
I'm new at the branching complexities of Git. I always work on a single branch and commit changes and then periodically push to my remote origin.
Somewhere recently, I did a reset of some files to ge..
What is the library to make drop down menu in swift? I am new to Xcode and the Swift language, so can anyone please direct me on how to implement the drop down list in swift?..
In listing controller I have,
public ActionResult GetByList(string name, string contact)
{
var NameCollection = Service.GetByName(name);
var ContactCollection = Service.GetByC..
I am running visual studio C++ and I have a header file "GameEngine.h" that I am trying to have another file see.
When I #include "GameEngine.h" it gives me the error that it cannot open the sour..
I want 1 larger image with 4 smaller images in a 2x2 format like this:
My initial thought was to house everything in one row. Then create two columns, and, in the second column, create two rows an..
I am using Windows 8 Pro. I have just installed XAMPP Windows 1.8.1.
I tried to start Apache from the XAMPP control panel but it wont start. It gives the following error.
Also I have no IIS Servic..
How to convert a value from nanoseconds to seconds?
Here's the code segment:
import java.io.*;
import java.util.concurrent.*;
..
class Stamper {
public static void main (String[] args) {
lon..
I am using both the JAI media apis and ImageMagick?
ImageMagick has some scalability issues and the JNI based JMagick isn't attractive either.
JAI has poor quality results when doing resizing operati..
I have a Java Project in which I am writing a simple JUNIT test case. I have copied the applicatinoContext.xml file into the root java source directory. I've tried it with some of the recommended se..
I'm new to the iPhone submission process. Apple asks for the Bundle ID Suffix. What is this? Not sure what to put here and what the significance of it is...
Q: Is there any way to programmatically prevent Google Colab from disconnecting on a timeout?
The following describes the conditions causing a notebook to automatically disconnect:
Google Colab..
I have a simple html page with angular js as follows:
//Application name
var app = angular.module("myTmoApppdl", []);
app.controller("myCtrl", function ($scope) {
//Sample login ..
I am trying to create a website to upload/display images (using MVC4).
I have written the below code to fetch the images which are locally stored on the server under a folder App_Data\Images.
The path..
I keep getting this error when I try to have 2 "Get" methods
Multiple actions were found that match the request: webapi
I been looking around at the other similar questions about this on stack ..
I have created a website in ASP.NET and have created a class and put it inside of the App_Code folder. However I cannot access this from my other pages. Does something need to be configured to allow t..
I want to write a bash function that check if a file has certain properties and returns true or false. Then I can use it in my scripts in the "if". But what should I return?
function myfun(){ ... ret..
How to split the string "Thequickbrownfoxjumps" to substrings of equal size in Java.
Eg. "Thequickbrownfoxjumps" of 4 equal size should give the output.
["Theq","uick","brow","nfox","jump","s"]
Sim..
I've got a C# webforms app, that until today had been working just swimmingly.
Now today, all of a sudden, every time I try run the app, I get a file locking error:
Unable to copy file "obj\Debu..
Over the years I have slowly developed a regular expression that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.
I use it in several PHP programs, ..
I want to catch the enter key press event on the textbox below. To make it more clear I am using a ng-repeat to populate the tbody. Here is the HTML:
<td><input type="number" id="closeqty{{..
This is a snippet from my pom.xml.
I tried the following, but the profile was not activated.
mvn clean install -Pdev1
mvn clean install -P dev1
When I tried mvn help:active-profiles no profiles wer..
What would be a nice way to go from {2:3, 1:89, 4:5, 3:0} to {1:89, 2:3, 3:0, 4:5}?
I checked some posts but they all use the "sorted" operator that returns tuples. ..
http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.atom on this site, I wrote the following code to retrieve the data. protected void Button1_Click(object sender, EventArgs e) {..
I am creating a figure in Matplotlib like this:
from matplotlib import pyplot as plt
fig = plt.figure()
plt.plot(data)
fig.suptitle('test title')
plt.xlabel('xlabel')
plt.ylabel('ylabel')
fig.savefi..
I'm learning Python and can't even write the first example:
print 2 ** 100
this gives SyntaxError: invalid syntax
pointing at the 2.
Why is this? I'm using version 3.1..
I do not want to inherit the child opacity from the parent in CSS.
I have one div which is the parent, and I have another div inside the first div which is the child.
I want to set the opacity prope..
I want to get the first match of a regex.
In this case, I got a list:
text = 'aa33bbb44'
re.findall('\d+',text)
['33', '44']
I could extract the first element of the list:
text = 'aa33bbb44'..
When pasting this YAML file into an online yaml parser, I got an expected block end error:
ADDATTEMPTING: 'Tentative d ajout '
ATTEMPTINGTOGIVE: 'Tenter de donner '
ATTEMPTINGTOSET1: 'Tentative de d�..
I am building an order form with PHP and MySQL.
The PHP Form has an input box where the user types in a product code. In the event that the user does not know the product code, I want them to click o..
Node version is v0.11.13
Memory usage during crash according to sudo top not raises over 3%
Code that reproduces this error:
var request = require('request')
var nodedump = require('nodedump')
req..
My PowerShell prompt's currently pointed to my C drive (PS C:\>). How do I change directory to a folder on my Q (PS Q:\>) drive?
The folder name on my Q drive is "My Test Folder"...
I'm using an IF statement in Ruby on Rails to try and test if request parameters are set. Regardless of whether or not both parameters are set, the first part of the following if block gets triggered..
I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2. I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest sol..
int:
The 32-bit int data type can hold integer values in the range of
-2,147,483,648 to 2,147,483,647. You may also refer to this data type
as signed int or signed.
unsigned int :
The 32-bit uns..
I know this might sound as really dummy question, but I'm trying to ensure that the provided string is of a number / decimal format to use it later on with PHP's number_format() function.
How would I..
Why can't do you this if you try to find out whether an int is between to numbers:
if(10 < x < 20)
Instead of it, you'll have to do
if(10<x && x<20)
which seems like a bit of..
I wonder the general rule to use regular expression in if clause in bash?
Here is an example
$ gg=svm-grid-ch
$ if [[ $gg == *grid* ]] ; then echo $gg; fi
svm-grid-ch
$ if [[ $gg == ^....grid..
Any easier way to write this if statement?
if (value==1 || value==2)
For example... in SQL you can say where value in (1,2) instead of where value=1 or value=2.
I'm looking for something that would..
I have this script where I want to add an object to an array called $Target in every foreach.
foreach ($Machine in $Machines)
{
$TargetProperties = @{Name=$Machine}
$TargetObject = New-Object P..
I'm not able to setup SSL. I've Googled and I found a few solutions but none of them worked for me. I need some help please...
Here's the error I get when I attempt to restart nginx:
root@s17925268:..
I've uploaded a sketch to an Arduino Uno whose loop is something like this:
void loop(){
Serial.println("Hello, World!");
}
So, now, I can't upload anything anymore, because the IDE says "port ..
I want to catch and log exceptions without exiting, e.g.,
try:
do_stuff()
except Exception, err:
print(Exception, err)
# I want to print the entire traceback here,
# not just the excep..
I want to get a specific output iterating a Ruby Hash.
This is the Hash I want to iterate over:
hash = {
1 => ['a', 'b'],
2 => ['c'],
3 => ['d', 'e', 'f', 'g'],
4 => ['h']
}
..
I am trying to create a text file in csv format out of a PyQt4 QTableWidget. I want to write the text with a UTF-8 encoding because it contains special characters. I use following code:
import codecs..
How do I determine if variable is undefined or null?
My code is as follows:
var EmpName = $("div#esd-names div#name").attr('class');
if(EmpName == 'undefined'){
// DO SOMETHING
};
<div id="es..
Anyone knows how to open a twitter bootstrap modal, from code behind?
I want to open the modal based on some requeriment at the moment of the save. Something like "Hey there's no stock, pick up one o..
What is the difference between this two call? (Is there any?)
// 1.
new BigDecimal("3.53456").round(new MathContext(4, RoundingMode.HALF_UP));
// 2.
new BigDecimal("3.53456").setScale(4, RoundingMode..
I've looked around at some of the solutions to this problem but they don't seem to be the same as what I'm experiencing.
Method that I'm trying to call:
namespace BetfairAPI
{
public class CBetf..
In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?
#include <filename>
#include "filename"
..
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..
I would like to convert a html element created from a string back to the string after some modifications. But I get an empty string instead.
$('<iframe width="854" height="480" src="http://www.you..