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 hidden or 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
| # Transform a file containing self-measures blood pressure measurements | |
| # into a typst file that will be used to build a document to send | |
| # to the physician. | |
| # | |
| # The format of the document is: | |
| # ``` | |
| # One title line describing the dates of the self-measurements | |
| # 120 78 77 | |
| # 121 76 80 |
This file contains hidden or 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 { |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
| import java.util.concurrent.ConcurrentHashMap; | |
| import java.util.concurrent.Semaphore; | |
| public class LockMap<Key> { | |
| private final ConcurrentHashMap<Key, Semaphore> map = new ConcurrentHashMap<Key, Semaphore>(); | |
| public void lock(final Key key) throws InterruptedException { | |
| Semaphore sem = map.get(key); | |
| while (true) { |
This file contains hidden or 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
| shortenUrl :: String -> String | |
| shortenUrl url = case splitFileName url of | |
| (dir, "index.html") | isLocal dir -> dir | |
| _ -> url | |
| where isLocal uri = isPrefixOf rootUrl uri || not (isInfixOf "://" uri) |
This file contains hidden or 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 "ch.h" | |
| #include "hal.h" | |
| #include "lcd.h" | |
| #define SCORED_QUIZZ 1 | |
| #define TEST_QUIZZ 2 | |
| // Define this as TEST_QUIZZ or SCORED_QUIZZ | |
| #define QUIZZ TEST_QUIZZ |
This file contains hidden or 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
| scala> ((x: Int, y: Int) => x+y).getClass.getMethods.find(_.getName == "apply").get.getParameterTypes.size | |
| res0: Int = 2 | |
| // Le getMethods.find(_.getName == "apply") est dû au fait qu'il y a deux apply possible, | |
| // un avec des "int", et un avec des "Object" (à cause de la possibilité de passer des | |
| // "Integer") -- vive l'interaction avec la JVM. Mais ces deux apply auront obligatoirement | |
| // la même arité. |
NewerOlder