Czetsuya (czetsuya) uses Bloggers to connect with peer Bloggers. Sign up to follow Czetsuya (czetsuya) and promote your blogs now!

Czetsuya

Activities of Czetsuya

Apr 8, 2012
Czetsuya posted a new topic.
3

How to create a modularized maven project in eclipse

czetsuya's tech ― I've just noticed that it's easier to do this now on eclipse-jee-indigo, no need to use the console :-)I'll try to make this write up short, but I guess it will not be.So first, you should have the ff installed (if you don't know how - just google... (More)
How to create a modularized maven project in eclipse
Posted on Apr 8th, 2012
Apr 4, 2012
Czetsuya posted a new topic.
3

MVC3 ajax validation doesn't work on a jquery served form

czetsuya's tech ― To make automatic validation using data annotation on a model on mvc3 c# we need:1.) A model with data annotation (ex. required attribute).2.) Form with jquery declaration (jquery1.7, validate, validate unobtrusive, and unobtrusive-ajax. All are... (More)
Posted on Apr 4th, 2012
Apr 3, 2012
Czetsuya posted a new topic.
3

DNS that you could choose from in the Philippines

czetsuya's tech ― Below are the DNS I'm using in the Philippines. The last is specifically for Globe network.OpenDNS - fast but restrictive 208.67.222.222 208.67.220.220Cisco - ok for me 64.102.255.44 128.107.241.185DNS advantage - bad 156.154.70.1 156.154.71.1Globe's... (More)
Posted on Apr 3rd, 2012
Mar 29, 2012
Czetsuya posted a new topic.
2

How to solve System.Security.SecurityException: That assembly does not allow partially trusted callers.

czetsuya's tech ― Recently I found myself in another shared hosting problem. Unfortunately, we are hosting our personalized-items/corporate give away website + wedding invitation (www.kalidadprintsandfavors.com) in godaddy.com. And I've just added a new feature where... (More)
Posted on Mar 29th, 2012
Mar 27, 2012
Czetsuya posted a new topic.
4

How to add social networking links to your website like facebook, twitter and tumblr

czetsuya's tech ― (function () { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s =... (More)
Posted on Mar 27th, 2012
Mar 19, 2012
Czetsuya posted a new topic.
6

How to resize an image from database or file using php

czetsuya's tech ― This implementation is done using php.Usually we resize image that we read from a local file, then save it locally.Flow:1.) read from local image file and store in a php variable2.) resize the image file using php functionalities3.) save the image... (More)
Posted on Mar 19th, 2012
Mar 7, 2012
Czetsuya posted a new topic.
4

Caps converter - convert uppercase to lowercase to normal case to capital case and vise versas

czetsuya's tech ― Below are the list of tools I use in case converting, they are useful if you are on a printing business and your clients just type on whatever case they want :-) Notepad++ - converts uppercase -> lowercase and vice versaMicrosoft word - a feature... (More)
Posted on Mar 7th, 2012
Czetsuya posted a new topic.
7

How to execute select count(*), field from table group by field in entity framework

czetsuya's tech ― As the title implies we will try to convert a native sql that group and counts the number of row.We will assume that you have a column quantity or number of items.//native queryselect count(*), fieldfrom tablegroup by field//entity frameworkvar query... (More)
Posted on Mar 7th, 2012
Mar 3, 2012
Czetsuya posted a new topic.
7

How to execute a group by and sum query in entity framework

czetsuya's tech ― The following code is the native sql with the converted code in entity framework. It queries the sum of quantity group by branch, model, year and week no.//native sqlselect weekyear, weekno, branchid, modelid, sum(quantity) from selloutmobileswhere... (More)
Posted on Mar 3rd, 2012
Feb 29, 2012
Czetsuya posted a new topic.
6

How to pass and post back user defined variables in paypal ipn

czetsuya's tech ― With paypal api, payment operation such as buy, donate, subscribe has never been easier. For simple cases, you just need to define a button inside paypal and embed it in your website, usually on blog sites that ask for donation.For cases that... (More)
Posted on Feb 29th, 2012
Feb 27, 2012
Czetsuya posted a new topic.
7

How to upload a file in an mvc3 c# ajax form

czetsuya's tech ― It's easy to upload file in a synchronous form, where you just post the file and read a HttpPostedFile variable in the server side:In plain html form, take note of the form enctype property://the view (index.cshtml)@using (Html.BeginForm("Upload", ... (More)
Posted on Feb 27th, 2012
Feb 13, 2012
Czetsuya posted a new topic.
7

How to render a Chart object in a view in MVC3

czetsuya's tech ― I was working on a project that requires showing a graph, fortunately there's already a built in graph helper in mvc3: http://www.asp.net/web-pages/tutorials/data/7-displaying-data-in-a-chart.Tried the tutorial in link above and was able to display... (More)
Posted on Feb 13th, 2012
Feb 6, 2012
Czetsuya posted a new topic.
8

Elmah not logging, elmah.axd page is always null when using SqlErrorLog

czetsuya's tech ― First make sure that you're web.config file is setup properly and that you have defined elmah to handle the error in each controller. You can do that easily in c# mvc3 by using nuget and downloading elmah, elmah.corelibrary and elmah.contrib.mvc.... (More)
Posted on Feb 6th, 2012
Jan 30, 2012
Czetsuya posted a new topic.
8

How to read and write an object in a textfile in C#

czetsuya's tech ― Long time ago I've a requirement to read sms messages from device to be written in a text file. Before I learned to serialize an object, I was saving it in a file comma-delimited. That approach is working but sometimes it's a pain to keep track of... (More)
Posted on Jan 30th, 2012
Jan 26, 2012
Czetsuya posted a new topic.
6

Read and update your mailbox using php

czetsuya's tech ― There are 2 ways I use 2 read email from my mailbox. Let the code explain:1.) Usually use for gmail./* connect to gmail */$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';$username = 'xxx@gmail.com';$password = 'xxx';/* try to connect */$inbox =... (More)
Posted on Jan 26th, 2012
Czetsuya posted a new topic.
8

Injection of Control in a C# Console Application

czetsuya's tech ― Now that I'm working with C# MVC3, I learned that it's easier to setup Injection of Control because of several available plugins that you can use straightly after install. For example the one I'm using is Unity.MVC, in Visual Studio 2010 you just... (More)
Posted on Jan 26th, 2012
Jan 24, 2012
Czetsuya posted a new topic.
9

How to alter bit and date column's default value in MSSQL

czetsuya's tech ― Aside from using the SQL Designer, you can alter a bit and date column's default value.ALTER TABLE TableName ADD CONSTRAINT TableName_Disabled DEFAULT 0 FOR DisabledALTER TABLE TableName ADD CONSTRAINT TableName_DateCreated DEFAULT getdate() FOR... (More)
Posted on Jan 24th, 2012
Jan 16, 2012
Czetsuya posted a new topic.
10

Add a jquery datepicker on jquery dialog box via load method

czetsuya's tech ― Recently I've worked on a form that requires a jquery datepicker to be rendered inside jquery's dialog element. Where I encountered several problems like:1.) datepicker() should be invoke inside dialog2.) the dialog created (div) should be remove... (More)
Posted on Jan 16th, 2012
Jan 11, 2012
Czetsuya posted a new topic.
9

Many to many relationship in Entity Framework

czetsuya's tech ― An example of many-to-many relationship is asp's membership tables, between aspnet_Users and aspnet_Roles.Usually we declare it like this:public class AspUser { public Guid UserId { get; set; } ... public ICollection AspRoles { get; set; }}public... (More)
Posted on Jan 11th, 2012
Czetsuya posted a new topic.
13

Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints

czetsuya's tech ― Have you encountered this error:"Introducing FOREIGN KEY constraint 'x_y_Target' on table 'z_UsersInRoles' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints."It... (More)
Posted on Jan 11th, 2012
Czetsuya posted a new topic.
10

How to declare foreign key in Entity Framework

czetsuya's tech ― There are 2 ways to declare foreign key in entity framework. Assuming we have 2 entities aspnet_Users and Person, which are link via UserId from aspnet_Users.1.) class Person { public Guid UserId { get;set; } [ForeignKey("UserId")] public virtual... (More)
Posted on Jan 11th, 2012
Jan 4, 2012
Czetsuya posted a new topic.
11

Adding loading screen to C# MVC ajax dialog form using jquery

czetsuya's tech ― With my experience from telerik, I want my entity's add and edit form to be a popup so I don't have to change screen. I'm using C# MVC3, so I tried to look for jquery add on that would do the job. Fortunately I've come up with this article: http:/... (More)
Posted on Jan 4th, 2012
Dec 28, 2011
Czetsuya posted a new topic.
11

validation-summary-errors div showing even if there is no error binded to a property

czetsuya's tech ― I'm working on a change password form when I encountered this strange behavior from mvc3. I created a simple form and change password model with 3 fields (old, new, confirm password). Then I extended ValidationAttribute to validate the password's... (More)
Posted on Dec 28th, 2011
Dec 20, 2011
Czetsuya posted a new topic.
11

Executing a linq query with a bridge table like aspnet_Users and aspnet_Roles

czetsuya's tech ― Using model first approach, we add aspnet_Users, aspnet_Roles and aspnet_UsersInRoles in the edmx file. But why is aspnet_UsersInRoles missing? It's because aspnet_Users has one-to-many relationship to aspnet_Roles. To get the role of the user, we... (More)
Posted on Dec 20th, 2011
Dec 17, 2011
Czetsuya posted a new topic.
13

Calling MSSQL's aspnet_Membership_CreateUser stored procedure

czetsuya's tech ― Here's how you would want to call mssql's aspnet_Membership_CreateUser method:DECLARE @return_value int, @UserId uniqueidentifier, @nowUtc datetime, @now datetime set @nowUtc = getutcdate() set @now = getdate()EXEC @return_value = [dbo].... (More)
Posted on Dec 17th, 2011
Dec 16, 2011
Czetsuya posted a new topic.
10

How to enable jquery's lavalamp's links

czetsuya's tech ― I've used lavalamp's menu in my project several times and have experienced the same problem 2 or 3 times after copying the code from the downloadable zipped file. It's as if the links were not there and even you click the menulink the page will not... (More)
Posted on Dec 16th, 2011
Dec 6, 2011
Czetsuya posted a new topic.
13

The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'.

czetsuya's tech ― Normally you will encounter this issue if you generate an sql script of an aspnet_database without including the data. To resolve this you have 2 options:1.) Execute c:windowsmicrosoft.net ramework 4.xxxspnet_regsql.exe, and just follow through.2.)... (More)
Posted on Dec 6th, 2011
Dec 2, 2011
Czetsuya posted a new topic.
7

Create a Magento extension that will only allow a customer to login until a given expiry time

czetsuya's tech ― Long time ago I was assigned to modify magento, add an expiry date and check if the costumer is expired during login. Those times resource were scarce and what I did was hacked magento, add custom codes and fields in the database. Which is not a good... (More)
Create a Magento extension that will only allow a customer to login until a given expiry time
Posted on Dec 2nd, 2011
Dec 1, 2011
Czetsuya posted a new topic.
12

How to download a zipped file of a magento extension

czetsuya's tech ― There are times when you want to see the code behind of a magento extension, but using magento connect would not give you all the files that have been created. To do that simply go to url below and type the Magento Connect 1 extension key:http:/... (More)
Posted on Dec 1st, 2011
Nov 30, 2011
Czetsuya posted a new topic.
15

How to install and setup magento on a windows 7 machine

czetsuya's tech ― This tutorial will try to install and setup magento on a local pc running windows 7. Requirements (I'm using the following versions, you can search the download links using google - lame :-) ):1.) apache2.22.) php-5.2.143.) MySQL Server 5.54.)... (More)
Posted on Nov 30th, 2011

Bloggers Spotlight

Mnemonic Reveries

211 Votes | 68 Comments | 128 Followers

Purity Pantry

70 Votes | 16 Comments | 35 Followers

Valentina

79 Votes | 19 Comments | 22 Followers

Melita

29 Votes | 6 Comments | 16 Followers

Brandie

27 Votes | 9 Comments | 15 Followers

Hooshmand Moslemi

11 Votes | 4 Comments | 4 Followers

Oz Wildlife Studio

8 Votes | 2 Comments | 1 Follower

Petro Neagu

9 Votes | 5 Comments | 3 Followers