I'm trying to post tables as code snippets using the Slack API; the tables are formatted like this (and looks this way on Desktop):
id id0 pct1 -16.5% -16.7%
num1 9308 4026
num -1538 -673
pct00 88.8% 86.0%
But Slack Mobile does something weird with the whitespaces (it seems like it clips them past a certain length), which results in the table looking something like this on Slack Mobile:
id id0 pct1 -16.5% -16.7%
num1 9308 4026
num -1538 -673
pct00 88.8% 86.0%
Is there a certain character (including invisible characters) I could replace the whitespace with to maintain the spacing and readability? (Using say, an underscore or hyphen keeps the spacing but looks rather invasive.)
I don't know if there's a setting on the app that fixes this whitespace issue (if there is, it would solve my problem immediately).
I had the same issue. Resolved it by using no-break space (U+00A0) which worked better with Slack on mobile. Hope that helps :-)
Related
One of the scrapy-ed items seems contain no content in HTML. In MySQL database, it does have content including a non-regular - (dash) that is slightly longer. It could be a dash symbol from Chinese input, or something similar. I am copy it below, not sure whether it will keep the original form. The web link is here and this non-regular dash is in the title and the beginning of the description.
**Hospitalist – Chattanooga**
To further prove it, the export CVS file from MySQL convert this weird dash to ?€?. Most likely this weird symbol causes the non-display problem.
I want to either delete this weird symbol or replace it with a , or a regular dash. Where can it be done? During Scrapy? Or in MySQL? Sorry this is not a specific coding question. I need some guidance before figuring out any codes for this problem.
The long dash is called an EM dash fileformat - EM dash
The reason you are seeing it is likely due to the chosen encoding.
Try setting a different encoding or replacing the EM dash with the , sign as you mentioned in your question.
In php you can do so with the following code:
str_replace(chr(151), ',' $input);
I am working on a ASP.NET MVC app.
This app displays a detail information regarding a product.
The product name can have any special chars like single quote, the percentage symbol, the Registered symbol the one with a circle and 'R' inside, the Trademark symbol etc.
Currently all these are replaced with a '-'.
If the name is like this:
Super - Men's 100% Polyester Knit Shirts
It appears like this in the URL:
8080/super---men-s-100-polyester-knit-shirts/maverick
- men-s-100-polyester-knit-shirts
This is done in Js like so:
Name.replace(/([~!##$%^&*()_+=`{}\[\]\|\\:;'"<>,.\/? ])+/g, '-').replace(/^(-)+|(-)+$/g, '');
So the question is, should the name be displayed as-is in the URL?
If yes, some pointers please.
If no, please provide some valid reasons like standards as followed today that will help me put the point across the table.
Regards.
The short answer is not to fiddle with it. It's as good as it gets out of the box.
The Url can only contain a small number of alphanumeric letters. which basically means you can only have 0-9 a-z and - _ . ~.
All other characters need to be encoded. Now that you can have arabic url's too it has gotten a little more complicated.
But assuming your website is indo-european this is it. So you will never be able to have full product names in your url.
And renaming them as something more cool like replacing % with "percent" in the url can bring desaster upon your url's as in some cases the "fake" names may not end up unique and therefore end up with unreliable routing.
look at URI characters on wiki
I am trying to automate a mobile website on android device, using Android WebDriver library.
When the script enters some alphanumeric characters , eg Test12345, in a text field the textbox shows "TEST!##$%" as entered text. It is true for any alphanumeric word starting with capital letter.
But, if I make the first character a SMALL character or a number then correct word is inserted.
Here is the code which I am using (same scenario happens on any textbox field)
driver.get("http://www.google.com");
WebElement searchBox = driver.findElement(By.name("q"));
searchBox.sendKeys("Test12345");
Is it a bug or am I missing something?
It seems that this is a bug. As a workaround you can type any (except NULL U+E000 or "\xEE\x80\x80" in UTF-8) character before your string. E.g. you can start typing with sending two SHIFT (U+E008 or "\xEE\x80\x88" in UTF-8) characters, or one CLEAR (U+E005 or "\xEE\x80\x85" in UTF-8) character. Just anything unprintable, and after that type your string.
FYI: I've confirmed the bug still exists. I'm looking at the android webdriver code to see if I can fathom out why it's occurring. I have some ideas, it's likely to be in one or other of:
java/client/src/org/openqa/selenium/android/library/AndroidKeys.java
java/client/src/org/openqa/selenium/android/library/EventSender.java
java/client/src/org/openqa/selenium/Keys.java
and related to mapping keys between Selenium-Webdriver and Android.
I have found another workaround, similar to the one mentioned by Ivan. Mine involves splitting the text into 2 parts, the first capitalized character e.g. the T and use sendKeys to send it; then send the rest of the text e.g. est12345
searchBox.sendKeys("T");
searchBox.sendKeys("est12345");
Ugly, shouldn't be necessary, but a practical option that doesn't involve sending extra (unprintable) characters.
We use TCPDF to generate PDFs. In one special case I got a strange behaviour, it looks like TCPDF puts a space inbetween two characters.
I use the cid0cs as font, the strange behaviour appears if I place "µg" in the PDF, it looks like "µ g" (with some space inbetween) now.
I edited the cid0cs.php on index 181 (like here: http://bytethinker.com/blog/correct-display-of-imported-fonts-in-tcpdf) with no success.
Any help is really appreciated.
Did you edit the character µ or g? If you select the letters you can see which letter the extra space belongs to. So... for a small "g" (the first letter after which is the space, you must edit the entry "130=>???" of the $cw array.
$cw=array(0=>0,1=>750,2=>750,3=>750,4=>750
Make it half the value. If its 750, make it 400 and try. Or even better: search for a letter that could be the same with as your "g" (an "a" for example).
Cheers,
Guido
(customer service is when you look at all the links that lead to your website :)
I am pretty unsure if it might be possible to find the password out of several Hex-Values which are XOR encrypted all with the same password?
For example these are some HEX values all XOR encrypted with the same HEX password which has exactly the same length as these values:
a0c91eab4f88c644433311f88b733655c3d03148c25b375123545d8fb3fe7ec7
b885f3cb8f529670040f3e6b15afa84a1a85ace03b108d3b410bc17747352bc3
77d147fdf263471fdfb756c436c1b86911de0a1d688997cfcabc5f6d34a6e045
464c506a68b73f4004e553b215c41ca9ec45c1200c4072ee940596e6760c2007
860a2f619063990663d3fc15d149e6baec423f40d6dd6d5c714ae373cee05985
188c1720cacc341cda9642feecfb05d89af2fe0e5e4bf560f1b85eec6a5b99e8
c3c9271bcd0a295276f9fd1bca172c4be45d3bdfc437992cfdd4a6914d03bdfa
Has anyone around here an idea how to solve that problem?
#phs and #Kerrek SB
Thanks for your response. I would really like to add an answer to your comments but unfortunately I am unable because the comment link does not work as of this JavaScript-Error as it seems. Not sure what that is all about.
Error: missing ) after condition
Source File: http://cdn.sstatic.net/js/full.js?v=ea83ae356357
Line: 1, Column: 242
Source Code:
comment")>-1){var i=g.attr("id").substr("comments-link-".length);var h=c(i);b(i,h,f);return true}return false};return{loadRest:d,init:a,jCommentsDiv:c,showComments:e,fetchComments:b}})();StackExchange.share=(function(){function a(d,b,c){if(!1;''.concat(d, ...
The ciphertext is ASCII (0 ... 254) converted into hex, the password is just a hex string same length as the ciphertext.
#muntoo
Many thanks for the proper formatting of my question. I really would like to know how you managed that because I am not able to see how you did it? This website is really strange in its behaviour, which is quit sad because of all the useful information. I get constantly logged out after clicking on any other message, links don't work, buttons don't work and so on ...
Cheers,
Karl-Uwe
P.S.: Still unable to post a reply to a comment, only the edit link is working as expected :-(
Okay than as this website does not work properly because my NoScript- and Ghostery-AddOn preventing so many foreign domains from loading some kind of weird JavaScript for this website I give up now.
The password I was searching for is 26ffe258d67de61313fc50c55b6afe5f58cbf7bd446354e02947b6c803f13d04
I suppose it's impossible to find it through cryptanalysis because it's an XOR enciphering with random HEX strings. In fact if I would encipher the same text every time with a random string it would be the same the other way round - no chance to decipher it.
Cheers and bye,
Karl-Uwe