Added icons; updated preview code formatting
BIN
images/pic1.png
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 200 KiB |
|
@ -14,6 +14,7 @@ with Ada.Text_Io; use Ada.Text_Io;
|
|||
type Door_State is (Closed, Open);
|
||||
type Door_List is array(Positive range 1..100) of Door_State;
|
||||
The_Doors : Door_List := (others => Closed);
|
||||
|
||||
begin
|
||||
for I in 1..100 loop
|
||||
for J in The_Doors'range loop
|
||||
|
@ -26,6 +27,7 @@ with Ada.Text_Io; use Ada.Text_Io;
|
|||
end if;
|
||||
end loop;
|
||||
end loop;
|
||||
|
||||
for I in The_Doors'range loop
|
||||
Put_Line(Integer'Image(I) & " is " & Door_State'Image(The_Doors(I)));
|
||||
end loop;
|
||||
|
@ -58,13 +60,14 @@ BEGIN {
|
|||
for(i = 1; i <= 100; i++) {
|
||||
doors[i] = 0 # close the doors
|
||||
}
|
||||
|
||||
for(i = 1; i <= 100; i++) {
|
||||
if ( int(sqrt(i)) == sqrt(i) ) {
|
||||
doors[i] = 1
|
||||
}
|
||||
}
|
||||
for(i=1; i <= 100; i++)
|
||||
{
|
||||
|
||||
for(i = 1; i <= 100; i++) {
|
||||
print i, doors[i] ? "open" : "close"
|
||||
}
|
||||
}
|
||||
|
@ -79,21 +82,20 @@ samples['c'] = """
|
|||
/* Some comments */
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
int square = 1, increment = 3, door;
|
||||
for (door = 1; door <= 100; ++door)
|
||||
{
|
||||
for (door = 1; door <= 100; ++door) {
|
||||
printf("door #%d", door);
|
||||
if (door == square)
|
||||
{
|
||||
|
||||
if (door == square) {
|
||||
printf(" is open.");
|
||||
square += increment;
|
||||
increment += 2;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
printf(" is closed.");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
|
@ -220,7 +222,6 @@ print 'hello world';
|
|||
samples['python'] = """
|
||||
def on_save_clicked(self, param):
|
||||
if not self.currentSchemeFile:
|
||||
|
||||
filename = runSaveAsDialog(self.window, self.entryId.get_text() + '.xml')
|
||||
|
||||
if filename and not '.' in os.path.basename(filename):
|
||||
|
@ -229,7 +230,6 @@ samples['python'] = """
|
|||
if filename:
|
||||
self.write_scheme(filename, self.entryId.get_text())
|
||||
self.currentSchemeFile = filename
|
||||
|
||||
else:
|
||||
self.write_scheme(self.currentSchemeFile, self.entryId.get_text())
|
||||
|
||||
|
|
|
@ -22,15 +22,17 @@
|
|||
<object class="GtkListStore" id="styles_list">
|
||||
<columns>
|
||||
<!-- column-name Styles -->
|
||||
<column type="gchar"/>
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkBox" id="glade_box">
|
||||
<property name="width-request">600</property>
|
||||
<property name="height-request">800</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="menu_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuBar">
|
||||
<property name="visible">True</property>
|
||||
|
@ -158,10 +160,23 @@
|
|||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-start">5</property>
|
||||
<property name="margin-end">5</property>
|
||||
<property name="margin-bottom">5</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
|
@ -188,6 +203,11 @@
|
|||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="styles_treeview">
|
||||
<property name="visible">True</property>
|
||||
|
@ -208,6 +228,8 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
|
@ -486,7 +508,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Name</property>
|
||||
<property name="xalign">0.019999999552965164</property>
|
||||
<property name="xalign">2.2351741291171123e-10</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -509,8 +531,9 @@
|
|||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-top">5</property>
|
||||
<property name="label" translatable="yes">Id</property>
|
||||
<property name="xalign">0.019999999552965164</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -533,8 +556,9 @@
|
|||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-top">5</property>
|
||||
<property name="label" translatable="yes">Description</property>
|
||||
<property name="xalign">0.019999999552965164</property>
|
||||
<property name="xalign">2.2351741291171123e-10</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -557,8 +581,11 @@
|
|||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-top">5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="label" translatable="yes">Author</property>
|
||||
<property name="xalign">0.019999999552965164</property>
|
||||
<property name="xalign">2.2351741291171123e-10</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -600,8 +627,9 @@
|
|||
<object class="GtkLabel" id="sample_lbl">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-top">5</property>
|
||||
<property name="label" translatable="yes">Sample</property>
|
||||
<property name="xalign">0.019999999552965164</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 850 B |
Before Width: | Height: | Size: 702 B |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 925 B |
Before Width: | Height: | Size: 882 B |
Before Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 798 B |
Before Width: | Height: | Size: 989 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |