This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A example from Cinique LeNoir at Quora's question | |
https://codepad.co/snippet/XGfrziiE | |
Using the database schema | |
CREATE TABLE user_cats (save_directory VARCHAR(20), uploader VARCHAR(20), playlists VARCHAR(20)); | |
""" | |
import sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <ctime> | |
#include <cstdlib> | |
#define HALFWAY ((0 + RAND_MAX) / 2) | |
int main() | |
{ | |
int val; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* From https://pt.stackoverflow.com/questions/516989/c%c3%b3digo-compila-mas-n%c3%a3o-funciona-apenas-finaliza-com-sucesso */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
void *calculaPrimo(void *limitValue) { | |
int primo, j; | |
int num = 1; | |
int maxValue = *(int*)limitValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From https://pt.stackoverflow.com/questions/516989/c%c3%b3digo-compila-mas-n%c3%a3o-funciona-apenas-finaliza-com-sucesso | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
void *calculaPrimo(void *limitValue) { | |
int primo, j; | |
int num = 1; | |
int maxValue = limitValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** tThread_orig.c 2021-07-08 11:31:40.000795883 -0300 | |
--- tThread.c 2021-07-08 11:49:00.032924787 -0300 | |
*************** | |
*** 1,4 **** | |
! // From https://pt.stackoverflow.com/questions/516989/c%c3%b3digo-compila-mas-n%c3%a3o-funciona-apenas-finaliza-com-sucesso | |
#include <stdio.h> | |
#include <stdlib.h> | |
--- 1,4 ---- | |
! /* From https://pt.stackoverflow.com/questions/516989/c%c3%b3digo-compila-mas-n%c3%a3o-funciona-apenas-finaliza-com-sucesso */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class EncompassingClass { | |
class ProtectedClass; | |
static class PrivateClass { | |
private: | |
int privateMember; | |
PrivateClass() { | |
privateMember = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
package tPrivateProtected; | |
/** | |
* @author hilton | |
* | |
*/ | |
public class EncompassingClass { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
package tPrivateProtected; | |
/** | |
* @author hilton | |
* | |
*/ | |
public class IndependentPrivateClass { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
package tPrivateProtected; | |
/** | |
* @author hilton | |
* | |
*/ | |
public class IndependentProtectedClass { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export TEXT='{ "foo" : { "bar": { "dolorem" : "ipsum", "quia" : { "dolor" : "sit"} } } }' | |
function bench { | |
time ( | |
for i in {1..100}; do | |
echo "${TEXT}" | $@ > /dev/null | |
done | |
) | |
} |