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 ..
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..
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..
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 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 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 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..
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..
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 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..
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?
int Blue = 13;
int Green = 0;
int Red = 0;
int Space = 14;
colorstring = St..
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'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..
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 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?
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'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 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..
I'm not asking about the HTML newline element (&l..
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'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..
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:
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 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..
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..
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 ..
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'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 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..
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..
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 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 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..
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'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, ..
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..
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 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 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 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..
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 ..
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(..
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 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'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:
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 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 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 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..
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 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..
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 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..
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 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..
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..
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..
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 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..