D/FbxCompMain( 7542): launching activity for 'Téléchargements'
I/ActivityManager( 850): START u0 {cmp=fr.freebox.android.compagnon/.downloadmanager.FbxDownloadListActivity (has extras)} from pid 7542
D/FbxDownloadListActivity( 7542): called onCreate
D/FbxDownloadListActivity( 7542): tab selected
D/FbxDownloadListFragment( 7542): called onCreate
D/FbxDownloadListActivity( 7542): called onStart
D/FbxDownloadListActivity( 7542): called onResume
D/FbxHttpClientTask( 7542): got 403, application/json; charset=utf-8 on http://88.160.xxx.yyy:81/api/v1/connection/config
D/FbxHttpClientTask( 7542): called doInBackground on: http://88.160.xxx.yyy:81/api/v1/fs/ls//?countSubFolder=1&removeHidden=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
object Test { | |
def foo(t: Boolean) = "foo1" | |
def foo(t: => Boolean) = "foo2" | |
} |
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
module Factor where | |
import Control.Monad.State | |
-- We can put integer literals or quotations on the stack | |
data Stackable = IntLiteral Int | |
| FQuotation (Factor ()) | |
-- Shortcut name | |
type Stack = [Stackable] |
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
// StopWatch class | |
abstract class StopWatch { | |
def giveTime: Time | |
} | |
// Class is declared abstract as it is lacking a StopWatch which will be later injected. | |
// Note that we could have defined a default value here and thus made the class concrete. | |
abstract class FooBar { |
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
"""Prime number generation and number factorization.""" | |
import bisect, itertools, random, sys | |
_primes = [2] | |
_miller_rabin_limit = 48611 # 5000th prime | |
_miller_rabin_security = 7 | |
def modpow (a, b, c): |
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
fn identity<T>(x: &mut T) -> &mut T { | |
println!("In identity"); | |
x | |
} | |
fn main() { | |
let mut x = 0i32; | |
println!("Before assignment"); | |
*identity(&mut x) = { println!("Evaluating 42"); 42 }; | |
println!("After assignment"); |
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
use tokio::time::Duration; | |
async fn value<T>(x: T, duration: Duration) -> T { | |
println!("Before sleeping in value"); | |
tokio::time::sleep(duration).await; | |
println!("After sleeping in value"); | |
x | |
} | |
async fn identity<T>(x: &mut T) -> &mut T { |
OlderNewer