Haskell – Why not be dependently typed

I have seen several sources echo the opinion that “Haskell is gradually becoming a dependently-typed language”. The implication seems to be that with more and more language extensions, Haskell is drifting in that general direction, but isn’t there yet. There are basically two things I would like to know. The first is, quite simply, what… Read More »

Category: Uncategorized

Postgresql – JPA, EclipseLink, PostgreSQL and schemas

I want to develop a Java EE application with JPA (EclipseLink implementation) and PostgreSQL as database. I chose to have one database and multiples schemas instead of having multiples databases and one schema per database. So, in my persistence.xml I have something like that : <persistence-unit name=”00″ transaction-type=”JTA”> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <jta-data-source>todo</jta-data-source> <class>…</class> <class>…</class> <properties> <property name=”javax.persistence.target-database”… Read More »

Category: Uncategorized

Javascript – why is the window.dialogArguments undefined

I need to open up a .aspx page in a modal dialog. Here is the JS code I use to open the dialog: if (url) { var fullPath = url + “/Validation.aspx”; } else { alert(“Could not find the location of the merge dialog. Please contact your System admin and have them update the configuration… Read More »

Category: Uncategorized

Python – Exercise on Summing Digits | What’s with n // = 10

This question already has answers here: Closed 8 years ago. Possible Duplicate: What is the reason for having ‘//’ in Python? While trying to do an exercise on summing digits, I stumbled on this solution: def sum_digits(n): import math total = 0 for i in range(int(math.log10(n)) + 1): total += n % 10 n //=… Read More »

Category: Uncategorized

Ny way to fill in missing data in graphite when using statsD

I’m using statsD to report counter data to graphite; sends a tick everytime I get a message. This works great, except in the situation when statsD has to restart for whatever reason. Then I get huge holes in my graphs, since statsD is now no longer sending ‘0’ every 10 seconds for periods when I… Read More »

Category: Uncategorized

Magento – importing configurable products in Magento from CSV

I’m trying to append complex data to my database products in Magento ver. 1.7.0.2, some are simple and other configurable. The exported Magento CSV doesn’t greet with the needs for importing. I have this file for example for importing data: sku,_store,_attribute_set,_type,_category,_root_category,_product_websites,price,special_price,special_from_date,special_to_date,image,media_gallery,news_from_date,news_to_date,url_key,url_path,minimal_price,visibility,custom_design,custom_layout_update,page_layout,options_container,required_options,has_options,image_label,small_image_label,thumbnail_label,created_at,updated_at,enable_googlecheckout,gift_message_available,is_imported,country_of_manufacture,msrp_enabled,msrp_display_actual_price_type,msrp,qty,min_qty,use_config_min_qty,is_qty_decimal,backorders,use_config_backorders,min_sale_qty,use_config_min_sale_qty,max_sale_qty,use_config_max_sale_qty,is_in_stock,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_auto,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,_links_related_sku,_links_related_position,_links_crosssell_sku,_links_crosssell_position,_links_upsell_sku,_links_upsell_position,_associated_sku,_associated_default_qty,_associated_position,_tier_price_website,_tier_price_customer_group,_tier_price_qty,_tier_price_price,_group_price_website,_group_price_customer_group,_group_price_price,_media_attribute_id,_media_image,_media_lable,_media_position,_media_is_disabled,_super_products_sku,_super_attribute_code,_super_attribute_option,_super_attribute_price_corr “1202012000009S_freesoul,,PartesDeArriba_Hombre,simple,Hombre/Camisetas,””Default Category””,base,45.0000,,,,/t/n/tn_1202012000009-1_1.jpg,,,,camiseta-freesoul,camiseta-freesoul.html,,1,,,,””Bloque después de la columna de Información””,0,0,””Camiseta Freesoul””,””Camiseta Freesoul””,””Camiseta Freesoul””,””2012-10-05 08:41:01″”,””2012-10-05 12:07:06″”,1,,No,,””Usar configuración””,””Usar… Read More »

Category: Uncategorized

Ios – Running App on iPhone4 from Xcode fails

I have a problem when running my App on my iPhone from Xcode. The App runs (seemingly) fine in the simulators (iPhone, iPad, etc). It also runs fine when loaded on the iPhone4 or iPad2, it is only when trying to start the App from Xcode (version 4.5) that I get the following message from… Read More »

Category: Uncategorized

Html – ASP.Net literal. Insert html

I have simple literal on my page. <asp:Literal ID=”litDescription” runat=”server”></asp:Literal> When I am trying to set the following text to the literal: <p><div>Some Text</div></p> in my browser’s markup I see <p></p> <div>Some Text</div> <p></p> Why there are two ‘p’ tags? I need to have <p><div>Some Text</div></p>. Best Solution A div inside a P is invalid… Read More »

Category: Uncategorized

OpenERP: How to override an inherited view’s action

I’d like to supress the display of the Stock Value Variation chart on the default view of the Manufacturing page. I’m using inheritance to modify the form. Right now I can inherit the form and get additional actions to show up. However, I’m not able to use position=”replace” for an action, form, or on the… Read More »

Category: Uncategorized