Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
Python
2022-03-27 19:35:51
how to import file from another directory in python
import sys # sys.path is a list of absolute path strings sys.path.append('/path/to/application/app/folder') import file
Add solution
Other
2022-03-27 19:30:28
unity detect when gamepad is connected
private int Xbox_One_Controller = 0; private int PS4_Controller = 0; void Update() { string[] names = Input.GetJoystickNames(); for (int x = 0; x < names.Length; x++) { print(names[x].Length); if (names[x].L...
Add solution
PHP
2022-03-27 18:55:22
php insert char before each letter using regex
// insert .(dot) before each a-z letter // [a-z] = range, {1} = group to catch $string = preg_replace("/([a-z]{1})/", '.$1', $string);
Add solution
C#
2022-03-27 18:50:02
c# remove invalid directory characters
public string ReplaceInvalidChars(string filename) { return string.Join("_", filename.Split(Path.GetInvalidFileNameChars())); }
Add solution
C#
2022-03-27 18:25:10
c# replace crlf
// Remove all newlines from the 'example' string variable string cleaned = example.Replace("\n", "").Replace("\r", "");
Add solution
Java
2022-03-27 18:20:21
string builder vs string buffer
String vs StringBuilder vs StringBuffer STRING STRINGBUFFER STRINGBUILDER Storage String Pool Heap Heap Modifiable Immutable Mutable Mutable Thread Safe YES YES...
Add solution
Python
2022-03-27 18:05:28
string punctuation python
import string print (string.punctuation) # !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ sentence = "Hey guys !, How are 'you' ?" for i in sentence: if i in string.punctuation: print(i) # ! , ' ' ?
Add solution
Javascript
2022-03-27 18:00:18
how to set empty date in javascript
var date = Date.parse(dateString) || 0;
Add solution
Javascript
2022-03-27 17:50:06
javascript base64 encode
> console.log(Buffer.from("Hello World").toString('base64')); SGVsbG8gV29ybGQ= > console.log(Buffer.from("SGVsbG8gV29ybGQ=", 'base64').toString('ascii')) Hello World
Add solution
C++
2022-03-27 17:10:08
repeat character n times c++
auto five_repeated_dots = std::string(5, '.');
Add solution
‹
1
2
3
4
5
6
7
8
9
10
...
966
967
›
Best helpers
daily
weekly
monthly
for 3 months
Little Girl
+5
Pratyush Das
+5
show more
This website uses cookies to make IQCode work for you. By using this site, you agree to our
cookie policy
Welcome Back!
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign in
E-mail
Password
Recover lost password
Log in
Or log in with
Not registered?
Sign up takes less than a minute
Create a Free Account
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign up
Email
Password
Sign up for free
Or sign up with
By signing up, you agree to the
Terms and Conditions
and
Privacy Policy
. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.