Search Results

Search found 3180 results on 128 pages for 'david sauter'.

Page 96/128 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • Create event for another owner using Facebook Graph API

    - by David
    Hi, I'm at the moment working on a web page where the users who visit it should have the possibility to create an event in my web page's name. There is a Page on Facebook for the web page which should be the owner of the user created event. Is this possible? All users are authenticated using Facebook Connect, but since the event won't be created in their name I don't know if that's so much of help. The Python SDK will be used since the event shall be implemented server side. / D

    Read the article

  • [Symfony] Admin generator and i18n

    - by David
    I have read lots of questions about i18n, but I haven't found any about performance. I have a simple backend app listing the contents of an ads table. These ads have a category, that is translated in some languages (it's defined as i18n in the Doctrine schema). So, when I add a "table_method" in my generator.yml to include de Category table, it reduces the number of queries, but there are yet some of them referencing i18n translation tables. So, if I add the category Translation table to the query, it reduces even more the queries BUT it increases the processing time considerably. Why this time penalty? Just because of the translation table? And why isn't the filter using this method to avoid so many translation queries as well? I mean, if I want to filter by category, it is making one query per category to include the translation table. Why??

    Read the article

  • GUID or int entity key with SQL Compact/EF4?

    - by David Veeneman
    This is a follow-up to an earlier question I posted on EF4 entity keys with SQL Compact. SQL Compact doesn't allow server-generated identity keys, so I am left with creating my own keys as objects are added to the ObjectContext. My first choice would be an integer key, and the previous answer linked to a blog post that shows an extension method that uses the Max operator with a selector expression to find the next available key: public static TResult NextId<TSource, TResult>(this ObjectSet<TSource> table, Expression<Func<TSource, TResult>> selector) where TSource : class { TResult lastId = table.Any() ? table.Max(selector) : default(TResult); if (lastId is int) { lastId = (TResult)(object)(((int)(object)lastId) + 1); } return lastId; } Here's my take on the extension method: It will work fine if the ObjectContext that I am working with has an unfiltered entity set. In that case, the ObjectContext will contain all rows from the data table, and I will get an accurate result. But if the entity set is the result of a query filter, the method will return the last entity key in the filtered entity set, which will not necessarily be the last key in the data table. So I think the extension method won't really work. At this point, the obvious solution seems to be to simply use a GUID as the entity key. That way, I only need to call Guid.NewGuid() method to set the ID property before I add a new entity to my ObjectContext. Here is my question: Is there a simple way of getting the last primary key in the data store from EF4 (without having to create a second ObjectContext for that purpose)? Any other reason not to take the easy way out and simply use a GUID? Thanks for your help.

    Read the article

  • parsing/matching string occurrence in C

    - by David
    I have the following string: const char *str = "\"This is just some random text\" 130 28194 \"Some other string\" \"String 3\"" I would like to get the the integer 28194 of course the integer varies, so I can't do strstr("20194"). So I was wondering what would be a good way to get that part of the string? I was thinking to use #include <regex.h> which I already have a procedure to match regexp's but not sure how the regexp in C will look like using the POSIX style notation. [:alpha:]+[:digit:] and if performance will be an issue. Or will it be better using strchr,strstr? Any ideas will be appreciate it

    Read the article

  • Visual C++ 2008 doesn't recognize Windows declared types

    - by David Thornley
    I have a program that doesn't seem to recognize declared types in the latest U3D software. There's a line typedef BOOL (WINAPI* GMI)(HMON, LPMONITORINFOEX); which gets the error: Error 1 error C2061: syntax error : identifier 'LPMONITORINFOEX' c:\Projects\U3D\Source\RTL\Platform\Common\Win32\IFXOSRender.cpp 28 and a line MONITORINFOEX miMon; which gets Error 5 error C2065: 'miMon' : undeclared identifier c:\Projects\U3D\Source\RTL\Platform\Common\Win32\IFXOSRender.cpp 49 Error 3 error C2065: 'MONITORINFOEX' : undeclared identifier c:\Projects\U3D\Source\RTL\Platform\Common\Win32\IFXOSRender.cpp 49 The program's first non-comment statement is #include <windows.h>, which includes winuser.h, which defines these identifiers. In Visual Studio, I can right-click on them and go to the definition (a typedef) and from the typedef to the struct. WINAPI is defined in WinDef.h, so that seems to be working. There are no redefinitions of LPMONITORINFOEX or MONITORINFOEX in any other file. So, how can this be happening, and what can I do about it?

    Read the article

  • How do I force jquery to center an element when it snaps to another container using the draggable method?

    - by David
    Here's my script. I want some square-shaped draggable objects (in this case just td boxes with numbers in them) to be able to snap to some empty table cells and snap to the center of those cells (empty td boxes), not the top or bottom of those cells, which is what is seems to do by default. <script type="text/javascript"> $(document).ready(function () { $(".inputs div").draggable( { snap: ".spaces" } ); }); </script>

    Read the article

  • Calling a javascript function from an aspx.cs code behind

    - by David Hodgson
    Hi, I would like to call a javascript function from an aspx control. For instance, suppose I had: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script type="text/javascript"> function test(x, y) { } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click"/> </div> </form> </body> </html> and in the code behind: protected void Button1_Click(object sender, EventArgs e) { // do stuff (really going to a database to fill x and y) int[] x = new int[] { 1, 2, 3, 4, 5 }; int[] y = new int[] { 1, 2, 3, 4, 5 }; // call javascript function as test(x,y); } Is there a way to do it? DUPLICATE:calling-a-javascript-function-at-the-end-of-button-click-code-behind

    Read the article

  • Why do .png backgrounds appear black on iPhone device but not simulator?

    - by David Rea
    I started with a .tiff file and used GraphicConverter to change it to a .png and set a transparency color. Worked fine in the simulator but when I pushed to the device the transparency color became black. Tested with a .png I downloaded from the net and that worked fine, so it seems to only happen with some files. Thus I suspect it has something to do with the way GraphicConverter writes the .pngs, but I don't know enough about file formats to debug it. Any ideas/suggestions? Ideally I'd like to programatically treat all .pngs because my app allowed dynamic loading of arbitrary files, so I can't verify the transparency beforehand.

    Read the article

  • Generate A Simple Read-Only DAL?

    - by David
    I've been looking around for a simple solution to this, trying my best to lean towards something like NHibernate, but so far everything I've found seems to be trying to solve a slightly different problem. Here's what I'm looking at in my current project: We have an IBM iSeries database as a primary repository for a third party software suite used for our core business (a financial institution). Part of what my team does is write applications that report on or key off of a lot of this data in some way. In the past, we've been manually creating ADO .NET connections (we're using .NET 3.5 and Visual Studio 2008, by the way) and manually writing queries, etc. Moving forward, I'd like to simplify the process of getting data from there for the development team. Rather than creating connections and queries and all that each time, I'd much rather a developer be able to simply do something like this: var something = (from t in TableName select t); And, ideally, they'd just get some IQueryable or IEnumerable of generated entities. This would be done inside a new domain core that I'm building where these entities would live and the applications would interface with it through a request/response service layer. A few things to note are: The entities that correspond to the database tables should be generated once and we'd prefer to manually keep them updated over time. That is, if columns/tables are added to the database then we shouldn't have to do anything. (If some are deleted, of course, it will break, but that's fine.) But if we need to use a new column, we should be able to just add it to the necessary class(es) without having to re-gen the whole thing. The whole thing should be SELECT-only. We're not doing a full DAL here because we don't want to be able to break anything in the database (even accidentally). We don't need any kind of mapping between our domain objects and the generated entity types. The domain barely covers a fraction of the data that's in there, most of it we'll never need, and we would rather just create re-usable maps manually over time. I already have a logical separation for the DAL where my "repository" classes return domain objects, I'm just looking for a better alternative to manual ADO to be used inside the repository classes. Any suggestions? It seems like what I'm doing is just enough outside the normal demand for DAL/ORM tools/tutorials online that I haven't been able to find anything. Or maybe I'm just overlooking something obvious?

    Read the article

  • database row/ record pointers

    - by David
    Hi I don't know the correct words for what I'm trying to find out about and as such having a hard time googling. I want to know whether its possible with databases (technology independent but would be interested to hear whether its possible with Oracle, MySQL and Postgres) to point to specific rows instead of executing my query again. So I might initially execute a query find some rows of interest and then wish to avoid searching for them again by having a list of pointers or some other metadata which indicates the location on a database which I can go to straight away the next time I want those results. I realise there is caching on databases, but I want to keep these "pointers" else where and as such caching doesn't ultimately solve this problem. Is this just an index and I store the index and look up by this? most of my current tables don't have indexes and I don't want the speed decrease that sometimes comes with indexes. So whats the magic term I've been trying to put into google? Cheers

    Read the article

  • Flex: Bottom-left align components?

    - by David Wolever
    As the title suggests, is there any way to bottom-left align components? An <HBox .../> nested in a <Canvas .../> doesn't work because the elements in the HBox are top-aligned instead of bottom aligned. For example, I'd like my components to be aligned like this: +-------------+ <-- container | components | | | V | | V +--+ | | +-+ | | | | +-+ +--+ | +-------------+

    Read the article

  • Entity Framework projections

    - by David McClelland
    We are investigating the Entity Framework to see if it will meet our particular needs. Here is the scenario I am interested in: I have a large table (let's call it VeryWideRecord) which has many columns, and it has a corresponding business object (it's also called VeryWideRecord). I would like to be able to query my database for a VeryWideRecord business object, but only have values for certain columns returned by the underlying SQL. Can I do this with the Entity Framework? I am uncertain as to whether this could be done with the Entity Framework's table splitting feature, because the application needs to be able (at runtime) to change the columns that are requested. The reason for this is that we are trying to minimize the amount of information that is going across the wire. I see how this could be done using NHibernate (example), but how can I do this with the Entity Framework?

    Read the article

  • Flash: Correctly handling click-and-drag outside the browser?

    - by David Wolever
    What's the correct way to detect, from Flash, when someone has started a drag within the browser (eg, a MOUSE_DOWN event), dragged the mouse outside the browser window, released the button, then moved the mouse back over the browser? For example (assuming StackOverflow was a Flash application): I've tried the "obvious" thing, checking event.buttonDown in the MOUSE_MOVE handler, but even though the mouse button is up, event.buttonDown is true in step 2 (above). So, is there any other way to check the "real" status of the mouse button? Or any other way to handle this situation?

    Read the article

  • How do I map a one-to-one value type association in an joined-subclass?

    - by David Rubin
    I've got a class hierarchy mapped using table-per-subclass, and it's been working out great: class BasicReport { ... } class SpecificReport : BasicReport { ... } With mappings: <class name="BasicReport" table="reports"> <id name="Id" column="id">...</id> <!-- some common properties --> </class> <joined-subclass name="SpecificReport" table="specificReports" extends="BasicReport"> <key column="id"/> <!-- some special properties --> </joined-subclass> So far, so good. The problem I'm struggling with is how to add a property to one of my subclasses that's both a value type for which I have an IUserType implemented and also mapped via an association: class OtherReport : BasicReport { public SpecialValue V { get; set; } } class SpecialValueUserType : IUserType { ... } What I'd like to do is: <joined-subclass name="OtherReport" table="otherReports" extends="BasicReport"> <key column="id"/> <join table="rptValues" fetch="join"> <key column="rptId"/> <property name="V" column="value" type="SpecialValueUserType"/> </join> </joined-subclass> This accurately reflects the intent, and the pre-existing database schema I'm tied to: the SpecialValue instance is a property of the OtherReport, but is stored in a separate table ("rptValues"). Unfortunately, it seems as though I can't do this, because <join> elements can't be used in <joined-subclass> mappings. <one-to-one> would require creating a class mapping for SpecialValue, which doesn't make any sense given that SpecialValue is just a meaningful scalar. So what can I do? Do I have any options? Right now I'm playing a game with sets: class OtherReport : BasicReport { public SpecialValue V { get { return _values.Count() > 0 ? _values.First() : null; } set { _values.Clear(); _values.Add(value); } } private ICollection<SpecialValue> _values; } With mapping: <joined-subclass name="OtherReport" table="otherReports" extends="BasicReport"> <key column="id"/> <set name="_values" access="field" table="rptValues" cascade="all-delete-orphan"> <key column="rptId" /> <element column="value" type="SpecialValueUserType"/> </set> </joined-subclass> Thanks in advance for the help! I've been banging my head into my desk for several days now.

    Read the article

  • Whats wrong with this method?

    - by David
    Here's the method: public static String CPUcolor () { System.out.println ("What color am I?") ; String s = getIns() ; System.out.println ("are you sure I'm "+s+"? (Y/N)") ; String a = getIns() ; while (!((a.equals ("y")) || (a.equals ("Y")) || (a.equals ("n")) || (a.equals ("N")))) { System.out.println ("try again") ; a = getIns () ; } if (a.equals ("n") || a.equals("N")) {CPUcolor() ;} System.out.println ("I am "+s) ; return s ; } here is a possible output of this method (y's and n's are user inputs): What color am I? red are you sure I'm red? (Y/N) N What color am I? blue are you sure I'm blue? (Y/N) N What color am I? Yellow are you sure I'm Yellow? (Y/N) y I am Yellow I am blue I am red Why is it that the line's "I am blue" and "I am Blue" printed? Why are they printed in reverse order with red, the first entered, printed last?

    Read the article

  • Why are these lines being skipped? (java)

    - by David
    Here's the relevant bit of the source code: class Dice { String name ; int x ; int[] sum ; ... public Dice (String name) { this.name = name ; this.x = 0 ; this.sum = new int[7] ; } ... public static void main (String[] arg) { Dice a1 = new Dice ("a1") ; printValues (a1) ; } public static void printDice (Dice Dice) { System.out.println (Dice.name) ; System.out.println ("value: "+Dice.x) ; printValues (Dice) ; } public static void printValues (Dice Dice) { for (int i = 0; i<Dice.sum.length; i++) System.out.println ("#of "+i+"'s: "+Dice.sum[i]) ; } } Here is the output: #of 0's: 0 #of 1's: 0 #of 2's: 0 #of 3's: 0 #of 4's: 0 #of 5's: 0 #of 6's: 0 Why didn't these two lines execute inside printDice: System.out.println (Dice.name) ; System.out.println ("value: "+Dice.x) ; if they had then i would expect to see "a1" and "Value: 0" printed at the top of the rows of #of's

    Read the article

  • Silverlight horizontal stretch and get position issue

    - by David
    I have a Grid (container) wich in turn has several grids(subContainers) arranged by rows. Each one of those "subContainers" has diferent columns and controls. And each of those "subContainers" has the horizontal alignment set to stretch, and it has to stay that way, since the layout this viewer depends on it. I use the "container" to set each control on it's adequate position. So far so good. Now comes my headache... I want to remove the control from the grid and put it in a canvas, at the same exact position, only, the position it returns is as if the control is set to the beggining of the grid and not it's true position. For testing purposes, I've set the "subContainters" horizontal alignment to center and (despite the layout is totally wrong) every control is in it's right position when sent to a canvas, wich it doesn't happen when HA = stretch. Here's the code I'm using to get position: GeneralTransform gt = nc.TransformToVisual(gridZoom); Point offset = gt.Transform(new Point()); So you can understand, for example, my first control should be somewhere like (80, 1090), but the point that I get is (3,3). Can anyone help me? Thanks

    Read the article

  • A simple question about type coercion in C++

    - by David
    Given a function prototype, and a type definition: int my_function(unsigned short x); typedef unsigned short blatherskite; Is the following situation defined by standard: int main(int argc, char** argv) { int result; blatherskite b; b=3; result = my_function(b); } Do I get type coercion predictably via the function prototype?

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >