I'm looking for a way to convert hex(hexadecimal) to dec(decimal) easily. I found an easy way to do this like :
int k = 0x265;
cout << k << endl;
But with that I can't input 265. Is the..
The colors in this table is all not transparent. I guess the value for the A is set to FF.
What is the code for transparency?
For example this color FFF0F8FF (AliceBlue), to a transparent code such..
I am trying to convert a string like "testing123" into hexadecimal form in java. I am currently using BlueJ.
And to convert it back, is it the same thing except backward?..
I want to convert a hex string (ex: 0xAD4) to hex number, then to add 0x200 to that number and again want to print that number in form of 0x as a string.
i tried for the first step:
str(int(str(item..
How can I perform a conversion of a binary string to the corresponding hex value in Python?
I have 0000 0100 1000 1101 and I want to get 048D I'm using Python 2.6...
how can we XOR hex numbers in python eg. I want to xor 'ABCD' to '12EF'. answer should be B922.
i used below code but it is returning garbage value
def strxor(a, b): # xor two strings of differe..
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'd like to use a color from an hexa string such as "#FFFF0000" to (say) change the background color of a Layout.
Color.HSVToColor looks like a winner but it takes a float[] as a parameter.
Am I any ..
I have the following code:
SN.get_Chars(5)
SN is a string so this should give the 5th Char. Ok!
Now I have another code but: SN.get_Chars(0x10)
I wonder what 0x10 is? Is it a number? If it's so, ..
I have a lot of this kind of string and I want to find a command to convert it in ascii, I tried with echo -e and od, but it did not work.
0xA7.0x9B.0x46.0x8D.0x1E.0x52.0xA7.0x9B.0x7B.0x31.0xD2
..
I have a function here that converts decimal to hex but it prints it in reverse order. How would I fix it?
def ChangeHex(n):
if (n < 0):
print(0)
elif (n<=1):
print(n)
..
What does a 0x prefix on a number mean?
const int shared_segment_size = 0x6400;
It's from a C program. I can't recall what it amounts to and particularly what the letter x means...
How can I convert the following?
2934 (integer) to B76 (hex)
Let me explain what I am trying to do. I have User IDs in my database that are stored as integers. Rather than having users reference ..
I have a long sequence of hex digits in a string, such as
000000000000484240FA063DE5D0B744ADBED63A81FAEA390000C8428640A43D5005BD44
only much longer, several kilobytes. Is there a builtin way t..
Can someone help me to convert a hexadecimal number to decimal number in a shell script?
E.g., I want to convert the hexadecimal number bfca3000 to decimal using a shell script. I basically want the ..
I need to check for a string located inside a packet that I receive as byte array. If I use BitConverter.ToString(), I get the bytes as string with dashes (f.e.: 00-50-25-40-A5-FF).
I tried most funct..
I hope this isn't too much of a stupid question, I have looked on 5 different pages of Google results but haven't been able to find anything on this.
What I need to do is convert a string that contai..
I have a byte array filled with hex numbers and printing it the easy way is pretty pointless because there are many unprintable elements. What I need is the exact hexcode in the form of: 3a5f771c..
I am interested in taking in a single character,
c = 'c' # for example
hex_val_string = char_to_hex_string(c)
print hex_val_string
output:
63
What is the simplest way of going about this? Any pr..
How do I create an unmodified hex dump of a binary file in Linux using bash? The od and hexdump commands both insert spaces in the dump and this is not ideal.
Is there a way to simply write a long st..
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..
How do I convert an integer to a hex string in C++?
I can find some ways to do it, but they mostly seem targeted towards C. It doesn't seem there's a native way to do it in C++. It is a pretty simple..
I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array.
I couldn't have phrased it better than the person that posted the same question here.
But..
I am trying to convert a String hexadecimal to an integer. The string hexadecimal was calculated from a hash function (sha-1). I get this error : java.lang.NumberFormatException. I guess it doesn't li..
I want to create a function that will accept any old string (will usually be a single word) and from that somehow generate a hexadecimal value between #000000 and #FFFFFF, so I can use it as a colour ..
I would like to be able to convert a String (with words/letters) to other forms, like binary.
How would I go about doing this. I am coding in BLUEJ (Java).
Thanks..
Using the following jQuery will get the RGB value of an element's background color:
$('#selector').css('backgroundColor');
Is there a way to get the hex value rather than the RGB?..
Is there a built in way to convert an integer in Ruby into its hexadecimal equivalent?
Something like the opposite of String#to_i:
"0A".to_i(16) #=>10
Like perhaps:
"0A".hex #=>10
I know ..
So I have this query working (where signal_data is a column) in Sybase but it doesn't work in Microsoft SQL Server:
HEXTOINT(SUBSTRING((INTTOHEX(signal_data)),5,2)) as Signal
I also have it in Exce..
I'm working on a project where I need to generate an undefined number of random, hexadecimal color codes…how would I go about building such a function in PHP?..
How to convert decimal to hex in the following format (at least two digits, zero-padded, without an 0x prefix)?
Input: 255 Output:ff
Input: 2 Output: 02
I tried hex(int)[2:] but it seems ..
I have a homework assignment where I need to do three-way conversion between decimal, binary and hexadecimal. The function I need help with is converting a decimal into a hexadecimal. I have nearly no..
I'm trying to convert a unicode string to a hexadecimal representation in javascript.
This is what I have:
function convertFromHex(hex) {
var hex = hex.toString();//force conversion
var str..
I got the problem when convert between this 2 type in PHP. This is the code I searched in google
function strToHex($string){
$hex='';
for ($i=0; $i < strlen($string); $i++){
$hex ...
I'm working on implementing a widget transparency option for my app widget although I'm having some trouble getting the hex color values right. Being completely new to hex color transparency I searche..
I have a list of numbers as below:
0, 16, 32, 48 ...
I need to output those numbers in hexadecimal as:
0000,0010,0020,0030,0040 ...
I have tried solution such as:
printf("%.4x",a); // whe..
What is the best way to convert a string to hex and vice versa in C++?
Example:
A string like "Hello World" to hex format: 48656C6C6F20576F726C64
And from hex 48656C6C6F20576F726C64 to string: "Hel..
How do I convert a byte[] to a string? Every time I attempt it, I get
System.Byte[]
instead of the value.
Also, how do I get the value in Hex instead of a decimal?..
How do I get the background color code of an element?
_x000D_
_x000D_
console.log($(".div").css("background-color"));_x000D_
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery..
This is more of a curious query than an important question, but why when printing hex as an 8 digit number with leading zeros, does this %#08X Not display the same result as 0x%08X?
When I try to use..
I am trying to use str.encode() but I get
>>> "hello".encode(hex)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be string, not builtin_..
Here is a function I was working on to programmatically lighten or darken a hex color by a specific amount. Just pass in a string like "3F6D2A" for the color (col) and a base10 integer (amt) for the a..
I have an integer that was generated from an android.graphics.Color
The Integer has a value of -16776961
How do I convert this value into a hex string with the format #RRGGBB
Simply put: I would li..
I searched char* to hex string before but implementation I found adds some non-existent garbage at the end of hex string. I receive packets from socket, and I need to convert them to hex strings for l..
I'm trying to convert a number from an integer into an another integer which, if printed in hex, would look the same as the original integer.
For example:
Convert 20 to 32 (which is 0x20)
Convert 5..
I'm trying to find a way to print a string in hexadecimal. For example, I have this string which I then convert to its hexadecimal value.
my_string = "deadbeef"
my_hex = my_string.decode('hex')
How..
What's a good hex editor/viewer for the Mac? I've used xxd for viewing hexdumps, and I think it can be used in reverse to make edits. But what I really want is a real hex editor...
What's the correct way to convert bytes to a hex string in Python 3?
I see claims of a bytes.hex method, bytes.decode codecs, and have tried other possible functions of least astonishment without ava..
How can I get a color from a hexadecimal color code (e.g. #FFDFD991)?
I am reading a file and am getting a hexadecimal color code. I need to create the corresponding System.Windows.Media.Color instan..
With below code, the colorsting always gives #DDDD. Green, Red and Space values int he How to fix this?
string colorstring;
int Blue = 13;
int Green = 0;
int Red = 0;
int Space = 14;
colorstring = St..
I am trying to understand how colors work in Android. I have this color set as the background of my LinearLayout, and I get a background gray with some transparency:
<gradient android:startColor="..
I have:
uint8 buf[] = {0, 1, 10, 11};
I want to convert the byte array to a string such that I can print the string using printf:
printf("%s\n", str);
and get (the colons aren't necessary):
"00..
I'm working with some example java code for making md5 hashes. One part converts the results from bytes to a string of hex digits:
byte messageDigest[] = algorithm.digest();
StringBuffer hexStri..
I found the following way hex to binary conversion:
String binAddr = Integer.toBinaryString(Integer.parseInt(hexAddr, 16));
While this approach works for small hex numbers, a hex number such as th..
I am working with Python3.2. I need to take a hex stream as an input and parse it at bit-level. So I used
bytes.fromhex(input_str)
to convert the string to actual bytes. Now how do I convert these ..
I wrote some code to convert my hexadecimal display string to decimal integer. However, when input is something like 100a or 625b( something with letter) I got an error like this:
java.lang..
I'm now doing it this way:
[root@~]# echo Aa|hexdump -v
0000000 6141 000a
0000003
[root@~]# echo -e "\x41\x41\x41\x41"
AAAA
But it's not exactly behaving as I wanted,
..
I am trying to convert a char[] in ASCII to char[] in hexadecimal.
Something like this:
hello --> 68656C6C6F
I want to read by keyboard the string. It has to be 16 characters long.
This is my code..
In C, what is the most efficient way to convert a string of hex digits into a binary unsigned int or unsigned long?
For example, if I have 0xFFFFFFFE, I want an int with the base10 value 4294967294...
I am trying to convert a string that is 8 characters long of hex code into an integer so that I can do int comparison instead of string comparisons over a lot of different values.
I know this is fair..
I want to take an integer (that will be <= 255), to a hex string representation
e.g.: I want to pass in 65 and get out '\x41', or 255 and get '\xff'.
I've tried doing this with the struct.pack('c..
I'm trying to read in a line of characters, then print out the hexadecimal equivalent of the characters.
For example, if I have a string that is "0xc0 0xc0 abc123", where the first 2 characters are c..
In a UNIX shell script, what can I use to convert decimal numbers into hexadecimal? I thought od would do the trick, but it's not realizing I'm feeding it ASCII representations of numbers.
printf? ..
I have a String array.
I want to convert it to byte array.
I use the Java program.
For example:
String str[] = {"aa", "55"};
convert to:
byte new[] = {(byte)0xaa, (byte)0x55};
What can I do?..
I need a good HEX editor for Linux, and by good I mean:
Fast
Search/replace features
Can display data not only in hex, but also binary, octal, etc.
Can work with huge (> 1 gb) files without becoming..
For logging purpose we are converting the logs to byte array and then to hex string. I want to get it back in a Java String, but I am not able to do so.
The hex string in log file looks something lik..
I have this string: Hello world !! and I want to print it using Python as 48:65:6c:6c:6f:20:77:6f:72:6c:64:20:21:21.
hex() works only for integers.
How can it be done?..
I want to convert a hex string to a 32 bit signed integer in C++.
So, for example, I have the hex string "fffefffe". The binary representation of this is 11111111111111101111111111111110. The sig..
How does one switch the case of highlighted text in Visual Studio Code? VS allows this via CTRL+SHIFT+U and CTRL+U.
Is there a command binding that I can set up to do this, or is it by default some ..
I am trying to consume some web services which are cross domain. When I disable chrome's web-security it is working fine. I want it to work without this so I have tried adding cross-domain.xml and st..
I am trying to rename a file and was using the below code but it does not seem to work. Can someone please tell me why? What is the correct way to rename a file from VBScript?
FSO.GetFile("MyFile.txt..
I want to change font color in TextField .I found -fx-background-color , -fx-border-color for changing the color of background and border but nothing for text . any ideas? thanks in advamce..
When cding into one of my directories called openfire the following error is returned:
bash: cd: openfire: Permission denied
Is there any way around this?..
In my app I want to copy a file to the other hard disk so this is my code:
#include <windows.h>
using namespace std;
int main(int argc, char* argv[] )
{
string Input = "C:\\Emploi NAm.do..
this function should read a file word by word
and it does work till the last word, where the run stops
void readFile( )
{
ifstream file;
file.open ("program.txt");
string word;
char..
I plan to use it with JavaScript to crop an image to fit the entire window.
Edit: I'll be using a 3rd party component that only accepts the aspect ratio in the format like: 4:3, 16:9...
I want to select sql:
SELECT "year-month" from table group by "year-month" AND order by date, where
year-month - format for date "1978-01","1923-12".
select to_char of couse work, but not "right" ord..
There are 2 tables, spawnlist and npc, and I need to delete data from spawnlsit.
npc_templateid = n.idTemplate is the only thing that "connect" the tables.
I have tried this script but it doesn't work..
I have a long sequence of hex digits in a string, such as
000000000000484240FA063DE5D0B744ADBED63A81FAEA390000C8428640A43D5005BD44
only much longer, several kilobytes. Is there a builtin way t..
I've been teaching myself Excel VBA over the last two years, and I have the idea that it is sometimes appropriate to dispose of variables at the end of a code segment. For example, I've seen it done i..
I am trying to develop a "document manager"
I have the necessity of accessing the files downloaded from the internet, from Gmail, for other mail clients, from other internet sources...
I would like ..
I accidentally dropped a DVD-rip into a website project, then carelessly git commit -a -m ..., and, zap, the repo was bloated by 2.2 gigs. Next time I made some edits, deleted the video file, and comm..
Is \n the universal newline character sequence in Javascript for all platforms? If not, how do I determine the character for the current environment?
I'm not asking about the HTML newline element (&l..
I'm currently in Ubuntu 14.04, using python 2.7 and cv2.
When I run this code:
import numpy as np
import cv2
img = cv2.imread('2015-05-27-191152.jpg',0)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRA..
I just ran my program and I got this error message
An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about
the..
I'm trying to use <mat-form-field> in an Angular project using Material2 but I've hit a wall.
Getting the error message below.
Uncaught Error: Template parse errors:
'mat-form-field' is not a ..
Greetings,
I'm trying to write a program in Python which would print a string every time it gets a tap in the microphone. When I say 'tap', I mean a loud sudden noise or something similar.
I searche..
I get the error: "Only a type can be imported. XYZ resolves to a package."
Someone has explained the cause here but I am not sure what I supposed to do to fix this. FYI: I am using Eclipse. I have ad..
I accidentally deleted some huge number of rows from a table...
How can I roll it back?
I executed the query using PuTTY.
I'll be grateful if any of you can guide me safely out of this.....
I've been trying for two days to find a way to set the maximum value of the yAxis on Highcharts.
I got a percentage column graphic, but the highest value in the series is 60, so it adjusts the axis t..
So if I have two sets:
Set<Integer> test1 = new HashSet<Integer>();
test1.add(1);
test1.add(2);
test1.add(3);
Set<Integer> test2 = new HashSet<Integer>();
test2.add(1);
test2..
If I do the following:
import subprocess
from cStringIO import StringIO
subprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO('one\ntwo\nthree\nfour\nfive\nsix\n')).communicate()[0]
I..
I'm using the Facebook API to get the like/share count for given URLs. The strange thing is that it seems to be quite inconsistent in returning results. For example, this page returns results:
https..
I'm having a weird configuration problem with Maven in Eclipse. Although I can build the project and deploy it to tomcat without any errors, The Marker tab keeps showing the following message:
[-] Ma..
I want to redirect the print to a .txt file using python. I have a 'for' loop, which will 'print' the output for each of my .bam file while I want to redirect ALL these output to one file. So I tried ..
I have below HTML code ?
<label for="male">Hello This Will Have Some Value</label>
But actually i dont have enough space to show this much long label. So i thought of creating label as ..
I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for httpd service, but something wrong with my iptables service ... what's wrong with it? What am I doing ..
I have a problem with accessing a function from a class with the class object in my main function. I am just trying to make the object for the class and use that object to access the function inside t..
In bash, calling foo would display any output from that command on the stdout.
Calling foo > output would redirect any output from that command to the file specified (in this case 'output').
Is t..
Wondering if its possible to change the size of checkbox as it's possible with buttons. I want it to be bigger, so it makes it easy to press. Right now its looking like this:
Code:
<div class=..
I need to modify an existing program and it contains following code:
var inputs = events.Select(async ev => await ProcessEventAsync(ev))
.Select(t => t.Result)
..
I'm trying to install version 1.2.2 of the MySQL_python adaptor, using a fresh virtualenv created with the --no-site-packages option. The current version shown in PyPi is 1.2.3. Is there a way to inst..
I have 2 fragments: (1)Frag1 (2)Frag2.
Frag1
bundl = new Bundle();
bundl.putStringArrayList("elist", eList);
Frag2 dv = new Frag2();
dv.setArguments(bundl);
FragmentTransaction ft = getFragmentMana..
I am looking for a way to store a large variable number of matrixes in an array in MATLAB.
Are there any ways to achieve this?
Example:
for i: 1:unknown
myArray(i) = zeros(500,800);
end
Where u..
I'm trying to create a view with an ORDER BY clause. I have create it successfully on SQL Server 2012 SP1, but when I try to re-create it on SQL Server 2008 R2, I get this error:
Msg 102, Level 1..
I would like to use google web starter kit. I installed node.js v0.12.0, node-sass & gulp.
And then ran:
$ sudo npm install
When I typed gulp serve then got this error:
Using gulpfile ~/web-s..
I have a time that is 16:23:01. I tried using DateTime.ParseExact, but it's not working.
Here is my code:
string Time = "16:23:01";
DateTime date = DateTime.ParseExact(Time, "hh:mm:ss tt", System.G..
after 2 hours of searching I decided to ask my question.
I have a div:
<div id="box"></div>
I want to add a div inside the above div using jquery.
I tried (following code is inside a ..
I'm trying:
SELECT *
FROM dbo.March2010 A
WHERE A.Date >= 2010-04-01;
A.Date looks like: 2010-03-04 00:00:00.000
However, this is not working.
Can anyone provide a reference for why?..
While uninstalling Microsoft Visual Studio Ultimate 2015 Preview, it throws an error quoting "Microsoft Visual Studio Ultimate 2015 Preview has stopped working"
Message Content Include:
A proble..
Instead of running an external program with its path hardcoded, I would like to get the current Project Dir. I'm calling an external program using a process in the custom task.
How would I do that? A..
I have a dataframe in pandas with mixed int and str data columns. I want to concatenate first the columns within the dataframe. To do that I have to convert an int column to str.
I've tried to do as ..
I was using this in my iPhone app
if (title == nil) {
// do something
}
but it throws some exception, and the console shows that the title is "(null)".
So I'm using this now:
if (title == nil..
As you can see in the CSS below, I want child2 to position itself before child1. This is because the site I'm currently developing should also work on mobile devices, on which the child2 should be at ..
I am writing my thesis in Latex, and I have the references in an own thesis.bib
file which look as follows
@Article{xxx,
author = "D.A. Reinhard",
title = "Case Study",
year = ..
I've searched many examples on this site but can't seem to fit them into my needs. I just need to filter some JSON results using grep().
Below is my JSON:
var data = { "items": [
{
"id..
I'm trying to write a simple function that takes two inputs, x and y, and passes these to three other simple functions that add, multiply, and divide them. The main function should then display the re..
I'm brand new to jQuery and have some experience using Prototype. In Prototype, there is a method to "flash" an element — ie. briefly highlight it in another color and have it fade back to norma..
I have a table with a lot of records (could be more than 500 000 or 1 000 000). I added a new column in this table and I need to fill a value for every row in the column, using the corresponding row v..
When I am running my docker image on windows 10. I am getting this error:
standard_init_linux.go:190: exec user process caused "no such file or directory"
my docker file is:
FROM openjdk:8
EXPOSE..
I have situation where I need to change the order of the columns/adding new columns for existing Table in SQL Server 2008.
Existing column
MemberName
MemberAddress
Member_ID(pk)
and I want this or..
I don't know how to create a regular expression in JavaScript or jQuery.
I want to create a regular expression that will check if a string contains only characters between a-z and A-Z with any arrang..
How do you write your own function for finding the most accurate square root of an integer?
After googling it, I found this (archived from its original link), but first, I didn't get it completely, a..
After I merged a file in Git I tried to pull the repository but error came up:
You have not concluded your merge. (MERGE_HEAD exists)
How does one conclude a merge?..
I have a header (dynamic height) with a fixed position.
I need to place the container div right below the header. As the header height is dynamic, I can't use the fixed value for top margin.
How ca..
How can one make the font size grow bigger on mouse over? Color transitions work fine over time, but the font size switches immediately for some reason.
Sample code:
body p {
font-size: 12p..
I’m embedding Google Maps into my web site. Once Google Maps is loaded, I need to kick off a few JavaScript processes.
Is there a way to auto-detect when Google Maps has fully loaded, including til..
I have seen null elements represented in several ways:
The element is present with xsi:nil="true":
<book>
<title>Beowulf</title>
<author xsi:nil="true"/>
</boo..
I'd like to store a JavaScript object in HTML5 localStorage, but my object is apparently being converted to a string.
I can store and retrieve primitive JavaScript types and arrays using localStorage..
I am using eclipse 3.4.1 Java EE under Vista. It seems to like getting stuck when building my workspace. Canceling the build doesn't seem to do anything as well.
Why is this happening and how do I fi..
I tested this javascript in Chrome's Javascript console and it returned SyntaxError: Unexpected Identifier.
I got this code from a tutorial and was just testing Chrome's console so i expected it to ..
I did a git stash pop and ended up with merge conflicts. I removed the files from the file system and did a git checkout as shown below, but it thinks the files are still unmerged. I then tried replac..
How do I add a certain number of days to the current date in PHP?
I already got the current date with:
$today = date('y:m:d');
Just need to add x number of days to it..
I am using the latest gcc with Netbeans on Windows. Why doesn't long double work? Is the printf specifier %lf wrong?
Code:
#include <stdio.h>
int main(void)
{
float aboat = 32000.0;
d..
Given a set of latitude and longitude points, how can I calculate the latitude and longitude of the center point of that set (aka a point that would center a view on all points)?
EDIT: Python soluti..
I'm trying to use cURL in a script and get it to not show the progress bar.
I've tried the -s, -silent, -S, and -quiet options, but none of them work.
Here's a typical command I've tried:
curl -s ..
How do I repeat the last command? The usual keys: Up, Ctrl+Up, Alt-p don't work. They produce nonsensical characters.
(ve)[kakarukeys@localhost ve]$ python
Python 2.6.6 (r266:84292, Nov 15 2010, 21:4..
I'm trying to put together a shopping list app, based on input fields, ArrayList, and ListView. The app will be based on Fragments. However, I have encountered a problem and I do not know how to solve..
Possible Duplicate:
What does threadsafe mean?
I am very confused that any class is Thread safe. I am understanding that, if any class is thread safe then it has some specific on its method..
In Eclipse, when you hover your mouse over a method, a window would appear with a description of what the method does, what the parameters mean and what it returns. Is there a way to get Android Studi..
I have a string like the following:
String str = "4*5";
Now I have to get the result of 20 by using the string.
I know in some other languages the eval() function will do this.
How can I do this i..
Since a few days I got an issue with Mac OS High Sierra 10.13.3 :
When I run a git clone like git clone github.com/xxx.git failed
it print:
LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to..
I'd love some some help handling a strange edge case with a paginated API I'm building.
Like many APIs, this one paginates large results. If you query /foos, you'll get 100 results (i.e. foo #1-100),..
I'm trying to display a price of a product in Woocommerce, on a custom page.
There is a short code for that, but it gives product price and also adds an "Add to cart button", I don't want the button, ..
So this seems pretty basic but I can't get it to work. I have an Object, and I am using reflection to get to it's public properties. One of these properties is static and I'm having no luck getting ..
Can anyone help me how to access for example value of first cell in 4th column?
a b c d
1 2 3 5
g n m l
for example, how to access to value d, if that would be datatable?
Thanks...
I am having this error when seeding my database with code first approach.
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
To be honest I don't..
I have the following codes to create a graph using Chart.js v2.1.3:
var ctx = $('#gold_chart');
var goldChart = new Chart(ctx, {
type: 'line',
data: {
labels: dates,
datasets:..
I have created an Android emulator (Android Virtual Device), but I am unable to find out the SD card I have built during creation of this.
How can I find the SD card and its content and also how to i..
In a view, i have a column comments which may contain large string.
I just want to select first 60 characters and append the '...' at the end of the selected string.
For selecting first 60 characters..
Have a code as shown below. I have problem passing the arguments.
stringstream data;
char *addr=NULL;
strcpy(addr,retstring().c_str());
retstring() is a function that returns a string.
//more code..
I cant figure it out. How do i align the textbox? I thought using float: left on the labels on the left (then doing it on the input when i notice the input was now on the left without that) but that w..
I have a website that every time a user logs in or logs out I save it to a text file.
My code doesn't work in appending data or creating a text file if it does not exist.. Here is the sample code
$m..
I have a question related to oracle. I have a machine which earlier had Oracle client installed on it. I was able to connect to my oracle server using the client.
Now I recently installed oracle 11g ..
So for the past hour I've been trying to figure out how to reset my 'root' password for MySQL as I cannot log into PHPMyAdmin. I've tried changing the password in the config.inc.php file and searching..
I have really great wish to set my own color to UITextField border. But so far I could find out how to change the border line style only.
I've used background property to set background color in such..
I need to sign Android application (.apk).
I have .pfx file. I converted it to .cer file via Internet Explorer and then converted .cer to .keystore using keytool. Then I've tried to sign .apk with jar..
I have issue after installing the matplotlib package unable to import matplotlib.pyplot as plt. Any suggestion will be greatly appreciate.
>>> import matplotlib.pyplot as plt
Traceback (mo..
What is content-type and datatype in a POST request? Suppose I have this:
$.ajax({
type : "POST",
url : /v1/user,
datatype : "application/json",
contentType: "text/plain",
success..
I am installing a website in a droplet (Digital Ocean). I have a issue for install NGINX with PHP properly. I did a tutorial https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx..
I am trying to use HttpContent:
HttpContent myContent = HttpContent.Create(SOME_JSON);
...but I am not having any luck finding the DLL where it is defined.
First, I tried adding references to Micr..
I am trying to position the text element "Bet 5 days ago" in the lower right-hand corner. How can I accomplish this? And, more importantly, please explain so I can conquer CSS!
..
I recently moved from Java for C++ but now when I am writing my application I'm not interested in writing everything of the code in the main function I want in main function to call another function b..
Are there any issues with using async/await in a forEach loop? I'm trying to loop through an array of files and await on the contents of each file.
import fs from 'fs-promise'
async function printF..
On an Amazon S3 Linux instance, I have two scripts called start_my_app and stop_my_app which start and stop forever (which in turn runs my Node.js application). I use these scripts to manually start a..
From what I have understood so far, an NFC phone will act as an NFC reader which will read data from an NFC tag. Now my question is, can we switch this around? Can we make an Android NFC phone behave ..
React is able to render custom attributes as described at
http://facebook.github.io/react/docs/jsx-gotchas.html:
If you want to use a custom attribute, you should prefix it with
data-.
<..
How can I define a CSS scrollbar style cross browser? I tested this code, it only works in IE and opera, but failed in Chrome, Safari and Firefox.
<style type="text/css">
<!--
body {
..
When I try to submit my app on the App Store through Xcode I got this error.
A server with the specified hostname could not be found.
Is this temporary error at Apple or something to do with X..
I just upgraded Git. I'm on Git version 1.8.3.
This morning I tried to unstash a change 1 deep in the stack.
I ran git stash pop stash@{1} and got this error.
fatal: ambiguous argument 'stash@1'..
I am setting up a local server using flask. All I want to do currently is display an image using the img tag in the index.html page. But I keep getting error
GET http://localhost:5000/
ayrton_senna_..
I'm trying to import some data into my database. So I've created a temporary table,
create temporary table tmp(pc varchar(10), lat decimal(18,12), lon decimal(18,12), city varchar(100), prov varchar(..
Possible Duplicate:
SQL group_concat function in SQL Server
I am looking to create a query but somehow I am unable to do so. Can anyone please help me out here?
The original data
ID Re..
Explain why a nullable int can't be assigned the value of null e.g
int? accom = (accomStr == "noval" ? null : Convert.ToInt32(accomStr));
What's wrong with that code?..
How do I write an SQL script to create a ROLE in PostgreSQL 9.1, but without raising an error if it already exists?
The current script simply has:
CREATE ROLE my_user LOGIN PASSWORD 'my_password';
..
I use STS(spring tool suite) + maven plugin.
Every time when I run my application using maven-clean I see following error:
[INFO] Scanning for projects...
[INFO] ..
I need to make following code stretchable with predefined height
<style>
.title{
background: url(bg.gif) no-repeat bottom right;
height: 25px;
}
</style>
<span class="title">..
I have created dictionary object
Dictionary<string, List<string>> dictionary =
new Dictionary<string,List<string>>();
I want to add string values to the list of string ..
I have the following table in MySQL version 5.5.24
DROP TABLE IF EXISTS `momento_distribution`;
CREATE TABLE IF NOT EXISTS `momento_distribution`
(
`momento_id` INT(11) NOT NULL,
`..
Here is the code I have written to add a marker to the google map by providing latitude and longitude. The problem is that I get a very highly zoomed google map. I have tried setting the zoom level to..
I have four projects in my Visual Studio solution (everyone targeting .NET 3.5) - for my problem only these two are important:
MyBaseProject <- this class library references a third-party DLL fil..
What is the smartest way to get an entity with a field of type List persisted?
Command.java
package persistlistofstring;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Li..
I am playing around with Nodejs and express by building a small rest API. My question is, what is the good practice/best way to set the code status, as well as the response data?
Let me explain with ..
I was wondering, how in jquery am I able to hide a div after a few seconds? Like Gmail's messages for example.
I've tried my best but am unable to get it working...
I'm trying to make a semi-transparent div cover the whole screen. I tried this:
#dimScreen
{
width: 100%;
height: 100%;
background:rgba(255,255,255,0.5);
}
But that doesn't cover the wh..
I have the following function
ALTER FUNCTION [dbo].[ActualWeightDIMS]
(
-- Add the parameters for the function here
@ActualWeight int,
@Actual_Dims_Lenght int,
@Actual_Dims_Width int..
I would like to know if there are any differences in between the two not equal operators <> and != in Oracle.
Are there cases where they can give different results or different performance?..
How can I select all elements whose id starts with "player_"?
I have multiple elements like this:
<div id="player_290x3dfda">text</div>
Every id has a unique stamp on it. How can I sel..
How do I check if a particular key exists in a JavaScript object or array?
If a key doesn't exist, and I try to access it, will it return false? Or throw an error?..
I'm executing an external script, using a <script> inside <head>.
Now since the script executes before the page has loaded, I can't access the <body>, among other things. I'd like t..
How do I open a elevated command prompt using command lines on a normal cmd?
For example, I use runas /username:admin cmd but the cmd that was opened does not seem to be elevated! Any solutions?..
I have an integer
{% set curYear = 2013 %}
In {% if %} statement I have to compare it with some string. I can't set curYear to string at the beginning because I have to decrement it in loop.
How c..
I'm trying to plot a figure without tickmarks or numbers on either of the axes (I use axes in the traditional sense, not the matplotlib nomenclature!). An issue I have come across is where matplotlib ..
I'm starting to tear my hair out with this - so I hope someone can help. I have a pandas DataFrame that was created from an Excel spreadsheet using openpyxl. The resulting DataFrame looks like:
print..
I have a database configuration class to connect my spring web service with the database. I'm using spring boot, to make it stand alone application.
Here is my class
@Configuration
@EnableTransactio..
I am working on an Android project and I am trying to make use of the Google Drive API and I've got most of it working but I am having an issue in how I perform a download.
I can't find anywhere how..
My application reads an Excel file using VSTO and adds the read data to a StringDictionary. It adds only data that are numbers with a few digits (1000 1000,2 1000,34 - comma is a delimiter in Russian ..
Is there a simple way of taking the value of a property and then copy it to another property with certain characters replaced?
Say propA=This is a value. I want to replace all the spaces in it into u..
I found this code to print in Javascript.
function printData()
{
var divToPrint=document.getElementById("printTable");
newWin= window.open("");
newWin.document.write(divToPrint.outerHTML);
..
I have a shared folder in a server and I need to remotely execute a command on some files. How do I do that?
What services need to be running on the server to make that work?
Some details: Only C# ..
After a few searches from Google, what I come up with is:
find my_folder -type f -exec grep -l "needle text" {} \; -exec file {} \; | grep text
which is very unhandy and outputs unneeded texts such..
Let's say I set a cookie using the setcookie() function in PHP:
setcookie('name','foo',false,'/',false);
I can see it in:
chrome://settings/cookies
However, I can not find the actual file store..
I am having a site with some pages on HTTPS connection. From these HTTPS pages, I have to use a HTTP Ajax request for some errors retrieval like blank fields. But this error messages are not coming. I..
I'm working with PHP, and I'm making an action page which a form posts to. The page checks for errors, then if everything is fine, it redirects them to the page where the data has been posted. If not,..
I want to retrieve a list of all schemas in a given Sql Server database. Using the ADO.NET schema retrieval API I get a list of all collections but there is no collection for 'Schemas'.
I could traver..
I'm trying my hardest to wrap my head around JavaScript closures.
I get that by returning an inner function, it will have access to any variable defined in its immediate parent.
Where would this be ..
Given this document saved in MongoDB
{
_id : ...,
some_key: {
param1 : "val1",
param2 : "val2",
param3 : "val3"
}
}
An object with new information on param2 and p..
Usually when I write anything in C++ and I need to convert a char into an int I simply make a new int equal to the char.
I used the code(snippet)
string word;
openfile >> word;
double l..
Possible Duplicate:
PHP: “Notice: Undefined variable” and “Notice: Undefined index”
So, I am currently learning PHP and was reading on a book about the md5 function for passwords, ..
I am wanting to access a website from a different port than 80 or 8080. Is this possible? I just want to view the website but through a different port. I do not have a router. I know this can be done ..
I am looking for documentation or examples on how to extract text from a PDF file using PDFMiner with Python.
It looks like PDFMiner updated their API and all the relevant examples I have found conta..
I don't see any menu item I can use to create a new workspace.
What should I use to create a new workspace and move some of the projects from existing default workspace to a new workspace?
I am us..
In C# I have the following object:
public class Item
{ }
public class Task<T>
{ }
public class TaskA<T> : Task<T>
{ }
public class TaskB<T> : Task<T>
{ }
I want to ..
I have been using vim for quite some time and am aware that selecting blocks of text in visual mode is as simple as SHIFT+V and moving the arrow key up or down line-by-line until I reach the end of th..
Is there a better way than simply trying to open the file?
int exists(const char *fname)
{
FILE *file;
if ((file = fopen(fname, "r")))
{
fclose(file);
return 1;
}
..
When I attempt to install the latest version of compass (https://rubygems.org/gems/compass/versions/1.0.0.alpha.17), I get the following error.
ERROR: Error installing compass:
ERROR: Failed to buil..
I'm sure i can figure something out using replace, etc, but just wondering if there is anything out there that lets you simply append data to a column rather than how the common Insert function works?..
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);
..
Maybe a fool question, I installed jenkins on windows by default, have set no user/password, it worked at first, no need to login. But when launch the 8080 webpage now, it hangs the login page, I've t..
I'm implementing an API made by other colleagues with Apiary.io, in a Windows Store app project.
They show this example of a method I have to implement:
var baseAddress = new Uri("https://private-a8..
I'm trying to pass an argument from command line to a java class. I followed this post: http://gradle.1045684.n5.nabble.com/Gradle-application-plugin-question-td5539555.html but the code does not wor..
I am new to moment.js. I have a date object and it has some time associated with it. I just want to check if that date is greater than or equal to today's date, excluding the time when comparing.
va..
Using Matplotlib, I want to plot a 2D heat map. My data is an n-by-n Numpy array, each with a value between 0 and 1. So for the (i, j) element of this array, I want to plot a square at the (i, j) coor..
I am working with Android application to show network error.
NetErrorPage.java
package exp.app;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import ..
I have just installed composer in my /usr/bin folder, so when from that folder I run php composer.phar I get the help info about composer. But, when I try to run the same from other folder I get Could..
So I was making an rss reader for my school and finished the code. I ran the test and it gave me that error. Here is the code it's referring to:
- (UITableViewCell *)tableView:(UITableView *)tableVie..
' ' in word == True
I'm writing a program that checks whether the string is a single word. Why doesn't this work and is there any better way to check if a string has no spaces/is a single word....
What is the difference in Typescript between export and default export. In all the tutorials I see people exporting their classes and I cannot compile my code if I don't add the default keyword before..
I try upload a file to an FTP-server with C#. The file is uploaded but with zero bytes.
private void button2_Click(object sender, EventArgs e)
{
var dirPath = @"C:/Documents and Settings/sander.G..
I have an Excel worksheet with two columns (name/ID) and then another list that is a subset of the names only from the larger aforementioned list. I want to go through the subset list and then pull th..
I have been moving from Webstorm and RubyMine to Atom and I really miss a feature from the Jetbrains editors where you select a code block and press CMD + - and it adds language specific comment chara..
I have an SQL query to create the database in SQLServer as given below:
create database yourdb
on
( name = 'yourdb_dat',
filename = 'c:\program files\microsoft sql server\mssql.1\mssql\data\yourdbd..
I am preparing for an exam where i couldn't understand the convertion of infix notation to polish notation for the below expression:
(a–b)/c*(d + e – f / g)
Can any one tell step by step how th..
I have been scrounging for articles/info about the architecture at Facebook, the challenges & ways they tackle them. What they use & why they use. How do they scale & what are the design d..
I don't know what's wrong with my machine, but it's a while that I'm getting the following strange error from ASP.NET (for all my applications).
Compilation Error
Description: An error occurred duri..
I have a numeric string like this 2223,00. I would like to transform it to 2223. This is: without the information after the ",". Assume that there will be only two decimals after the ",".
I did:
st..
So I have a table that has the month and year broken down, for example field called Month has the number 7 in it (this month) and the Year field has 2011. Theres also additional months years, etc. How..
Given this function, I want to replace the color with a random color generator.
document.overlay = GPolyline.fromEncoded({
color: "#0000FF",
weight: 10,
points: encoded_points,
zoomFa..
I have "read only" access to a few tables in an Oracle database. I need to get schema information on some of the columns. I'd like to use something analogous to MS SQL's sp_help.
I see the table I'm..
The table name is "OrderDetails" and columns are given below:
OrderDetailID || ProductID || ProductName || OrderQuantity
I'm trying to select multiple columns and Group By ProductID while having SU..
I'm just starting with Arrays, Objects, and JSON - so hopefully there's just something simple I'm overlooking here. I'm encountering an error when attempting to add (push) a new item into my json obje..
As per this SO thread, I know there are version conflicts, but issue still persists after new versions from Google.
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix ..
After installing the Android O preview on a test device my ADB stopped working and started giving me this error.
adb server version (36) doesn't match this client (39); killing...
adb E 03-27 08:01:55..
I'm coming from a relational database background and trying to work with amazon's DynamoDB
I have a table with a hash key "DataID" and a range "CreatedAt" and a bunch of items in it.
I'm trying to g..
Possible Duplicate:
How to add number of days to today's date?
I'm confused, I found so many different approaches, and which of them is actually correct?
So what is the correct way to..
That sounds weird I know, but I am having trouble getting a piece of text to move down a tiny bit so it's centered on the tab it's on.
here's what it looks like:
I want buy to be centered vertica..
I'm trying to use a break statement in a for loop, but since I'm also using strict subs in my Perl code, I'm getting an error saying:
Bareword "break" not allowed while
"strict subs" in use at ...
How do I parse the date string below into a Date object?
String target = "Thu Sep 28 20:29:30 JST 2000";
DateFormat df = new SimpleDateFormat("E MM dd kk:mm:ss z yyyy");
Date result = df.parse(targe..
I am building a project through the command line and not inside Visual Studio 2013. Note, I had upgraded my project from Visual Studio 2012 to 2013. The project builds fine inside the IDE. Also, I com..