Search Results

Search found 669 results on 27 pages for 'stephen chin'.

Page 11/27 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Easy way to identify pages which are index, but not linked to on my site

    - by Stephen Connolly
    I'm just wondering if there is an easy way to find out what pages Google has indexed, that are not directly linked on my site, for example: www.mysite.com/skype.html originally had a link in my site menu, but this link was removed. The page is still available when the url is typed directly, but there is no direct link to it. I don't want Google indexing this page any more and want to put a 'disallow' in my robots.txt.

    Read the article

  • DB Object passing between classes singleton, static or other?

    - by Stephen
    So I'm designing a reporting system at work it's my first project written OOP and I'm stuck on the design choice for the DB class. Obviously I only want to create one instance of the DB class per-session/user and then pass it to each of the classes that need it. What I don't know it what's best practice for implementing this. Currently I have code like the following:- class db { private $user = 'USER'; private $pass = 'PASS'; private $tables = array( 'user','report', 'etc...'); function __construct(){ //SET UP CONNECTION AND TABLES } }; class report{ function __construct ($params = array(), $db, $user) { //Error checking/handling trimed //$db is the database object we created $this->db = $db; //$this->user is the user object for the logged in user $this->user = $user; $this->reportCreate(); } public function setPermission($permissionId = 1) { //Note the $this->db is this the best practise solution? $this->db->permission->find($permissionId) //Note the $this->user is this the best practise solution? $this->user->checkPermission(1) $data=array(); $this->db->reportpermission->insert($data) } };//end report I've been reading about using static classes and have just come across Singletons (though these appear to be passé already?) so what's current best practice for doing this?

    Read the article

  • jsonSerializer.DeserializeObject and arrays

    - by Chin
    I have a column in the a database with values like the below. [{"noteText":"Today was sunny.","noteDate":"2010-03-30 10:06:22"},{"noteDate":"2010-04-06 13:21:36","noteText":"Today was windy."}] I think they are from an array of objects serialized via flash to Json. What I need to do is pull out the noteText and noteDate values only and record them back to the database as a normal string. I was hoping to just deserialize back to objects and build up a string from there, however, due to my unfamiliarity with c# and .Net I've hit a brick wall trying to deserialize the string. var obj = jsonSerializer.DeserializeObject(ns); Am I going in the right direction or should I be looking at doing some string manipulation? Any pointers much appreciated.

    Read the article

  • to_date in MS SQL Server 2005

    - by Chin
    Does any one know how I would have to change the following to work with ms sql? WHERE registrationDate between to_date ('2003/01/01', 'yyyy/mm/dd') AND to_date ('2003/12/31', 'yyyy/mm/dd'); What I have read implies I would have to construct it using DATEPART() which could become very long winded. Especially when the goal would be to compare on dates which I receive in the following format "2003-12-30 10:07:42". It would be nice to pass them off to the database as is. Any pointers appreciated.

    Read the article

  • dll woes c# noob

    - by Chin
    Hi, I'm a bit of a visual studio noob. I have just restarted a project in which I am using NHibernate. The project worked fine last time I used it but now is giving the following error. System.IO.FileLoadException: Could not load file or assembly 'Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at NHibernate.Cfg.Configuration.Reset() at NHibernate.Cfg.Configuration..ctor(SettingsFactory settingsFactory) at NHibernate.Cfg.Configuration..ctor() at Luther.Dao.Repositories.Session.NHibernateHelper..cctor() in NHibernateHelper.cs: line 18 I notice the current reference to the iesi dll ia at 1.0.1.0. What is the best way to get this up and running again? Try and find the appropriate version of the dll or sort out the manifest file? Any pointers much appreciated.

    Read the article

  • Adobe Air Debugger not visible

    - by Chin
    Have a little conundrum, when I debug my air app. It goes through the build process and seemingly launches. I can see the process in windows task manager, but can not see the actual application. Kind of strange I know. If anyone has had the same problem and can offer a shortcut to success, I'd much appreciate a pointer. Thanks

    Read the article

  • Flex Datagrid editing cells in same row not firing collection change event

    - by Chin
    Hi, I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong? Any help appreciated.

    Read the article

  • FlexUnit 4 and Cairngorm commands

    - by Chin
    Does anyone know if it is possible to test remote procedure calls in Cairngorm Commands with FlexUnit 4. I have an old app full of them and before I introduce FlexUnit into the mix would like to here if anyone has been successful with this. Many thanks,

    Read the article

  • Flex Datagrid editing calls from same row not firing collection change event

    - by Chin
    Hi, I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value of the parameter in the object is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong? Any help appreciated.

    Read the article

  • Flex: Failing gracefully on ReferenceError: Error #1056:

    - by Chin
    Hi I have a text field which I would like to bind to a dynamic object. <mx:TextInput id="ti4" text="{selectedObj['someProp']}" valueCommit="{selectedObj['someProp'] = ti4.text}" x="1011.5" y="835"/> If the property doesn't exist I get a reference error - Is there any way to fail a little more gracefully? Any ideas much appreciated.

    Read the article

  • to_date in SQL Server 2005

    - by Chin
    Does any one know how I would have to change the following to work with ms sql? WHERE registrationDate between to_date ('2003/01/01', 'yyyy/mm/dd') AND to_date ('2003/12/31', 'yyyy/mm/dd'); What I have read implies I would have to construct it using DATEPART() which could become very long winded. Especially when the goal would be to compare on dates which I receive in the following format "2003-12-30 10:07:42". It would be nice to pass them off to the database as is. Any pointers appreciated.

    Read the article

  • Database: Storing Dates as Numeric Values

    - by Chin
    I'm considering storing some date values as ints. i.e 201003150900 Excepting the fact that I lose any timezone information, is there anything else I should be concerned about with his solution? Any queries using this column would be simple 'where after or before' type lookups. i.e Where datefield is less than 201103000000 (before March next year). currently the app is using MSSQL2005. Any pointers to pitfalls appreciated.

    Read the article

  • Coldfusion returning typed objects / AMF remoting

    - by Chin
    Is the same possible in ColdFusion? Currently I am using .Net/Fluorine to return objects to the client. Whilst in testing I like to pass strings representing the select statement and the custom object I wish to have returned from my service. Fluorine has a class ASObject to which you can set the var 'typeName'; which works great. I am hoping that this is possible in Coldfusion. Does anyone know whether you can set the type of the returned object in a similar way. This is especially helpful with large collections as the flash player will convert them to a local object of the same name thus saving interating over the collection to convert the objects to a particular custom object. foreach (DataRow row in ds.Tables[0].Rows) { ASObject obj = new ASObject(); foreach (DataColumn col in ds.Tables[0].Columns) { obj.Add(col.ColumnName, row[col.ColumnName]); } obj.TypeName = pObjType; al.Add(obj); } Many thanks,

    Read the article

  • Detecting branch reintegration or merge in pre-commit script

    - by Shawn Chin
    Within a pre-commit script, is it possible (and if so, how) to identify commits stemming from an svn merge? svnlook changed ... shows files that have changed, but does not differentiate between merges and manual edits. Ideally, I would also like to differentiate between a standard merge and a merge --reintegrate. Background: I'm exploring the possibility of using pre-commit hooks to enforce SVN usage policies for our project. One of the policies state that some directories (such as /trunk) should not be modified directly, and changed only through the reintegration of feature branches. The pre-commit script would therefore reject all changes made to these directories apart from branch reintegrations. Any ideas? Update: I've explored the svnlook command, and the closest I've got is to detect and parse changes to the svn:mergeinfo property of the directory. This approach has some drawback: svnlook can flag up a change in properties, but not which property was changed. (a diff with the proplist of the previous revision is required) By inspecting changes in svn:mergeinfo, it is possible to detect that svn merge was run. However, there is no way to determine if the commits are purely a result of the merge. Changes manually made after the merge will go undetected. (related post: Diff transaction tree against another path/revision)

    Read the article

  • Specifying different initial values for fields in inherited models (django)

    - by Shawn Chin
    Question : What is the recommended way to specify an initial value for fields if one uses model inheritance and each child model needs to have different default values when rendering a ModelForm? Take for example the following models where CompileCommand and TestCommand both need different initial values when rendered as ModelForm. # ------ models.py class ShellCommand(models.Model): command = models.Charfield(_("command"), max_length=100) arguments = models.Charfield(_("arguments"), max_length=100) class CompileCommand(ShellCommand): # ... default command should be "make" class TestCommand(ShellCommand): # ... default: command = "make", arguments = "test" I am aware that one can used the initial={...} argument when instantiating the form, however I would rather store the initial values within the context of the model (or at least within the associated ModelForm). My current approach What I'm doing at the moment is storing an initial value dict within Meta, and checking for it in my views. # ----- forms.py class CompileCommandForm(forms.ModelForm): class Meta: model = CompileCommand initial_values = {"command":"make"} class TestCommandForm(forms.ModelForm): class Meta: model = TestCommand initial_values = {"command":"make", "arguments":"test"} # ------ in views FORM_LOOKUP = { "compile": CompileCommandFomr, "test": TestCommandForm } CmdForm = FORM_LOOKUP.get(command_type, None) # ... initial = getattr(CmdForm, "initial_values", {}) form = CmdForm(initial=initial) This feels too much like a hack. I am eager for a more generic / better way to achieve this. Suggestions appreciated. Other attempts I have toyed around with overriding the constructor for the submodels: class CompileCommand(ShellCommand): def __init__(self, *args, **kwargs): kwargs.setdefault('command', "make") super(CompileCommand, self).__init__(*args, **kwargs) and this works when I try to create an object from the shell: >>> c = CompileCommand(name="xyz") >>> c.save() <CompileCommand: 123> >>> c.command 'make' However, this does not set the default value when the associated ModelForm is rendered, which unfortunately is what I'm trying to achieve. Update 2 (looks promising) I now have the following in forms.py which allow me to set Meta.default_initial_values without needing extra code in views. class ModelFormWithDefaults(forms.ModelForm): def __init__(self, *args, **kwargs): if hasattr(self.Meta, "default_initial_values"): kwargs.setdefault("initial", self.Meta.default_initial_values) super(ModelFormWithDefaults, self).__init__(*args, **kwargs) class TestCommandForm(ModelFormWithDefaults): class Meta: model = TestCommand default_initial_values = {"command":"make", "arguments":"test"}

    Read the article

  • Reflecting actionscript objects

    - by Chin
    Is it possible to reflect an object in actionscript and get the property names back in the order they are positioned in the class? I have tried the following var reflectionObject : Object = ObjectUtil.getClassInfo(obj); var propsArray : Array = reflectionObject.properties; (orders alphabetically) var typeInfo:XML = describeType(obj) (Not sure what order this is)

    Read the article

  • Multi table Triggers ms sql noob

    - by Chin
    I have a load of tables all with the same 2 datetime columns (lastModDate, dateAdded). I am wondering if I can set up global Insert Update trigger for these tables to set the datetime values. Or if not, what approaches are there? Any pointers much appreciated

    Read the article

  • Multi table Triggers SQL Server noob

    - by Chin
    I have a load of tables all with the same 2 datetime columns (lastModDate, dateAdded). I am wondering if I can set up global Insert Update trigger for these tables to set the datetime values. Or if not, what approaches are there? Any pointers much appreciated

    Read the article

  • Cannot debug in visual studio 2008

    - by Chin
    I recently reopened a project and on trying to debug the breakpoint only shows as a red circle and gives the following message "The breakpoint will not currently be hit. No symbols have been loaded for this document" I notice there are no PB files in the bin directory. I presume I need to rebuild the debug files. Does anybody know how to go about this? Any help much appreciated.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >