Inlägg

Inlägg som Gego har skrivit i forumet
Av Gego

om jag nu bara hade vetat vad du menade med att "sätta eventet innan"...

kan någon förklara det hade jag varit glad...

//många tack i förhand.

Av Gego

*head desk*
*head desk*
*head bleed*

0_o ... nu vill programmet kompilera... det körs i några sekunder.... och så dör det ned fel kod:

mono: ../../src/xcb_io.c:242: process_responses: Försäkran "(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)" falsk. Stacktrace: at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x0004d> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> at Gtk.Application.Run () <0x0000b> at GTKtest.Program.Main (string[]) [0x00016] in /home/gego/mono-projects/GTK test/GTK test/Main.cs:21 at (wrapper runtime-invoke) GTKtest.Program.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff> Native stacktrace: /usr/bin/mono [0x429e65] /lib/libpthread.so.0 [0x7fcfb8dfd080] /lib/libc.so.6(gsignal+0x35) [0x7fcfb8829fb5] /lib/libc.so.6(abort+0x183) [0x7fcfb882bbc3] /lib/libc.so.6(__assert_fail+0xe9) [0x7fcfb8822f09] /usr/lib/libX11.so.6 [0x7fcfb54b8a9b] /usr/lib/libX11.so.6(_XEventsQueued+0x35) [0x7fcfb54b9345] /usr/lib/libX11.so.6(XPending+0x5d) [0x7fcfb54a1e4d] /usr/lib/libgdk-x11-2.0.so.0 [0x7fcfb68287b5] /usr/lib/libglib-2.0.so.0(g_main_context_check+0x2c2) [0x7fcfb9452ed2] /usr/lib/libglib-2.0.so.0 [0x7fcfb94537c9] /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1cd) [0x7fcfb9453dad] /usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa7) [0x7fcfb6bb1bc7] [0x4200700d] Debug info from gdb: (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 0x7fcfb9ad1730 (LWP 9231)] [New Thread 0x7fcfad8ac950 (LWP 9238)] [New Thread 0x7fcfadaad950 (LWP 9237)] [New Thread 0x7fcfaedea950 (LWP 9236)] [New Thread 0x7fcfb75ce950 (LWP 9235)] [New Thread 0x7fcfb9ada950 (LWP 9234)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 6 Thread 0x7fcfb9ada950 (LWP 9234) 0x00007fcfb8dfc7e1 in nanosleep () from /lib/libpthread.so.0 5 Thread 0x7fcfb75ce950 (LWP 9235) 0x00007fcfb8df92e9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 4 Thread 0x7fcfaedea950 (LWP 9236) 0x00007fcfb8df956d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 3 Thread 0x7fcfadaad950 (LWP 9237) 0x00007fcfb88d5742 in select () from /lib/libc.so.6 2 Thread 0x7fcfad8ac950 (LWP 9238) 0x00007fcfb88d3496 in poll () from /lib/libc.so.6 1 Thread 0x7fcfb9ad1730 (LWP 9231) 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 Thread 6 (Thread 0x7fcfb9ada950 (LWP 9234)): #0 0x00007fcfb8dfc7e1 in nanosleep () from /lib/libpthread.so.0 #1 0x0000000000503be2 in ?? () #2 0x00007fcfb8df53ba in start_thread () from /lib/libpthread.so.0 #3 0x00007fcfb88dcfcd in clone () from /lib/libc.so.6 #4 0x0000000000000000 in ?? () Thread 5 (Thread 0x7fcfb75ce950 (LWP 9235)): #0 0x00007fcfb8df92e9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x0000000000506815 in ?? () #2 0x0000000000508f8f in ?? () #3 0x000000000052123d in ?? () #4 0x0000000000496d33 in ?? () #5 0x00000000004b52d3 in ?? () #6 0x000000000051d81b in ?? () #7 0x000000000053a1c2 in ?? () #8 0x00007fcfb8df53ba in start_thread () from /lib/libpthread.so.0 #9 0x00007fcfb88dcfcd in clone () from /lib/libc.so.6 #10 0x0000000000000000 in ?? () Thread 4 (Thread 0x7fcfaedea950 (LWP 9236)): #0 0x00007fcfb8df956d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00000000005067f0 in ?? () #2 0x0000000000508f8f in ?? () #3 0x0000000000521128 in ?? () #4 0x00000000004b284b in ?? () #5 0x0000000042006dd8 in ?? () #6 0x0000000001998aa0 in ?? () #7 0x00007fcfb75d2398 in ?? () #8 0x00007fcfb825d0e0 in ?? () #9 0x00000000420068ac in ?? () #10 0x00007fcfaede9fc8 in ?? () #11 0x00007fcfaede9ef0 in ?? () #12 0x00007fcfaede9e40 in ?? () #13 0x00007fcfb9968000 in ?? () #14 0x0000000000000000 in ?? () Thread 3 (Thread 0x7fcfadaad950 (LWP 9237)): #0 0x00007fcfb88d5742 in select () from /lib/libc.so.6 #1 0x00007fcfb339e1ae in ?? () from /usr/lib/libxcb.so.1 #2 0x00007fcfb339f91a in xcb_wait_for_event () from /usr/lib/libxcb.so.1 #3 0x00007fcfb54b8688 in ?? () from /usr/lib/libX11.so.6 #4 0x00007fcfb54b8a3d in ?? () from /usr/lib/libX11.so.6 #5 0x00007fcfb54b92f9 in _XReadEvents () from /usr/lib/libX11.so.6 #6 0x00007fcfb5497c39 in XIfEvent () from /usr/lib/libX11.so.6 #7 0x00007fcfb6828414 in gdk_x11_get_server_time () from /usr/lib/libgdk-x11-2.0.so.0 #8 0x00007fcfb6cd9ee9 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x00007fcfb6cdb20d in gtk_clipboard_clear () from /usr/lib/libgtk-x11-2.0.so.0 #10 0x00007fcfb6b43690 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #11 0x00007fcfb6b43b03 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #12 0x00007fcfb39c527d in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #13 0x00007fcfb39dab1e in ?? () from /usr/lib/libgobject-2.0.so.0 #14 0x00007fcfb39dc432 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #15 0x00007fcfb39dc74c in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #16 0x00007fcfb6b3c7ec in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #17 0x00007fcfb6b41ccf in gtk_entry_set_text () from /usr/lib/libgtk-x11-2.0.so.0 #18 0x0000000042004c83 in ?? () #19 0x0000000001d82690 in ?? () #20 0x00007fcfadaacdc0 in ?? () #21 0x00007fcfadaacbd0 in ?? () #22 0x00007fcfb75da300 in ?? () #23 0x00007fcfb825d0e0 in ?? () #24 0x00007fcfadaacdc0 in ?? () #25 0x00007fcfadaacbf0 in ?? () #26 0x00007fcfb75da300 in ?? () #27 0x0000000001d8eba0 in ?? () #28 0x0000000001ac8010 in ?? () #29 0x00007fcfb75d0ae0 in ?? () #30 0x000000000000000b in ?? () #31 0x00007fcfb75d0de0 in ?? () #32 0x0000000042004c04 in ?? () #33 0x00007fcfb825d0e0 in ?? () #34 0x00007fcfb825d0e0 in ?? () #35 0x0000000001ac8010 in ?? () #36 0x00007fcfb75dcfc0 in ?? () #37 0x00007fcfadaacdc0 in ?? () #38 0x0000000042007a40 in ?? () #39 0x00007fcfb825d0e0 in ?? () #40 0x000000004a7eabf1 in ?? () #41 0x00007fcfb75dcfc0 in ?? () #42 0x0000000041920799 in ?? () #43 0x00007fcfadaacdc0 in ?? () #44 0x0000000042007904 in ?? () #45 0x0000000001b67790 in ?? () #46 0x00000000005fd770 in ?? () #47 0x0000000000000001 in ?? () #48 0x0000000001b67790 in ?? () #49 0x0000000000000000 in ?? () Thread 2 (Thread 0x7fcfad8ac950 (LWP 9238)): #0 0x00007fcfb88d3496 in poll () from /lib/libc.so.6 #1 0x00007fcfb945377f in ?? () from /usr/lib/libglib-2.0.so.0 #2 0x00007fcfb9453dad in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #3 0x00007fcfafe30b00 in ?? () from /usr/lib/libORBit-2.so.0 #4 0x00007fcfb9479ae4 in ?? () from /usr/lib/libglib-2.0.so.0 #5 0x00007fcfb8df53ba in start_thread () from /lib/libpthread.so.0 #6 0x00007fcfb88dcfcd in clone () from /lib/libc.so.6 #7 0x0000000000000000 in ?? () Thread 1 (Thread 0x7fcfb9ad1730 (LWP 9231)): #0 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 #1 0x0000000000429f6c in ?? () #2 <signal handler called> #3 0x00007fcfb8829fb5 in raise () from /lib/libc.so.6 #4 0x00007fcfb882bbc3 in abort () from /lib/libc.so.6 #5 0x00007fcfb8822f09 in __assert_fail () from /lib/libc.so.6 #6 0x00007fcfb54b8a9b in ?? () from /usr/lib/libX11.so.6 #7 0x00007fcfb54b9345 in _XEventsQueued () from /usr/lib/libX11.so.6 #8 0x00007fcfb54a1e4d in XPending () from /usr/lib/libX11.so.6 #9 0x00007fcfb68287b5 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #10 0x00007fcfb9452ed2 in g_main_context_check () from /usr/lib/libglib-2.0.so.0 #11 0x00007fcfb94537c9 in ?? () from /usr/lib/libglib-2.0.so.0 #12 0x00007fcfb9453dad in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #13 0x00007fcfb6bb1bc7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #14 0x000000004200700d in ?? () #15 0x00000000018e14c0 in ?? () #16 0x0000000000000001 in ?? () #17 0x00000000000000f0 in ?? () #18 0x00000000018e14c0 in ?? () #19 0x0000000000000000 in ?? () #0 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 ================================================================= Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. =================================================================

gör jag det med knappen istället så fungerar det...
så.... det måste vara något med timer funktion....??

Av Gego

så här set i alla fall exemplet på mono documentation ut:

using System; using System.Timers; public class TimerExample { private static System.Timers.Timer ourTimer; public static void Main() { ourTimer = new System.Timers.Timer(); // attach to the Elapsed event. ourTimer.Elapsed += new ElapsedEventHandler(OnTimerElapsed); // make our timer interval 1 second ourTimer.Interval = 1000; // don't forget to enable the timer! // we could also call ourTimer.Start() here; they both have the same effect // (starting the timer). ourTimer.Enabled = true; Console.WriteLine("Waiting 10 seconds before exit..."); System.Threading.Thread.Sleep(10000); } private static void OnTimerElapsed(object sender, ElapsedEventArgs e) { Console.WriteLine("Timer elapsed at: " + e.SignalTime.ToLongTimeString()); } }

och min kod:

using System; using System.Timers; using Gtk; using GLib; namespace GTKtest { //das program public class Program { public static void Main(String[] args) { Application.Init(); MainWindow wind = new MainWindow("Stuff"); wind.ShowAll(); Application.Run(); } } //window class MainWindow : Window { private Entry entTime; public MainWindow(string title) : base(title) { this.SetDefaultSize(250, 100); this.DeleteEvent += new DeleteEventHandler(MainWindow_delete); Label lbTitle = new Label("The Epoch time is now:"); entTime = new Entry(); // Button btnTick = new Button("tick"); // btnTick.Clicked += entTimeRedraw; //tryck på knappen för att rita om entTime entTime.Text = timeToEpoch.toEpoch().ToString(); System.Timers.Timer tiimeer = new System.Timers.Timer(); tiimeer.Interval = 666; tiimeer.Enabled = true; tiimeer.Elapsed += ElapsedEventHandler(entTimeRedraw); // <------ här är det fel?!?! <------ VBox boxxer1 = new VBox(); HBox boxxer2 = new HBox(); boxxer2.Add(entTime); //boxxer2.Add(btnTick); boxxer1.Add(lbTitle); boxxer1.Add(boxxer2); this.Add(boxxer1); } private static void entTimeRedraw(object sender, ElapsedEventArgs e) { entTime.Text = timeToEpoch.toEpoch().ToString(); } void MainWindow_delete(object sender, DeleteEventArgs args) { Application.Quit(); args.RetVal = true; } } // stuff.... and p0|2|\| class timeToEpoch { public static int toEpoch() { int eTime; TimeSpan t = (DateTime.UtcNow - new DateTime(1970,1,1)); eTime = (int) t.TotalSeconds; return(eTime); } } }

det felmedeandet som jag får är:

[Task:File=/home/username/mono-projects/GTK test/GTK test/Main.cs, Line=55, Column=44, Type=Error, Priority=Normal, Description=Expression denotes a `type', where a `variable', `value' or `method group' was expected(CS0119)]

Av Gego

tack. det fungerad...

men nu har jag ett annat problem, hur skall jag göra för att få tiden att uppdatera automatiskt?
att skapa en ticker metod, men jag vet inte hur en sådan skall se tu...

Av Gego

trodde det, men jag kommer inte åt entTime från entTimeRedraw-metoden..

Av Gego

mjo, men hur ritar jag om?

jag la till en knapp som jag tänkt att använda för att rita om tiden, och en eventhandeler

{ //stuff// btnTick.Clicked += entTimeRedraw; //tryck på knappen för att rita om entTime //mer skit// } void entTimeRedraw(object sender, EventArgs e) { //vet inte... }

(språkmässigt är det ingen sklinad, oberoende på vilden CLI man använder...)

[edit]
om du vill testa på hur mono är: http://www.go-mono.com/mono-downloads/download.html
gtk-sharp finns även till .Net

[edit2]
monodevelop RC till windows: http://monodevelop.com/Download/Windows_Preview

[edit3.....]
ett litet roligt demo som visar vad man kan göra med mono: http://www.mono-project.com/CsharpRepl

Av Gego

ok nu är det mesta på plats..
nu skall jag bara komma på hur man får den att uppdatera tiden... -_-... några idéer?

using System; using Gtk; using GLib; //behöver jag dig? namespace GTKtest { //das program public class Program { public static void Main(String[] args) { Application.Init(); MainWindow wind = new MainWindow("Stuff"); wind.ShowAll(); Application.Run(); } } //window class MainWindow : Window { public MainWindow(string title) : base(title) { this.SetDefaultSize(250, 100); this.DeleteEvent += new DeleteEventHandler(MainWindow_delete); Label lbTitle = new Label("The Epoch time is now:"); Label lbTime = new Label(); lbTime.Text = timeToEpoch.toEpoch().ToString(); VBox boxxer1 = new VBox(); boxxer1.Add(lbTitle); boxxer1.Add(lbTime); this.Add(boxxer1); } void MainWindow_delete(object sender, DeleteEventArgs args) { Application.Quit(); args.RetVal = true; } } class timeToEpoch { public static int toEpoch() { int eTime; TimeSpan t = (DateTime.UtcNow - new DateTime(1970,1,1)); eTime = (int) t.TotalSeconds; return(eTime); } } }

Av Gego

despotify kan vara något, dock så måste du ha "spotify pro" för att använda det...

Av Gego

använd det där saken som ser ut som en skalpell...
dra över bilden...
ändra storlek
tryck enter...

http://carol.gimp.org/gimp2/basics/gimplite/crop.html
http://www.gimpguru.org/AskTheGuru/G20050312/

Av Gego

[C#/Mono/Gtk-Sharp] fatalt fel?

första problemet löst...

andra: kolla sista posten...

Av Gego

mixa minen?

går det att mix:a minnen med olika timing om de har samma "frekvens" (pc2 6400)?
vill nämligen stoppa in lite mer RAM i datorn, men kommer inte ihåg timingen...
(och köpa mer hårddisk utrymme samtidigt... /home börjar bli fullt -_-)...

Av Gego
Citat:

Ursprungligen inskrivet av Kyroz
Symbian är påväg att bli open source.

http://en.wikipedia.org/wiki/Symbian_OS#Becoming_open_source

YOU ARE WINNAR
http://www.symbianos.org/intro

Av Gego

/me funderar.... "är jag den ända som älskar Transmission?"

jag har aldrig haft några större problem med Transmission, kanske tar (väldigt) lång tid att starta, men annars inte så dåligt...

PS: om jag hade kunnat importera alla cachade torrents och annan information i ett annat program hade jag nod bytt...

Av Gego

bigmem kernel <--- find it, install it... 32 bit med max 16 gb ram...

fungerar det inte, så kom du köra en memtest...

Av Gego

finns det folk som använder vi fortfarande? trodde att det var vim som gällde...

Av Gego

VNC?
*nix har inget register, och kommer aldrig ha, registret är bara för idioter som inte vet att man kan lagra data i filer...

domänauthenciering? Du menar LDAP?

Vad är det du skall med resistret till? finns absolut ingen nytta för det i *nix miljöer...

Av Gego
Citat:

Ursprungligen inskrivet av iXam
Att linuxsystem skulle vara imuna mot fragmentering är ju en populär myt. Men jämfört med fatXX är ju det flesta riktigt trevliga.
Ett sätt att defragmentera en partition när det inte finns något program för det är att flytta över alla filer till en annan HD/partition och sedan tillbaka.

jo det är en populär myt, som jag även gick på en gång i tiden... man börjag dock märka att det tar längre och längre tid att komma åt filer desto fler filer man har, tror att det är pga att filsystemet är för fragmenterat....

ASDF?
AOEU!

Av Gego

jag undrar för att jag håller på och skriver något, sam ni tyvärr inte kommer få se på ett tag, och undrar hur ett samhälle som har raser som åldras olika fort skulle utveckla sina lagar, det är en sci-fi/fantacy historia.... det är allt jag kan säga....

Av Gego

[fantasi] alver och sex....

hur är det med sex lagarna om nu alver åldras mycket långsammare?
vet att det är en hypotetisk fråga, ben vad tycker ni? är det pedofileri att ha sex med en alv som är 15 år gammal (eller äldre, beroende på vilket universum man vill bo i) som ser ut att vara 6 år gammal?

(ta inte frågan allt för seriöst dock....)

{{ Gå till inlägget för att se omröstningen }}

Av Gego
Citat:

Ursprungligen inskrivet av magnusvmt
Om någon sitter med en ljudboks-ftp på ephone och läser alla dessa nyheter, lär personen gjort sig av med rubbet för ganska länge sen.

Han dar nog nuke:at* disken ochså.... 5 skrivningar med /dev/urandom ** så är det inte mycket data kvar att hämta...

* boot and nuke
** DoD Normal standard