The place I'm working for is a service provider. We have a lot of services, which are written to deal with deadline, so their code are really terrible:
No coding convention, everyone codes in his own style
No unit testing (which is really bad)
No refactoring (which is truly worse)
No automation build/deployment
etc
and these code are used…
Hi, I've a recurrent problem, I don't find an elegant solution to avoid the resource cleaning code duplication:
resource allocation:
try {
f()
} catch (...) {
resource cleaning code;
throw;
}
resource cleaning code;
return rc;
So, I know I can do a temporary class with cleaning up destructor, but I don't really like it because it…
Hello everyone,
How can I convert backslash key ('\') to key code?
On my keyboard backslash code is 220, but the method below
(int)'\\'
returns me 92.
I need some generic conversion like
int ConvertCharToKeyValue(char c)
{
// some code here...
}
Any ideas?
What could be the potential reasons why mongrel does not use the latest code in the ~/current branch?
The code changes are in the MODELs. The code changes in the CONTROLLERS TAKE EFFECT.
I tried the following:
god restart app
deploying several times
manually stopping mongrel cluster, deleting the pid files, and starting them again
…
i have this code for hiding a table and a cell in aspx, backend vb.net
Code -
For Each row As HtmlTableRow In tab_a1.Rows
If row.ID = "a1" Then
For Each cell As HtmlTableCell In row.Cells
cell.Visible = (cell.ID = "a1")
Next
…
Setting value in html control in code behind without making server control
<input type="text" name="txt" />
<%--Pleas note I don't want put runat=server here to get the control in code behind--%>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
Code behind
protected void…
I am on the ruby on rails application and trying to embed the code for js , added the whole code for embedding in Text box , But when i copy paste in other blogs where embed is poss , i am not getting the full js work , the code is given below
<%= text_field_tag "text","
script src=\"/public/javascripts/calendarview.js\"…
Can anyone recommend a public code repository? A few friends and I are thinking of starting a few projects for iPhone, web, Android, etc., and it would be nice to have a public (internet) code repository to use that would work well on any platform (Mac, PC, Linux). Any type of repository is fine (SVN, CVS, Git, etc.).
A few…
Before you start admonishing me with "DON'T DO IT," "BAD PRACTICE!" and "Learn to use proper source code control", please hear me out first. I am fully aware that the practice of commenting out old code and leaving it there forever is very bad and I hate such practice myself.
But here's the situation I'm in. A few months ago…
Hi, I've a recurrent problem, I don't find an elegant solution to avoid the resource cleaning code duplication:
resource allocation:
try {
f()
} catch (...) {
resource cleaning code;
throw;
}
resource cleaning code;
return rc;
So, I know I can do a temporary class with cleaning up destructor, but I don't really…
I am going to be working on a project, a web application. I was reading 37signals getting real pamphlet online (http://gettingreal.37signals.com/), and I understand the recommended process to build the entire website. Brainstorm, sketch, HTML, code.
They touch on each process lightly, but they never really talk much…
Hi
Im compiling some code at runtime then loading the assembly into the current appdomain, however when i then try to do Type.GetType it cant find the type...
Here is how i compile the code...
public static Assembly CompileCode(string code)
{
Microsoft.CSharp.CSharpCodeProvider provider = new…
im all new to framework.
so the structure of code igniter looks like:
system
system/application
the system folder is code igniter's base folder right? so if they in the future releases a new version i just put application in the new system folder and its upgraded right?
does this mean that i shouldn't…
I am impressed with intel thread building blocks. I like how i should write task and not thread code and i like how it works under the hood with my limited understanding (task are in a pool, there wont be 100 threads on 4cores, a task is not guaranteed to run because it isnt on its own thread and may be…
I have a webrequest that returns a html response which has form inside with hidden fields with some javascript that submits the form automatically on pageload ( if this was run in a browser).
If I save this file as *.html and run this file in browser , the java script code automatically posts the form…
Delphi 2010
When reading from file using readLn procedure, by default i get unicode string converted from code page 1251 (code page of windows).
How can i change this and read from file in other code page, in 1252 or UTF16 ?
I have a table like this
C1 C2 C3 Code
1 2 3 33
1 2 3 34
2 4 1 14
1 2 3 14
i want to select only those record whose code is appearing only in single row. ie, in this case rows with code 33 and 34.. as they appear only once in this table.
How can i write a query for that
Hi,
I am using Net Beans for developing an application on S60. I made one page for user authentication and using .net wcf service to authenticate user. i am able to send data on .net service by HttpGet method but not able to get response back on java page.
I have tested it on fiddler with this url its…
I have the following asp.net mvc 3 razor code, where "item" is my model,
<a @if (item.Selected) { class="youarehere" } href="@item.Href" title="@item.Title">@item.Description</a>
This code throws up the following error,
CS1513: } expected
which is pointing to
class="youarehere"
…
Ok, I understand that using strings that have special characters is an encoding issue.
However I am not sure how to adjust my code to allow these characters. Below is the code that works great for text that contains no special characters, but can you show me how and where to change the code to allow…
When I use Server.Transfer the browser keeps the Previous Page on the URL bar. Also, when I try to view the source code of the page, shows the previous page code. I need to see the current page code. Any help?
Thank you
I'm starting to feel the need to run fastly through code with keyboard shortcuts, to arrive faster where I want to make any changes (avoiding use of mouse or long times holding [up], [left], [right] and [down]).
I'm already using some:
[home] - first position in current line
[end] …