Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
112 views

Class showing a format similar to var_dump v1.0.5

First of all I must thank for the help given in the previous post: Class showing a format similar to var_dump RC5 Version I have it deployed in a early versio v1.0.5: https://github.com/arcanisgk/BOH-...
user avatar
5 votes
1 answer
259 views

Simple Pretty-Bytes Size (SI System)

This is a simple and short "Pretty Bytes" javascript function using the SI Decimal System for quantifying bytes. The code does not use complex maths such as ...
Mohsen Alyafei's user avatar
3 votes
3 answers
284 views

Retrieve words from dictionary when they meet letter requirements

I have a set of functions that retrieve words from some arbitrary dictionary based on what letters they have. For example, this function gets words that use only the specified letters: ...
Andreas Hunter's user avatar
2 votes
2 answers
869 views

Sorting a JavaScript array with a Regex

I'm using SharePoint 2013 JSOM. My variable this.templates contains a collection of templates with many different names. The only way to iterate through this ...
Treycos's user avatar
  • 340
2 votes
0 answers
51 views

Multilang sentence to N-gram

Task: Transform sentence to n-gram and remove all punctuation Tests: Input: ngram('Name, + other ~ name!', 1) Result: ['Name', 'other', 'name'] Input: ngram('Name, + other ~ name!', 2) ...
Stepan Vanzuriak's user avatar
4 votes
1 answer
117 views

Performing substitutions according to a word list in a database

A bit of history I had about 40,000 words in the database. I need words to correct the texts entered incorrectly by users. User enter text in any non-legal format and I use my words in the database ...
Andreas Hunter's user avatar
12 votes
2 answers
145 views

Re-arranging an obfuscated address

I'm getting address (physical address, not digital) input that's obfuscated, and looks like the following: The plaintext version: ...
Quill's user avatar
  • 12k
26 votes
4 answers
3k views

"ONCE", "UPON", "A", "TIME"

I'm working on a small program to perform various tasks on text content, primarily at the word level. I wrote these methods as ways to help prepare the raw text file into something more malleable, ...
Phrancis's user avatar
  • 20.5k
6 votes
2 answers
8k views

Retrieving all the email addresses on a web page

I recently discovered the file_get_contents function and wanted to put it to some use, alongside preg_match_all, off the ...
alanbuchanan's user avatar
  • 1,312
5 votes
2 answers
125 views

Parsing a URL from a document and matching it from an array

I need help in improving this script that I have written to parse a URL and check it from an array. This is what I have done till now: (fiddle) This is working fine. Was this done correctly? What ...
kannu's user avatar
  • 53
1 vote
1 answer
381 views

TCPDUMP file (part of a real capture)

I have been working on this code for quite a while and just want to make sure it is up to good standards. I know many of you will have questions, so as they come up, I will edit my initial question to ...
user2288's user avatar
4 votes
3 answers
10k views

Performance: getting first value from comma delimited string

I've got a string that has values that are delimited by comma's, like so: $var = '1,23,45,123,145,200'; I'd like to get just the first value, so what I do is ...
kasimir's user avatar
  • 243
2 votes
1 answer
2k views

Can I make a regex array to iterate through in C++?

I have to check a string to various regular expressions in C++. Up to now, I've done this using something similar to this: ...
user avatar