I'm referring to http://www.codinghorror.com/blog/2005/10/equipping-our-ascii-armor.html but I'm getting drastically different results.
Does anyone know how to duplicate his blog post examples in Ruby?
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is:
"{"id":"1234","name":"john smith","email":"[email protected]"},{"id":"4431","name":"marry doe","email":"[email protected]"}"
Now I need to pass this as an array of objects again. How do I convert this string into array of objects?
I am attempting to wipe and repopulate test data on SQL CE. I am getting an error due to FK constraints existing. Typically in Sql2005 I would
ALTER TABLE [tablename] CHECK/NOCHECK CONSTRAINT ALL to enable/disable all constraints. From what I could find in my searching, it seems that this might not be supported in CE. Is that true? If so, is there an alternative?
I feel a little caught between a rock and a hard place here. I want to use Firefox's built in spell checking without disabling Ckeditor's context menu as this renders it impossible to work with tables. Is there a way of getting the best of both worlds here?
I'm having an issue trying to parse the ascii part of a file, and once I hit the end tag, IMMEDIATELY start reading in the bytes from that point on. Everything I know in Java to read off a line or a whole word creates a buffer, which ruins any chance of getting the bytes immediately following my stop point. Is the only way to do this read in byte-by-byte, find new-lines, reconstruct everything prior to the new-line, see if it's my end tag, and go from there?
hi, i have following selectlist for dropdownbox in aspnet mvc.
This is the editEmployee Action controller, so while edit page is displayed i want to display a selectvalue in dropdownbox,since "SelectList" takes 3 parameters one for value,one for text and other is for selected value, here i'm not getting what should i pass in 3rd parameter, coz its asking an object for selected value.
ViewData["DepartmentList"] = new SelectList(DepartmentRepository.GetDepartmentsBySchoolIdInList(ViewData["schoolId"].ToString()),"DepartmentId","DepartmentTitle");
here is the view
=Html.DropDownList("DepartmentList")
I need some information about the Informatica ETL tool. I am a rookie with that, so could you please recommend where can I get some tutorials to get started. Can I download the tool, and if so where can I download it? What are the alternatives to Informatica?
When I type
#include <QObject>
it complains that it couldn't find file.
but if I type
#include <QtCore\QObject>
It works properly.
I moved VS2005 to VS2008, this was not the case in VS2005, and it started with VS2008. Why am I getting this error?
We are designing our office right now and want to know what stuff you guys really care about or started loving in your office.
So -
What are your must-haves for a developers office?
What things can't you live without?
I'm technically savvy but don't have extensive experience with servers/daemons (I'm a Windows guy, so...command lines intimidate me).
I started a Mercurial server using the hg serve -d command, and all was well.
Now, I want to stop it, and can't find a process to kill. Does anybody know the process name or a relatively simply CLI command to get it done?
Hi,
I would like to share one of my practical experience with multiprogramming here.
Yesterday I had written a multiprogram. Modifications to sharable resources were put under critical sections protected by P(mutex) and V(mutex) and those critical section code were put in a common library. The library will be used by concurrent applications (of my own).
I had three applications that will use the common code from library and do their stuff independently.
my library
---------
work_on_shared_resource
{
P(mutex)
get_shared_resource
work_with_it
V(mutex)
}
---------
my application
-----------
application1
{
*[
work_on_shared_resource
do_something_else_non_ctitical
]
}
application2
{
*[
work_on_shared_resource
do_something_else_non_ctitical
]
}
application3
{
*[
work_on_shared_resource
]
}
*[...] denote a loop.
------------
I had to run the applications on Linux OS. I had a thought in my mind, hanging over years, that, OS shall schedule all the processes running under him with all fairness. In other words, it will give all the processes, their pie of resource-usage equally well.
When first two applications were put to work, they run perfectly well without deadlock. But when the third application started running, always the third one got the resources, but since it is not doing anything in its non-critical region, it gets the shared resource more often when other tasks are doing something else. So the other two applications were found almost totally halted. When the third application got terminated forcefully, the previous two applications resumed their work as before.
I think, this is a case of starvation, first two applications had to starve.
Now how can we ensure fairness?
Now I started believing that OS scheduler is innocent and blind. It depends upon who won the race; he got the largest pie of CPU and resource.
Shall we attempt to ensure fairness of resource users in the critical-section code in library?
Or shall we leave it up to the applications to ensure fairness by being liberal, not greedy?
To my knowledge, adding code to ensure fairness to the common library shall be an overwhelming task. On the other hand, believing on the applications will also never ensure 100% fairness. The application which does a very little task after working with shared resources shall win the race where as the application which does heavy processing after their work with shared resources shall always starve.
What is the best practice in this case? Where we ensure fairness and how?
Sincerely,
Srinivas Nayak
JSF 1.1 and websphere 6.1 was working properly in my case. Once I deployed that to a websphere 7 server, I received the following error -
Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactoryat javax.faces.FactoryFinder.getFactory(FactoryFinder.java:270)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:164)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
Not sure what it means, I have enabled JSF1.2 as project facet in the RAD but still keep getting the above error message and none of my jsf files are working.
I'm trying to generate a pdf file from a tex file from R, but I'm getting the following error:
> tools::texi2dvi("teste.tex",)
Error in tools::texi2dvi("teste.tex", ) :
Running 'texi2dvi' on 'teste.tex' failed.
Messages:
sed: can't read ./teste.tex: Permission denied
mkdir: cannot create directory `teste.t2d': Permission denied
/usr/bin/texi2dvi: cannot create directory: teste.t2d
The user owns the file teste.tex and also the folder it's located.
I'm running it into Ubuntu 12.04 and R 2.15.0
Does anyone knows what's going on?
I am trying httpUnit for the first time and just trying to get a response back from google.com.
However, I keep getting the following error:
com.meterware.httpunit.dom.HTMLDocumentImpl not found
Though, I have placed httpUnit.jar in the libraries folder of my NetBeans project and can actually see that class file is there.
Any experiences with this?
Dim db As New SQLDataContext
Try
Dim deleteBoatPics = (From boat In db.Photos
Where boat.boatid = id)
db.Photos.DeleteOnSubmit(deleteBoatPics)
db.SubmitChanges()
Catch ex As Exception
End Try
I'm getting an error that says:
Unable to cast object of type 'System.Data.Linq.DataQuery`1[WhiteWaterPhotos.Photo]' to type 'WhiteWaterPhotos.Photo'.
I have two separate db.SubmitChanges() because when the button is pressed, I have it delete the records from 1 table, and then the next.
I'm lost, can someone help me out?
I'm trying to implement paging using row-based limiting (for example: setFirstResult(5) and setMaxResults(10)) on a Hibernate Criteria query that has joins to other tables.
Understandably, data is getting cut off randomly; and the reason for that is explained here.
As a solution, the page suggests using a "second sql select" instead of a join.
How can I convert my existing criteria query (which has joins using createAlias()) to use a nested select instead?
I have installed both IIS and SQL Server 2005 on my laptop.
Both work individualy, however when I try to connect to an DB from an ASP page I keep getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DB1" requested by the login. The login failed.
/testFiles/Connection/Connection.inc, line 5
Line 5 says:
con.open "DSN=DB1"
Can anybody tell me what the problem is?
Thanks
I think that there are something wrong with new RC, when i write
Html.BeginForm("Item", "Newsletter", FormMethod.Post, new { enctype = "multipart/form-data" })
method must render in output something like this:
<form action="/Newsletter/Item" enctype = "multipart/form-data" method="POST"></form>
but instead of that im getting:
<form action="Item" enctype = "multipart/form-data" method="POST"></form>
where my full action path?
Let's say this page
www.example.com/mypage
returns some html that I want to parse in Actionscript.
How do i call this page from Actionscript while getting back the response in a string variable?
I'm getting ready to finally deploy my first iPhone app. The app uses SSL to connect to a REST web service. While reading the docs on deploying the app to the app store, I came across some drivel regarding having to go through a 30 - 60 day government vetting process just to ship an app that simply connects to an HTTPS server.
My question is, since this is an export requirement, do apps that are only distributed in the US face this same restriction?
Thanks
Hi I have just started using IntelliJ again and have version 9. I just installed the Mecurial plugin and now the ide won't start anymore.
Has an error of
Fatal error initializing class com.intellij.openapi.actionSystem.ActionManager:
java.lang.VerifyError: class com.dcx.hg.MercurialVcs overrides final method getName.()Ljava/lang/String;
I now know that I should be using the plugin hg4idea
Is there a way I can remove this plugin so I can start the ide, I am sure there must be..
Thanks in advance.
How can i make a cached object re-cache it self with updated info when the cache has expired? I'm trying to prevent the next user who request the cache to have to deal with getting the data setting the cache then using it is there any background method/event i can tie the object to so that when it expires it just calls the method it self and self-caches.
I heard that some people where having problems accessing their sites which get their jQuery from Google since their corporate firewall didn't like sites getting code from other sites, i.e. cross-site scripting?
Has anyone run into problem such as this?
Hello
I've been trying to parse a UTF-16 encoded xml file in Ruby (1.8.7), and I can't seem to find how to do it by searching (google and stack overflow)
Here's the xml file url:
http://www.abc.net.au/triplej/feeds/playout/triplejsydneyplayout.xml?_5366
Getting the xml string from Net::HTTP and passing it to REXML, then calling logger.info xmlDoc.inspect produces: <UNDEFINED> ... </>
Any ideas?
Cheers